/* =====================================================
   ExamPrep — Design System
   Custom palette: deep indigo + warm coral accent
   Typography: Heebo (Hebrew) + Inter (Latin)
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600;700;800;900&family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Brand palette - matched to ExamPrep logo (sky blue + deep navy) */
  --brand-50:  #eff6ff;
  --brand-100: #dbeafe;
  --brand-200: #bfdbfe;
  --brand-300: #93c5fd;
  --brand-400: #60a5fa;
  --brand-500: #3b82f6;
  --brand-600: #2563eb;
  --brand-700: #1d4ed8;
  --brand-800: #1e40af;
  --brand-900: #1e3a8a;
  --brand-950: #172554;

  /* Accent: a warmer sky for highlights (kept analogous to brand) */
  --accent-50:  #f0f9ff;
  --accent-100: #e0f2fe;
  --accent-200: #bae6fd;
  --accent-300: #7dd3fc;
  --accent-400: #38bdf8;
  --accent-500: #0ea5e9;
  --accent-600: #0284c7;
  --accent-700: #0369a1;
  --accent-800: #075985;
  --accent-900: #0c4a6e;

  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-50: #ecfdf5;

  --rose-500: #f43f5e;
  --rose-600: #e11d48;
  --rose-50: #fff1f2;

  --amber-500: #f59e0b;
  --amber-50: #fffbeb;

  /* Neutral */
  --gray-50:  #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --gray-950: #020617;

  --bg: #fafbff;
  --bg-elevated: #ffffff;
  --bg-soft: #f4f6ff;
  --bg-subtle: #f8fafc;
  --card-bg: #ffffff;
  --text: var(--gray-900);
  --text-1: var(--gray-900);
  --text-muted: var(--gray-500);
  --text-soft: var(--gray-600);
  --border: var(--gray-200);
  --border-soft: var(--gray-100);

  --primary: var(--brand-600);
  --primary-rgb: 37, 99, 235;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .04), 0 1px 2px rgba(15, 23, 42, .03);
  --shadow:    0 4px 14px rgba(15, 23, 42, .06), 0 2px 4px rgba(15, 23, 42, .03);
  --shadow-md: 0 12px 32px rgba(30, 58, 138, .10), 0 4px 12px rgba(15, 23, 42, .04);
  --shadow-lg: 0 24px 60px rgba(30, 58, 138, .14), 0 8px 20px rgba(15, 23, 42, .06);
  --shadow-glow: 0 0 0 4px rgba(59, 130, 246, .15);

  --gradient-brand: linear-gradient(135deg, var(--brand-900) 0%, var(--brand-600) 60%, var(--brand-400) 100%);
  --gradient-soft: linear-gradient(135deg, var(--brand-50) 0%, #fff 60%, var(--accent-50) 100%);
  --gradient-text: linear-gradient(135deg, var(--brand-900) 0%, var(--brand-600) 50%, var(--brand-400) 100%);

  --transition: 220ms cubic-bezier(.4, 0, .2, 1);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: 'Rubik', 'Inter', -apple-system, 'Segoe UI', system-ui, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "calt", "ss01";
  letter-spacing: -.005em;
}
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; line-height: 1.08; letter-spacing: -.028em; }
h1 { font-weight: 800; letter-spacing: -.035em; line-height: 1.02; }
h2 { font-weight: 700; letter-spacing: -.028em; line-height: 1.08; }
h3 { font-weight: 700; letter-spacing: -.022em; line-height: 1.18; }
p { margin: 0; }
a { color: var(--brand-600); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brand-700); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }
img { max-width: 100%; display: block; }
code { font-family: 'JetBrains Mono', 'SF Mono', Monaco, monospace; font-size: .92em; }

/* ===== Utility ===== */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }
.muted { color: var(--text-muted); }
.row { display: flex; gap: 12px; align-items: center; }

/* ===== Buttons (refined, professional) ===== */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px; border-radius: 11px;
  font-family: inherit;
  font-weight: 600; font-size: 14.5px; line-height: 1;
  letter-spacing: -.012em;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 220ms cubic-bezier(.4,0,.2,1), transform 160ms ease;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  border-color: #1e40af;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .18) inset,
    0 -1px 0 rgba(0, 0, 0, .08) inset,
    0 1px 2px rgba(15, 23, 42, .08),
    0 4px 12px -4px rgba(29, 78, 216, .45);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #1d4ed8 0%, #1e3a8a 100%);
  border-color: #1e3a8a;
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .2) inset,
    0 -1px 0 rgba(0, 0, 0, .1) inset,
    0 2px 4px rgba(15, 23, 42, .1),
    0 8px 20px -6px rgba(29, 78, 216, .55);
  transform: translateY(-1px);
}
.btn-primary:active {
  background: linear-gradient(180deg, #1e3a8a 0%, #172554 100%);
  transform: translateY(0);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .12) inset,
    0 1px 2px rgba(15, 23, 42, .12);
}
.btn-ghost {
  background: #fff;
  color: var(--gray-800);
  border-color: var(--gray-200);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.btn-ghost:hover { background: var(--gray-50); border-color: var(--gray-300); color: var(--gray-900); box-shadow: 0 2px 6px rgba(15, 23, 42, .06); }
.btn-soft { background: var(--brand-50); color: var(--brand-800); border-color: transparent; }
.btn-soft:hover { background: var(--brand-100); color: var(--brand-900); }
.btn-warn {
  background: linear-gradient(180deg, #0ea5e9 0%, #0284c7 100%);
  color: #fff;
  border-color: #0369a1;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 4px 12px -4px rgba(14, 165, 233, .45);
}
.btn-warn:hover { background: linear-gradient(180deg, #0284c7 0%, #075985 100%); color: #fff; }
.btn-danger {
  background: linear-gradient(180deg, #f43f5e 0%, #e11d48 100%);
  color: #fff;
  border-color: #be123c;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 4px 12px -4px rgba(244, 63, 94, .45);
}
.btn-danger:hover { background: linear-gradient(180deg, #e11d48 0%, #be123c 100%); color: #fff; }
.btn-success {
  background: linear-gradient(180deg, var(--brand-500) 0%, var(--brand-700) 100%);
  color: #fff;
  border-color: var(--brand-800);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 4px 12px -4px rgba(29, 78, 216, .45);
}
.btn-success:hover { background: linear-gradient(180deg, var(--brand-600) 0%, var(--brand-800) 100%); color: #fff; }
.btn-lg { padding: 17px 30px; font-size: 15.5px; border-radius: 13px; gap: 11px; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; box-shadow: 0 1px 2px rgba(15, 23, 42, .04) !important; }
.btn:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }

/* Inline icon helpers (for SVG icons that replaced emojis) */
.icon-inline {
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  vertical-align: -.18em;
  margin-inline-end: .35em;
  flex-shrink: 0;
}
.btn-icon {
  width: 16px; height: 16px;
  flex-shrink: 0;
  display: inline-block;
}
.btn-lg .btn-icon { width: 18px; height: 18px; }
.btn-sm .btn-icon { width: 14px; height: 14px; }
/* Branded blue check badge — used for "trust" rows on light + dark backgrounds */
.trust-check {
  width: 22px; height: 22px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--brand-500) 0%, var(--brand-700) 100%);
  padding: 5px;
  box-sizing: border-box;
  color: #fff;          /* drives currentColor stroke on inner polyline */
  overflow: visible;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .35) inset,
    0 -1px 0 rgba(0, 0, 0, .15) inset,
    0 1px 2px rgba(29, 78, 216, .25),
    0 4px 10px -4px rgba(29, 78, 216, .45);
}
.trust-check polyline,
.trust-check path { stroke: #fff; stroke-width: 3.5; }
/* Pricing list checks — slightly larger so they read clearly */
.paywall-features .trust-check { width: 22px; height: 22px; }
/* On dark CTA background use a glassy white pill */
.cta-trust .trust-check {
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .4);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 2px 6px rgba(0, 0, 0, .12);
}
.cta-trust .trust-check polyline { stroke: #fff; }
.point-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  color: var(--brand-600);
  display: inline-block;
}
.heart-icon {
  width: 14px; height: 14px;
  vertical-align: -.18em;
  color: #ef4444;
  display: inline-block;
  margin: 0 .15em;
}
.h-icon {
  width: 22px; height: 22px;
  flex-shrink: 0;
  color: var(--brand-600);
  display: inline-block;
  vertical-align: -.22em;
  margin-inline-end: .45em;
}

/* ===================== LANDING ===================== */

.landing { min-height: 100vh; }

/* ===== Navbar ===== */
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-soft);
}
.navbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; color: var(--gray-900); }
.logo:hover { color: var(--gray-900); }
.logo-img { height: 38px; width: auto; display: block; }
.logo-img-sm { height: 30px; }
.logo-img-dark {
  /* Show the logo on dark backgrounds with a soft white-glow background */
  background: #fff;
  padding: 8px 14px;
  border-radius: 12px;
  height: 44px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}
.logo-icon {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--gradient-brand);
  display: grid; place-items: center;
  color: #fff; font-size: 20px; font-weight: 900;
  box-shadow: var(--shadow-md);
}
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { color: var(--gray-700); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--brand-600); }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.hamburger { display: none; font-size: 24px; padding: 6px 10px; border-radius: 8px; color: var(--gray-700); }
.nav-mobile-cta { display: none; }

@media (max-width: 920px) {
  .nav-links, .nav-cta { display: none; }
  .nav-mobile-cta {
    display: flex; align-items: center; gap: 10px;
  }
  .nav-mobile-cta .hamburger { display: block; }
  .navbar.open .nav-links { display: flex; flex-direction: column; position: absolute; top: 70px; right: 0; left: 0; background: #fff; padding: 20px 24px; gap: 14px; box-shadow: var(--shadow-lg); border-bottom: 1px solid var(--border); }
}

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden;
  padding: 80px 0 100px;
  background: var(--gradient-soft);
}
.hero::before, .hero::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(80px); opacity: .35;
  pointer-events: none;
}
.hero::before { width: 480px; height: 480px; background: var(--brand-300); top: -120px; left: -120px; }
.hero::after  { width: 420px; height: 420px; background: var(--accent-300); bottom: -150px; right: -100px; }
.hero-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center;
}
.hero-text .badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px 8px 12px; border-radius: 100px;
  background: #fff; border: 1px solid var(--brand-100);
  color: var(--brand-800); font-size: 12.5px; font-weight: 600;
  margin-bottom: 24px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 4px 12px -4px rgba(29, 78, 216, .15);
  letter-spacing: -.005em;
}
.hero-text .badge .icon-inline {
  width: 18px; height: 18px; margin: 0; color: #fff;
  background: linear-gradient(180deg, var(--brand-500), var(--brand-700));
  padding: 4px;
  border-radius: 50%;
  box-sizing: border-box;
  flex-shrink: 0;
}
.hero h1 {
  font-size: clamp(38px, 5.6vw, 64px);
  font-weight: 800;
  line-height: 1.0;
  margin-bottom: 24px;
  letter-spacing: -.04em;
  color: var(--gray-950);
}
.hero h1 .grad { background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 18px; color: var(--gray-600); margin-bottom: 32px; max-width: 560px; line-height: 1.65; font-weight: 400; }
.hero-ctas { display: flex; gap: 14px; margin-bottom: 28px; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 22px; flex-wrap: wrap; color: var(--gray-600); font-size: 13.5px; font-weight: 500; letter-spacing: -.005em; }
.hero-trust span { display: inline-flex; align-items: center; gap: 9px; }

/* Hero visual */
.hero-visual { position: relative; }
.hero-image {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, .6);
  transform: rotate(-1deg);
  transition: transform var(--transition);
}
.hero-image:hover { transform: rotate(0deg) scale(1.01); }

.hero-mock {
  background: #fff; border-radius: var(--radius-xl); padding: 24px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border-soft);
  position: relative;
  transform: rotate(-1.5deg);
  transition: transform var(--transition);
}
.hero-mock:hover { transform: rotate(0deg) scale(1.02); }
.hero-mock-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 18px;
  padding-bottom: 16px; border-bottom: 1px solid var(--border-soft);
}
.hero-mock-header .dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.hero-mock-title { margin-right: auto; font-size: 13px; color: var(--text-muted); font-weight: 600; }
.hero-mock-q { font-size: 16px; font-weight: 600; margin-bottom: 14px; color: var(--gray-800); line-height: 1.5; }
.hero-mock-code {
  background: var(--gray-900); color: #e2e8f0; padding: 14px 16px;
  border-radius: 10px; font-family: 'JetBrains Mono', monospace; font-size: 13px;
  margin-bottom: 18px; direction: ltr; text-align: left; line-height: 1.6;
}
.hero-mock-opts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.hero-mock-opt {
  padding: 12px 16px; background: var(--gray-50); border-radius: 12px;
  border: 1.5px solid transparent; font-size: 14px; font-weight: 500; color: var(--gray-700);
}
.hero-mock-opt.correct { background: var(--emerald-50); border-color: var(--emerald-500); color: var(--emerald-600); font-weight: 600; }
.hero-mock-opt.wrong { background: var(--rose-50); border-color: var(--rose-500); color: var(--rose-600); text-decoration: line-through; }
.hero-mock-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; border-top: 1px solid var(--border-soft); font-size: 13px; color: var(--text-muted); }
.hero-mock-progress { font-weight: 600; color: var(--brand-600); }

@media (max-width: 920px) {
  .hero { padding: 50px 0 60px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-mock { transform: none; }
}

/* ===== Sections base ===== */
.section { padding: 90px 0; }
.section-eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand-600); margin-bottom: 14px;
  padding: 6px 14px;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: 100px;
}
.section > .container > .section-eyebrow,
.section .container > .section-eyebrow { display: block; width: fit-content; margin-inline: auto; }
.section-title {
  text-align: center;
  font-size: clamp(30px, 4.2vw, 46px);
  margin-bottom: 16px;
  letter-spacing: -.035em;
  font-weight: 800;
  line-height: 1.05;
  color: var(--gray-950);
}
.section-sub { text-align: center; font-size: 17.5px; color: var(--gray-600); max-width: 680px; margin: 0 auto 60px; line-height: 1.65; font-weight: 400; }

/* ===== Features ===== */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.feature-card {
  background: #fff; border-radius: var(--radius-lg); padding: 32px 28px;
  border: 1px solid var(--border-soft); box-shadow: var(--shadow-sm);
  transition: all var(--transition); position: relative; overflow: hidden;
}
.feature-card::before {
  content: ''; position: absolute; top: 0; right: 0; left: 0; height: 4px;
  background: var(--gradient-brand); opacity: 0; transition: opacity var(--transition);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--brand-200); }
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--brand-50); color: var(--brand-600);
  display: grid; place-items: center; font-size: 26px; margin-bottom: 18px;
  transition: all var(--transition);
}
.feature-card:hover .feature-icon { background: var(--gradient-brand); color: #fff; transform: scale(1.05); }
.feature-card h3 { font-size: 20px; margin-bottom: 10px; color: var(--gray-900); }
.feature-card p { color: var(--text-soft); line-height: 1.7; font-size: 15px; }

@media (max-width: 920px) {
  .features-grid { grid-template-columns: 1fr; }
}

/* ===== Showcase (alternating image+text) ===== */
.showcase { padding: 90px 0; position: relative; }
.showcase.reverse { background: var(--bg-soft); }
.showcase-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center;
}
.showcase.reverse .showcase-grid { grid-template-columns: .95fr 1.05fr; }
.showcase.reverse .showcase-visual { order: -1; }
.showcase-text .section-eyebrow { display: inline-block; margin-inline: 0; }
.showcase-text h2 {
  font-size: clamp(28px, 4vw, 44px); margin-bottom: 18px; line-height: 1.05;
  letter-spacing: -.038em;
  font-weight: 800;
  color: var(--gray-950);
}
.showcase-text p { font-size: 16.5px; color: var(--gray-600); line-height: 1.7; margin-bottom: 22px; font-weight: 400; }
.showcase-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.showcase-points li {
  font-size: 15px; color: var(--gray-800); font-weight: 500;
  display: flex; align-items: center; gap: 12px;
  line-height: 1.5;
}
.showcase-points .point-icon {
  background: linear-gradient(180deg, var(--brand-500), var(--brand-700));
  border-radius: 50%;
  padding: 7px;
  width: 28px; height: 28px;
  box-sizing: border-box;
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .25) inset,
    0 1px 2px rgba(29, 78, 216, .25),
    0 4px 10px -4px rgba(29, 78, 216, .35);
}
.showcase-visual img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-soft);
}
@media (max-width: 920px) {
  .showcase { padding: 60px 0; }
  .showcase-grid, .showcase.reverse .showcase-grid { grid-template-columns: 1fr; gap: 40px; }
  .showcase.reverse .showcase-visual { order: 0; }
}

/* ===== How it works ===== */
.how { background: #fff; }
.how-image-wrap {
  display: flex; justify-content: center; align-items: center;
  padding: 20px 0;
}
.how-image {
  max-width: 720px; width: 100%; height: auto; display: block;
  border-radius: var(--radius-xl);
  /* Soft glow */
  filter: drop-shadow(0 24px 60px rgba(30, 58, 138, .12));
}
.how-steps {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; align-items: start;
  position: relative;
}
.how-step {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  position: relative;
}
.how-step-circle {
  width: 88px; height: 88px; border-radius: 50%;
  background: #fff; border: 3px solid var(--brand-200);
  display: grid; place-items: center; font-size: 32px;
  color: var(--brand-600); margin-bottom: 18px;
  position: relative; z-index: 2; transition: all var(--transition);
  box-shadow: var(--shadow);
}
.how-step:hover .how-step-circle { transform: scale(1.05); border-color: var(--brand-500); background: var(--brand-50); }
.how-step-num {
  position: absolute; top: -8px; right: -8px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--gradient-brand); color: #fff;
  font-size: 14px; font-weight: 700;
  display: grid; place-items: center;
  box-shadow: var(--shadow);
}
.how-step h4 { font-size: 17px; margin-bottom: 6px; color: var(--gray-900); }
.how-step p { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.how-step::after {
  content: ''; position: absolute;
  top: 44px; height: 2px; background: var(--brand-100);
  width: calc(100% - 50px); right: calc(-50% + 25px);
  z-index: 1;
}
.how-step:last-child::after { display: none; }
@media (max-width: 920px) {
  .how-steps { grid-template-columns: 1fr; }
  .how-step::after { display: none; }
}

/* ===== Stats strip ===== */
.stats-strip {
  background: var(--bg-soft);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  padding: 40px 0;
}
.stats-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.stat-item {
  display: flex; flex-direction: column; align-items: center;
  flex: 1; min-width: 140px;
  padding: 16px 24px;
  text-align: center;
}
.stat-number {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 800;
  line-height: 1;
  background: var(--gradient-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 14px;
  color: var(--gray-600);
  font-weight: 500;
}
.stat-divider {
  width: 1px; height: 56px;
  background: var(--border-soft);
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .stats-strip { display: none; }
}

/* ===== Benefit cards ===== */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.benefit-card {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  display: flex; flex-direction: column; gap: 14px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.benefit-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.benefit-card h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
}
.benefit-card p {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.65;
  margin: 0;
}
@media (max-width: 920px) {
  .benefits-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .benefit-card { padding: 24px 20px; }
  .benefit-card h3 { font-size: 17px; }
}

/* ===== Steps (new 3-step how it works) ===== */
.steps-grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-top: 48px;
  flex-wrap: wrap;
}
.step-item {
  flex: 1; min-width: 180px; max-width: 280px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: 0 16px;
}
.step-number {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff; font-size: 22px; font-weight: 800;
  display: grid; place-items: center;
  margin-bottom: 18px;
  box-shadow: 0 4px 16px rgba(59, 130, 246, .3);
  flex-shrink: 0;
}
.step-title {
  font-size: 18px; font-weight: 700;
  color: var(--gray-900); margin-bottom: 8px;
}
.step-desc {
  font-size: 14px; color: var(--gray-600);
  line-height: 1.6; margin: 0;
}
.step-arrow {
  color: var(--brand-300);
  padding: 0 8px;
  margin-top: 16px;
  flex-shrink: 0;
}
.how-cta {
  text-align: center;
  margin-top: 48px;
}
@media (max-width: 768px) {
  .steps-grid { flex-direction: column; align-items: center; gap: 8px; }
  .step-arrow { transform: rotate(90deg); }
  .step-item { max-width: 320px; }
}

/* ===== Testimonials (WhatsApp style — original take, not copied) ===== */
.testimonials {
  background: linear-gradient(180deg, var(--bg-soft) 0%, #fff 100%);
}
.tg-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%23dee4ff' fill-opacity='.4'%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Ccircle cx='40' cy='40' r='2'/%3E%3Ccircle cx='70' cy='10' r='2'/%3E%3Ccircle cx='25' cy='65' r='2'/%3E%3Ccircle cx='60' cy='65' r='2'/%3E%3C/g%3E%3C/svg%3E");
  padding: 28px; border-radius: var(--radius-xl);
  border: 1px solid var(--border-soft);
}
.tg-col { display: flex; flex-direction: column; gap: 16px; }
.bubble {
  background: #fff; padding: 14px 18px; border-radius: 18px;
  box-shadow: var(--shadow-sm); position: relative;
  font-size: 14px; line-height: 1.6; color: var(--gray-800);
  max-width: 360px;
}
.bubble.right {
  background: #dcf6dc; margin-right: 0; margin-left: auto;
  border-bottom-right-radius: 4px;
}
.bubble.right::after {
  content: ''; position: absolute; bottom: 0; right: -7px;
  width: 0; height: 0;
  border-top: 8px solid #dcf6dc; border-left: 8px solid transparent;
}
.bubble.left {
  background: #fff; margin-left: 0; margin-right: auto;
  border-bottom-left-radius: 4px;
}
.bubble.left::after {
  content: ''; position: absolute; bottom: 0; left: -7px;
  width: 0; height: 0;
  border-top: 8px solid #fff; border-right: 8px solid transparent;
}
.bubble-time {
  font-size: 11px; color: var(--text-muted); margin-top: 6px;
  text-align: left; direction: ltr;
}
.bubble-name { font-size: 12px; font-weight: 700; color: var(--brand-700); margin-bottom: 4px; }

@media (max-width: 920px) {
  .tg-grid { grid-template-columns: 1fr; }
}

/* ===== Pricing ===== */
.pricing-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.price-card {
  background: #fff; border-radius: var(--radius-lg); padding: 32px 26px;
  border: 1.5px solid var(--border-soft); position: relative;
  transition: all var(--transition);
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.price-card.featured {
  border-color: var(--brand-500);
  background: linear-gradient(180deg, #fff 0%, var(--brand-50) 100%);
  box-shadow: var(--shadow-md);
}
.price-card.featured::before {
  content: 'הכי פופולרי'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--gradient-brand); color: #fff; font-size: 12px; font-weight: 700;
  padding: 6px 14px; border-radius: 100px; box-shadow: var(--shadow);
}
.price-card.education {
  border-color: var(--accent-300);
  background: linear-gradient(180deg, #fff 0%, var(--accent-50) 100%);
}
.price-card.education::before {
  content: 'למוסדות'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent-600), var(--accent-500)); color: #fff; font-size: 12px; font-weight: 700;
  padding: 6px 14px; border-radius: 100px; box-shadow: var(--shadow);
}
.price-name { font-size: 14px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px; }
.price-amount { font-size: 42px; font-weight: 900; color: var(--gray-900); display: flex; align-items: baseline; gap: 4px; line-height: 1; margin-bottom: 4px; }
.price-amount .currency { font-size: 22px; color: var(--text-muted); font-weight: 700; }
.price-amount .period { font-size: 14px; color: var(--text-muted); font-weight: 600; }
.price-desc { color: var(--text-soft); font-size: 14px; margin-bottom: 22px; min-height: 42px; }
.price-features { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 12px; }
.price-features li { font-size: 14px; color: var(--gray-700); display: flex; align-items: flex-start; gap: 8px; line-height: 1.5; }
.price-features li::before { content: '✓'; color: var(--emerald-500); font-weight: 800; flex-shrink: 0; }
.price-features li.no::before { content: '✕'; color: var(--gray-400); }
.price-features li.no { color: var(--text-muted); }
.price-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  font-size: 12px; font-weight: 700; padding: 6px 14px;
  border-radius: 100px; box-shadow: var(--shadow); color: #fff; white-space: nowrap;
}
.price-badge.trial-badge { background: linear-gradient(135deg, var(--emerald-500), #059669); }
.price-badge.popular-badge { background: var(--gradient-brand); }
/* Hide the old ::before pseudo-badge on featured since we use .price-badge now */
.price-card.featured::before { display: none; }

/* ===== Trial banner ===== */
.trial-banner {
  background: linear-gradient(135deg, var(--brand-50) 0%, var(--emerald-50) 100%);
  border: 1px solid var(--brand-200);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin-bottom: 20px;
}
.trial-banner.warning {
  background: linear-gradient(135deg, var(--amber-50) 0%, #fef3c7 100%);
  border-color: var(--amber-300);
}
.trial-banner.urgent {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-color: var(--rose-300);
}
.trial-banner-content {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.trial-banner-text {
  font-size: 14px; color: var(--gray-700); flex: 1; min-width: 180px;
}
.trial-banner-text strong { color: var(--gray-900); }
.trial-banner-bar {
  width: 120px; height: 6px; background: var(--gray-200);
  border-radius: 100px; overflow: hidden; flex-shrink: 0;
}
.trial-banner-fill {
  height: 100%; background: var(--brand-500); border-radius: 100px;
  transition: width .3s ease;
}
.trial-banner.warning .trial-banner-fill { background: var(--amber-500); }
.trial-banner.urgent .trial-banner-fill { background: var(--rose-500); }
.trial-banner-cta { flex-shrink: 0; }

/* ===== Paywall modal ===== */
.paywall-modal { max-width: 420px; text-align: center; }
.paywall-modal h2 { margin-bottom: 8px; }
.paywall-plan-highlight {
  background: var(--brand-50); border: 1px solid var(--brand-200);
  border-radius: var(--radius); padding: 20px; margin: 20px 0;
  text-align: right;
}
.paywall-plan-highlight .price-name { margin-bottom: 4px; }
.paywall-plan-highlight .price-amount { font-size: 28px; margin-bottom: 12px; }
.paywall-plan-highlight .price-features { margin-bottom: 0; }

@media (max-width: 1180px) {
  .pricing-grid { gap: 16px; }
  .price-card { padding: 28px 22px; }
}
@media (max-width: 1080px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .price-card { padding: 32px 26px; }
}
@media (max-width: 600px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

/* ===== FAQ ===== */
.faq { background: #fff; }
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--bg-soft); border-radius: var(--radius);
  border: 1px solid var(--border-soft); overflow: hidden;
}
.faq-q {
  width: 100%; padding: 20px 24px; text-align: right;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-weight: 600; font-size: 16px; color: var(--gray-900); cursor: pointer;
  background: transparent; transition: background var(--transition);
}
.faq-q:hover { background: var(--brand-50); }
.faq-q .arrow { transition: transform var(--transition); color: var(--brand-600); font-size: 20px; }
.faq-item.open .faq-q .arrow { transform: rotate(180deg); }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height 350ms cubic-bezier(.4, 0, .2, 1);
}
.faq-item.open .faq-a { max-height: 400px; }
.faq-a-inner { padding: 0 24px 20px; color: var(--text-soft); line-height: 1.7; }

/* ===== Final CTA ===== */
.final-cta {
  background: var(--gradient-brand); color: #fff;
  text-align: center; padding: 80px 0;
  position: relative; overflow: hidden;
}
.final-cta::before, .final-cta::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(120px); pointer-events: none;
}
.final-cta::before { width: 400px; height: 400px; background: rgba(255, 255, 255, .15); top: -150px; left: 10%; }
.final-cta::after  { width: 300px; height: 300px; background: var(--accent-400); bottom: -100px; right: 15%; opacity: .4; }
.final-cta .container { position: relative; z-index: 2; }
.final-cta h2 { font-size: clamp(32px, 4.4vw, 48px); margin-bottom: 16px; letter-spacing: -.04em; font-weight: 800; line-height: 1.05; }
.final-cta p { font-size: 17px; opacity: .9; max-width: 540px; margin: 0 auto 30px; line-height: 1.6; font-weight: 400; }
.final-cta .btn-primary {
  background: #fff; color: var(--brand-800);
  border-color: rgba(255, 255, 255, .9);
  font-weight: 700; font-size: 16px; padding: 17px 36px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 6px 24px -6px rgba(0, 0, 0, .25);
}
.final-cta .btn-primary:hover {
  background: #fff;
  color: var(--brand-900);
  border-color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 10px 32px -8px rgba(0, 0, 0, .35);
  transform: translateY(-1px);
}
.final-cta .btn-primary:active { transform: translateY(0); }
.cta-trust { display: flex; gap: 32px; justify-content: center; margin-top: 26px; flex-wrap: wrap; font-size: 14px; opacity: .92; font-weight: 500; }
.cta-trust span { display: inline-flex; align-items: center; gap: 8px; }
.cta-trust .trust-check { color: rgba(255, 255, 255, .95); }

/* ===== Contact Section ===== */
.contact-section { background: var(--bg-subtle); }
.contact-form {
  max-width: 580px; margin: 0 auto;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 20px; padding: 40px 36px;
  box-shadow: 0 4px 24px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
}
.contact-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Floating label fields */
.cf-float {
  position: relative; margin-bottom: 18px;
}
.cf-float input,
.cf-float select,
.cf-float textarea {
  width: 100%; padding: 20px 16px 8px; border: 1.5px solid var(--border); border-radius: 12px;
  font-size: 15px; background: var(--bg); color: var(--text-1);
  font-family: inherit; transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
  -webkit-appearance: none; appearance: none;
}
.cf-float label {
  position: absolute; top: 50%; right: 16px; transform: translateY(-50%);
  font-size: 15px; color: var(--text-muted); pointer-events: none;
  transition: all .2s cubic-bezier(.4,0,.2,1);
  background: transparent; padding: 0 2px;
}
.cf-float textarea ~ label { top: 20px; transform: none; }

/* Float up when focused or has content */
.cf-float input:focus ~ label,
.cf-float input:not(:placeholder-shown) ~ label,
.cf-float select:focus ~ label,
.cf-float select:valid ~ label,
.cf-float textarea:focus ~ label,
.cf-float textarea:not(:placeholder-shown) ~ label {
  top: 6px; transform: none;
  font-size: 11px; font-weight: 600; color: var(--primary);
  background: var(--bg); padding: 0 4px; border-radius: 2px;
}
.cf-float input:focus,
.cf-float select:focus,
.cf-float textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 99,102,241), .12);
}
.cf-float textarea { resize: vertical; min-height: 130px; }

/* Select arrow */
.cf-select { position: relative; }
.cf-select::after {
  content: ''; position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 0; height: 0; border-right: 5px solid transparent; border-left: 5px solid transparent;
  border-top: 6px solid var(--text-muted); pointer-events: none;
}
.cf-select select { padding-left: 40px; cursor: pointer; }
/* Force label up when a real option is selected (not the empty placeholder) */
.cf-select select:valid ~ label,
.cf-select select.has-value ~ label { top: 6px; transform: none; font-size: 11px; font-weight: 600; color: var(--primary); background: var(--bg); padding: 0 4px; }

.contact-submit {
  width: 100%; margin-top: 6px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 16px; padding: 16px 24px; border-radius: 14px;
}
.contact-submit .btn-icon { width: 20px; height: 20px; }
.contact-alt {
  text-align: center; margin-top: 16px; font-size: 13px; color: var(--text-muted);
}
.contact-alt a { color: var(--primary); font-weight: 600; text-decoration: none; }
.contact-alt a:hover { text-decoration: underline; }
.contact-success[hidden] { display: none !important; }
.contact-success {
  display: flex; align-items: center; gap: 10px; margin-top: 16px;
  padding: 14px 18px; border-radius: 12px;
  background: var(--green-50, #ecfdf5); border: 1px solid var(--green-200, #a7f3d0);
  color: var(--green-700, #047857); font-weight: 500; font-size: 15px;
}
.contact-success svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--green-500, #10b981); }
[data-theme="dark"] .contact-success { background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.25); color: #6ee7b7; }
@media (max-width: 640px) {
  .contact-form { padding: 28px 20px; border-radius: 16px; }
  .contact-form-row { grid-template-columns: 1fr; }
}

/* ===== Footer ===== */
.footer { background: var(--gray-950); color: var(--gray-400); padding: 60px 0 30px; }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .logo { color: #fff; }
.footer-brand p { margin-top: 14px; font-size: 14px; line-height: 1.6; max-width: 320px; }
.footer h5 { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .08em; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { color: var(--gray-400); font-size: 14px; }
.footer ul a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid var(--gray-800); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  font-size: 13px;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== PWA Install Section (mobile only) ===== */
@media (min-width: 769px) { .pwa-section { display: none !important; } }
.pwa-section[hidden] { display: none !important; }

.pwa-tabs {
  display: flex; justify-content: center; gap: 0; margin-bottom: 32px;
  background: var(--bg-subtle); border-radius: 14px; padding: 4px;
  max-width: 300px; margin-left: auto; margin-right: auto;
  border: 1px solid var(--border);
}
.pwa-tab {
  flex: 1; padding: 10px 16px; border-radius: 11px; font-size: 14px; font-weight: 600;
  border: none; background: transparent; color: var(--text-muted);
  cursor: pointer; transition: all .2s;
}
.pwa-tab.is-active {
  background: var(--primary); color: #fff;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb,99,102,241),.3);
}

/* Steps list */
.pwa-guide-list {
  max-width: 400px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 0;
}
.pwa-guide-list[hidden] { display: none !important; }

.pwa-step {
  display: flex; gap: 16px; align-items: flex-start; padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.pwa-step:last-child { border-bottom: none; }

.pwa-step-number {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--primary); color: #fff;
  font-size: 16px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb,99,102,241),.25);
}
.pwa-step-number.done {
  background: #10b981;
  box-shadow: 0 2px 8px rgba(16,185,129,.25);
}

.pwa-step-info { flex: 1; }
.pwa-step-info strong {
  display: block; font-size: 16px; color: var(--text-1); margin-bottom: 4px;
}
.pwa-step-info p {
  font-size: 14px; color: var(--text-muted); margin: 0; line-height: 1.5;
}
.pwa-step-icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background: rgba(var(--primary-rgb,99,102,241),.08);
  border: 1.5px solid rgba(var(--primary-rgb,99,102,241),.15);
  display: flex; align-items: center; justify-content: center;
}
.pwa-step-icon.green {
  background: rgba(16,185,129,.08);
  border-color: rgba(16,185,129,.15);
}

/* ===== PWA Phone Mockups ===== */
.pwa-mockup {
  display: flex; flex-direction: column; align-items: center;
  margin: 8px auto 20px; gap: 8px;
}
.mockup-frame {
  width: 160px; border-radius: 24px;
  background: #1a1a2e; padding: 8px 6px 6px;
  box-shadow: 0 8px 30px rgba(0,0,0,.18), 0 2px 6px rgba(0,0,0,.1);
  position: relative;
}
.android-frame { border-radius: 18px; padding: 6px; }
.mockup-notch {
  width: 50px; height: 6px; border-radius: 4px;
  background: #333; margin: 0 auto 6px;
}
.mockup-screen {
  background: #fff; border-radius: 16px; overflow: hidden;
  min-height: 200px; display: flex; flex-direction: column;
}
.android-frame .mockup-screen { border-radius: 12px; }
.mockup-home-bar {
  width: 42px; height: 4px; border-radius: 3px;
  background: #555; margin: 6px auto 2px;
}

/* Safari URL bar */
.mockup-safari-url {
  background: #f2f2f7; padding: 5px 10px; text-align: center;
  font-size: 8px; color: #666; border-bottom: 1px solid #e5e5ea;
  font-family: -apple-system, sans-serif;
}

/* Safari bottom bar */
.mockup-safari-bar {
  display: flex; justify-content: space-around; align-items: center;
  padding: 6px 8px; border-top: 1px solid #e5e5ea; background: #f9f9f9;
}
.mockup-safari-icon { display: flex; align-items: center; justify-content: center; }
.mockup-safari-icon.highlight-share {
  background: rgba(0,122,255,.12); border-radius: 8px; padding: 3px;
  animation: pwa-pulse 2s ease-in-out infinite;
}

/* Chrome bar */
.mockup-chrome-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px; background: #f1f3f4; border-bottom: 1px solid #ddd;
}
.mockup-chrome-url {
  flex: 1; font-size: 7px; color: #333; background: #fff;
  padding: 3px 8px; border-radius: 10px;
}
.mockup-chrome-dots { display: flex; align-items: center; flex-shrink: 0; }
.mockup-chrome-dots.highlight-dots {
  background: rgba(26,115,232,.12); border-radius: 8px; padding: 2px;
  animation: pwa-pulse 2s ease-in-out infinite;
}

/* Chrome menu dropdown */
.mockup-chrome-menu {
  background: #fff; border-radius: 8px; margin: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.15); overflow: hidden;
}
.mockup-menu-row {
  padding: 7px 10px; font-size: 8px; color: #333;
  border-bottom: 1px solid #f0f0f0;
  display: flex; align-items: center; gap: 6px;
}
.mockup-menu-row:last-child { border-bottom: none; }
.mockup-menu-row.highlight {
  background: rgba(var(--primary-rgb),.08);
  color: var(--brand-600); font-weight: 700;
}

/* Share sheet (iOS) */
.mockup-share-sheet {
  flex: 1; display: flex; flex-direction: column;
  justify-content: flex-end; padding: 0;
}
.mockup-share-handle {
  width: 30px; height: 3px; border-radius: 2px;
  background: #ccc; margin: 8px auto;
}
.mockup-share-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; font-size: 8px; color: #333;
  border-bottom: 1px solid #f0f0f0;
}
.mockup-share-row.highlight {
  background: rgba(var(--primary-rgb),.08);
  color: var(--brand-600); font-weight: 700;
}
.mockup-share-icon {
  width: 22px; height: 22px; border-radius: 6px;
  background: #f2f2f7; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.mockup-share-icon.highlight { background: rgba(var(--primary-rgb),.12); }

/* Generic content placeholder */
.mockup-content {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 16px 12px; gap: 8px;
}
.mockup-logo { width: 40px; height: auto; margin-bottom: 4px; }
.mockup-text-line {
  height: 4px; border-radius: 2px; background: #e2e8f0;
}
.mockup-text-line.w70 { width: 70%; }
.mockup-text-line.w50 { width: 50%; }
.mockup-btn-placeholder {
  width: 60%; height: 14px; border-radius: 7px;
  background: var(--brand-500); margin-top: 6px;
}

/* Home screen mockup */
.mockup-homescreen {
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 220px; padding: 10px; align-items: center;
}
.android-hs { background: linear-gradient(180deg, #121212 0%, #1a237e 100%); }
.mockup-hs-time {
  font-size: 16px; font-weight: 600; color: #fff;
  text-align: center; margin-bottom: 14px; margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.mockup-hs-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; justify-items: center; margin-bottom: 6px;
}
.mockup-hs-icon {
  width: 28px; height: 28px; border-radius: 7px;
  opacity: .7;
}
.mockup-hs-icon.rounded { border-radius: 50%; }
.mockup-hs-icon.ep-icon {
  background: #fff; opacity: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 3px; box-shadow: 0 2px 8px rgba(0,0,0,.3);
  animation: pwa-pulse 2s ease-in-out infinite;
}
.mockup-hs-icon.ep-icon img { width: 100%; height: 100%; object-fit: contain; border-radius: 4px; }
.mockup-hs-icon.small { width: 24px; height: 24px; border-radius: 6px; }
.mockup-hs-label {
  font-size: 7px; color: #fff; text-align: center;
  font-weight: 600; margin-top: -2px; margin-bottom: 8px;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.mockup-hs-dock {
  display: flex; gap: 12px; justify-content: center;
  background: rgba(255,255,255,.12); border-radius: 14px;
  padding: 6px 16px; margin-top: auto;
}

/* Arrow pointer */
.mockup-arrow {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--brand-500); font-weight: 700;
}

@keyframes pwa-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb),0); }
  50% { box-shadow: 0 0 0 6px rgba(var(--primary-rgb),.2); }
}

/* ===== Cookie Consent Banner ===== */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  background: var(--gray-900); border-top: 1px solid var(--gray-700);
  padding: 16px 0;
  animation: slideUpBanner .3s ease-out;
}
@keyframes slideUpBanner { from { transform: translateY(100%); } to { transform: translateY(0); } }
.cookie-banner-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.cookie-banner p { color: var(--gray-300); font-size: 14px; margin: 0; line-height: 1.5; }
.cookie-banner a { color: var(--primary-300, #a5b4fc); text-decoration: underline; }
.cookie-banner .btn { flex-shrink: 0; }
@media (max-width: 640px) {
  .cookie-banner-inner { flex-direction: column; text-align: center; }
}

/* ===================== AUTH (split-screen) ===================== */
.auth-split {
  min-height: 100vh; display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--bg);
}

/* ----- LEFT side ----- */
.auth-left {
  position: relative;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(96, 165, 250, .35), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, rgba(14, 165, 233, .28), transparent 60%),
    linear-gradient(135deg, var(--brand-950) 0%, var(--brand-900) 45%, var(--brand-700) 100%);
  overflow: hidden;
  display: flex; flex-direction: column;
  color: #fff;
  padding: 56px 60px;
}
.auth-left-bg { position: absolute; inset: 0; pointer-events: none; }
.auth-orb {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: .35;
}
.auth-orb.orb-a { width: 420px; height: 420px; background: var(--brand-400); top: -140px; right: -120px; }
.auth-orb.orb-b { width: 360px; height: 360px; background: var(--accent-500); bottom: -120px; left: -140px; opacity: .30; }
.auth-orb.orb-c { width: 260px; height: 260px; background: var(--brand-300); top: 45%; left: 45%; opacity: .20; }
.auth-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse at center, #000 25%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 25%, transparent 80%);
}

.auth-left-inner {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; height: 100%;
  flex: 1;
}
.auth-left-logo {
  display: block;
  width: fit-content;
  margin: 0 auto;
}
.logo-img-light {
  background: transparent;
  padding: 0;
  height: 58px;
  filter: brightness(0) invert(1) drop-shadow(0 4px 18px rgba(0, 0, 0, .35));
}

.auth-left-content {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  max-width: 520px;
  padding: 36px 0 24px;
}
.auth-eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255, 255, 255, .92);
  background: rgba(255, 255, 255, .12);
  padding: 7px 14px; border-radius: 100px;
  margin-bottom: 18px; align-self: flex-start;
  border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(6px);
}
.auth-headline {
  font-size: clamp(32px, 3.6vw, 44px); font-weight: 900;
  line-height: 1.1; letter-spacing: -.02em;
  margin-bottom: 14px; color: #fff;
}
.auth-headline-grad {
  background: linear-gradient(135deg, #bae6fd 0%, #7dd3fc 50%, #38bdf8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-tagline {
  font-size: 15px; line-height: 1.65;
  color: rgba(255, 255, 255, .80);
  margin-bottom: 26px; max-width: 460px;
}

/* Compact 2x2 feature grid (replaces the giant baked-in image) */
.auth-features {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  max-width: 520px;
}
.auth-features li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 14px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  transition: all var(--transition);
}
.auth-features li:hover {
  background: rgba(255, 255, 255, .11);
  border-color: rgba(255, 255, 255, .22);
  transform: translateY(-1px);
}
.auth-feature-ico {
  flex-shrink: 0;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(125, 211, 252, .25), rgba(56, 189, 248, .15));
  border: 1px solid rgba(186, 230, 253, .25);
  color: #bae6fd;
}
.auth-feature-ico svg { width: 18px; height: 18px; }
.auth-features li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.auth-features strong {
  font-size: 13px; font-weight: 700;
  color: #fff; line-height: 1.3;
}
.auth-features span {
  font-size: 11.5px; line-height: 1.45;
  color: rgba(255, 255, 255, .68);
}

.auth-left-foot {
  margin-top: 24px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .68);
}
.auth-left-foot span { display: inline-flex; align-items: center; gap: 8px; }
.auth-left-foot .icon-inline { width: 14px; height: 14px; margin: 0; color: rgba(255, 255, 255, .8); }

/* ----- RIGHT side ----- */
.auth-right {
  display: flex; flex-direction: column;
  padding: 28px 44px 48px;
  background: var(--bg);
  position: relative;
  overflow-y: auto;
}
.auth-right-top { display: flex; justify-content: flex-start; margin-bottom: 14px; }
.auth-back-link {
  font-size: 13.5px; color: var(--text-muted); font-weight: 500;
  padding: 8px 14px; border-radius: 100px;
  transition: all var(--transition);
  display: inline-flex; align-items: center; gap: 6px;
}
.auth-back-link:hover { background: var(--bg-soft); color: var(--brand-700); }
.auth-back-link .btn-icon { width: 14px; height: 14px; }

.auth-panel {
  width: 100%; max-width: 420px;
  margin: auto; padding: 6px 0 24px;
}
.auth-panel-logo { display: block; margin: 0 auto 16px; width: fit-content; }
.auth-panel-logo .logo-img { height: 40px; }
.auth-panel-title {
  text-align: center; font-size: 26px; margin-bottom: 6px;
  color: var(--gray-900); font-weight: 800; letter-spacing: -.01em;
}
.auth-panel-sub {
  text-align: center; color: var(--text-muted);
  font-size: 14px; margin-bottom: 22px;
}

.auth-tabs {
  display: flex; gap: 4px;
  background: var(--gray-100); padding: 4px;
  border-radius: 12px; margin-bottom: 20px;
  border: 1px solid var(--border-soft);
}
.auth-tab {
  flex: 1; padding: 10px; border-radius: 9px;
  font-weight: 600; font-size: 13.5px; color: var(--text-muted);
  transition: all var(--transition);
}
.auth-tab.active {
  background: #fff; color: var(--brand-700);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
}

/* OAuth button */
.oauth-btn {
  width: 100%; padding: 12px 20px; border-radius: 12px;
  background: #fff; border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-size: 14.5px; font-weight: 600; color: var(--gray-800);
  cursor: pointer; transition: all var(--transition);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.oauth-btn:hover {
  border-color: var(--brand-400);
  box-shadow: 0 4px 14px rgba(30, 58, 138, .08);
  transform: translateY(-1px);
}
.oauth-icon { flex-shrink: 0; }

.auth-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 20px 0; color: var(--text-muted); font-size: 12.5px;
  font-weight: 500;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* Form */
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 12.5px; font-weight: 600; color: var(--gray-700);
  display: flex; justify-content: space-between; align-items: center;
}
.field-link {
  font-size: 12px; color: var(--brand-600); font-weight: 600;
}
.field-link:hover { color: var(--brand-700); text-decoration: underline; }
.field input, .field select {
  padding: 12px 15px;
  border: 1.5px solid var(--border); border-radius: 11px;
  font-size: 14.5px; color: var(--gray-900);
  background: #fff; transition: all var(--transition);
}
.field input:hover, .field select:hover {
  border-color: var(--gray-300);
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .12);
}
.field input::placeholder { color: var(--gray-400); }

.input-with-icon { position: relative; display: block; width: 100%; }
.input-with-icon input { width: 100%; padding-left: 44px; }
.input-eye {
  position: absolute; top: 50%; left: 10px; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
  background: transparent; color: var(--text-muted); font-size: 15px;
  cursor: pointer; transition: all var(--transition);
}
.input-eye:hover { background: var(--bg-soft); color: var(--brand-600); }

.pass-match {
  display: flex; align-items: center; gap: 6px;
  margin-top: 4px;
  font-size: 12px; font-weight: 600;
  padding: 0 2px;
}
.pass-match.match { color: var(--emerald-600); }
.pass-match.mismatch { color: var(--rose-600); }

.email-hint {
  display: flex; align-items: center; gap: 6px;
  margin-top: 4px; font-size: 12px; font-weight: 600; padding: 0 2px;
}
.email-hint.hint-ok  { color: var(--emerald-600); }
.email-hint.hint-err { color: var(--rose-600); }

.password-rules {
  margin-top: 4px; padding: 12px 14px;
  background: var(--bg-soft); border-radius: 10px;
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px; color: var(--text-muted);
}
.password-rules .rule { display: flex; align-items: center; gap: 8px; transition: color var(--transition); }
.password-rules .rule.met { color: var(--emerald-600); font-weight: 600; }
.password-rules .rule.met .rule-icon { color: var(--emerald-500); }
.password-rules .rule.optional { color: var(--gray-500); font-style: italic; }
.rule-icon { font-size: 14px; line-height: 1; }
.rule.met .rule-icon::before { content: '✓'; }
.rule:not(.met) .rule-icon::before { content: '○'; }
.rule .rule-icon { display: inline-block; min-width: 14px; }
.rule .rule-icon::before { display: inline-block; }
.rule.met .rule-icon, .rule:not(.met) .rule-icon { font-size: 0; }
.rule.met .rule-icon::before, .rule:not(.met) .rule-icon::before { font-size: 14px; }

.auth-options {
  display: flex; align-items: center; justify-content: space-between;
  margin: 4px 0;
}
.remember-me {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--gray-700); font-weight: 500;
  cursor: pointer; user-select: none;
}
.remember-me input { display: none; }
.remember-toggle {
  position: relative; width: 38px; height: 22px;
  background: var(--gray-300); border-radius: 100px;
  transition: all var(--transition);
}
.remember-toggle::after {
  content: ''; position: absolute;
  top: 3px; right: 3px;
  width: 16px; height: 16px; background: #fff; border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: all var(--transition);
}
.remember-me input:checked + .remember-toggle { background: var(--brand-500); }
.remember-me input:checked + .remember-toggle::after { right: 19px; }

.auth-error {
  color: var(--rose-600); font-size: 13px;
  min-height: 18px; text-align: center; font-weight: 500;
}
.auth-error.success { color: var(--emerald-600); }

.auth-switch {
  text-align: center; font-size: 14px;
  color: var(--text-muted); margin-top: 18px;
}
.auth-switch a { color: var(--brand-600); font-weight: 600; }
.auth-switch a:hover { color: var(--brand-700); text-decoration: underline; }

.admin-shortcut {
  margin-top: 18px; padding: 14px 16px;
  background: linear-gradient(135deg, var(--brand-50) 0%, var(--accent-50) 100%);
  border: 1px dashed var(--brand-300);
  border-radius: 12px; text-align: center;
}
.admin-shortcut strong {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 12px; color: var(--brand-800);
  font-weight: 800; margin-bottom: 3px; letter-spacing: .03em;
}
.admin-shortcut strong .icon-inline { width: 12px; height: 12px; margin: 0; }
.admin-shortcut p {
  font-size: 11.5px; color: var(--brand-700); margin-bottom: 9px; line-height: 1.5;
}
.admin-shortcut button {
  display: block; margin: 0 auto;
  background: #fff; border: 1.5px solid var(--brand-400);
  color: var(--brand-700);
  padding: 8px 20px; border-radius: 100px;
  font-weight: 700; font-size: 12.5px; cursor: pointer;
  transition: all var(--transition);
}
.admin-shortcut button:hover {
  background: var(--brand-500); color: #fff; border-color: var(--brand-500);
  transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37, 99, 235, .25);
}

.auth-legal {
  text-align: center; font-size: 11px; color: var(--text-muted);
  line-height: 1.6; margin-top: 20px; padding: 0 8px;
}
.auth-legal a { color: var(--brand-600); font-weight: 500; }
.auth-legal a:hover { text-decoration: underline; }

@media (max-width: 920px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .auth-right { padding: 32px 20px 40px; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
}
@media (max-width: 540px) {
  .auth-left { padding: 22px 18px; }
  .auth-features { grid-template-columns: 1fr; }
  .auth-features li { padding: 11px 12px; }
  .auth-panel-title { font-size: 22px; }
  .auth-right { padding: 20px 18px 36px; }
}

/* ===================== APP (logged-in) ===================== */
.app-screen { min-height: 100vh; background: var(--bg); }
.app-topbar {
  background: #fff; border-bottom: 1px solid var(--border-soft);
  position: sticky; top: 0; z-index: 30;
}
.app-topbar-inner { max-width: 1280px; margin: 0 auto; padding: 14px 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.app-user { display: flex; align-items: center; gap: 12px; position: relative; }
.app-user-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--gradient-brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.app-user-name { font-weight: 600; font-size: 14px; color: var(--gray-900); }
.app-user-plan { font-size: 11px; padding: 2px 8px; border-radius: 100px; background: var(--brand-50); color: var(--brand-700); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.app-user-plan.pro { background: linear-gradient(135deg, var(--accent-100), var(--brand-100)); color: var(--accent-700); }
.app-content { max-width: 1280px; margin: 0 auto; padding: 32px 28px 60px; }

/* Dashboard */
.dash-greet { margin-bottom: 28px; }
.dash-greet h1 { font-size: 30px; margin-bottom: 4px; }
.dash-greet p { color: var(--text-muted); }

.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-bottom: 36px;
}
.stat-card {
  background: #fff; padding: 22px; border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft); box-shadow: var(--shadow-sm);
}
.stat-card .label { font-size: 13px; color: var(--text-muted); font-weight: 600; margin-bottom: 6px; }
.stat-card .value { font-size: 32px; font-weight: 800; color: var(--gray-900); }
.stat-card.success .value { color: var(--emerald-600); }
.stat-card.danger .value { color: var(--rose-600); }
.stat-card.warn .value { color: var(--amber-500); }
.stat-card.brand .value { color: var(--brand-600); }
@media (max-width: 760px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

.section-h {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; margin-top: 36px;
}
.section-h h2 { font-size: 22px; }

.courses-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.course-card {
  background: #fff; padding: 28px 24px; border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft); box-shadow: var(--shadow-sm);
  cursor: pointer; transition: all var(--transition); position: relative; overflow: hidden;
}
.course-card::before {
  content: ''; position: absolute; top: 0; right: 0; left: 0; height: 6px;
  background: var(--course-color, var(--brand-500));
}
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.course-card h3 { font-size: 20px; margin-bottom: 6px; color: var(--gray-900); }
.course-card .desc { font-size: 14px; color: var(--text-muted); margin-bottom: 18px; line-height: 1.5; min-height: 42px; }
.course-card .meta {
  display: flex; gap: 18px; font-size: 13px; color: var(--text-soft);
  direction: rtl; unicode-bidi: plaintext;
}
.course-card .meta span { unicode-bidi: isolate; }
.course-card .meta strong { color: var(--gray-900); font-weight: 700; }
.course-card.add { border-style: dashed; background: var(--bg-soft); }
.course-card.add:hover { border-color: var(--brand-400); background: var(--brand-50); }
.course-card.add .add-card-content {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; min-height: 180px; color: var(--text-muted);
}
.course-card.add .add-icon { font-size: 36px; margin-bottom: 8px; color: var(--brand-500); }

@media (max-width: 920px) { .courses-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .courses-grid { grid-template-columns: 1fr; } }

/* Batch creation modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .55);
  z-index: 100; display: grid; place-items: center; padding: 20px;
  animation: fadeIn 200ms;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff; border-radius: var(--radius-xl); padding: 36px;
  max-width: 560px; width: 100%; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg); position: relative;
  animation: slideUp 300ms cubic-bezier(.4, 0, .2, 1);
}
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.modal h2 { font-size: 24px; margin-bottom: 6px; }
.modal .modal-sub { color: var(--text-muted); margin-bottom: 24px; font-size: 14px; }
.modal-close {
  position: absolute; top: 16px; left: 16px;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--bg-soft); color: var(--text-muted); font-size: 20px;
  display: grid; place-items: center; cursor: pointer; transition: all var(--transition);
}
.modal-close:hover { background: var(--rose-50); color: var(--rose-600); }

.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-soft); padding: 14px 18px; border-radius: var(--radius);
  margin-top: 8px;
}
.toggle-row .toggle-text { font-weight: 600; font-size: 14px; color: var(--gray-900); }
.toggle-row .toggle-text small { display: block; color: var(--text-muted); font-weight: 500; margin-top: 2px; font-size: 12px; }
.toggle {
  position: relative; width: 46px; height: 26px;
  background: var(--gray-300); border-radius: 100px; cursor: pointer; transition: all var(--transition);
  flex-shrink: 0;
}
.toggle::after {
  content: ''; position: absolute; top: 3px; right: 3px;
  width: 20px; height: 20px; background: #fff; border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: all var(--transition);
}
.toggle.on { background: var(--brand-500); }
.toggle.on::after { right: 23px; }

/* ===================== QUIZ (MCQ practice flow) ===================== */
.quiz-screen {
  min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg);
}
.quiz-topbar {
  background: #fff; border-bottom: 1px solid var(--border-soft);
  padding: 14px 24px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.quiz-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.quiz-brand .logo-icon { width: 34px; height: 34px; font-size: 17px; }
.quiz-brand-text { font-weight: 700; font-size: 14px; color: var(--gray-900); }
.quiz-brand-text small { display: block; font-weight: 500; font-size: 12px; color: var(--text-muted); }

.quiz-progress-block { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 200px; }
.quiz-progress-label { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.quiz-progress-bar { height: 8px; background: var(--gray-100); border-radius: 100px; overflow: hidden; }
.quiz-progress-fill { height: 100%; background: var(--gradient-brand); transition: width 300ms ease-out; border-radius: 100px; }

.quiz-timer-wrap {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-soft); padding: 8px 16px; border-radius: 100px;
  font-weight: 700; color: var(--gray-800);
}
.quiz-timer-wrap.danger { background: var(--rose-50); color: var(--rose-600); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .6; } }
.quiz-quit {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--bg-soft); color: var(--text-muted); font-size: 18px;
  display: grid; place-items: center; cursor: pointer; transition: all var(--transition);
}
.quiz-quit:hover { background: var(--rose-50); color: var(--rose-600); }

.quiz-body {
  flex: 1; display: grid; grid-template-columns: 1fr 280px; gap: 32px;
  max-width: 1280px; width: 100%; margin: 0 auto; padding: 28px;
}
.quiz-main { min-width: 0; }
.quiz-card {
  background: #fff; border-radius: var(--radius-xl); padding: 30px;
  border: 1px solid var(--border-soft); box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.quiz-q-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--border-soft);
}
.quiz-q-num { font-size: 16px; font-weight: 700; color: var(--gray-900); }
.quiz-q-num small { color: var(--text-muted); font-weight: 500; margin-right: 8px; }
.quiz-flag {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 100px;
  background: var(--bg-soft); color: var(--text-soft); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
}
.quiz-flag:hover { background: var(--amber-50); color: var(--amber-500); }
.quiz-flag.flagged { background: var(--amber-50); color: var(--amber-500); }

.quiz-image-wrap {
  background: var(--bg-soft); border-radius: var(--radius); padding: 16px;
  margin-bottom: 22px; display: grid; place-items: center;
}
.quiz-image-wrap img { max-width: 100%; max-height: 520px; border-radius: 8px; }

.quiz-answers { display: flex; flex-direction: column; gap: 10px; }
.quiz-ans {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; border-radius: var(--radius);
  background: var(--bg-soft); border: 2px solid transparent;
  cursor: pointer; transition: all var(--transition);
  text-align: right; font-size: 15px; font-weight: 500; color: var(--gray-800);
}
.quiz-ans:hover:not(:disabled) { background: var(--brand-50); border-color: var(--brand-200); }
.quiz-ans .num {
  width: 32px; height: 32px; border-radius: 10px;
  background: #fff; color: var(--brand-700);
  display: grid; place-items: center; font-weight: 700; font-size: 15px;
  border: 1.5px solid var(--brand-200); flex-shrink: 0;
}
.quiz-ans.binary { justify-content: center; padding: 18px; font-size: 16px; }
.quiz-ans.binary .num { display: none; }
.quiz-ans.selected {
  background: var(--brand-50); border-color: var(--brand-500);
  box-shadow: var(--shadow-glow);
}
.quiz-ans.selected .num { background: var(--brand-500); color: #fff; border-color: var(--brand-500); }
.quiz-ans.correct {
  background: var(--emerald-50) !important; border-color: var(--emerald-500) !important;
  color: var(--emerald-600);
}
.quiz-ans.correct .num { background: var(--emerald-500); color: #fff; border-color: var(--emerald-500); }
.quiz-ans.wrong {
  background: var(--rose-50) !important; border-color: var(--rose-500) !important;
  color: var(--rose-600);
}
.quiz-ans.wrong .num { background: var(--rose-500); color: #fff; border-color: var(--rose-500); }
.quiz-ans:disabled { cursor: default; }

/* Solution panel */
.solution-panel {
  background: #fff; border-radius: var(--radius-xl); padding: 30px;
  border: 1px solid var(--border-soft); box-shadow: var(--shadow);
  margin-top: 20px; animation: slideUp 300ms;
}
.solution-panel.hidden { display: none; }
.solution-panel h3 {
  font-size: 18px; color: var(--brand-700); margin-bottom: 4px;
  display: flex; align-items: center; gap: 10px;
}
.solution-panel h3::before { content: '💡'; font-size: 22px; }
.solution-source { font-size: 12px; color: var(--text-muted); margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border-soft); }
.solution-topic { display: inline-block; background: var(--brand-50); color: var(--brand-700); padding: 4px 12px; border-radius: 100px; font-size: 12px; font-weight: 600; margin-bottom: 16px; }
.solution-general {
  background: var(--bg-soft); padding: 16px 20px; border-radius: var(--radius);
  margin-bottom: 18px; border-right: 4px solid var(--brand-500);
  font-size: 15px; line-height: 1.7; color: var(--gray-800);
}
.solution-general strong:first-child { display: block; margin-bottom: 8px; color: var(--brand-700); }
.opt-explain {
  padding: 14px 18px; border-radius: var(--radius); margin-bottom: 10px;
  background: var(--bg-soft); border-right: 4px solid var(--gray-300);
  font-size: 14px; line-height: 1.7;
}
.opt-explain.correct { background: var(--emerald-50); border-right-color: var(--emerald-500); }
.opt-explain.wrong { background: var(--rose-50); border-right-color: var(--rose-500); }
.opt-explain.user-selected { box-shadow: 0 0 0 2px var(--brand-300); }
.opt-explain .opt-num { font-weight: 800; color: var(--gray-900); margin-left: 6px; }
.opt-explain .opt-label { font-weight: 700; color: var(--gray-800); display: block; margin-bottom: 6px; }
.opt-explain code {
  background: rgba(15, 23, 42, .08); padding: 2px 6px; border-radius: 4px;
  direction: ltr; display: inline-block;
}
.opt-explain.correct .opt-label::after { content: ' ✔'; color: var(--emerald-600); }

.quiz-actions { display: flex; gap: 12px; padding: 20px 0; }
.quiz-actions .btn { flex: 1; }

/* Question navigator sidebar */
.quiz-nav {
  background: #fff; border-radius: var(--radius-xl); padding: 22px;
  border: 1px solid var(--border-soft); box-shadow: var(--shadow-sm);
  align-self: start; position: sticky; top: 84px;
}
.quiz-nav h4 { font-size: 14px; color: var(--gray-900); margin-bottom: 14px; }
.quiz-nav-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 18px; }
.nav-cell {
  aspect-ratio: 1; display: grid; place-items: center;
  background: var(--bg-soft); border-radius: 8px;
  font-size: 13px; font-weight: 700; color: var(--text-muted);
  cursor: pointer; transition: all var(--transition);
  border: 2px solid transparent;
}
.nav-cell:hover { background: var(--brand-50); color: var(--brand-700); }
.nav-cell.current { background: var(--brand-500); color: #fff; }
.nav-cell.answered { background: var(--brand-100); color: var(--brand-800); }
.nav-cell.correct { background: var(--emerald-50); color: var(--emerald-600); }
.nav-cell.wrong { background: var(--rose-50); color: var(--rose-600); }
.nav-cell.flagged { border-color: var(--amber-500); }
.quiz-nav-legend { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-muted); }
.quiz-nav-legend .item { display: flex; align-items: center; gap: 8px; }
.quiz-nav-legend .swatch { width: 12px; height: 12px; border-radius: 4px; }

@media (max-width: 1080px) {
  .quiz-body { grid-template-columns: 1fr; padding: 20px 18px; gap: 20px; }
  .quiz-nav { position: static; }
  .quiz-nav-grid { grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); }
}
@media (max-width: 760px) {
  .quiz-topbar { padding: 12px 16px; gap: 12px; }
  .quiz-progress-block { min-width: 140px; }
  .quiz-progress-label { font-size: 12px; }
  .quiz-brand-text small { display: none; }
  .quiz-image-wrap img { max-height: 360px; }
  .quiz-q-head { margin-bottom: 16px; padding-bottom: 14px; }
  .quiz-flag { font-size: 12px; padding: 6px 10px; }
}
@media (max-width: 600px) {
  .quiz-card, .solution-panel { padding: 20px 18px; }
  .quiz-actions { flex-direction: column; }
  .quiz-ans { padding: 14px 16px; font-size: 14px; }
  .quiz-ans .num { width: 28px; height: 28px; font-size: 13px; }
  .quiz-image-wrap { padding: 10px; }
  .quiz-image-wrap img { max-height: 280px; }
  .quiz-nav-grid { grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 6px; }
  .nav-cell { font-size: 12px; }
}

/* ===================== SUMMARY ===================== */
.summary-screen { min-height: 100vh; background: var(--gradient-soft); padding: 60px 20px; }
.summary-card {
  max-width: 760px; margin: 0 auto;
  background: #fff; border-radius: var(--radius-xl); padding: 44px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border-soft);
}
.summary-title { text-align: center; font-size: 32px; margin-bottom: 6px; margin-top: 8px; }
.summary-sub { text-align: center; color: var(--text-muted); margin-bottom: 32px; }
.summary-score {
  background: var(--gradient-soft); border-radius: var(--radius-lg);
  padding: 30px; text-align: center; margin-bottom: 30px;
  border: 1px solid var(--brand-100);
}
.summary-score-num {
  font-size: 64px; font-weight: 900; line-height: 1;
  background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.summary-score-label { font-size: 16px; color: var(--text-muted); margin-top: 6px; font-weight: 600; }
.summary-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 30px; }
.summary-pills {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px;
  padding: 18px; background: var(--bg-soft); border-radius: var(--radius);
}
.q-pill {
  width: 36px; height: 36px; border-radius: 8px;
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px; color: #fff;
}
.q-pill.correct { background: var(--emerald-500); }
.q-pill.wrong { background: var(--rose-500); }
.q-pill.revealed { background: var(--amber-500); }
.q-pill.skipped { background: var(--gray-400); }
.summary-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.summary-actions .btn { flex: 1; min-width: 200px; }
@media (max-width: 600px) { .summary-stats { grid-template-columns: repeat(2, 1fr); } }

/* ===================== MISTAKE REVIEW ===================== */
.review-screen { min-height: 100vh; background: var(--bg); }
.review-header {
  background: #fff; border-bottom: 1px solid var(--border-soft);
  padding: 22px 28px;
}
.review-header-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.review-header h1 { font-size: 24px; display: flex; align-items: center; gap: 10px; }
.review-header h1::before { content: '🔍'; font-size: 28px; }
.review-header p { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.review-back {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 100px;
  background: var(--bg-soft); color: var(--gray-700); font-weight: 600; font-size: 14px;
  cursor: pointer; transition: all var(--transition);
}
.review-back:hover { background: var(--brand-50); color: var(--brand-700); }

.review-body { max-width: 980px; margin: 0 auto; padding: 32px 28px 60px; }
.review-progress {
  background: #fff; border-radius: var(--radius); padding: 18px 24px;
  margin-bottom: 24px; display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--border-soft); box-shadow: var(--shadow-sm);
}
.review-progress .label { font-weight: 600; color: var(--gray-900); }
.review-progress .label small { display: block; color: var(--text-muted); font-weight: 500; font-size: 12px; }
.review-pager { display: flex; gap: 8px; }
.review-pager .btn { padding: 10px 18px; font-size: 14px; }

.review-question-card {
  background: #fff; border-radius: var(--radius-xl); padding: 32px;
  box-shadow: var(--shadow-md); border: 1px solid var(--border-soft);
  margin-bottom: 20px;
}
.review-meta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-bottom: 18px; border-bottom: 1px solid var(--border-soft); margin-bottom: 22px;
}
.review-meta-pill {
  padding: 5px 12px; border-radius: 100px;
  background: var(--bg-soft); color: var(--gray-700);
  font-size: 12px; font-weight: 600;
}
.review-meta-pill.exam { background: var(--brand-50); color: var(--brand-700); }
.review-meta-pill.topic { background: var(--accent-50); color: var(--accent-700); }
.review-meta-pill.wrong { background: var(--rose-50); color: var(--rose-600); }

.review-image {
  background: var(--bg-soft); border-radius: var(--radius); padding: 18px;
  margin-bottom: 24px; display: grid; place-items: center;
}
.review-image img { max-width: 100%; max-height: 480px; border-radius: 8px; }

.review-answer-summary {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 24px;
}
.review-answer-box { padding: 18px; border-radius: var(--radius); border: 2px solid; }
.review-answer-box.your-wrong { background: var(--rose-50); border-color: var(--rose-500); }
.review-answer-box.correct { background: var(--emerald-50); border-color: var(--emerald-500); }
.review-answer-box .label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.review-answer-box.your-wrong .label { color: var(--rose-600); }
.review-answer-box.correct .label { color: var(--emerald-600); }
.review-answer-box .value { font-size: 18px; font-weight: 700; color: var(--gray-900); }
.review-answer-box .value-sub { font-size: 13px; color: var(--text-soft); margin-top: 4px; }
@media (max-width: 600px) { .review-answer-summary { grid-template-columns: 1fr; } }

.review-explanation { background: linear-gradient(180deg, var(--brand-50) 0%, #fff 100%); border-radius: var(--radius); padding: 24px; border: 1px solid var(--brand-100); }
.review-explanation h4 {
  font-size: 16px; color: var(--brand-700); margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.review-explanation h4::before { content: '📖'; font-size: 20px; }
.review-explanation .general {
  background: #fff; padding: 16px 18px; border-radius: var(--radius);
  font-size: 15px; line-height: 1.8; color: var(--gray-800);
  margin-bottom: 18px; border-right: 4px solid var(--brand-500);
}
.review-options { display: flex; flex-direction: column; gap: 10px; }
.review-options h5 { font-size: 13px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.review-explanation code,
.solution-panel code {
  background: var(--gray-900); color: #e2e8f0;
  padding: 2px 8px; border-radius: 6px;
  font-size: .85em; font-family: 'JetBrains Mono', Monaco, monospace;
  direction: ltr; display: inline-block;
}

/* Toast notifications */
.toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  background: var(--gray-900); color: #fff;
  padding: 14px 24px; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); z-index: 200;
  font-size: 14px; font-weight: 500;
  animation: toastIn 200ms cubic-bezier(.4, 0, .2, 1);
}
.toast.success { background: var(--emerald-600); }
.toast.error { background: var(--rose-600); }
.toast.warning { background: #d97706; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Loader */
.loader-screen {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  background: var(--gradient-soft);
}
.loader-logo { height: 56px; width: auto; opacity: .9; }
.spinner {
  width: 50px; height: 50px; border-radius: 50%;
  border: 4px solid var(--brand-100); border-top-color: var(--brand-500);
  animation: spin 800ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Ready-pill (course card status) */
.ready-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--emerald-50); color: var(--emerald-600);
  font-weight: 700; font-size: 12px;
  padding: 4px 10px; border-radius: 100px;
}

/* Summary screen logo */
.summary-logo {
  display: block; width: fit-content; margin: 0 auto 18px;
  opacity: .85;
}
.summary-logo .logo-img { height: 38px; }

/* Review screen brand */
.review-header-brand {
  display: flex; align-items: center; gap: 18px;
}
.review-logo {
  display: block; width: fit-content;
  padding-left: 18px;
  border-left: 1px solid var(--border);
}

/* Private-beta banner */
.beta-banner {
  background: #fef3c7;
  color: #78350f;
  border-bottom: 1px solid #fde68a;
  text-align: center;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.beta-banner .icon-inline { width: 16px; height: 16px; margin: 0; color: #b45309; flex-shrink: 0; }

/* =====================================================
   PAIN POINTS SECTION (problem statement before features)
   ===================================================== */
.pain-section {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
}
.pain-section .section-title .grad {
  background: linear-gradient(135deg, var(--rose-500) 0%, var(--amber-500) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pain-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 22px; margin-top: 12px;
}
.pain-card {
  background: #fff; padding: 28px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  display: flex; align-items: flex-start; gap: 18px;
  transition: all var(--transition);
  position: relative;
}
.pain-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}
.pain-card .pain-icon {
  flex-shrink: 0;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 14px;
}
.pain-card h3 {
  font-size: 17px; color: var(--gray-900);
  margin-bottom: 8px; line-height: 1.4;
}
.pain-card p {
  color: var(--text-soft); font-size: 14px;
  line-height: 1.65;
}
@media (max-width: 760px) {
  .pain-grid { grid-template-columns: 1fr; gap: 16px; }
  .pain-card { padding: 22px 20px; gap: 14px; }
  .pain-card .pain-icon { width: 42px; height: 42px; }
  .pain-card h3 { font-size: 16px; }
}

/* Icon background tints (used by pain cards + feature cards) */
.icon-bg-blue    { background: var(--brand-50); color: var(--brand-600); }
.icon-bg-emerald { background: var(--emerald-50); color: var(--emerald-600); }
.icon-bg-rose    { background: var(--rose-50); color: var(--rose-500); }
.icon-bg-amber   { background: #fffbeb; color: var(--amber-500); }
.icon-bg-purple  { background: #f5f3ff; color: #7c3aed; }
.icon-bg-cyan    { background: #ecfeff; color: #0891b2; }
.icon-bg-indigo  { background: #eef2ff; color: #4f46e5; }

/* Feature card "new" pill + tweaks for the SVG variant */
.feature-card.feature-new { border-color: var(--brand-200); }
.feature-card .feature-pill {
  position: absolute; top: 14px; left: 14px;
  background: var(--gradient-brand); color: #fff;
  font-size: 10px; font-weight: 800;
  padding: 4px 10px; border-radius: 100px;
  letter-spacing: .05em; text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}
.feature-icon svg { display: block; }
.feature-card:hover .feature-icon { color: #fff; }
.feature-card:hover .icon-bg-blue,
.feature-card:hover .icon-bg-emerald,
.feature-card:hover .icon-bg-rose,
.feature-card:hover .icon-bg-amber,
.feature-card:hover .icon-bg-purple,
.feature-card:hover .icon-bg-cyan,
.feature-card:hover .icon-bg-indigo { background: var(--gradient-brand); color: #fff; }

/* =====================================================
   REVIEWS SECTION — clean professional cards
   ===================================================== */
.reviews-section {
  background:
    radial-gradient(circle at 15% 20%, rgba(99, 102, 241, .035) 0, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(236, 72, 153, .025) 0, transparent 45%),
    var(--bg);
}
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 16px;
}
.review-card {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 28px 26px 24px;
  box-shadow:
    0 1px 0 rgba(15, 23, 42, .02),
    0 4px 14px rgba(15, 23, 42, .05);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all var(--transition);
  position: relative;
}
.review-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 1px 0 rgba(15, 23, 42, .02),
    0 12px 30px rgba(15, 23, 42, .08);
  border-color: var(--brand-200);
}
.review-stars {
  display: flex;
  gap: 3px;
  color: #f59e0b;
}
.review-stars svg { display: block; }
.review-quote {
  margin: 0;
  color: var(--gray-800);
  font-size: 15px;
  line-height: 1.75;
  text-align: right;
  flex: 1;
}
.review-author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
  margin-top: 4px;
}
.review-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .02em;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .12);
}
.review-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
}
.review-meta strong {
  font-size: 14px;
  color: var(--gray-900);
  font-weight: 700;
}
.review-meta span {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Mobile carousel — hidden on desktop */
.reviews-mobile { display: none; }

@media (max-width: 980px) {
  .reviews-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .reviews-grid { display: none; }
  .reviews-mobile {
    display: block;
    margin-top: 12px;
    overflow: hidden;
    touch-action: pan-y;
    -webkit-user-select: none; user-select: none;
  }
  .rm-stage {
    display: flex;
    transition: transform .4s cubic-bezier(.25,.8,.25,1);
    will-change: transform;
  }
  .rm-stage .review-card {
    flex: 0 0 100%;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
  }
  .rm-stage.is-dragging { transition: none; }
  .rm-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 22px;
    flex-wrap: wrap;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }
  .rm-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #cbd5e1;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all .25s ease;
  }
  .rm-dot.is-active {
    background: var(--brand-600, #2563eb);
    width: 22px;
    border-radius: 4px;
  }
}

/* =====================================================
   APP TOPBAR NAV (shared between dashboard, insights,
   lab, progress) — desktop horizontal, mobile drawer
   ===================================================== */
.topbar-nav {
  display: flex; gap: 6px; align-items: center;
  margin-right: auto; margin-left: 24px;
  padding: 4px;
  background: var(--gray-100);
  border-radius: 100px;
}
.topbar-nav a {
  padding: 8px 18px; border-radius: 100px;
  font-size: 14px; font-weight: 600;
  color: var(--gray-600);
  transition: all var(--transition);
  white-space: nowrap;
}
.topbar-nav a:hover { color: var(--brand-700); background: rgba(255,255,255,.6); }
.topbar-nav a.active {
  background: #fff; color: var(--brand-700);
  box-shadow: var(--shadow-sm);
}
.topbar-mobile-toggle {
  display: none;
  font-size: 24px; padding: 4px 12px;
  color: var(--gray-700); border-radius: 8px;
}

@media (max-width: 980px) {
  .topbar-nav { display: none; }
  .topbar-mobile-toggle { display: block; }
  .app-topbar.mobile-open .topbar-nav {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; padding: 12px 16px;
    border-radius: 0; gap: 4px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    margin: 0; z-index: 31;
  }
  .app-topbar.mobile-open .topbar-nav a {
    text-align: right; padding: 12px 16px;
  }
  .app-topbar-inner { padding: 12px 18px; flex-wrap: wrap; }
  .app-user { gap: 8px; }
  .app-user-name { display: none; }
}
@media (max-width: 600px) {
  .app-content { padding: 20px 16px 40px; }
  .app-user-plan { display: none; }
  .app-topbar-inner { gap: 8px; }
  .logo-img { height: 32px; }
}

/* =====================================================
   PAGE HEADER (insights / lab / progress)
   ===================================================== */
.page-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 32px;
}
.page-header h1 {
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -.02em;
  background: var(--gradient-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 6px;
}
.page-header p { color: var(--text-soft); max-width: 720px; line-height: 1.6; font-size: 15px; }
.page-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700;
  color: var(--brand-600); text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 10px;
}
@media (max-width: 760px) {
  .page-header { flex-direction: column; align-items: flex-start; gap: 18px; }
  .page-header .btn { align-self: stretch; text-align: center; }
}

/* =====================================================
   INSIGHTS PAGE
   ===================================================== */
.insights-banner {
  padding: 16px 22px;
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
  font-size: 15px; line-height: 1.6;
  border: 1px solid;
}
.insights-banner.warn {
  background: #fffbeb; color: #92400e; border-color: #fde68a;
}
.insights-banner.ok {
  background: var(--emerald-50); color: var(--emerald-600); border-color: #a7f3d0;
}
.insights-banner strong { color: inherit; }

.insights-section { margin-bottom: 48px; }
.insights-section-head { margin-bottom: 22px; }
.insights-section-head h2 {
  font-size: 22px; margin-bottom: 6px;
  color: var(--gray-900);
  display: flex; align-items: center; gap: 10px;
}
.insights-section-head h2 .h-icon { width: 22px; height: 22px; margin: 0; }
.insights-section-head p {
  color: var(--text-soft); font-size: 14px; line-height: 1.6;
  max-width: 760px;
}

/* Topic map (frequency bars) */
.topic-map {
  background: #fff; padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 18px;
}
.topic-row { display: flex; flex-direction: column; gap: 6px; }
.topic-row-head {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; flex-wrap: wrap;
}
.topic-icon { font-size: 18px; width: 24px; text-align: center; }
.topic-name { font-weight: 700; color: var(--gray-900); flex: 1; min-width: 140px; }
.topic-meta { color: var(--text-muted); font-size: 12px; }
.topic-bar {
  height: 10px; background: var(--gray-100);
  border-radius: 100px; overflow: hidden;
}
.topic-bar-fill {
  height: 100%; border-radius: 100px;
  background: var(--bar-color, var(--brand-500));
  transition: width 600ms cubic-bezier(.4,0,.2,1);
}

/* Focus grid */
.focus-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.focus-card {
  position: relative;
  background: #fff; padding: 22px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  display: flex; flex-direction: column; gap: 8px;
  overflow: hidden;
}
.focus-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--accent, var(--brand-500));
}
.focus-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.focus-rank {
  position: absolute; top: 12px; left: 14px;
  font-size: 12px; font-weight: 800;
  color: #fff;
  background: var(--accent, var(--brand-500));
  padding: 4px 10px; border-radius: 100px;
  border: none;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.focus-icon { font-size: 30px; margin-top: 8px; }
.focus-card h3 { font-size: 18px; color: var(--gray-900); font-weight: 800; }
.focus-reason { font-size: 14px; color: var(--gray-600); line-height: 1.5; margin-bottom: 8px; }
.focus-stats {
  display: flex; gap: 16px; font-size: 13px; color: var(--gray-600);
  flex-wrap: wrap;
  unicode-bidi: plaintext;
}
.focus-stats span { unicode-bidi: isolate; }
.focus-stats strong { color: var(--gray-900); font-weight: 800; font-size: 15px; }
.focus-card .focus-practice { margin-top: 10px; align-self: flex-start; }

/* Hard questions list */
.hard-q-list {
  background: #fff; border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.hard-q-row {
  display: grid;
  grid-template-columns: 32px 64px 1fr auto;
  gap: 14px; align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
  transition: background var(--transition);
}
.hard-q-row:last-child { border-bottom: none; }
.hard-q-row:hover { background: var(--bg-soft); }
.hard-q-num {
  font-weight: 800; color: var(--brand-600);
  font-size: 16px; text-align: center;
}
.hard-q-thumb {
  width: 64px; height: 48px;
  border-radius: 8px; overflow: hidden;
  background: var(--gray-100);
  border: 1px solid var(--border);
}
.hard-q-thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.hard-q-info { min-width: 0; }
.hard-q-title {
  font-size: 14px; font-weight: 700; color: var(--gray-900);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 4px;
}
.hard-q-meta {
  display: flex; gap: 8px; font-size: 12px; color: var(--text-muted);
  flex-wrap: wrap; align-items: center;
}
.reason-pill {
  padding: 2px 8px; border-radius: 100px;
  background: var(--rose-50); color: var(--rose-600);
  font-weight: 600; font-size: 11px;
}
.insights-cta { margin-top: 24px; text-align: center; }

@media (max-width: 600px) {
  .hard-q-row { grid-template-columns: 28px 1fr auto; gap: 10px; padding: 12px 14px; }
  .hard-q-thumb { display: none; }
  .focus-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .focus-card { padding: 18px 16px; }
}
@media (max-width: 420px) {
  .focus-grid { grid-template-columns: 1fr; }
}

/* =====================================================
   LAB PAGE
   ===================================================== */
.lab-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.lab-card {
  background: #fff; padding: 32px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow);
  position: relative;
}
.lab-card-icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  font-size: 28px;
  background: var(--brand-50);
  border-radius: 16px;
  margin-bottom: 18px;
  color: var(--brand-700);
}
.lab-card-icon svg { width: 28px; height: 28px; display: block; }
.lab-card-ai {
  background: linear-gradient(180deg, #fff 0%, #fff 70%, #fafbff 100%);
  border-color: var(--brand-200);
}
.lab-card-ai .lab-card-icon {
  background: linear-gradient(135deg, var(--brand-100), var(--accent-100));
}
.lab-card h2 {
  font-size: 22px; margin-bottom: 8px; color: var(--gray-900);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.lab-badge {
  font-size: 11px; font-weight: 800;
  padding: 3px 10px; border-radius: 100px;
  background: var(--gradient-brand); color: #fff;
  letter-spacing: .05em; text-transform: uppercase;
}
.lab-card-sub { color: var(--text-soft); font-size: 14px; line-height: 1.6; margin-bottom: 22px; }

.lab-form { display: flex; flex-direction: column; gap: 16px; margin-bottom: 18px; }
.lab-form .field { display: flex; flex-direction: column; gap: 6px; }
.lab-form .field label {
  font-size: 13px; font-weight: 600; color: var(--gray-700);
}
.lab-form .field label small { color: var(--text-muted); font-weight: 500; margin-right: 4px; }
.lab-form .field select,
.lab-form .field input {
  padding: 12px 14px; border-radius: var(--radius);
  border: 1.5px solid var(--border); background: #fff;
  font-size: 15px; color: var(--gray-900);
  transition: all var(--transition);
}
.lab-form .field select:focus,
.lab-form .field input:focus {
  outline: none; border-color: var(--brand-500);
  box-shadow: var(--shadow-glow);
}

.lab-mode-pills {
  display: flex; gap: 8px; padding: 4px;
  background: var(--gray-100); border-radius: var(--radius);
}
.lab-mode-pills .mode-pill {
  flex: 1; padding: 10px 14px;
  border-radius: 10px; font-size: 14px; font-weight: 600;
  color: var(--gray-600);
  transition: all var(--transition);
}
.lab-mode-pills .mode-pill.active {
  background: #fff; color: var(--brand-700);
  box-shadow: var(--shadow-sm);
}

.lab-preview {
  background: var(--bg-soft); padding: 16px 18px;
  border-radius: var(--radius); margin-bottom: 18px;
  border: 1px dashed var(--brand-200);
}
.lab-preview-title {
  font-size: 13px; font-weight: 700; color: var(--brand-700);
  margin-bottom: 10px;
}
.lab-preview-buckets { display: flex; flex-wrap: wrap; gap: 6px; }
.lab-preview-pill {
  padding: 4px 10px; border-radius: 100px;
  background: #fff; border: 1px solid var(--brand-100);
  font-size: 12px; color: var(--gray-700); font-weight: 600;
}

/* Topic chip picker */
.lab-topic-picker {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 12px; background: var(--bg-soft);
  border-radius: var(--radius); border: 1px solid var(--border);
  max-height: 200px; overflow-y: auto;
}
.topic-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 100px;
  background: #fff; border: 1.5px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--gray-700);
  transition: all var(--transition);
}
.topic-chip:hover { border-color: var(--accent, var(--brand-400)); transform: translateY(-1px); }
.topic-chip.selected {
  background: var(--accent, var(--brand-500));
  color: #fff; border-color: var(--accent, var(--brand-500));
  box-shadow: var(--shadow-sm);
}

.ai-tip {
  background: var(--accent-50); border: 1px solid var(--accent-200);
  padding: 12px 16px; border-radius: var(--radius);
  font-size: 13px; color: var(--accent-800);
  margin-bottom: 18px; line-height: 1.6;
}
.ai-tip strong { color: var(--accent-700); }

.ai-result { margin-top: 24px; }
.ai-success {
  background: var(--emerald-50); color: var(--emerald-600);
  padding: 14px 20px; border-radius: var(--radius);
  font-weight: 700; margin-bottom: 18px;
  border: 1px solid #a7f3d0;
}
.ai-error {
  background: var(--rose-50); color: var(--rose-600);
  padding: 16px 20px; border-radius: var(--radius);
  font-weight: 600;
  border: 1px solid #fecaca;
}
.ai-error strong { display: block; margin-bottom: 6px; font-size: 15px; }
.ai-error p { font-size: 13px; line-height: 1.6; color: var(--gray-700); font-weight: 500; }
.ai-error code {
  background: var(--gray-900); color: #f1f5f9;
  padding: 2px 8px; border-radius: 6px;
  font-size: .9em; direction: ltr; display: inline-block;
}

.ai-spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.3); border-top-color: #fff;
  border-radius: 50%; animation: spin 700ms linear infinite;
  vertical-align: middle; margin-left: 8px;
}

/* AI generated question card */
.ai-questions { display: flex; flex-direction: column; gap: 16px; }
.ai-q-card {
  background: #fff; border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 22px 24px; box-shadow: var(--shadow-sm);
}
.ai-q-head {
  display: flex; gap: 10px; align-items: center;
  margin-bottom: 14px; flex-wrap: wrap;
}
.ai-q-remove {
  margin-right: auto; margin-left: 0;
  background: none; border: 1px solid var(--border-soft);
  color: var(--text-muted); font-size: 14px; font-weight: 600;
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; cursor: pointer;
  transition: all .15s ease;
}
.ai-q-remove:hover { background: var(--rose-50); border-color: var(--rose-300); color: var(--rose-600); }
.ai-q-num {
  font-weight: 800; color: var(--brand-600);
  font-size: 14px;
}
.ai-q-topic {
  padding: 4px 12px; border-radius: 100px;
  background: var(--brand-50); color: var(--brand-700);
  font-size: 12px; font-weight: 600;
}
.ai-q-diff {
  padding: 4px 12px; border-radius: 100px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
}
.ai-q-diff-easy   { background: var(--emerald-50); color: var(--emerald-600); }
.ai-q-diff-medium { background: #fef3c7; color: #92400e; }
.ai-q-diff-hard   { background: var(--rose-50); color: var(--rose-600); }

.ai-q-code {
  background: var(--gray-900); color: #e2e8f0;
  padding: 16px 18px; border-radius: var(--radius);
  font-family: 'JetBrains Mono', Monaco, monospace;
  font-size: 13px; line-height: 1.6;
  direction: ltr; text-align: left;
  overflow-x: auto;
  margin-bottom: 12px;
}
.ai-q-stem { font-size: 15px; color: var(--gray-800); margin-bottom: 14px; line-height: 1.6; font-weight: 500; }
.ai-q-options { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ai-q-options li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius);
  background: var(--bg-soft); border: 1.5px solid var(--border);
  font-size: 14px; line-height: 1.5;
}
.ai-q-options li.correct {
  background: var(--emerald-50); border-color: #6ee7b7;
  color: var(--emerald-600); font-weight: 600;
}
.ai-q-options .opt-num {
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; color: var(--gray-700);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
  border: 1.5px solid var(--border);
}
.ai-q-options li.correct .opt-num {
  background: var(--emerald-500); color: #fff; border-color: var(--emerald-500);
}
.ai-q-options .opt-mark {
  margin-right: auto; color: var(--emerald-600); font-weight: 800;
}
.ai-q-explain {
  margin-top: 14px;
}
.ai-q-explain summary {
  cursor: pointer; padding: 10px 14px;
  background: var(--brand-50); color: var(--brand-700);
  border-radius: var(--radius); font-weight: 600; font-size: 13px;
  list-style: none;
}
.ai-q-explain summary::-webkit-details-marker { display: none; }
.ai-q-explain summary::before { content: '📖 '; }
.ai-q-explain[open] summary { margin-bottom: 12px; }
.ai-q-explain-body {
  padding: 0 6px;
  font-size: 14px; line-height: 1.7;
  color: var(--gray-700);
}
.ai-q-opt-exps { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.ai-q-opt-exps > div {
  padding: 10px 14px; border-radius: 10px;
  border-right: 4px solid;
}
.ai-q-opt-exps .correct {
  background: var(--emerald-50); border-color: var(--emerald-500);
}
.ai-q-opt-exps .wrong {
  background: var(--rose-50); border-color: var(--rose-500);
}
.ai-actions { margin-top: 22px; text-align: center; }

/* AI question stem inside the quiz screen */
.ai-q-stem-card {
  background: var(--bg-soft); padding: 24px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
}
.ai-q-stem-text {
  font-size: 17px; line-height: 1.7;
  color: var(--gray-900); font-weight: 600;
  margin-bottom: 14px;
}
.ai-q-stem-card .ai-q-code {
  margin-bottom: 0;
}

@media (max-width: 980px) {
  .lab-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .lab-card { padding: 22px 18px; }
  .ai-q-card { padding: 18px 16px; }
  .ai-q-code { font-size: 12px; padding: 12px 14px; }
}

/* =====================================================
   PROGRESS PAGE
   ===================================================== */
.progress-hero {
  background: linear-gradient(135deg, var(--brand-900) 0%, var(--brand-700) 60%, var(--brand-500) 100%);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 32px 36px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.progress-hero::before {
  content: ''; position: absolute; top: -80px; right: -80px;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.18) 0%, transparent 70%);
  pointer-events: none;
}
.progress-hero-main {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 24px; margin-bottom: 28px;
  position: relative; z-index: 2;
}
.ph-block {
  text-align: center;
  border-right: 1px solid rgba(255,255,255,.18);
  padding: 0 12px;
}
.ph-block:first-child { border-right: none; padding-right: 0; }
.ph-num {
  font-size: clamp(36px, 5vw, 50px); font-weight: 900;
  line-height: 1; letter-spacing: -.02em;
  margin-bottom: 6px;
}
.ph-label { font-size: 13px; font-weight: 700; opacity: .92; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .05em; }
.ph-sub { font-size: 12px; opacity: .8; }

.progress-hero-bar { position: relative; z-index: 2; }
.phb-label {
  display: flex; justify-content: space-between;
  font-size: 13px; font-weight: 600;
  margin-bottom: 8px; opacity: .92;
}
.phb-track {
  height: 10px; background: rgba(255,255,255,.18);
  border-radius: 100px; overflow: hidden;
}
.phb-fill {
  height: 100%; background: linear-gradient(90deg, var(--accent-300), #fff);
  border-radius: 100px;
  box-shadow: 0 0 12px rgba(255,255,255,.5);
  transition: width 800ms cubic-bezier(.4,0,.2,1);
}

@media (max-width: 760px) {
  .progress-hero { padding: 24px 22px; }
  .progress-hero-main { grid-template-columns: 1fr 1fr; gap: 20px 12px; }
  .ph-block { padding: 0; border-right: none; border-bottom: 1px solid rgba(255,255,255,.18); padding-bottom: 14px; }
  .ph-block:nth-last-child(-n+2) { border-bottom: none; padding-bottom: 0; }
}
@media (max-width: 420px) {
  .progress-hero-main { grid-template-columns: 1fr 1fr; gap: 18px 10px; }
}

/* Streak/time/trend row */
.progress-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 18px; margin-bottom: 40px;
}
.progress-card {
  background: #fff; border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
}
.progress-card h3 {
  font-size: 14px; color: var(--text-muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 14px;
}
.big-num {
  font-size: 42px; font-weight: 900; line-height: 1;
  color: var(--gray-900); letter-spacing: -.02em;
  margin-bottom: 8px;
}
.big-num small { font-size: 16px; font-weight: 600; color: var(--text-muted); margin-right: 4px; }
.big-num.good { color: var(--emerald-600); }
.big-num.bad { color: var(--rose-500); }
.big-num.muted { color: var(--gray-400); }
.meta-line {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-soft); margin-bottom: 10px;
}
.meta-line strong { color: var(--gray-900); font-weight: 700; }
.badge-good, .badge-warn, .badge-info {
  display: inline-block; padding: 4px 12px;
  border-radius: 100px; font-size: 12px; font-weight: 700;
}
.badge-good { background: var(--emerald-50); color: var(--emerald-600); }
.badge-warn { background: #fffbeb; color: #92400e; }
.badge-info { background: var(--brand-50); color: var(--brand-700); }

@media (max-width: 880px) {
  .progress-row { grid-template-columns: 1fr; }
}

/* Mastery grid */
.progress-section { margin-bottom: 48px; }
.progress-section-head { margin-bottom: 22px; }
.progress-section-head h2 { font-size: 22px; color: var(--gray-900); margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }
.progress-section-head h2 .h-icon { width: 22px; height: 22px; margin: 0; }
.progress-card h3 { display: flex; align-items: center; gap: 8px; }
.progress-card h3 .h-icon { width: 18px; height: 18px; margin: 0; }
.progress-section-head p { color: var(--text-soft); font-size: 14px; line-height: 1.6; max-width: 760px; }

.mastery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.mastery-card {
  background: #fff; padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 12px;
}
.mastery-card::before {
  content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 4px;
  background: var(--accent, var(--brand-500));
}
.mastery-card.master { border-color: #a7f3d0; }
.mastery-card.master::before { background: var(--emerald-500); }
.mastery-card.good::before { background: #34d399; }
.mastery-card.mid::before { background: var(--amber-500); }
.mastery-card.weak { border-color: #fecaca; }
.mastery-card.weak::before { background: var(--rose-500); }
.mastery-card.unknown { background: var(--bg-soft); }
.mastery-head { display: flex; align-items: flex-start; gap: 12px; }
.mastery-icon { font-size: 22px; }
.mastery-title { flex: 1; min-width: 0; }
.mastery-title h4 { font-size: 15px; color: var(--gray-900); margin-bottom: 2px; }
.mastery-title small { font-size: 11px; color: var(--text-muted); }
.mastery-level {
  font-size: 11px; font-weight: 800; padding: 4px 10px;
  border-radius: 100px;
  background: var(--gray-100); color: var(--gray-700);
  text-transform: uppercase; letter-spacing: .05em;
  white-space: nowrap;
}
.mastery-card.master .mastery-level { background: var(--emerald-50); color: var(--emerald-600); }
.mastery-card.good .mastery-level { background: #d1fae5; color: var(--emerald-600); }
.mastery-card.mid .mastery-level { background: #fef3c7; color: #92400e; }
.mastery-card.weak .mastery-level { background: var(--rose-50); color: var(--rose-600); }
.mastery-bar {
  position: relative; height: 22px;
  background: var(--gray-100);
  border-radius: 100px; overflow: hidden;
}
.mastery-bar-fill {
  position: absolute; top: 0; bottom: 0; left: 0;
  background: var(--accent, var(--brand-500));
  border-radius: 100px;
  transition: width 700ms cubic-bezier(.4,0,.2,1);
}
.mastery-card.master .mastery-bar-fill { background: linear-gradient(90deg, #10b981, #34d399); }
.mastery-card.good .mastery-bar-fill { background: linear-gradient(90deg, #34d399, #6ee7b7); }
.mastery-card.mid .mastery-bar-fill { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.mastery-card.weak .mastery-bar-fill { background: linear-gradient(90deg, var(--rose-500), #fb7185); }
.mastery-bar-label {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800;
  color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.2);
  z-index: 2;
}
.mastery-empty {
  font-size: 13px; color: var(--text-muted);
  font-style: italic; padding: 6px 0;
}
.mastery-foot {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--text-muted);
}

/* Recent batches */
.recent-batches {
  background: #fff; border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft); box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.batch-row {
  display: grid;
  grid-template-columns: 80px 1fr 200px;
  gap: 18px; align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-soft);
}
.batch-row:last-child { border-bottom: none; }
.batch-score {
  font-size: 24px; font-weight: 900;
  text-align: center; padding: 10px;
  border-radius: 12px;
  background: var(--gray-100);
}
.batch-row.good .batch-score { background: var(--emerald-50); color: var(--emerald-600); }
.batch-row.mid .batch-score { background: #fef3c7; color: #92400e; }
.batch-row.bad .batch-score { background: var(--rose-50); color: var(--rose-600); }
.batch-meta { font-size: 14px; color: var(--gray-800); font-weight: 600; }
.batch-date { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.batch-bar {
  height: 8px; background: var(--gray-100);
  border-radius: 100px; overflow: hidden;
}
.batch-bar-fill {
  height: 100%; background: var(--brand-400);
  border-radius: 100px;
}
.batch-row.good .batch-bar-fill { background: var(--emerald-500); }
.batch-row.mid .batch-bar-fill { background: var(--amber-500); }
.batch-row.bad .batch-bar-fill { background: var(--rose-500); }

@media (max-width: 760px) {
  .batch-row { grid-template-columns: 64px 1fr; gap: 14px; padding: 14px 18px; }
  .batch-bar { grid-column: 1 / -1; }
  .batch-score { font-size: 20px; padding: 8px; }
}

/* Exam management */
.exam-row { border-bottom: 1px solid var(--border-soft); }
.exam-row:last-child { border-bottom: none; }
.exam-row .batch-row { border-bottom: none; }
.exam-actions { display: flex; gap: 6px; align-items: center; }
.btn-icon {
  width: 34px; height: 34px; border-radius: 8px; border: none;
  display: grid; place-items: center; cursor: pointer;
  background: transparent; color: var(--text-muted);
  transition: all var(--transition);
}
.btn-icon:hover { background: var(--bg-soft); color: var(--text-1); }
.btn-icon svg { transition: transform 0.2s ease; }
.exam-delete-btn:hover { color: var(--rose-600); background: var(--rose-50); }
.btn-danger {
  background: var(--rose-600); color: #fff; border: none;
  padding: 10px 20px; border-radius: 10px; font-weight: 600; cursor: pointer;
}
.btn-danger:hover { background: var(--rose-700); }

.exam-questions-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px; padding: 0 22px 16px;
}
.exam-q-thumb {
  position: relative; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border-soft); background: var(--bg-soft);
}
.exam-q-thumb img {
  width: 100%; height: 100px; object-fit: cover; object-position: top;
  display: block;
}
.exam-q-thumb-text {
  width: 100%; height: 100px; padding: 8px; font-size: 11px; line-height: 1.4;
  color: var(--text-secondary); overflow: hidden; direction: rtl;
}
.exam-q-thumb-info {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 8px; font-size: 11px; font-weight: 600; color: var(--text-muted);
}
.btn-icon-sm {
  width: 22px; height: 22px; border: none; background: transparent;
  color: var(--text-muted); cursor: pointer; border-radius: 4px;
  font-size: 13px; font-weight: 700;
  display: grid; place-items: center; transition: all var(--transition);
}
.btn-icon-sm:hover { background: var(--rose-50); color: var(--rose-600); }

.upload-drop-zone {
  border: 2px dashed var(--border-soft); border-radius: 12px;
  padding: 24px 16px; text-align: center; cursor: pointer;
  transition: all var(--transition); margin-bottom: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.upload-drop-zone:hover, .upload-drop-zone.drag-over {
  border-color: var(--brand-400); background: var(--brand-50);
}
.upload-drop-zone.has-file {
  border-color: var(--green-500); background: var(--green-50, #f0fdf4);
}
.upload-drop-zone strong { font-size: 14px; color: var(--text-primary); }
.upload-drop-zone .drop-hint { font-size: 12px; color: var(--text-muted); }
.upload-drop-zone.has-file .drop-hint { display: none; }
.upload-drop-zone .drop-file-name {
  font-size: 13px; color: var(--green-700, #15803d); font-weight: 600;
  direction: ltr; word-break: break-all;
}
.upload-drop-zone-sm { padding: 16px 12px; }
.upload-drop-zone-sm svg { display: none; }
.upload-guidance {
  font-size: 13px; color: var(--text-muted); line-height: 1.7;
  margin-top: 8px; padding: 10px 14px;
  background: var(--amber-50); border-radius: 8px; border: 1px solid var(--amber-200);
}

@media (max-width: 760px) {
  .exam-questions-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; padding: 0 14px 12px; }
  .exam-q-thumb img { height: 70px; }
}

/* Tips grid */
.tips-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.tip-card {
  display: flex; gap: 16px;
  background: #fff; padding: 22px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.tip-card::before {
  content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 4px;
}
.tip-card.tone-good::before { background: var(--emerald-500); }
.tip-card.tone-warn::before { background: var(--amber-500); }
.tip-card.tone-info::before { background: var(--brand-500); }
.tip-icon {
  font-size: 28px; flex-shrink: 0;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: var(--brand-50); border-radius: 14px;
}
.tip-card.tone-good .tip-icon { background: var(--emerald-50); }
.tip-card.tone-warn .tip-icon { background: #fffbeb; }
.tip-body { flex: 1; min-width: 0; }
.tip-body h4 { font-size: 16px; color: var(--gray-900); margin-bottom: 6px; }
.tip-body p { font-size: 14px; color: var(--text-soft); line-height: 1.6; margin-bottom: 10px; }
.tip-cta { margin-top: 4px; }

.empty-state {
  text-align: center; padding: 40px 20px;
  background: #fff; border-radius: var(--radius-lg);
  border: 1px dashed var(--border);
  color: var(--text-muted); font-size: 14px;
}

/* =====================================================
   COURSE ACTIONS MODAL
   ===================================================== */
.modal-actions { max-width: 540px; }
.course-actions-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px; margin-top: 18px;
}
.action-tile {
  background: #fff;
  padding: 22px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column;
  align-items: flex-start; gap: 6px;
  text-align: right;
  transition: all var(--transition);
}
.action-tile:hover {
  border-color: var(--brand-400);
  background: var(--brand-50);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.action-icon {
  font-size: 28px; margin-bottom: 4px;
  display: grid; place-items: center;
  width: 48px; height: 48px;
  background: var(--brand-50); border-radius: 12px;
  color: var(--brand-700);
}
.action-icon svg { width: 24px; height: 24px; display: block; }
.action-tile:hover .action-icon { background: #fff; }
.action-tile strong { font-size: 16px; color: var(--gray-900); }
.action-tile small { font-size: 12px; color: var(--text-muted); line-height: 1.4; }

@media (max-width: 480px) {
  .course-actions-grid { grid-template-columns: 1fr; }
}

/* =====================================================
   SMART STUDY FROM SUMMARY
   ===================================================== */

/* Featured tile in course-actions modal (highlighted Smart Study) */
.action-tile-upload {
  background: linear-gradient(135deg, #eff6ff, #dbeafe) !important;
  border: 2px dashed var(--brand-400) !important;
}
.action-tile-upload .action-icon { color: var(--brand-600); }
.action-tile-featured {
  background: linear-gradient(135deg, var(--brand-50), #ecfeff) !important;
  border: 2px solid var(--accent-400, #22d3ee) !important;
  position: relative;
}
.action-tile-featured::after {
  content: '✨ חדש';
  position: absolute;
  top: -8px;
  left: -8px;
  background: var(--accent-500, #06b6d4);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

/* Hero feature card on landing (the prominent "Smart Study" card) */
.feature-card.feature-hero {
  background: linear-gradient(155deg, #fff 0%, var(--brand-50) 60%, #eff6ff 100%);
  border: 1.5px solid var(--brand-300);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .04), 0 12px 32px -12px rgba(29, 78, 216, .25);
}
.feature-card.feature-hero h3 { font-size: 20px; }
.feature-card.feature-hero p strong { color: var(--brand-800, #1e3a8a); font-weight: 700; }

/* ===== Study list page ===== */
.study-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.study-pack-card {
  position: relative;
  display: block;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: transform .18s, box-shadow .18s, border-color .18s;
  cursor: pointer;
}
.study-pack-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15,23,42,.08);
  border-color: var(--brand-300, #93c5fd);
}
.study-pack-card-icon { font-size: 28px; margin-bottom: 8px; }
.study-pack-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900, #111);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.study-pack-card-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.study-pack-card-meta span {
  font-size: 11px;
  color: var(--brand-700);
  background: var(--brand-50);
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 600;
}
.study-pack-card-date {
  font-size: 11px;
  color: var(--text-muted);
}
.study-pack-card-delete {
  position: absolute;
  top: 12px;
  left: 12px;
  background: transparent;
  border: 0;
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background .15s;
}
.study-pack-card-delete:hover {
  background: #fee2e2;
  color: #dc2626;
}

.study-empty {
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  border: 2px dashed var(--gray-200, #e5e7eb);
  border-radius: 20px;
  margin-top: 24px;
}
.study-empty-icon { font-size: 56px; margin-bottom: 12px; color: var(--brand-600); display: flex; justify-content: center; }
.study-empty-icon svg { width: 56px; height: 56px; }
.study-empty h2 { margin: 0 0 8px; font-size: 22px; }
.study-empty p { color: var(--text-muted); max-width: 480px; margin: 0 auto 20px; line-height: 1.6; }

.study-quota-banner { margin-top: 16px; }
.quota-pill {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--brand-50);
  border: 1px solid var(--brand-200, #c7d2fe);
  border-radius: 14px;
}
.quota-pill-icon { font-size: 24px; }
.quota-pill strong { display: block; font-size: 14px; color: var(--brand-800, #1e293b); }
.quota-pill small { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.quota-pill-empty { background: #fef3c7; border-color: #fcd34d; }
.quota-pill-unlimited { background: linear-gradient(135deg, #fef3c7, #fed7aa); border-color: #fbbf24; }

/* ===== Study create page ===== */
/* Progress bar animation during study pack creation */
.study-progress-wrap {
  margin-top: 16px;
  text-align: center;
}
.study-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--gray-100);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 10px;
}
.study-progress-fill {
  height: 100%;
  background: var(--gradient-brand);
  border-radius: 100px;
  transition: width 1.2s cubic-bezier(.22, .61, .36, 1);
}
.study-progress-step {
  font-size: 14px;
  color: var(--brand-700);
  font-weight: 600;
  animation: sp-pulse 2s ease-in-out infinite;
}
@keyframes sp-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .6; }
}

.study-create-card {
  background: #fff;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 18px;
  padding: 28px;
  max-width: 760px;
  margin: 24px auto 0;
  box-shadow: 0 4px 12px rgba(15,23,42,.04);
}
.study-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 0;
}
.study-tab {
  background: transparent;
  border: 0;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: color .15s, border-color .15s;
  display: inline-flex; align-items: center; gap: 8px;
}
.study-tab .btn-icon { width: 16px; height: 16px; }
.study-tab:hover { color: var(--brand-700); }
.study-tab.active {
  color: var(--brand-700);
  border-bottom-color: var(--brand-500, #6366f1);
}

.study-tab-panel .field { margin-bottom: 18px; }
.study-tab-panel textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  padding: 14px;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  resize: vertical;
  min-height: 240px;
}
.study-tab-panel textarea:focus { outline: 2px solid var(--brand-500); outline-offset: 0; border-color: transparent; }
.study-text-meta {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}
.study-text-min { opacity: .7; }

.study-pdf-drop {
  border: 2px dashed var(--gray-300, #d1d5db);
  border-radius: 14px;
  padding: 32px 20px;
  text-align: center;
  background: var(--gray-50, #f9fafb);
  transition: border-color .15s, background .15s;
}
.study-pdf-drop.drag-over {
  border-color: var(--brand-500);
  background: var(--brand-50);
}
.study-pdf-icon { font-size: 36px; margin-bottom: 8px; color: var(--brand-600); display: flex; justify-content: center; }
.study-pdf-icon svg { width: 40px; height: 40px; }
.study-pdf-drop p { margin: 8px 0 4px; font-size: 14px; }
.study-pdf-drop small { color: var(--text-muted); font-size: 12px; }
.study-pdf-selected { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; }
.link-btn {
  background: transparent;
  border: 0;
  color: var(--brand-700);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.study-error {
  color: #dc2626;
  font-size: 14px;
  min-height: 20px;
  margin: 8px 0 12px;
}
.study-quota-hint {
  text-align: center;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.quota-blocked {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  text-align: center;
}
.quota-blocked a { color: #b45309; font-weight: 700; }

#study-create-submit { margin-top: 8px; }
.btn-spinner {
  display: inline-block;
  font-size: 14px;
}

/* ===== Study pack viewer ===== */
.study-pack-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: #fff;
  padding: 8px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  margin-top: 16px;
  overflow-x: auto;
}
.pack-tab {
  background: transparent;
  border: 0;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 10px;
  white-space: nowrap;
  transition: background .15s, color .15s;
  display: inline-flex; align-items: center; gap: 7px;
}
.pack-tab .btn-icon { width: 16px; height: 16px; }
.pack-tab:hover { color: var(--brand-700); background: var(--brand-50); }
.pack-tab.active {
  background: var(--brand-100, #e0e7ff);
  color: var(--brand-800, #1e3a8a);
}

.study-pack-panels { margin-top: 18px; }
.pack-panel {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  padding: 24px;
  min-height: 200px;
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

/* MCQ in study pack */
.study-question {
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  background: var(--gray-50, #f9fafb);
}
.study-question-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.study-question-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-700);
}
.study-q-remove {
  background: none; border: 1px solid var(--border-soft);
  color: var(--text-muted); font-size: 13px; font-weight: 600;
  width: 26px; height: 26px; border-radius: 7px;
  display: grid; place-items: center; cursor: pointer;
  transition: all .15s ease;
}
.study-q-remove:hover { background: var(--rose-50); border-color: var(--rose-300); color: var(--rose-600); }
.study-question-stem {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 12px;
  line-height: 1.5;
}
.study-question-options { list-style: none; padding: 0; margin: 0 0 12px; }
.study-question-options li {
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  margin-bottom: 6px;
  font-size: 14px;
}
.study-question.revealed .study-question-options li.is-correct {
  background: #d1fae5;
  border-color: #10b981;
  color: #065f46;
  font-weight: 600;
}
.study-question-explain {
  display: none;
  background: #fff;
  border: 1px solid var(--brand-200, #c7d2fe);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 10px;
}
.study-question.revealed .study-question-explain { display: block; }
.study-question-explain strong { color: var(--brand-800); display: block; margin-bottom: 6px; }
.study-question-explain p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--gray-700, #374151); }

/* Flashcards (CSS flip) */
.flashcards-hint { text-align: center; font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }
.flashcards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.flashcard {
  perspective: 1000px;
  cursor: pointer;
  height: 200px;
  outline: none;
}
.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform .5s;
  transform-style: preserve-3d;
}
.flashcard.flipped .flashcard-inner { transform: rotateY(180deg); }
.flashcard-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border: 1px solid var(--brand-200);
  box-shadow: 0 4px 12px rgba(15,23,42,.06);
}
.flashcard-front { background: linear-gradient(135deg, #fff, var(--brand-50)); }
.flashcard-back {
  background: linear-gradient(135deg, var(--brand-50), #ecfeff);
  transform: rotateY(180deg);
}
.flashcard-num {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 11px;
  background: var(--brand-100);
  color: var(--brand-800);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
}
.flashcard-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.5;
  max-height: 100%;
  overflow-y: auto;
}
.flashcard-back .flashcard-text { font-weight: 500; color: var(--brand-900, #312e81); }
.flashcard-hint {
  position: absolute;
  bottom: 8px;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Outline */
.study-outline { padding: 0; }
.study-outline-section { margin-bottom: 24px; }
.study-outline-section h3 {
  font-size: 18px;
  color: var(--brand-800);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.study-outline-num {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: var(--brand-100);
  color: var(--brand-800);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.study-outline-list {
  list-style: none;
  padding-right: 16px;
  border-right: 2px solid var(--brand-100);
  margin: 6px 0;
}
.study-outline-list.depth-1 { border-right-color: var(--gray-200); margin-top: 4px; }
.study-outline-list li { padding: 6px 0; font-size: 14px; }
.study-outline-list li strong { color: var(--gray-900); }
.outline-leaf { color: var(--gray-700); }

/* Glossary */
.study-glossary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  padding: 0;
  margin: 0;
}
.glossary-item {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 14px;
}
.glossary-item dt {
  font-weight: 700;
  color: var(--brand-800);
  font-size: 14px;
  margin-bottom: 4px;
}
.glossary-item dd {
  margin: 0;
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.6;
}

/* Open questions */
.study-open-q {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 14px;
}
.study-open-q-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-700);
  margin-bottom: 4px;
}
.study-open-q-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 12px;
  line-height: 1.5;
}
.study-open-q-answer {
  display: none;
  background: #fff;
  border: 1px solid var(--brand-200);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 10px;
}
.study-open-q.revealed .study-open-q-answer { display: block; }
.study-open-q-answer strong { color: var(--brand-800); }
.study-open-q-answer p { margin: 4px 0 0; font-size: 14px; line-height: 1.6; color: var(--gray-700); }

/* Self test */
.self-test-intro {
  background: var(--brand-50);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--brand-800);
}
.self-test-items > .st-item {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 14px;
}
.st-item-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-700);
  margin-bottom: 6px;
}
.st-item-stem {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 12px;
  line-height: 1.5;
}
.st-options { display: flex; flex-direction: column; gap: 6px; }
.st-option {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 10px 14px;
  text-align: right;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.st-option:not(:disabled):hover { background: var(--brand-50); border-color: var(--brand-300); }
.st-option:disabled { cursor: default; opacity: .8; }
.st-option.is-correct { background: #d1fae5; border-color: #10b981; color: #065f46; font-weight: 600; }
.st-option.is-wrong { background: #fee2e2; border-color: #ef4444; color: #991b1b; }
.st-flash-back {
  display: none;
  background: #fff;
  border: 1px solid var(--brand-200);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.6;
}
.st-item-flash.revealed .st-flash-back { display: block; }
.st-flash-rate { display: none; gap: 8px; margin-top: 8px; }
.st-item-flash.revealed:not(.rated) .st-flash-rate { display: flex; }

.self-test-result { margin-top: 20px; text-align: center; }
.st-progress { font-size: 14px; color: var(--text-muted); }
.st-result-card {
  background: linear-gradient(135deg, var(--brand-50), #ecfeff);
  border: 2px solid var(--brand-300);
  border-radius: 18px;
  padding: 28px;
  display: inline-block;
}
.st-result-emoji { font-size: 48px; margin-bottom: 8px; }
.st-result-score {
  font-size: 32px;
  font-weight: 800;
  color: var(--brand-800);
}
.st-result-pct {
  font-size: 18px;
  color: var(--brand-700);
  margin-bottom: 8px;
}
.st-result-verdict { font-size: 14px; color: var(--gray-700); }

/* Paywall modal */
.paywall-backdrop { z-index: 9999; }
.modal-paywall {
  max-width: 460px;
  text-align: center;
  padding: 36px 32px;
}
.paywall-icon { font-size: 56px; margin-bottom: 12px; color: var(--brand-600); display: flex; justify-content: center; }
.paywall-icon svg { width: 56px; height: 56px; }
.modal-paywall h2 { margin: 0 0 8px; font-size: 22px; color: var(--gray-900); }
.modal-paywall .modal-sub { margin-bottom: 20px; line-height: 1.6; }
.paywall-features {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  text-align: right;
}
.paywall-features li {
  font-size: 14px;
  padding: 6px 0;
  color: var(--gray-700);
  display: flex; align-items: center; gap: 10px;
}
#paywall-upgrade { margin-bottom: 8px; }

@media (max-width: 600px) {
  .study-pack-tabs { padding: 6px; }
  .pack-tab { padding: 8px 12px; font-size: 13px; }
  .pack-panel { padding: 16px; }
  .flashcards-grid { grid-template-columns: 1fr; }
  .study-create-card { padding: 20px; }
}

/* =====================================================
   USER DROPDOWN MENU (clickable avatar in topbar)
   ===================================================== */
.app-user-clickable {
  cursor: pointer;
  border-radius: 12px;
  padding: 6px 10px;
  position: relative;
  transition: background 160ms ease;
}
.app-user-clickable:hover { background: var(--brand-50); }
.app-user-caret {
  display: inline-flex;
  color: var(--text-muted);
  margin-inline-start: 2px;
  transition: transform 160ms ease;
}
.app-user-clickable:hover .app-user-caret { color: var(--brand-700); }

.user-menu-pop {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 200;
  width: 280px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, .06),
    0 24px 48px -16px rgba(15, 23, 42, .25);
  padding: 10px;
  animation: userMenuPop 160ms cubic-bezier(.2, .8, .2, 1);
  text-align: right;
}
@keyframes userMenuPop {
  from { opacity: 0; transform: translateY(-6px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.user-menu-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 10px 14px;
  position: relative;
}
.user-menu-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-800));
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 17px;
  flex-shrink: 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 4px 10px -4px rgba(29, 78, 216, .45);
}
.user-menu-id { flex: 1; min-width: 0; }
.user-menu-name {
  font-weight: 700; font-size: 14.5px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-menu-email {
  font-size: 12px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-menu-plan {
  position: absolute; top: 8px; left: 8px;
  font-size: 10px; font-weight: 800;
  background: var(--gray-100); color: var(--gray-600);
  padding: 3px 8px; border-radius: 100px;
  letter-spacing: .04em;
}
.user-menu-plan.is-pro {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff;
}
.user-menu-divider {
  height: 1px;
  background: var(--border-soft);
  margin: 4px 0;
}
.user-menu-item {
  display: flex; align-items: center; gap: 11px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: 0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-align: right;
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease;
}
.user-menu-item svg { color: var(--text-muted); flex-shrink: 0; }
.user-menu-item:hover { background: var(--brand-50); color: var(--brand-800); }
.user-menu-item:hover svg { color: var(--brand-700); }
.user-menu-logout { color: var(--rose-600); }
.user-menu-logout svg { color: var(--rose-500); }
.user-menu-logout:hover { background: var(--rose-50); color: var(--rose-600); }
.user-menu-logout:hover svg { color: var(--rose-600); }

@media (max-width: 760px) {
  .user-menu-pop { width: 260px; left: auto; right: 0; }
}

/* =====================================================
   SETTINGS PAGE
   ===================================================== */
.settings-page {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 0 60px;
}
.settings-side h1 {
  font-size: 28px; margin-bottom: 6px;
  letter-spacing: -.03em;
}
.settings-side-sub {
  font-size: 13.5px; color: var(--text-muted);
  margin-bottom: 22px; line-height: 1.5;
}
.settings-nav { display: flex; flex-direction: column; gap: 4px; }
.settings-nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 14px;
  background: transparent;
  border: 0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft);
  cursor: pointer;
  text-align: right;
  transition: background 150ms ease, color 150ms ease;
}
.settings-nav-item svg { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; }
.settings-nav-item:hover { background: var(--brand-50); color: var(--brand-800); }
.settings-nav-item:hover svg { color: var(--brand-700); }
.settings-nav-item.active {
  background: var(--brand-50);
  color: var(--brand-800);
  font-weight: 600;
}
.settings-nav-item.active svg { color: var(--brand-700); }
.settings-nav-danger { color: var(--rose-600); }
.settings-nav-danger svg { color: var(--rose-500); }
.settings-nav-danger:hover, .settings-nav-danger.active {
  background: var(--rose-50); color: var(--rose-600);
}
.settings-nav-danger:hover svg { color: var(--rose-600); }

.settings-content { min-width: 0; }
.settings-panel { display: block; }
.settings-panel[hidden] { display: none; }
.settings-panel-head { margin-bottom: 18px; }
.settings-panel-head h2 {
  font-size: 24px; margin-bottom: 4px;
  color: var(--text);
  letter-spacing: -.025em;
}
.settings-panel-head p {
  font-size: 14px; color: var(--text-muted); line-height: 1.5;
}
.settings-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
}
.settings-card h3 {
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--text);
  letter-spacing: -.018em;
}
.settings-help {
  font-size: 13.5px; color: var(--text-muted);
  line-height: 1.55; margin-bottom: 16px;
}

/* Profile section */
.settings-profile-row {
  display: flex; align-items: center; gap: 16px;
  padding-bottom: 18px; margin-bottom: 18px;
  border-bottom: 1px solid var(--border-soft);
}
.settings-avatar-big {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-800));
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 26px;
  flex-shrink: 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 6px 16px -6px rgba(29, 78, 216, .45);
}
.settings-profile-meta { flex: 1; min-width: 0; }
.settings-profile-name {
  font-weight: 700; font-size: 18px; color: var(--text);
  margin-bottom: 2px;
}
.settings-profile-email {
  font-size: 13.5px; color: var(--text-muted);
}
.settings-form { display: flex; flex-direction: column; gap: 14px; }
.settings-form .field { margin: 0; }
.settings-form .field label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-soft); margin-bottom: 6px;
}
.settings-form .field input {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.settings-form .field input:focus {
  outline: 0;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}
.settings-form .field input:disabled {
  background: var(--bg-soft);
  color: var(--text-muted);
  cursor: not-allowed;
}
.settings-form .field small {
  display: block; font-size: 12px; color: var(--text-muted);
  margin-top: 4px;
}
.settings-save-status {
  display: inline-block;
  margin-inline-start: 12px;
  font-size: 13px; color: var(--text-muted);
  vertical-align: middle;
}
.settings-save-status.is-ok { color: var(--brand-700); font-weight: 600; }

/* Plan section */
.settings-plan-card {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 18px;
  background: linear-gradient(135deg, var(--brand-50), #fff);
  border-color: var(--brand-200);
}
.settings-plan-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--brand-700);
  margin-bottom: 4px;
}
.settings-plan-name {
  font-size: 32px; font-weight: 800; color: var(--text);
  letter-spacing: -.025em;
  line-height: 1; margin-bottom: 6px;
}
.settings-plan-meta { font-size: 13.5px; color: var(--text-soft); line-height: 1.5; }
.settings-plan-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.settings-plan-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.settings-plan-tile {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 6px;
  padding: 16px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  text-align: right;
  cursor: pointer;
  font-family: inherit;
  transition: all 160ms ease;
}
.settings-plan-tile:hover { border-color: var(--brand-400); background: var(--brand-50); transform: translateY(-2px); }
.settings-plan-tile.is-current {
  border-color: var(--brand-600);
  background: var(--brand-50);
}
.settings-plan-tile.is-current::after {
  content: 'נוכחי';
  font-size: 10px; font-weight: 800;
  background: var(--brand-700); color: #fff;
  padding: 3px 8px; border-radius: 100px;
  align-self: flex-start;
}
.settings-plan-tile strong { font-size: 14px; font-weight: 700; color: var(--text); }
.settings-plan-price { font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: -.018em; }
.settings-plan-price small { font-size: 11px; font-weight: 500; color: var(--text-muted); }
.settings-plan-tile small { font-size: 11.5px; color: var(--text-muted); line-height: 1.4; }
.admin-current-badge {
  display: inline-block; font-size: 10px; font-weight: 700; color: #fff;
  background: var(--emerald-500); padding: 2px 8px; border-radius: 100px;
  margin-top: 4px;
}

/* Appearance / theme picker */
.theme-picker {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.theme-option {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: all 160ms ease;
}
.theme-option:hover { border-color: var(--brand-400); transform: translateY(-2px); }
.theme-option.is-active {
  border-color: var(--brand-600);
  background: var(--brand-50);
  color: var(--brand-800);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 4px 12px -4px rgba(29, 78, 216, .25);
}
.theme-preview {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.theme-preview-bar {
  position: absolute; top: 0; left: 0; right: 0; height: 14px;
  border-bottom: 1px solid var(--border);
}
.theme-preview-card {
  position: absolute; top: 22px; left: 12px; right: 12px; height: calc(100% - 34px);
  border-radius: 4px;
}
.theme-preview-light { background: #fafbff; }
.theme-preview-light .theme-preview-bar { background: #fff; }
.theme-preview-light .theme-preview-card { background: #fff; border: 1px solid #e2e8f0; }
.theme-preview-dark { background: #0b1120; border-color: #1f2937; }
.theme-preview-dark .theme-preview-bar { background: #111827; border-color: #1f2937; }
.theme-preview-dark .theme-preview-card { background: #111827; border: 1px solid #1f2937; }
.theme-preview-auto {
  background: linear-gradient(90deg, #fafbff 0%, #fafbff 50%, #0b1120 50%, #0b1120 100%);
}
.theme-preview-auto .theme-preview-bar { background: linear-gradient(90deg, #fff 0%, #fff 50%, #111827 50%, #111827 100%); }
.theme-preview-auto .theme-preview-card { background: linear-gradient(90deg, #fff 0%, #fff 50%, #111827 50%, #111827 100%); border: 1px solid var(--border); }

/* Notifications */
.settings-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
}
.settings-toggle-row:last-child { border-bottom: 0; padding-bottom: 0; }
.settings-toggle-row strong { font-size: 14.5px; color: var(--text); display: block; margin-bottom: 2px; }
.settings-toggle-row p { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
.settings-switch {
  position: relative;
  width: 42px; height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}
.settings-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.settings-switch-slider {
  position: absolute; inset: 0;
  background: var(--gray-300);
  border-radius: 100px;
  transition: background 180ms ease;
}
.settings-switch-slider::before {
  content: '';
  position: absolute;
  top: 3px; right: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .25);
  transition: transform 180ms ease;
}
.settings-switch input:checked + .settings-switch-slider {
  background: linear-gradient(180deg, var(--brand-500), var(--brand-700));
}
.settings-switch input:checked + .settings-switch-slider::before {
  transform: translateX(-18px);
}

/* Privacy */
.settings-actions-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* Danger zone */
.settings-card-danger { border-color: rgba(244, 63, 94, .25); background: rgba(244, 63, 94, .03); }
.settings-card-danger h3 { color: var(--rose-600); }

@media (max-width: 920px) {
  .settings-page { grid-template-columns: 1fr; gap: 18px; }
  .settings-side h1 { font-size: 24px; }
  .settings-nav { flex-direction: row; flex-wrap: wrap; gap: 6px; overflow-x: auto; }
  .settings-nav-item { padding: 8px 12px; font-size: 13px; }
  .settings-plan-grid { grid-template-columns: 1fr; }
  .theme-picker { grid-template-columns: 1fr; }
}

/* =====================================================
   DARK MODE
   ===================================================== */
:root[data-theme="dark"] {
  --bg: #0a1020;
  --bg-elevated: #111a2e;
  --bg-soft: #0e1628;
  --bg-subtle: #0c1224;
  --card-bg: #111a2e;
  --text: #e6edf7;
  --text-1: #e6edf7;
  --text-muted: #8a96ac;
  --text-soft: #b6c0d3;
  --border: #1f2a40;
  --border-soft: #18223a;

  --primary: var(--brand-400);
  --primary-rgb: 96, 165, 250;

  --gray-50:  #0e1628;
  --gray-100: #131c30;
  --gray-200: #1f2a40;
  --gray-300: #2c3854;
  --gray-400: #62718e;
  --gray-500: #8a96ac;
  --gray-600: #a9b3c6;
  --gray-700: #c5cddc;
  --gray-800: #dce3ee;
  --gray-900: #ecf0f8;
  --gray-950: #f5f7fb;

  --brand-50: #0f1d3a;
  --brand-100: #142850;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .35), 0 1px 2px rgba(0, 0, 0, .25);
  --shadow:    0 4px 14px rgba(0, 0, 0, .4),  0 2px 4px rgba(0, 0, 0, .25);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, .45), 0 4px 12px rgba(0, 0, 0, .3);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5),  0 8px 20px rgba(0, 0, 0, .35);

  --gradient-soft: linear-gradient(135deg, #0a1020 0%, #0e1628 60%, #0f1d3a 100%);
}

/* Targeted overrides for elements that hardcode colors instead of using vars */
:root[data-theme="dark"] body { background: var(--bg); color: var(--text); }
:root[data-theme="dark"] .navbar { background: rgba(10, 16, 32, .85); border-bottom-color: var(--border); }
:root[data-theme="dark"] .nav-links a { color: var(--text-soft); }
:root[data-theme="dark"] .nav-links a:hover { color: var(--brand-400); }
:root[data-theme="dark"] .logo { color: var(--text); }
:root[data-theme="dark"] .logo:hover { color: var(--text); }
:root[data-theme="dark"] .hero { background: var(--gradient-soft); }
:root[data-theme="dark"] .hero h1 { color: var(--text); }
:root[data-theme="dark"] .hero-text .badge { background: rgba(20, 40, 80, .6); color: var(--brand-300); border-color: rgba(59, 130, 246, .3); }
:root[data-theme="dark"] .feature-card,
:root[data-theme="dark"] .pain-card,
:root[data-theme="dark"] .price-card,
:root[data-theme="dark"] .progress-card,
:root[data-theme="dark"] .lab-card,
:root[data-theme="dark"] .settings-card { background: var(--bg-elevated); border-color: var(--border); }
:root[data-theme="dark"] .feature-card.feature-hero { background: linear-gradient(155deg, #111a2e 0%, #142850 60%, #0f1d3a 100%); border-color: var(--brand-700); }
:root[data-theme="dark"] .feature-card h3,
:root[data-theme="dark"] .pain-card h3,
:root[data-theme="dark"] .price-card h3,
:root[data-theme="dark"] .price-name { color: var(--text); }
:root[data-theme="dark"] .feature-card p,
:root[data-theme="dark"] .pain-card p,
:root[data-theme="dark"] .price-desc { color: var(--text-soft); }
:root[data-theme="dark"] .section-title,
:root[data-theme="dark"] .showcase-text h2,
:root[data-theme="dark"] .insights-section-head h2,
:root[data-theme="dark"] .progress-section-head h2 { color: var(--text); }
:root[data-theme="dark"] .section-sub,
:root[data-theme="dark"] .showcase-text p,
:root[data-theme="dark"] .insights-section-head p,
:root[data-theme="dark"] .progress-section-head p { color: var(--text-soft); }
:root[data-theme="dark"] .section-eyebrow { background: rgba(20, 40, 80, .5); border-color: rgba(59, 130, 246, .25); color: var(--brand-300); }
:root[data-theme="dark"] .showcase.reverse { background: var(--bg-soft); }
:root[data-theme="dark"] .how { background: var(--bg-elevated); }
:root[data-theme="dark"] .faq { background: var(--bg-elevated); }
:root[data-theme="dark"] .faq-item { background: var(--bg-soft); border-color: var(--border); }
:root[data-theme="dark"] .faq-q { color: var(--text); }
:root[data-theme="dark"] .faq-q:hover { background: rgba(20, 40, 80, .4); }
:root[data-theme="dark"] .faq-a-inner { color: var(--text-soft); }
:root[data-theme="dark"] .pain-section { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%); }
:root[data-theme="dark"] .testimonials-paper { background: var(--bg-soft); }
:root[data-theme="dark"] .paper-bubble { background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text-soft); }
:root[data-theme="dark"] .paper-time { color: var(--text-muted); }
:root[data-theme="dark"] .price-card.featured { background: linear-gradient(180deg, var(--bg-elevated) 0%, #0f1d3a 100%); }
:root[data-theme="dark"] .price-card.education { background: linear-gradient(180deg, var(--bg-elevated) 0%, #0c2a3a 100%); border-color: var(--accent-700); }
:root[data-theme="dark"] .price-features li { color: var(--text-soft); }
:root[data-theme="dark"] .price-amount { color: var(--text); }
:root[data-theme="dark"] .trial-banner { background: linear-gradient(135deg, #0f1d3a 0%, #0d2818 100%); border-color: var(--brand-700); }
:root[data-theme="dark"] .trial-banner.warning { background: linear-gradient(135deg, #1a1500 0%, #2a1f00 100%); border-color: var(--amber-700); }
:root[data-theme="dark"] .trial-banner.urgent { background: linear-gradient(135deg, #1a0505 0%, #2a0a0a 100%); border-color: var(--rose-700); }
:root[data-theme="dark"] .trial-banner-text { color: var(--text-soft); }
:root[data-theme="dark"] .trial-banner-text strong { color: var(--text); }
:root[data-theme="dark"] .paywall-plan-highlight { background: var(--bg-elevated); border-color: var(--brand-700); }
/* Buttons in dark */
:root[data-theme="dark"] .btn-ghost {
  background: var(--bg-elevated); color: var(--text);
  border-color: var(--border);
}
:root[data-theme="dark"] .btn-ghost:hover { background: var(--bg-soft); border-color: var(--gray-300); color: var(--text); }
:root[data-theme="dark"] .btn-soft { background: rgba(20, 40, 80, .5); color: var(--brand-300); }
:root[data-theme="dark"] .btn-soft:hover { background: rgba(20, 40, 80, .8); color: var(--brand-200); }

/* App screens (dashboard, etc.) */
:root[data-theme="dark"] .app-topbar { background: rgba(10, 16, 32, .9); border-bottom-color: var(--border); }
:root[data-theme="dark"] .topbar-nav a { color: var(--text-soft); }
:root[data-theme="dark"] .topbar-nav a:hover,
:root[data-theme="dark"] .topbar-nav a.active { color: var(--brand-400); }
:root[data-theme="dark"] .app-user-name { color: var(--text); }
:root[data-theme="dark"] .app-user-plan { background: rgba(20, 40, 80, .6); color: var(--brand-300); }
:root[data-theme="dark"] .app-user-clickable:hover { background: rgba(20, 40, 80, .5); }

/* User dropdown in dark */
:root[data-theme="dark"] .user-menu-pop { background: var(--bg-elevated); border-color: var(--border); }
:root[data-theme="dark"] .user-menu-item:hover { background: rgba(20, 40, 80, .5); color: var(--brand-300); }
:root[data-theme="dark"] .user-menu-item:hover svg { color: var(--brand-400); }
:root[data-theme="dark"] .user-menu-plan { background: var(--bg-soft); color: var(--text-soft); }
:root[data-theme="dark"] .user-menu-logout { color: #fb7185; }
:root[data-theme="dark"] .user-menu-logout:hover { background: rgba(244, 63, 94, .1); color: #fda4af; }

/* Settings page in dark */
:root[data-theme="dark"] .settings-form .field input {
  background: var(--bg-soft);
  border-color: var(--border);
  color: var(--text);
}
:root[data-theme="dark"] .settings-form .field input:disabled { background: var(--bg); color: var(--text-muted); }
:root[data-theme="dark"] .settings-plan-card { background: linear-gradient(135deg, #0f1d3a, var(--bg-elevated)); border-color: var(--brand-700); }
:root[data-theme="dark"] .settings-plan-tile { background: var(--bg-soft); border-color: var(--border); }
:root[data-theme="dark"] .settings-plan-tile:hover { background: rgba(20, 40, 80, .5); }
:root[data-theme="dark"] .settings-plan-tile.is-current { background: rgba(20, 40, 80, .5); border-color: var(--brand-500); }
:root[data-theme="dark"] .theme-option { background: var(--bg-soft); border-color: var(--border); color: var(--text); }
:root[data-theme="dark"] .theme-option.is-active { background: rgba(20, 40, 80, .6); color: var(--brand-300); }
:root[data-theme="dark"] .settings-card-danger { background: rgba(244, 63, 94, .07); border-color: rgba(244, 63, 94, .3); }

/* Footer (already dark, no override needed) */

/* Auth pages in dark */
:root[data-theme="dark"] .auth-right { background: var(--bg); }
:root[data-theme="dark"] .auth-panel-title { color: var(--text); }
:root[data-theme="dark"] .auth-panel-sub { color: var(--text-soft); }
:root[data-theme="dark"] .auth-tab { color: var(--text-muted); }
:root[data-theme="dark"] .auth-tab.active { color: var(--brand-400); }
:root[data-theme="dark"] .auth-form input,
:root[data-theme="dark"] .field input,
:root[data-theme="dark"] .field select,
:root[data-theme="dark"] .field textarea {
  background: var(--bg-soft);
  border-color: var(--border);
  color: var(--text);
}
:root[data-theme="dark"] .auth-form input::placeholder,
:root[data-theme="dark"] .field input::placeholder { color: var(--text-muted); }
:root[data-theme="dark"] .oauth-btn { background: var(--bg-elevated); color: var(--text); border-color: var(--border); }
:root[data-theme="dark"] .oauth-btn:hover { background: var(--bg-soft); }

/* Modals */
:root[data-theme="dark"] .modal { background: var(--bg-elevated); color: var(--text); }
:root[data-theme="dark"] .modal h2 { color: var(--text); }
:root[data-theme="dark"] .modal-sub { color: var(--text-soft); }
:root[data-theme="dark"] .modal-close { color: var(--text-muted); }

/* Action tiles */
:root[data-theme="dark"] .action-tile { background: var(--bg-elevated); border-color: var(--border); color: var(--text); }
:root[data-theme="dark"] .action-tile:hover { background: rgba(20, 40, 80, .5); border-color: var(--brand-500); }
:root[data-theme="dark"] .action-tile strong { color: var(--text); }
:root[data-theme="dark"] .action-tile small { color: var(--text-muted); }
:root[data-theme="dark"] .action-icon { background: rgba(20, 40, 80, .6); color: var(--brand-300); }

/* Beta banner */
:root[data-theme="dark"] .beta-banner { background: rgba(180, 83, 9, .15); color: #fbbf24; border-bottom-color: rgba(180, 83, 9, .3); }
:root[data-theme="dark"] .beta-banner .icon-inline { color: #fbbf24; }

/* =====================================================
   v2 Design Refresh — Dashboard / Progress / Insights
   Restrained palette, modern data tables, no emoji noise
   ===================================================== */

/* ----- Metric cards (replaces stat-card variants) ----- */
.metric-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 36px;
}
.metric-card {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), transform var(--transition);
  position: relative; overflow: hidden;
}
.metric-card::after {
  content: '';
  position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--brand-500), var(--accent-400));
  opacity: 0;
  transition: opacity var(--transition);
}
.metric-card:hover { border-color: var(--brand-200); }
.metric-card:hover::after { opacity: 1; }
.metric-card .metric-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 12px;
}
.metric-card .metric-label svg {
  width: 14px; height: 14px;
  color: var(--gray-400);
  flex-shrink: 0;
}
.metric-card .metric-value {
  font-size: 32px; font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  margin-bottom: 6px;
  direction: ltr; unicode-bidi: isolate;
  text-align: right;
}
.metric-card .metric-sub {
  font-size: 12px; color: var(--text-muted);
  line-height: 1.4;
  unicode-bidi: plaintext;
}
.metric-card .metric-sub strong {
  color: var(--gray-700); font-weight: 700;
}
@media (max-width: 760px) { .metric-grid { grid-template-columns: 1fr 1fr; } }

/* ----- Modern data table ----- */
.data-table-wrap {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table thead th {
  background: linear-gradient(180deg, var(--gray-50), #fff);
  font-size: 11px; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .06em;
  text-align: right;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}
.data-table tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--gray-800);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr {
  transition: background var(--transition);
}
.data-table tbody tr:hover { background: var(--gray-50); }
.batch-row-clickable:hover { background: var(--brand-50) !important; }
.batch-row-clickable:hover .row-title { color: var(--brand-700); }
.data-table .num {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--gray-900);
  direction: ltr; unicode-bidi: isolate;
}
.data-table .col-action { text-align: left; width: 1%; }
.data-table .row-title {
  font-weight: 700; color: var(--gray-900);
  display: flex; align-items: center; gap: 10px;
}
.data-table .row-sub {
  font-size: 12px; color: var(--text-muted);
  margin-top: 2px;
}

/* Inline horizontal bar inside a table cell */
.bar-cell {
  display: flex; align-items: center; gap: 12px;
  min-width: 160px;
}
.bar-cell .bar-track {
  flex: 1; height: 6px;
  background: var(--gray-100);
  border-radius: 100px; overflow: hidden;
  min-width: 60px;
}
.bar-cell .bar-fill {
  height: 100%; border-radius: 100px;
  background: var(--brand-500);
  transition: width 700ms cubic-bezier(.4,0,.2,1);
}
.bar-cell .bar-fill.bar-good { background: var(--emerald-500); }
.bar-cell .bar-fill.bar-mid  { background: var(--amber-500); }
.bar-cell .bar-fill.bar-bad  { background: var(--rose-500); }
.bar-cell .bar-num {
  font-size: 13px; font-weight: 700;
  color: var(--gray-800);
  font-variant-numeric: tabular-nums;
  min-width: 38px; text-align: left;
}

/* Status pills (consistent across all tables) */
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 12px; font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}
.status-pill::before {
  content: ''; width: 6px; height: 6px;
  border-radius: 50%; background: currentColor;
}
.status-pill.s-master { background: var(--emerald-50); color: var(--emerald-600); }
.status-pill.s-good   { background: #d1fae5; color: var(--emerald-600); }
.status-pill.s-mid    { background: #fef3c7; color: #92400e; }
.status-pill.s-weak   { background: var(--rose-50); color: var(--rose-600); }
.status-pill.s-unknown{ background: var(--gray-100); color: var(--gray-500); }
.status-pill.s-info   { background: var(--brand-50); color: var(--brand-700); }

/* Color dots (replaces emoji topic icons) */
.color-dot {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--dot-color, var(--brand-500));
  flex-shrink: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot-color, var(--brand-500)) 22%, transparent);
  vertical-align: middle;
}

/* Compact ghost button used inside table rows */
.btn-row {
  font-size: 12px; font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  background: transparent;
  color: var(--brand-600);
  border: 1px solid var(--border);
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
}
.btn-row:hover {
  background: var(--brand-50);
  border-color: var(--brand-300);
  color: var(--brand-700);
}

/* ----- Refined dashboard greeting ----- */
.dash-greet h1 {
  font-size: clamp(26px, 4vw, 32px);
  letter-spacing: -.025em;
  background: var(--gradient-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.dash-greet p {
  font-size: 15px; color: var(--text-soft);
  margin-top: 4px;
}

/* ----- Refined course cards ----- */
.course-card .ready-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 100px;
  background: var(--emerald-50); color: var(--emerald-600);
  text-transform: uppercase; letter-spacing: .05em;
}
.course-card .ready-pill::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--emerald-500);
}

/* ----- Refined progress hero (less radial blob, more sophisticated) ----- */
.progress-hero {
  background: linear-gradient(135deg, #0f172a 0%, var(--brand-900) 50%, var(--brand-700) 100%);
}
.progress-hero::before {
  background: radial-gradient(circle, rgba(255,255,255,.10) 0%, transparent 70%);
  width: 360px; height: 360px;
  top: -120px; right: -120px;
}
.progress-hero::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56,189,248,.18) 0%, transparent 70%);
  pointer-events: none;
}

/* ----- Refined streak/time/trend cards (no emoji badges) ----- */
.progress-card { position: relative; }
.progress-card .meta-line span { display: inline-flex; align-items: baseline; gap: 4px; }
.progress-card .badge-good,
.progress-card .badge-warn,
.progress-card .badge-info {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 4px;
}
.progress-card .badge-good::before,
.progress-card .badge-warn::before,
.progress-card .badge-info::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}

/* ----- Refined section heads (no h2 emoji noise) ----- */
.progress-section-head h2,
.insights-section-head h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.progress-section-head h2 .h-icon,
.insights-section-head h2 .h-icon {
  width: 18px; height: 18px;
  color: var(--brand-500);
  stroke-width: 2.2;
}

/* ----- Insights: refined topic map (no emoji icons) ----- */
.topic-map { padding: 8px 4px; }
.topic-map .topic-row {
  padding: 14px 22px;
  gap: 8px;
  border-bottom: 1px solid var(--border-soft);
}
.topic-map .topic-row:last-child { border-bottom: none; }
.topic-row-head .color-dot { margin-left: 2px; }
.topic-row-head .topic-name { font-size: 14px; font-weight: 700; }
.topic-row-head .topic-meta {
  font-size: 12px; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.topic-bar { height: 8px; }

/* ----- Insights: refined focus cards (no emoji) ----- */
.focus-card {
  padding: 24px 22px;
  gap: 10px;
}
.focus-card::before { height: 3px; }
.focus-card .focus-rank {
  position: static;
  font-size: 12px;
  background: var(--accent, var(--brand-500));
  color: #fff;
  border: none;
  padding: 4px 12px;
  border-radius: 100px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  width: fit-content;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.focus-card h3 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.015em;
  color: var(--gray-900);
}
.focus-card .focus-stats {
  padding-top: 8px;
  border-top: 1px solid var(--border-soft);
  margin-top: 4px;
}

/* ----- Insights: refined hard questions (no emoji) ----- */
.hard-q-row .reason-pill {
  background: var(--gray-100);
  color: var(--gray-600);
  text-transform: none;
  letter-spacing: 0;
}
.hard-q-row .hard-q-num {
  font-variant-numeric: tabular-nums;
  background: var(--brand-50);
  color: var(--brand-700);
  border-radius: 8px;
  padding: 4px 0;
  font-size: 13px;
  font-weight: 800;
}

/* ----- Refined tips (subtle dots, no emoji) ----- */
.tip-card { padding: 20px 22px; gap: 14px; }
.tip-card .tip-icon {
  width: 36px; height: 36px;
  font-size: 0;
  background: transparent;
  border-radius: 0;
  position: relative;
  flex-shrink: 0;
}
.tip-card .tip-icon::before {
  content: ''; position: absolute; inset: 0;
  border-radius: 12px;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
}
.tip-card .tip-icon::after {
  content: ''; position: absolute;
  top: 50%; left: 50%;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--brand-500);
  transform: translate(-50%, -50%);
}
.tip-card.tone-good .tip-icon::before { background: var(--emerald-50); border-color: #a7f3d0; }
.tip-card.tone-good .tip-icon::after  { background: var(--emerald-500); }
.tip-card.tone-warn .tip-icon::before { background: var(--amber-50); border-color: #fde68a; }
.tip-card.tone-warn .tip-icon::after  { background: var(--amber-500); }
.tip-card::before { width: 3px; }

/* ----- Insights banner: cleaner ----- */
.insights-banner {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 20px;
  font-size: 14px;
  border-radius: var(--radius);
  border-width: 1px;
  border-left-width: 4px;
}
.insights-banner.warn { border-left-color: var(--amber-500); }
.insights-banner.ok   { border-left-color: var(--emerald-500); }

/* =====================================================
   MOBILE EXPERIENCE OVERHAUL
   Comprehensive phone optimization: reduce clutter,
   hide heavy marketing panels, tighten spacing, improve
   readability and navigation on small screens.
   ===================================================== */

/* ── Hero: tighter on phone, smaller badge ── */
@media (max-width: 640px) {
  .hero { padding: 32px 0 40px; }
  .hero h1 { font-size: clamp(26px, 7vw, 34px); }
  .hero-sub { font-size: 14.5px; line-height: 1.6; margin-bottom: 20px; }
  .hero-ctas { flex-direction: column; gap: 10px; }
  .hero-ctas .btn { width: 100%; text-align: center; }
  .badge { font-size: 12px; padding: 8px 14px; line-height: 1.4; }
  .hero-trust { gap: 10px; font-size: 12px; flex-wrap: wrap; }
  .hero-visual { margin-top: 10px; }
  .hero-image { border-radius: var(--radius-lg); }
}

/* ── Sections: less vertical padding on phone ── */
@media (max-width: 640px) {
  .section { padding: 50px 0; }
  .section-title { font-size: clamp(24px, 6vw, 32px); margin-bottom: 10px; }
  .section-sub { font-size: 14.5px; margin-bottom: 36px; }
  .section-eyebrow { font-size: 10px; padding: 5px 11px; }
}

/* ── Feature cards: 2-column compact grid on phone, not single column ── */
@media (max-width: 920px) and (min-width: 481px) {
  .features-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 14px;
  }
  .feature-card {
    padding: 20px 16px;
  }
  .feature-card h3 { font-size: 15px; margin-bottom: 6px; }
  .feature-card p { font-size: 13px; line-height: 1.55; }
  .feature-icon { width: 42px; height: 42px; border-radius: 12px; margin-bottom: 12px; }
  .feature-icon svg { width: 20px; height: 20px; }
  .feature-pill { font-size: 8px; padding: 3px 8px; top: 10px; left: 10px; }
}
@media (max-width: 480px) {
  .features-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px;
  }
  .feature-card {
    padding: 16px 14px;
  }
  .feature-card h3 { font-size: 14px; margin-bottom: 4px; }
  .feature-card p { font-size: 12px; line-height: 1.5; }
  .feature-icon { width: 36px; height: 36px; border-radius: 10px; margin-bottom: 10px; }
  .feature-icon svg { width: 18px; height: 18px; }
  .feature-pill { font-size: 7px; padding: 2px 7px; top: 8px; left: 8px; }
}

/* ── Showcase sections: compact on phone ── */
@media (max-width: 640px) {
  .showcase { padding: 40px 0; }
  .showcase-grid { gap: 24px !important; }
  .showcase-text h2 { font-size: clamp(22px, 5.5vw, 28px); margin-bottom: 12px; }
  .showcase-text p { font-size: 14px; margin-bottom: 16px; }
  .showcase-points li { font-size: 13px; gap: 8px; }
  .showcase-points .point-icon { width: 24px; height: 24px; padding: 5px; }
  .showcase-visual img {
    border-radius: var(--radius-lg);
    max-height: 260px;
    object-fit: cover;
    object-position: center top;
  }
}

/* ── Pain points: 2-column on phone instead of stacked ── */
@media (max-width: 640px) {
  .pain-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px;
  }
  .pain-card {
    padding: 14px 12px !important;
    gap: 10px !important;
    flex-direction: column;
    align-items: flex-start;
  }
  .pain-card .pain-icon { width: 34px !important; height: 34px !important; }
  .pain-card h3 { font-size: 13px; }
  .pain-card p { font-size: 11.5px; line-height: 1.5; }
}

/* ── How it works: smaller image ── */
@media (max-width: 640px) {
  .how .how-image-wrap { padding: 10px 0; }
  .how .how-image { max-height: 220px; object-fit: contain; }
}

/* ── Reviews: already handled by carousel ── */

/* ── Pricing: tighter cards on phone ── */
@media (max-width: 600px) {
  .price-card { padding: 24px 18px; }
  .price-amount { font-size: 34px; }
  .price-desc { font-size: 13px; min-height: auto; }
  .price-features li { font-size: 13px; }
}

/* ── FAQ: tighter on phone ── */
@media (max-width: 640px) {
  .faq-q { font-size: 14px; padding: 14px 16px; }
  .faq-a-inner { font-size: 13px; padding: 12px 16px 16px; }
}

/* ── Final CTA: tighter ── */
@media (max-width: 640px) {
  .final-cta { padding: 50px 0; }
  .final-cta h2 { font-size: clamp(22px, 6vw, 28px); }
  .final-cta p { font-size: 14px; }
  .final-cta .btn-primary { padding: 14px 28px; font-size: 15px; width: 100%; }
  .cta-trust { gap: 8px; font-size: 12px; flex-wrap: wrap; justify-content: center; }
}

/* ── Footer: compact ── */
@media (max-width: 640px) {
  .footer { padding: 40px 0 24px; }
  .footer-grid { grid-template-columns: 1fr !important; gap: 28px; text-align: center; }
  .footer-brand p { font-size: 13px; }
  .footer-links { justify-content: center; }
}

/* ── Nav: tighter mobile hamburger ── */
@media (max-width: 640px) {
  .nav-brand .logo-img { height: 28px; }
  .topbar { padding: 10px 16px; }
  .topbar .logo-img { height: 26px; }
}

/* ===== Course Dashboard ===== */
.course-dash-header {
  margin-bottom: 24px;
}
.course-dash-header h1 {
  font-size: 28px; font-weight: 800; margin-bottom: 4px;
  color: var(--gray-900);
  border-right: 4px solid var(--course-color, var(--brand-500));
  padding-right: 14px;
}
.course-dash-header p {
  color: var(--text-muted); font-size: 15px; padding-right: 18px;
}
.cd-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-muted);
  text-decoration: none; margin-bottom: 12px;
  transition: color .15s;
}
.cd-back:hover { color: var(--brand-600); }
.cd-back svg { flex-shrink: 0; }

.cd-actions {
  margin-bottom: 28px;
}
.cd-actions .action-tile-featured {
  background: linear-gradient(135deg, var(--brand-50), var(--brand-100));
  border-color: var(--brand-200);
}

.batch-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  background: var(--bg-card);
  transition: background .15s;
}
.batch-row:hover { background: var(--bg-soft); }
.batch-clickable { cursor: pointer; }
.batch-clickable:active { transform: scale(.98); }
.batch-chevron { flex-shrink: 0; color: var(--text-muted); transition: transform .15s; }
.batch-clickable:hover .batch-chevron { color: var(--brand-600); transform: translateX(-3px); }
.batch-score {
  font-size: 20px; font-weight: 800; color: var(--brand-600);
  min-width: 56px; text-align: center;
}
.batch-info { flex: 1; }
.batch-summary { font-size: 14px; font-weight: 600; color: var(--gray-800); }
.batch-date { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ===== Add Course Modal ===== */
.color-picker {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.color-swatch {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer; transition: border-color .15s, transform .1s;
  padding: 0;
}
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.active { border-color: var(--gray-900); box-shadow: 0 0 0 2px var(--bg-card); }

.course-card .ready-pill.empty {
  background: var(--gray-100); color: var(--gray-500);
}
.course-card .ready-pill.empty::before {
  background: var(--gray-400);
}
