/* =====================================================
   100bal.az — Design System v3B (Phase 3B World-Class)
   ===================================================== */

/* ===== 1. CSS CUSTOM PROPERTIES (DESIGN TOKENS) ===== */
:root {
  /* Brand Palette */
  --color-primary:        #6366f1;
  --color-primary-hover:  #4f46e5;
  --color-primary-light:  #e0e7ff;
  --color-primary-dark:   #3730a3;
  --color-primary-rgb:    99,102,241;

  --color-secondary:      #06b6d4;
  --color-secondary-light:#e0f2fe;
  --color-secondary-hover:#0891b2;

  --color-accent:         #f59e0b;
  --color-accent-light:   #fef3c7;
  --color-accent-hover:   #d97706;

  --color-success:        #22c55e;
  --color-success-light:  #dcfce7;
  --color-success-dark:   #166534;

  --color-danger:         #ef4444;
  --color-danger-light:   #fee2e2;
  --color-danger-dark:    #991b1b;

  --color-warning:        #f59e0b;
  --color-warning-light:  #fef3c7;
  --color-warning-dark:   #92400e;

  /* Neutral Scale (Slate) */
  --slate-50:   #f8fafc;
  --slate-100:  #f1f5f9;
  --slate-200:  #e2e8f0;
  --slate-300:  #cbd5e1;
  --slate-400:  #94a3b8;
  --slate-500:  #64748b;
  --slate-600:  #475569;
  --slate-700:  #334155;
  --slate-800:  #1e293b;
  --slate-900:  #0f172a;

  /* Semantic Light Tokens */
  --bg:              #f8fafc;
  --bg-alt:          #f1f5f9;
  --surface:         #ffffff;
  --surface-raised:  #ffffff;
  --surface-overlay: rgba(255,255,255,0.8);
  --border:          #e2e8f0;
  --border-subtle:   #f1f5f9;
  --border-strong:   #cbd5e1;
  --text:            #0f172a;
  --text-muted:      #64748b;
  --text-subtle:     #94a3b8;
  --text-inverse:    #ffffff;

  /* Nav/Sidebar */
  --nav-bg:          #1e1b4b;
  --nav-surface:     #27235c;
  --nav-border:      rgba(255,255,255,0.08);
  --nav-text:        #c7d2fe;
  --nav-text-muted:  #818cf8;
  --nav-hover-bg:    rgba(255,255,255,0.07);
  --nav-active-bg:   rgba(99,102,241,0.25);
  --nav-active-text: #ffffff;

  /* Spacing Scale */
  --sp-1:   0.25rem;
  --sp-2:   0.5rem;
  --sp-3:   0.75rem;
  --sp-4:   1rem;
  --sp-5:   1.25rem;
  --sp-6:   1.5rem;
  --sp-8:   2rem;
  --sp-10:  2.5rem;
  --sp-12:  3rem;
  --sp-16:  4rem;
  --sp-20:  5rem;

  /* Border Radius */
  --radius-sm:   4px;
  --radius:      10px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:    0 2px 8px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.06);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.16), 0 8px 16px rgba(0,0,0,0.08);
  --shadow-primary: 0 4px 14px rgba(99,102,241,0.30);

  /* Typography */
  --font:         'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono:    'Cascadia Code', 'Consolas', monospace;
  --text-xs:      0.75rem;
  --text-sm:      0.8125rem;
  --text-base:    0.9375rem;
  --text-lg:      1.0625rem;
  --text-xl:      1.25rem;
  --text-2xl:     1.5rem;
  --text-3xl:     1.875rem;
  --text-4xl:     2.25rem;
  --text-5xl:     3rem;
  --leading-tight: 1.25;
  --leading-snug:  1.375;
  --leading-normal:1.6;

  /* Transitions */
  --ease:        0.18s ease;
  --ease-out:    0.25s ease-out;
  --ease-bounce: 0.3s cubic-bezier(0.34,1.56,0.64,1);

  /* Z-index Scale */
  --z-base:     1;
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-overlay:  300;
  --z-sidebar:  350;
  --z-modal:    400;
  --z-toast:    500;

  /* Sidebar */
  --sidebar-w: 240px;
  --topbar-h:  56px;

  /* Backward compat aliases */
  --c-primary:    var(--color-primary);
  --c-primary-dark: var(--color-primary-hover);
  --c-secondary:  var(--slate-500);
  --c-success:    var(--color-success);
  --c-danger:     var(--color-danger);
  --c-warning:    var(--color-warning);
  --c-bg:         var(--bg);
  --c-surface:    var(--surface);
  --c-border:     var(--border);
  --c-text:       var(--text);
  --c-muted:      var(--text-muted);
  --c-nav-bg:     var(--nav-bg);
  --c-nav-text:   var(--nav-text);
  --radius: 10px;
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
  --bg:              #0f172a;
  --bg-alt:          #111827;
  --surface:         #1e293b;
  --surface-raised:  #243048;
  --surface-overlay: rgba(30,41,59,0.9);
  --border:          #334155;
  --border-subtle:   #1e293b;
  --border-strong:   #475569;
  --text:            #f1f5f9;
  --text-muted:      #94a3b8;
  --text-subtle:     #64748b;

  --nav-bg:          #0d1117;
  --nav-surface:     #161b27;

  --color-primary-light: rgba(99,102,241,0.18);
  --color-secondary-light: rgba(6,182,212,0.18);
  --color-success-light: rgba(34,197,94,0.15);
  --color-danger-light:  rgba(239,68,68,0.15);
  --color-warning-light: rgba(245,158,11,0.15);
  --color-accent-light:  rgba(245,158,11,0.15);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow:    0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.4);

  --c-bg:      #0f172a;
  --c-surface: #1e293b;
  --c-border:  #334155;
  --c-text:    #f1f5f9;
  --c-muted:   #94a3b8;
  --c-nav-bg:  #0d1117;
}

/* ===== 2. RESET ===== */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: var(--leading-normal);
  font-size: var(--text-base);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background var(--ease), color var(--ease);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
hr { border: none; border-top: 1px solid var(--border); margin: var(--sp-4) 0; }
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: 4px; }

/* ===== 3. TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  line-height: var(--leading-tight);
  font-weight: 700;
  color: var(--text);
}
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
p { margin-bottom: 0; }

/* Text utilities */
.text-xs   { font-size: var(--text-xs); }
.text-sm   { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg   { font-size: var(--text-lg); }
.text-xl   { font-size: var(--text-xl); }
.text-2xl  { font-size: var(--text-2xl); }
.text-3xl  { font-size: var(--text-3xl); }
.text-muted  { color: var(--text-muted) !important; }
.text-subtle { color: var(--text-subtle); }
.text-primary  { color: var(--color-primary); }
.text-success  { color: var(--color-success); }
.text-danger   { color: var(--color-danger); }
.text-warning  { color: var(--color-warning); }
.text-accent   { color: var(--color-accent); }
.text-center   { text-align: center; }
.text-right    { text-align: right; }
.font-bold     { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium   { font-weight: 500; }
.truncate      { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== 4. LAYOUT: APP SHELL ===== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* === SIDEBAR === */
.sidebar {
  width: var(--sidebar-w);
  background: var(--nav-bg);
  color: var(--nav-text);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: var(--z-sidebar);
  transition: transform var(--ease-out);
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  border-bottom: 1px solid var(--nav-border);
  flex-shrink: 0;
  text-decoration: none;
}
.sidebar-logo:hover { text-decoration: none; }
.sidebar-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--color-primary), #818cf8);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.sidebar-logo .logo-text { color: #fff; }
.sidebar-logo .logo-text span { color: #818cf8; }

/* === LOGO IMAGES === */
.sidebar-logo-img { height: 28px; width: auto; display: block; }
.nav-logo-img { height: 26px; width: auto; display: block; }
.footer-logo-img { height: 30px; width: auto; display: block; }
.auth-logo-img { height: 52px; width: auto; display: block; }
.exam-logo-img { height: 22px; width: auto; display: block; }
.sidebar-logo { padding: var(--sp-4) var(--sp-5); }

/* Nav sections */
.sidebar-section {
  padding: var(--sp-3) 0 var(--sp-2);
  flex: 1;
}
.sidebar-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nav-text-muted);
  padding: var(--sp-2) var(--sp-5) var(--sp-1);
  opacity: 0.6;
}
.sidebar-nav { padding: 0 var(--sp-3); }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 0.55rem var(--sp-3);
  color: #c7d2fe;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius);
  transition: background var(--ease), color var(--ease);
  position: relative;
  text-decoration: none;
  margin-bottom: 2px;
}
.sidebar-nav a:hover {
  background: var(--nav-hover-bg);
  color: #fff;
  text-decoration: none;
}
.sidebar-nav a.active {
  background: var(--nav-active-bg);
  color: var(--nav-active-text);
  font-weight: 600;
}
.sidebar-nav a.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 3px;
  background: var(--color-primary);
  border-radius: 0 3px 3px 0;
  left: calc(var(--sp-3) * -1);
}
.sidebar-nav a svg, .sidebar-nav a .nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.75;
}
.sidebar-nav a.active svg, .sidebar-nav a.active .nav-icon { opacity: 1; }
.sidebar-nav a:hover svg, .sidebar-nav a:hover .nav-icon { opacity: 1; }
.nav-badge {
  margin-left: auto;
  background: rgba(99,102,241,0.3);
  color: #a5b4fc;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
}

.sidebar-divider {
  border: none;
  border-top: 1px solid var(--nav-border);
  margin: var(--sp-3) var(--sp-3);
}

.sidebar-footer {
  padding: var(--sp-3) var(--sp-3);
  border-top: 1px solid var(--nav-border);
  flex-shrink: 0;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-2);
  border-radius: var(--radius);
  transition: background var(--ease);
}
.sidebar-user:hover { background: var(--nav-hover-bg); }
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary), #818cf8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name  { font-size: var(--text-sm); font-weight: 600; color: #e2e8f0; }
.user-email { font-size: 0.7rem; color: var(--nav-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-logout {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-2);
  color: #f87171;
  font-size: var(--text-sm);
  border-radius: var(--radius);
  margin-top: var(--sp-1);
  transition: background var(--ease);
}
.sidebar-logout:hover { background: rgba(239,68,68,0.1); text-decoration: none; }

/* Sidebar mobile overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: calc(var(--z-sidebar) - 1);
  backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }

/* ===== MAIN CONTENT AREA ===== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin-left: var(--sidebar-w);
  transition: margin-left var(--ease-out);
}

/* ===== TOPBAR ===== */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  gap: var(--sp-4);
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex: 1;
  min-width: 0;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  cursor: pointer;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-muted);
  border-radius: 1px;
  transition: var(--ease);
}
.topbar-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--text-sm);
  color: var(--text-muted);
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--color-primary); text-decoration: none; }
.breadcrumb-sep { opacity: 0.4; }
.breadcrumb .current { color: var(--text); font-weight: 500; }

.topbar-action { display: flex; align-items: center; }
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 2px;
  border: 1px solid var(--border);
}
.lang-btn {
  padding: 0.2rem 0.5rem;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 4px;
  transition: var(--ease);
  cursor: pointer;
  text-decoration: none;
}
.lang-btn:hover, .lang-btn.active { background: var(--surface); color: var(--color-primary); text-decoration: none; }
.theme-toggle {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: rgba(255,255,255,.55);
  transition: color .15s;
  padding: 0;
}
.theme-toggle:hover { color: #fff; }

/* ===== CONTENT AREA ===== */
.content-area {
  flex: 1;
  padding: var(--sp-6);
  overflow-y: auto;
  max-width: 100%;
}

/* Page header */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--sp-6);
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.page-header-left { min-width: 0; }
.page-header h1, .page-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--text);
  line-height: var(--leading-tight);
}
.page-subtitle {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-top: var(--sp-1);
}
.page-header-actions {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  flex-shrink: 0;
}
.section-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ===== PUBLIC NAVBAR ===== */
.navbar {
  background: var(--nav-bg);
  color: var(--nav-text);
  padding: 0 var(--sp-6);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  backdrop-filter: blur(10px);
}
.nav-brand a {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.nav-brand a:hover { text-decoration: none; }
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.nav-links a {
  color: #e2e8f0;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-sm);
  transition: var(--ease);
}
.nav-links a:hover { color: #fff; text-decoration: none; }
.nav-mobile-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  font-size: 1.2rem;
}
.public-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-4);
  width: 100%;
  flex: 1;
}
/* Landing page öz container-ini idarə edir — default padding lazım deyil */
.public-content.lp-page { max-width: 100%; padding: 0; }

/* ===== AUTH LAYOUT ===== */
.auth-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #1e1b4b 100%);
  padding: var(--sp-4);
  position: relative;
  overflow: hidden;
}
.auth-layout::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.auth-layout::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(6,182,212,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.auth-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--sp-10) var(--sp-8);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 1;
}
.auth-logo {
  text-align: center;
  margin-bottom: var(--sp-8);
}
.auth-logo-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.auth-logo-link:hover { text-decoration: none; }
.auth-logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--color-primary), #818cf8);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.auth-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  text-align: center;
  margin-bottom: var(--sp-2);
}
.auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--sp-6);
}

/* ===== EXAM LAYOUT ===== */
.exam-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
}
.exam-header {
  background: linear-gradient(90deg, #1e1b4b, #312e81);
  color: #fff;
  padding: 0 var(--sp-6);
  height: 56px;
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.exam-brand {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.3px;
  white-space: nowrap;
}
.exam-title-bar {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: 500;
  color: #c7d2fe;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.exam-meta-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-shrink: 0;
}
.exam-progress-text {
  font-size: var(--text-sm);
  color: #c7d2fe;
  white-space: nowrap;
}
.exam-timer {
  font-size: 1.3rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  white-space: nowrap;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.1);
  min-width: 80px;
  text-align: center;
}
.exam-timer.warning { color: #fbbf24; background: rgba(251,191,36,0.15); }
.exam-timer.danger  { color: #f87171; background: rgba(248,113,113,0.15); animation: timerPulse 1s infinite; }
@keyframes timerPulse { 0%,100%{opacity:1} 50%{opacity:0.6} }

.exam-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}
.exam-sidebar {
  width: 260px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: var(--sp-4);
  overflow-y: auto;
  flex-shrink: 0;
}
.exam-main {
  flex: 1;
  padding: var(--sp-6);
  overflow-y: auto;
  max-width: 820px;
}
.exam-finish-btn {
  background: #ef4444;
  color: #fff;
  border: none;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--ease);
}
.exam-finish-btn:hover { background: #dc2626; }

/* ===== 5. BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.6rem 1.4rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .12s;
  white-space: nowrap;
  line-height: 1.4;
  font-family: inherit;
  position: relative;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(99,102,241,.35), 0 1px 2px rgba(99,102,241,.2);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  box-shadow: 0 4px 16px rgba(99,102,241,.45), 0 1px 3px rgba(99,102,241,.25);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: 0 1px 3px rgba(0,0,0,.07);
}
.btn-secondary:hover {
  background: var(--bg-alt);
  border-color: #94a3b8;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--bg-alt);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-danger {
  background: var(--color-danger);
  color: #fff;
  border-color: var(--color-danger);
  box-shadow: 0 2px 8px rgba(239,68,68,.3);
}
.btn-danger:hover { background: #dc2626; box-shadow: 0 4px 14px rgba(239,68,68,.4); transform: translateY(-1px); }

.btn-success {
  background: var(--color-success);
  color: #fff;
  border-color: var(--color-success);
  box-shadow: 0 2px 8px rgba(16,185,129,.3);
}
.btn-success:hover { background: #16a34a; box-shadow: 0 4px 14px rgba(16,185,129,.4); transform: translateY(-1px); }

.btn-accent {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
  box-shadow: 0 2px 8px rgba(245,158,11,.35);
}
.btn-accent:hover { background: var(--color-accent-hover); box-shadow: 0 4px 14px rgba(245,158,11,.45); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary-light);
  box-shadow: 0 2px 8px rgba(99,102,241,.15);
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: .82rem;
  border-radius: var(--radius-sm);
}
.btn-lg {
  padding: 0.75rem 2rem;
  font-size: var(--text-base);
  border-radius: var(--radius-md);
}
.btn-xl {
  padding: 0.95rem 2.5rem;
  font-size: var(--text-lg);
  border-radius: var(--radius-md);
}
.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--radius-sm);
  font-size: 1rem;
}
.btn-block { width: 100%; }

/* Loading state */
.btn-loading {
  pointer-events: none;
  opacity: 0.8;
}
.btn-loading::after {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: var(--sp-2);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 6. FORMS ===== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  margin-bottom: var(--sp-4);
}
.form-label, label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
}
.form-hint {
  font-size: var(--text-xs);
  color: var(--text-subtle);
  margin-top: 2px;
}
.form-row {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.form-row .form-group {
  flex: 1;
  min-width: 180px;
  margin-bottom: 0;
}
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}
.form-actions {
  display: flex;
  gap: var(--sp-3);
  align-items: center;
  padding-top: var(--sp-2);
}

input[type=text],
input[type=email],
input[type=password],
input[type=number],
input[type=date],
input[type=file],
input[type=search],
input[type=tel],
input[type=url],
textarea,
select {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: var(--text-sm);
  font-family: inherit;
  line-height: 1.5;
  transition: border-color var(--ease), box-shadow var(--ease);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb),0.15);
}
input.is-error, textarea.is-error, select.is-error {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
}
.form-error {
  font-size: var(--text-xs);
  color: var(--color-danger);
  margin-top: 3px;
}
textarea { resize: vertical; min-height: 90px; }
select { cursor: pointer; }
input::placeholder, textarea::placeholder { color: var(--text-subtle); }
input[type=file] { padding: 0.5rem; cursor: pointer; }
input[type=checkbox], input[type=radio] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
  cursor: pointer;
}
.checkbox-group {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  cursor: pointer;
}
.checkbox-group label { cursor: pointer; font-weight: 500; color: var(--text); margin: 0; }

/* Input with icon */
.input-wrapper { position: relative; }
.input-wrapper svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  pointer-events: none;
  width: 16px;
  height: 16px;
}
.input-wrapper input { padding-left: 2.4rem; }

/* ===== 7. CARDS ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}
.card-header h3, .card-title {
  font-size: var(--text-base);
  font-weight: 700;
  margin: 0;
}
.card-body { padding: var(--sp-5); }
.card-footer {
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

/* Form card (same as card with body) */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
}

/* Stat cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-5);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--ease), transform var(--ease);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.stat-card.stat-success::before { background: linear-gradient(90deg, var(--color-success), #86efac); }
.stat-card.stat-danger::before  { background: linear-gradient(90deg, var(--color-danger),  #fca5a5); }
.stat-card.stat-warning::before { background: linear-gradient(90deg, var(--color-warning), #fcd34d); }
.stat-card.stat-accent::before  { background: linear-gradient(90deg, var(--color-accent),  #fbbf24); }
.stat-card.stat-secondary::before { background: linear-gradient(90deg, var(--color-secondary), #67e8f9); }

.stat-card h3 {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: var(--sp-2);
}
.stat-num {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -1px;
}
.stat-num.text-primary { color: var(--color-primary); }
.stat-num.text-success { color: var(--color-success); }
.stat-num.text-danger  { color: var(--color-danger); }
.stat-num.text-accent  { color: var(--color-accent); }
.stat-trend {
  font-size: var(--text-xs);
  margin-top: var(--sp-2);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.stat-trend.up   { color: var(--color-success); }
.stat-trend.down { color: var(--color-danger); }
.stat-icon {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0.15;
}

/* Exam cards */
.exam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-4);
}
.exam-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-5);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--ease), border-color var(--ease), transform var(--ease);
  display: flex;
  flex-direction: column;
}
.exam-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
  transform: translateY(-2px);
  text-decoration: none;
}
.exam-card h3 { font-size: var(--text-base); margin-bottom: var(--sp-2); font-weight: 700; }
.exam-meta {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin: var(--sp-3) 0;
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.exam-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.exam-card-footer {
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Dashboard quick-nav */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--sp-3);
  margin: var(--sp-4) 0;
}
.dash-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-5) var(--sp-4);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text);
  font-weight: 600;
  transition: var(--ease);
  min-height: 90px;
  text-decoration: none;
}
.dash-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-2px);
  text-decoration: none;
}
.dash-card-icon {
  font-size: 1.6rem;
  line-height: 1;
}
.dash-card svg {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
}

/* Admin nav grid */
.admin-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--sp-3);
  margin: var(--sp-4) 0;
}
.admin-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text);
  transition: var(--ease);
  text-decoration: none;
  font-weight: 500;
}
.admin-nav-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
  color: var(--color-primary);
  text-decoration: none;
}
.admin-nav-item .icon { font-size: 1.6rem; }

/* ===== 8. TABLES ===== */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: var(--text-sm);
  min-width: 500px;
}
.table th {
  padding: 0.65rem 1rem;
  text-align: left;
  border-bottom: 1.5px solid var(--border);
  background: transparent;
  font-weight: 600;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
}
.table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background var(--ease); }
.table tbody tr:hover td { background: rgba(var(--color-primary-rgb),0.03); }
.table-actions { display: flex; gap: var(--sp-2); align-items: center; }

/* ===== 9. BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  white-space: nowrap;
}
.badge-primary   { background: var(--color-primary-light); color: var(--color-primary-dark); }
.badge-success   { background: var(--color-success-light); color: var(--color-success-dark); }
.badge-danger    { background: var(--color-danger-light);  color: var(--color-danger-dark); }
.badge-warning   { background: var(--color-warning-light); color: var(--color-warning-dark); }
.badge-accent    { background: var(--color-accent-light);  color: var(--color-accent-hover); }
.badge-secondary { background: var(--bg-alt); color: var(--text-muted); border: 1px solid var(--border); }
.badge-cyan      { background: var(--color-secondary-light); color: var(--color-secondary-hover); }

/* Score badge */
.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 28px;
  padding: 0 var(--sp-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 800;
}
.score-high   { background: var(--color-success-light); color: var(--color-success-dark); }
.score-medium { background: var(--color-warning-light); color: var(--color-warning-dark); }
.score-low    { background: var(--color-danger-light);  color: var(--color-danger-dark); }

/* Streak badge */
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  background: var(--color-accent-light);
  border: 1px solid #fed7aa;
  border-radius: var(--radius-full);
  color: #c2410c;
  font-weight: 700;
  font-size: var(--text-sm);
}

/* ===== 10. ALERTS & FLASH ===== */
.alert {
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius);
  border: 1px solid;
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: var(--text-sm);
  margin-bottom: var(--sp-4);
}
.alert-success { background: var(--color-success-light); border-color: #86efac; color: var(--color-success-dark); }
.alert-danger  { background: var(--color-danger-light);  border-color: #fca5a5; color: var(--color-danger-dark); }
.alert-warning { background: var(--color-warning-light); border-color: #fcd34d; color: var(--color-warning-dark); }
.alert-info    { background: var(--color-secondary-light); border-color: #67e8f9; color: var(--color-secondary-hover); }
.alert-icon { flex-shrink: 0; font-size: 1rem; line-height: 1.5; }

.flash {
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius);
  margin-bottom: var(--sp-4);
  font-weight: 500;
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  border: 1px solid;
  animation: flashIn 0.3s ease;
}
@keyframes flashIn { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }
.flash-success { background: var(--color-success-light); color: var(--color-success-dark); border-color: #86efac; }
.flash-error   { background: var(--color-danger-light);  color: var(--color-danger-dark);  border-color: #fca5a5; }

/* ===== 11. MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: var(--z-modal);
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  backdrop-filter: blur(3px);
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-xl);
  animation: modalIn 0.2s ease-out;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
@keyframes modalIn { from { opacity:0; transform:scale(0.95) translateY(10px); } to { opacity:1; transform:scale(1) translateY(0); } }
.modal-header {
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.modal-header h3 { font-size: var(--text-lg); font-weight: 700; margin: 0; }
.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--ease);
}
.modal-close:hover { background: var(--color-danger-light); color: var(--color-danger); }
.modal-body {
  padding: var(--sp-6);
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--border);
  display: flex;
  gap: var(--sp-3);
  justify-content: flex-end;
  flex-shrink: 0;
}

/* ===== 12. PROGRESS ===== */
.progress {
  height: 8px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-sm { height: 5px; }
.progress-lg { height: 12px; }
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}
.progress-bar.success { background: linear-gradient(90deg, var(--color-success), #86efac); }
.progress-bar.danger  { background: linear-gradient(90deg, var(--color-danger),  #fca5a5); }
.progress-bar.warning { background: linear-gradient(90deg, var(--color-warning), #fcd34d); }
.progress-bar.accent  { background: linear-gradient(90deg, var(--color-accent),  #fbbf24); }

.progress-labeled {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-2);
}
.progress-label { font-size: var(--text-xs); color: var(--text-muted); width: 140px; flex-shrink: 0; }
.progress-value { font-size: var(--text-xs); font-weight: 700; color: var(--text-muted); min-width: 35px; text-align: right; }

/* ===== 13. TABS ===== */
.tabs { margin-bottom: var(--sp-4); }
.tab-list {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  overflow-x: auto;
}
.tab-list::-webkit-scrollbar { height: 0; }
.tab-btn {
  padding: 0.7rem 1.25rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--ease);
  margin-bottom: -2px;
  font-family: inherit;
}
.tab-btn:hover { color: var(--color-primary); }
.tab-btn.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== 14. PAGINATION ===== */
.pagination {
  display: flex;
  gap: var(--sp-1);
  align-items: center;
  margin-top: var(--sp-4);
  flex-wrap: wrap;
}
.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 var(--sp-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--text);
  transition: var(--ease);
}
.pagination a:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); text-decoration: none; }
.pagination .current-page { background: var(--color-primary); color: #fff; border-color: var(--color-primary); font-weight: 700; }

/* ===== 15. QUESTION COMPONENTS ===== */
.q-nav-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--sp-1);
}
.q-nav-btn {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--ease);
}
.q-nav-btn:hover { border-color: var(--color-primary); color: var(--color-primary); text-decoration: none; }
.q-nav-btn.current { border-color: var(--color-primary); color: var(--color-primary); font-weight: 800; box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb),0.15); }
.q-nav-btn.answered { background: var(--color-success); border-color: var(--color-success); color: #fff; }
.q-nav-btn.bookmarked { background: var(--color-warning-light); border-color: var(--color-warning); color: var(--color-warning-dark); }
.q-nav-btn.flagged { background: var(--color-danger-light); border-color: var(--color-danger); color: var(--color-danger-dark); }

.question-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--sp-4);
}
.question-num {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-3);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.question-text {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.55;
  margin-bottom: var(--sp-5);
  color: var(--text);
}
.options-list { display: flex; flex-direction: column; gap: var(--sp-2); }
.option-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 0.85rem 1.1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--ease);
  position: relative;
  user-select: none;
}
.option-item:hover { background: rgba(var(--color-primary-rgb),0.05); border-color: var(--color-primary); }
.option-item input[type=radio], .option-item input[type=checkbox] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin: 0;
}
.option-letter {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--text-muted);
  flex-shrink: 0;
}
.option-text { flex: 1; font-size: var(--text-sm); line-height: 1.5; }
.option-item.selected      { background: rgba(var(--color-primary-rgb),0.07); border-color: var(--color-primary); }
.option-item.selected .option-letter { background: var(--color-primary); color: #fff; }
.option-item.selected-correct { background: var(--color-success-light); border-color: var(--color-success); }
.option-item.selected-correct .option-letter { background: var(--color-success); color: #fff; }
.option-item.selected-wrong   { background: var(--color-danger-light);  border-color: var(--color-danger); }
.option-item.selected-wrong .option-letter   { background: var(--color-danger);  color: #fff; }
.option-item.correct-answer   { background: var(--color-success-light); border-color: var(--color-success); }

/* Question actions (bookmark / flag) */
.question-actions {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
}
.q-action-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--ease);
  font-family: inherit;
}
.q-action-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.q-action-btn.active { background: var(--color-warning-light); border-color: var(--color-warning); color: var(--color-warning-dark); }
.q-action-btn.flagged { background: var(--color-danger-light); border-color: var(--color-danger); color: var(--color-danger-dark); }

/* Save status */
.save-status {
  font-size: var(--text-xs);
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  transition: var(--ease);
}
.save-status.saving { color: var(--color-warning); }
.save-status.saved  { color: var(--color-success); }
.save-status.error  { color: var(--color-danger); }

/* ===== 16. RESULT / SCORE ===== */
.score-display { text-align: center; padding: var(--sp-8) var(--sp-4); }
.score-circle-wrap { position: relative; display: inline-block; margin-bottom: var(--sp-4); }
.score-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 8px solid var(--color-primary);
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--color-primary);
  background: var(--color-primary-light);
  letter-spacing: -2px;
}
.score-circle.score-high   { border-color: var(--color-success); color: var(--color-success); background: var(--color-success-light); }
.score-circle.score-medium { border-color: var(--color-warning); color: var(--color-warning); background: var(--color-warning-light); }
.score-circle.score-low    { border-color: var(--color-danger);  color: var(--color-danger);  background: var(--color-danger-light); }

.result-stats {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: var(--sp-3);
  margin: var(--sp-6) 0;
}
.result-stat {
  text-align: center;
  padding: var(--sp-4);
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.result-stat-num { font-size: 1.8rem; font-weight: 800; }
.result-stat-label { font-size: var(--text-xs); color: var(--text-muted); margin-top: 4px; }
.result-stat.correct .result-stat-num  { color: var(--color-success); }
.result-stat.wrong .result-stat-num    { color: var(--color-danger); }
.result-stat.empty .result-stat-num    { color: var(--text-muted); }

.topic-breakdown { margin: var(--sp-4) 0; }
.topic-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-2);
  font-size: var(--text-sm);
}
.topic-name { width: 160px; flex-shrink: 0; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbar { flex: 1; height: 10px; background: var(--border); border-radius: var(--radius-full); overflow: hidden; }
.pbar-fill { height: 100%; background: linear-gradient(90deg, var(--color-primary), var(--color-secondary)); border-radius: var(--radius-full); transition: width 0.6s ease; }
.pbar-fill.weak { background: linear-gradient(90deg, var(--color-danger), #fca5a5); }
.pbar-pct { font-size: var(--text-xs); font-weight: 700; color: var(--text-muted); min-width: 35px; text-align: right; }

/* Explanation accordion */
.explanation-box {
  background: var(--color-secondary-light);
  border: 1px solid rgba(6,182,212,0.3);
  border-radius: var(--radius);
  padding: var(--sp-4);
  margin-top: var(--sp-3);
  font-size: var(--text-sm);
  color: var(--text);
  line-height: 1.7;
}
[data-theme="dark"] .explanation-box { background: rgba(6,182,212,0.08); }

/* ===== 17. LANDING PAGE ===== */
.hero {
  text-align: center;
  padding: var(--sp-20) var(--sp-4) var(--sp-12);
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 400px;
  background: linear-gradient(180deg, rgba(var(--color-primary-rgb),0.06) 0%, transparent 100%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  background: var(--color-primary-light);
  border: 1px solid rgba(var(--color-primary-rgb),0.3);
  border-radius: var(--radius-full);
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--sp-6);
}
.hero h1 {
  font-size: var(--text-5xl);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: var(--sp-5);
}
.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto var(--sp-8);
  line-height: 1.7;
}
.hero-btns {
  display: flex;
  gap: var(--sp-3);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--sp-8);
}

/* Hero visual mockup */
.hero-visual {
  max-width: 600px;
  margin: var(--sp-8) auto 0;
  position: relative;
}
.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-xl);
  text-align: left;
}
.hero-card-row {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}
.hero-score-num {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--color-primary);
  letter-spacing: -2px;
  line-height: 1;
}
.hero-score-label { font-size: var(--text-xs); color: var(--text-muted); }
.hero-chart { flex: 1; height: 50px; display: flex; align-items: flex-end; gap: 4px; }
.hero-bar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: var(--color-primary-light);
}
.hero-bar:last-child { background: var(--color-primary); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--sp-4);
  padding: var(--sp-4) 0;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-5);
  transition: var(--ease);
}
.feature-card:hover { box-shadow: var(--shadow-md); border-color: var(--color-primary); transform: translateY(-2px); }
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-3);
  font-size: 1.3rem;
}
.feature-icon.indigo  { background: var(--color-primary-light); }
.feature-icon.cyan    { background: var(--color-secondary-light); }
.feature-icon.amber   { background: var(--color-accent-light); }
.feature-icon.green   { background: var(--color-success-light); }
.feature-icon.red     { background: var(--color-danger-light); }
.feature-card h3 { font-size: var(--text-base); margin-bottom: var(--sp-2); }
.feature-card p  { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.6; }

.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-4);
}
.audience-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  text-align: center;
  transition: var(--ease);
}
.audience-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.audience-icon { font-size: 2.5rem; margin-bottom: var(--sp-3); }
.audience-card h3 { font-size: var(--text-lg); margin-bottom: var(--sp-2); }
.audience-card p  { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: var(--sp-4); line-height: 1.6; }
.audience-features { list-style: none; text-align: left; }
.audience-features li {
  font-size: var(--text-sm);
  color: var(--text-muted);
  padding: var(--sp-1) 0;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.audience-features li::before { content: '✓'; color: var(--color-success); font-weight: 700; }

/* Trust / stats section */
.trust-section {
  background: var(--nav-bg);
  padding: var(--sp-12) var(--sp-4);
  text-align: center;
}
.trust-title { color: #fff; font-size: var(--text-2xl); font-weight: 800; margin-bottom: var(--sp-8); }
.trust-grid  { display: flex; justify-content: center; gap: var(--sp-8); flex-wrap: wrap; }
.trust-item  { color: #fff; text-align: center; }
.trust-item strong { display: block; font-size: var(--text-3xl); font-weight: 900; color: var(--color-secondary); letter-spacing: -1px; }
.trust-item span  { font-size: var(--text-sm); color: var(--nav-text); }

/* Pricing preview */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--sp-4);
  margin: var(--sp-6) 0;
}
.pricing-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  position: relative;
  transition: var(--ease);
}
.pricing-card:hover { box-shadow: var(--shadow-md); }
.pricing-card.featured {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary), var(--shadow-md);
}
.pricing-featured-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 0.2rem 0.8rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.pricing-type { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: var(--sp-2); }
.pricing-name { font-size: var(--text-xl); font-weight: 800; margin-bottom: var(--sp-1); }
.pricing-price { font-size: var(--text-3xl); font-weight: 900; color: var(--color-primary); letter-spacing: -1px; margin-bottom: var(--sp-4); }
.pricing-price span { font-size: var(--text-sm); font-weight: 500; color: var(--text-muted); }
.pricing-features { list-style: none; }
.pricing-features li { font-size: var(--text-sm); padding: var(--sp-1) 0; color: var(--text-muted); display: flex; gap: var(--sp-2); align-items: flex-start; }
.pricing-features li::before { content: '✓'; color: var(--color-success); font-weight: 700; flex-shrink: 0; }

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, var(--color-primary), #4f46e5);
  border-radius: var(--radius-lg);
  padding: var(--sp-10) var(--sp-8);
  text-align: center;
  margin: var(--sp-8) 0;
}
.cta-banner h2 { color: #fff; font-size: var(--text-3xl); margin-bottom: var(--sp-3); font-weight: 800; }
.cta-banner p  { color: rgba(255,255,255,0.8); font-size: var(--text-base); margin-bottom: var(--sp-6); }

/* Stats section */
.stats-section { background: var(--nav-bg); padding: var(--sp-8) var(--sp-4); text-align: center; }
.stats-row { display: flex; justify-content: center; gap: var(--sp-8); flex-wrap: wrap; }
.stat-pill { color: #fff; font-size: var(--text-base); }
.stat-pill strong { font-size: var(--text-3xl); display: block; color: var(--color-secondary); font-weight: 900; letter-spacing: -1px; }

/* Marketplace */
.marketplace-layout { display: grid; grid-template-columns: 240px 1fr; gap: var(--sp-6); }
.filter-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-5);
  box-shadow: var(--shadow-sm);
  height: fit-content;
  position: sticky;
  top: calc(var(--topbar-h) + var(--sp-4));
}
.filter-panel h3 { font-size: var(--text-sm); font-weight: 700; margin-bottom: var(--sp-4); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.filter-group { margin-bottom: var(--sp-5); }
.filter-group h4 { font-size: var(--text-sm); font-weight: 600; margin-bottom: var(--sp-3); }
.filter-option {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
  cursor: pointer;
}
.filter-option input[type=checkbox] { flex-shrink: 0; }

/* Product card */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--ease);
  display: flex;
  flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-md); border-color: var(--color-primary); transform: translateY(-2px); }
.product-card-top {
  background: linear-gradient(135deg, rgba(var(--color-primary-rgb),0.07), rgba(6,182,212,0.05));
  padding: var(--sp-5);
  border-bottom: 1px solid var(--border);
}
.product-card-body { padding: var(--sp-5); flex: 1; }
.product-card-footer {
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-alt);
}
.product-price { font-size: var(--text-xl); font-weight: 800; color: var(--color-primary); }
.product-free  { color: var(--color-success); }

/* Section wrapper */
.section {
  padding: var(--sp-10) 0;
}
.section-header {
  text-align: center;
  margin-bottom: var(--sp-8);
}
.section-header h2 { font-size: var(--text-3xl); font-weight: 800; margin-bottom: var(--sp-3); }
.section-header p  { font-size: var(--text-base); color: var(--text-muted); max-width: 560px; margin: 0 auto; }
.section-tag {
  display: inline-block;
  padding: var(--sp-1) var(--sp-3);
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-3);
}

/* App footer */
.app-footer { background: var(--nav-bg); color: #94a3b8; padding: var(--sp-8) var(--sp-4); margin-top: auto; }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-brand { color: #e2e8f0; font-size: var(--text-base); margin-bottom: var(--sp-2); font-weight: 700; }
.footer-links { display: flex; gap: var(--sp-5); flex-wrap: wrap; margin-bottom: var(--sp-3); }
.footer-links a { color: #94a3b8; font-size: var(--text-sm); transition: var(--ease); }
.footer-links a:hover { color: #e2e8f0; text-decoration: none; }
.footer-copy { font-size: var(--text-xs); color: #64748b; }
.footer-debug { font-size: var(--text-xs); color: #4b5563; margin-top: var(--sp-2); }

/* ===== 18. EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: var(--sp-16) var(--sp-4);
  color: var(--text-muted);
}
.empty-state-icon {
  font-size: 3rem;
  margin-bottom: var(--sp-4);
  opacity: 0.4;
  line-height: 1;
}
.empty-state-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--sp-2);
}
.empty-state-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  max-width: 340px;
  margin: 0 auto var(--sp-5);
  line-height: 1.7;
}

/* ===== 19. STEPPER ===== */
.stepper {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-bottom: var(--sp-6);
  overflow-x: auto;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
  min-width: 80px;
}
.step + .step::before {
  content: '';
  position: absolute;
  top: 14px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
}
.step.done + .step::before { background: var(--color-primary); }
.step-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
  transition: var(--ease);
}
.step.active .step-dot { background: var(--color-primary); border-color: var(--color-primary); color: #fff; box-shadow: 0 0 0 4px rgba(var(--color-primary-rgb),0.2); }
.step.done .step-dot   { background: var(--color-success); border-color: var(--color-success); color: #fff; }
.step-label { font-size: var(--text-xs); color: var(--text-muted); margin-top: var(--sp-1); text-align: center; font-weight: 500; }
.step.active .step-label { color: var(--color-primary); font-weight: 700; }
.step.done .step-label   { color: var(--color-success); }

/* ===== 20. BUILDER LIVE SUMMARY ===== */
.builder-layout { display: grid; grid-template-columns: 1fr 300px; gap: var(--sp-6); align-items: flex-start; }
.builder-summary {
  background: var(--surface);
  border: 1.5px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: var(--sp-5);
  position: sticky;
  top: calc(var(--topbar-h) + var(--sp-4));
  box-shadow: var(--shadow-primary);
}
.builder-summary h3 { font-size: var(--text-base); font-weight: 700; margin-bottom: var(--sp-4); }
.summary-row { display: flex; justify-content: space-between; align-items: center; padding: var(--sp-2) 0; border-bottom: 1px dashed var(--border); font-size: var(--text-sm); }
.summary-row:last-of-type { border-bottom: none; }
.summary-row .label { color: var(--text-muted); }
.summary-row .value { font-weight: 700; color: var(--text); }
.summary-price { font-size: var(--text-2xl); font-weight: 900; color: var(--color-primary); text-align: center; margin: var(--sp-4) 0; }

/* ===== 21. ONLINE STATUS / SAVE STATUS BANNER ===== */
.offline-banner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--color-danger);
  color: #fff;
  text-align: center;
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--text-sm);
  font-weight: 600;
  z-index: var(--z-toast);
  animation: slideDown 0.3s ease;
}
.offline-banner.show { display: block; }
@keyframes slideDown { from { transform:translateY(-100%); } to { transform:translateY(0); } }

/* ===== 22. MOBILE BOTTOM BAR (EXAM) ===== */
.exam-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: var(--sp-3) var(--sp-4);
  gap: var(--sp-2);
  z-index: var(--z-sticky);
  box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
  align-items: center;
  justify-content: center;
}
.exam-bottom-bar .btn { flex: 1; max-width: 120px; justify-content: center; }

/* ===== 23. MOBILE EXAM QUESTION PANEL ===== */
.q-panel-toggle {
  display: none;
  position: fixed;
  bottom: 80px;
  right: var(--sp-4);
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 1rem;
  box-shadow: var(--shadow-lg);
  align-items: center;
  justify-content: center;
  z-index: var(--z-sticky);
}

/* ===== 24. AI SUMMARY BOX ===== */
.ai-box {
  background: linear-gradient(135deg, rgba(var(--color-primary-rgb),0.06), rgba(6,182,212,0.06));
  border: 1px solid rgba(var(--color-primary-rgb),0.2);
  border-radius: var(--radius-md);
  padding: var(--sp-5);
  position: relative;
  overflow: hidden;
}
.ai-box::before {
  content: '✦';
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-4);
  font-size: 1.2rem;
  color: var(--color-primary);
  opacity: 0.3;
}
.ai-box-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  margin-bottom: var(--sp-2);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.ai-box p { font-size: var(--text-sm); color: var(--text); line-height: 1.7; }

/* ===== 25. SEAT LICENSE PANEL ===== */
.seat-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-5);
}
.seat-numbers {
  display: flex;
  gap: var(--sp-4);
  margin: var(--sp-3) 0;
}
.seat-num { text-align: center; }
.seat-num strong { display: block; font-size: var(--text-2xl); font-weight: 800; }
.seat-num span { font-size: var(--text-xs); color: var(--text-muted); }
.seat-num.used strong  { color: var(--color-primary); }
.seat-num.total strong { color: var(--text); }
.seat-num.remaining strong { color: var(--color-success); }

/* ===== 26. BULK TOOLBAR ===== */
.bulk-toolbar {
  display: none;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--color-primary-light);
  border: 1px solid rgba(var(--color-primary-rgb),0.25);
  border-radius: var(--radius);
  margin-bottom: var(--sp-3);
  font-size: var(--text-sm);
}
.bulk-toolbar.show { display: flex; }
.bulk-count { font-weight: 700; color: var(--color-primary); }

/* ===== 27. COPY CODE BLOCK ===== */
.code-copy {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--sp-2) var(--sp-3);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text);
}
.copy-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--sp-1) var(--sp-2);
  font-size: var(--text-xs);
  cursor: pointer;
  color: var(--text-muted);
  font-family: inherit;
  transition: var(--ease);
  white-space: nowrap;
}
.copy-btn:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.copy-btn.copied { background: var(--color-success); color: #fff; border-color: var(--color-success); }

/* ===== 28. UTILITY CLASSES ===== */
.mt-auto { margin-top: auto; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--sp-4); }
.w-full { width: 100%; }
.hidden { display: none !important; }
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }
.rounded { border-radius: var(--radius); }
.rounded-full { border-radius: var(--radius-full); }
.p-4 { padding: var(--sp-4); }
.p-5 { padding: var(--sp-5); }
.p-6 { padding: var(--sp-6); }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-3 { margin-bottom: var(--sp-3); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }
.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.divider { border-top: 1px solid var(--border); margin: var(--sp-4) 0; }
.options-builder { margin: var(--sp-3) 0; }
.option-row { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-2); }
.option-row input[type=text] { flex: 1; }

/* ===== 29. ANIMATIONS ===== */
@keyframes fadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }
.animate-fade-in { animation: fadeIn 0.3s ease; }

/* ===== 30. RESPONSIVE — MOBILE FIRST ===== */
@media (max-width: 1024px) {
  .marketplace-layout { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
  .builder-layout { grid-template-columns: 1fr; }
  .builder-summary { position: static; }
}

@media (max-width: 768px) {
  /* Sidebar becomes offcanvas */
  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-xl);
  }
  .sidebar.open { transform: translateX(0); }

  /* Main content takes full width */
  .main-content { margin-left: 0; }

  /* Show hamburger */
  .hamburger { display: flex; }

  /* Topbar */
  .topbar { padding: 0 var(--sp-4); }

  /* Content area */
  .content-area { padding: var(--sp-4); }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* Exam sidebar hidden on mobile */
  .exam-sidebar { display: none; }
  .exam-main { padding: var(--sp-4) var(--sp-3); }

  /* Show exam mobile bar */
  .exam-bottom-bar { display: flex; }
  .q-panel-toggle  { display: flex; }
  .exam-main { padding-bottom: 140px; }

  /* Tables scroll */
  .table-wrapper { overflow-x: auto; }

  /* Hero */
  .hero h1 { font-size: var(--text-3xl); letter-spacing: -1px; }
  .hero-btns { flex-direction: column; align-items: stretch; }
  .hero-btns .btn { justify-content: center; }

  /* Page header */
  .page-header { flex-direction: column; align-items: flex-start; }
  .page-header-actions { width: 100%; }

  /* Form row */
  .form-row { flex-direction: column; }
  .form-grid-2 { grid-template-columns: 1fr; }

  /* Grids */
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .result-stats { grid-template-columns: repeat(3,1fr); }
  .trust-grid { gap: var(--sp-4); }
  .dashboard-grid { grid-template-columns: repeat(2,1fr); }
  .admin-nav-grid { grid-template-columns: repeat(2,1fr); }
  .q-nav-grid { grid-template-columns: repeat(6,1fr); }
  .stepper { overflow-x: auto; }
  .features-grid { grid-template-columns: 1fr; }
  .audience-grid { grid-template-columns: 1fr; }
  .pricing-grid  { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-mobile-toggle { display: flex; }
  .sidebar-footer .user-email { display: none; }
  .topbar-title { font-size: var(--text-base); }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: var(--text-2xl); }
  .auth-card { padding: var(--sp-6) var(--sp-5); }
  .result-stats { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: repeat(2,1fr); }
  .exam-header { padding: 0 var(--sp-3); gap: var(--sp-3); }
  .exam-brand { display: none; }
}

@media (min-width: 769px) {
  .sidebar { transform: translateX(0) !important; }
  .sidebar-overlay { display: none !important; }
}

/* ══════════════════════════════════════════════
   LANDING PAGE — lp-* components
   Mobile-first, appended after existing styles.
══════════════════════════════════════════════ */

/* Container */
.lp-container { max-width: 1180px; margin: 0 auto; padding: 0 var(--sp-5); }
.lp-container--narrow { max-width: 780px; }

/* Tag pill */
.lp-tag {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(99,102,241,.1); color: #6366f1;
  font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  padding: .3rem .8rem; border-radius: 9999px; margin-bottom: .75rem;
}
.lp-tag--light { background: rgba(255,255,255,.18); color: #fff; }

/* Hero badge */
.hero-badge {
  background: rgba(99,102,241,.1); color: #6366f1;
  font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  padding: .3rem .9rem; border-radius: 9999px; gap: .4rem; align-items: center;
}

/* ── HERO ── */
.lp-hero {
  background: linear-gradient(135deg, #fafbff 0%, #f0f3ff 50%, #e8eeff 100%);
  padding: clamp(3rem,8vw,6rem) 0 clamp(2rem,5vw,4rem);
  position: relative; overflow: hidden;
}
.lp-hero::before {
  content: '';
  position: absolute; top: -80px; right: -80px;
  width: clamp(200px,40vw,440px); height: clamp(200px,40vw,440px);
  background: radial-gradient(circle, rgba(99,102,241,.12) 0%, transparent 70%);
  pointer-events: none;
}
.lp-hero-inner {
  display: flex; align-items: center; gap: clamp(2rem,5vw,4rem);
  flex-wrap: wrap;
}
.lp-hero-copy { flex: 1 1 320px; }
.lp-hero-visual { flex: 1 1 320px; display: flex; justify-content: flex-end; }

.lp-h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  font-weight: 800; line-height: 1.15; letter-spacing: -.75px;
  color: var(--text); margin: 0 0 1rem;
}
.lp-h1-accent {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.lp-hero-sub {
  font-size: clamp(1rem, 2vw, 1.1rem); color: var(--text-muted);
  line-height: 1.75; max-width: 520px; margin-bottom: 2rem; font-weight: 400;
}
.lp-hero-btns {
  display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.75rem;
}
.lp-trust-row {
  display: flex; flex-wrap: wrap; gap: .6rem 1.25rem;
  font-size: .8rem; color: var(--text-muted);
}
.lp-trust-row div { display: flex; align-items: center; gap: .35rem; }

/* ── HERO MOCKUP ── */
.hm-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(99,102,241,.15), 0 4px 20px rgba(0,0,0,.06);
  overflow: hidden;
  width: 100%; max-width: 420px; min-width: 280px;
}
.hm-chrome {
  background: var(--surface-alt, #f8f9fa);
  border-bottom: 1px solid var(--border);
  padding: .6rem 1rem;
  display: flex; align-items: center; gap: .4rem;
}
.hm-dot { width: 11px; height: 11px; border-radius: 50%; }
.hm-dot--red   { background: #ff5f57; }
.hm-dot--amber { background: #ffbd2e; }
.hm-dot--green { background: #28c940; }
.hm-chrome-title { margin-left: .5rem; font-size: .75rem; color: var(--text-muted); font-weight: 500; }
.hm-body { padding: 1.25rem; }

.hm-score-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.hm-score-ring {
  width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(#6366f1 0% 87%, #e5e7eb 87%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 800; line-height: 1; position: relative;
}
.hm-score-ring::after {
  content: ''; position: absolute;
  inset: 8px; border-radius: 50%; background: var(--surface);
}
.hm-score-num { position: relative; z-index: 1; font-size: 1.3rem; color: #6366f1; }
.hm-score-label { position: relative; z-index: 1; font-size: .6rem; color: var(--text-muted); }

.hm-score-title { font-weight: 700; font-size: .88rem; margin-bottom: .15rem; }
.hm-score-sub   { font-size: .72rem; color: var(--text-muted); margin-bottom: .4rem; }
.hm-badge { display: inline-flex; font-size: .68rem; font-weight: 700; padding: .2rem .55rem; border-radius: 9999px; }
.hm-badge--green { background: rgba(16,185,129,.12); color: #059669; }

.hm-bars { display: flex; flex-direction: column; gap: .55rem; margin-bottom: 1rem; }
.hm-bar-row { display: flex; align-items: center; gap: .5rem; }
.hm-bar-lbl { font-size: .72rem; color: var(--text-muted); width: 72px; flex-shrink: 0; }
.hm-bar-track { flex: 1; height: 7px; background: var(--surface-alt,#f1f3f5); border-radius: 9999px; overflow: hidden; }
.hm-bar-fill  { height: 100%; border-radius: 9999px; transition: width .8s ease; }
.hm-bar-pct   { font-size: .7rem; font-weight: 700; width: 30px; text-align: right; color: var(--text-muted); }
.hm-bar-pct--warn { color: #d97706; }

.hm-stat-row { display: flex; gap: .5rem; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: .75rem; }
.hm-mini-stat { display: flex; align-items: center; gap: .3rem; font-size: .72rem; color: var(--text-muted); }
.hm-mini-stat--warn { color: #d97706; }

/* ── STATS BAR ── */
.lp-stats-bar {
  background: var(--color-primary);
  padding: 1.25rem 0;
}
.lp-stats-inner {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 1rem 0; align-items: center;
}
.lp-stat-item { text-align: center; padding: 0 2rem; }
.lp-stat-num  { display: block; font-size: 1.25rem; font-weight: 700; color: #fff; letter-spacing: -.3px; }
.lp-stat-lbl  { display: block; font-size: .78rem; color: rgba(255,255,255,.72); margin-top: .15rem; }
.lp-stat-sep  { width: 1px; height: 36px; background: rgba(255,255,255,.2); flex-shrink: 0; }

/* ── SECTION BASE ── */
.lp-section { padding: clamp(3.5rem,8vw,6rem) 0; }
.lp-section--alt { background: var(--surface-alt, #f9fafb); }
.lp-section-hd { text-align: center; margin-bottom: 2.75rem; }
.lp-section-title {
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 700; color: var(--text);
  margin: 0 0 .65rem; line-height: 1.25; letter-spacing: -.3px;
}
.lp-section-sub { color: var(--text-muted); font-size: 1.025rem; max-width: 560px; margin: 0 auto; line-height: 1.7; font-weight: 400; }

/* ── CATEGORY GRID ── */
.lp-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}
.lp-cat-card {
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 1rem .75rem;
  text-decoration: none !important; color: var(--text);
  transition: transform .15s, box-shadow .15s, border-color .15s;
  text-align: center; position: relative; overflow: hidden;
}
.lp-cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(99,102,241,.12);
  border-color: var(--color-primary);
}
.lp-cat-card:focus { outline: none; }
.lp-cat-card:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }
.lp-cat-card--accent { border-color: #f59e0b; background: rgba(245,158,11,.04); }
.lp-cat-card--accent:hover { border-color: #d97706; box-shadow: 0 8px 24px rgba(245,158,11,.15); }
.lp-cat-icon  { font-size: 1.75rem; line-height: 1; }
.lp-cat-name  { font-size: 1rem; font-weight: 600; }
.lp-cat-arrow { display: none; }

/* ── AUDIENCE CARDS ── */
/* ── AUDIENCE v2 ── */
.lp-aud-icon2 {
  width: 56px; height: 56px; border-radius: 16px;
  background: rgba(99,102,241,.12);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.1rem;
}
.lp-aud-card--featured2 {
  background: linear-gradient(145deg, #6366f1 0%, #4f46e5 60%, #7c3aed 100%);
  border-color: transparent;
  box-shadow: 0 16px 48px rgba(99,102,241,.35), 0 4px 16px rgba(99,102,241,.2);
  transform: translateY(-4px);
}
.lp-aud-pop-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  background: rgba(255,255,255,.2); color: #fff;
  font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: .3rem .75rem; border-radius: 9999px; margin-bottom: 1.25rem;
}
.lp-check-list--colored li::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd' fill='%236366f1'/%3E%3C/svg%3E") center/contain no-repeat;
}
.lp-check-list--white { margin-bottom: 1.5rem; }
.lp-check-list--white li { color: rgba(255,255,255,.85); }
.lp-check-list--white li::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd' fill='%23fff'/%3E%3C/svg%3E") center/contain no-repeat;
}
.lp-aud-cta {
  display: inline-block; font-size: .875rem; font-weight: 600;
  color: var(--ac, #6366f1); text-decoration: none;
  border: 2px solid var(--ac, #6366f1);
  padding: .55rem 1.25rem; border-radius: 9999px;
  transition: background .15s, color .15s;
}
.lp-aud-cta:hover { background: var(--ac, #6366f1); color: #fff; }
.lp-aud-cta--inv {
  background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.4);
}
.lp-aud-cta--inv:hover { background: #fff; color: #6366f1; border-color: #fff; }

/* ── COMPARE v2 ── */
.lp-cmp2 {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0; align-items: start;
  max-width: 860px; margin: 0 auto;
}
.lp-cmp2-card {
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
  border: 1px solid var(--border);
  background: var(--surface);
}
.lp-cmp2-top {
  padding: 2rem 1.75rem 1.5rem;
  color: #fff;
}
.lp-cmp2-ico {
  width: 52px; height: 52px; border-radius: 14px;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.lp-cmp2-title { font-size: 1.25rem; font-weight: 700; color: #fff; margin: 0 0 .35rem; }
.lp-cmp2-sub   { font-size: .875rem; color: rgba(255,255,255,.8); margin: 0; }
.lp-cmp2-body  { padding: 1.75rem; }
.lp-cmp2-list  { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-direction: column; gap: .6rem; }
.lp-cmp2-list li { display: flex; align-items: center; gap: .6rem; font-size: .9375rem; }
.lp-cmp2-yes { color: #6366f1; font-weight: 700; font-size: 1rem; flex-shrink: 0; }
.lp-cmp2-no  { color: var(--text-muted); font-weight: 700; flex-shrink: 0; }
.lp-cmp2-for {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(99,102,241,.1); color: #6366f1;
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: .35rem .85rem; border-radius: 9999px; margin-bottom: 1.25rem;
}
.lp-cmp2-btn {
  display: block; text-align: center; font-size: .9rem; font-weight: 600;
  background: var(--bc, #6366f1); color: #fff;
  padding: .7rem 1.5rem; border-radius: 10px; text-decoration: none;
  transition: filter .15s;
}
.lp-cmp2-btn:hover { filter: brightness(1.08); text-decoration: none; }
.lp-cmp2-vs {
  display: flex; align-items: center; justify-content: center;
  width: 44px; align-self: center; margin: 0 .5rem;
  font-size: .8rem; font-weight: 800; color: var(--text-muted);
  letter-spacing: .05em;
}

/* ── AUDIENCE v3 ── */
.lp-aud3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}
.lp-aud3-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.lp-aud3-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,.08); transform: translateY(-2px); }
.lp-aud3-card--pop {
  border-color: #6366f1;
  box-shadow: 0 8px 32px rgba(99,102,241,.18);
  transform: translateY(-4px);
}
.lp-aud3-card--pop:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(99,102,241,.22); }
.lp-aud3-accent { height: 4px; width: 100%; flex-shrink: 0; }
.lp-aud3-pop-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: #6366f1; padding: .6rem 1.5rem .1rem;
}
.lp-aud3-body { padding: 1.25rem 1.5rem 1.75rem; flex: 1; display: flex; flex-direction: column; }
.lp-aud3-icon {
  width: 48px; height: 48px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: .9rem; flex-shrink: 0;
}
.lp-aud3-title { font-size: 1rem; font-weight: 700; margin: 0 0 .45rem; color: var(--text); letter-spacing: -.1px; }
.lp-aud3-desc  { font-size: .875rem; color: var(--text-muted); line-height: 1.65; margin: 0 0 1rem; flex: 1; }
.lp-aud3-list  { list-style: none; padding: 0; margin: 0 0 1.25rem; display: flex; flex-direction: column; gap: .45rem; }
.lp-aud3-list li {
  display: flex; align-items: center; gap: .5rem;
  font-size: .875rem; color: var(--text-muted);
}
.lp-aud3-list li::before {
  content: '';
  width: 15px; height: 15px; flex-shrink: 0; border-radius: 50%;
  background: var(--lc, #6366f1);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E") center/contain no-repeat;
}
.lp-aud3-btn {
  display: inline-block; width: 100%; text-align: center;
  font-size: .875rem; font-weight: 600;
  padding: .6rem 1rem; border-radius: 9px;
  border: 2px solid var(--bc, #6366f1);
  text-decoration: none; transition: background .15s, color .15s;
  margin-top: auto;
}
.lp-aud3-btn:hover { background: var(--bc, #6366f1); color: #fff !important; text-decoration: none; }
.lp-aud3-btn--fill { background: #6366f1; color: #fff !important; border-color: #6366f1; }
.lp-aud3-btn--fill:hover { background: #4f46e5; border-color: #4f46e5; }

/* ── FEATURES — label chip grid ── */
.lp-feat2-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: center;
}
.lp-feat2-card {
  display: inline-flex; align-items: center; gap: .6rem;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 9999px;
  padding: .55rem 1.1rem .55rem .7rem;
  transition: box-shadow .15s, border-color .15s, transform .15s;
  cursor: default;
}
.lp-feat2-card:hover {
  border-color: var(--fc, #6366f1);
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  transform: translateY(-1px);
}
.lp-feat2-icon {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%;
  background: var(--fbg, rgba(99,102,241,.12));
  display: flex; align-items: center; justify-content: center;
}
.lp-feat2-body { min-width: 0; }
.lp-feat2-title { font-size: .875rem; font-weight: 600; margin: 0; color: var(--text); white-space: nowrap; }
.lp-feat2-desc  { display: none; }

/* legacy compatibility (keep old classes working) */
.lp-aud-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.lp-aud-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 2rem 1.75rem;
  position: relative; overflow: hidden;
  transition: box-shadow .2s;
}
.lp-aud-card--featured {
  border-color: var(--color-primary);
  box-shadow: 0 8px 32px rgba(99,102,241,.14);
}
.lp-aud-badge {
  position: absolute; top: 0; right: 1.5rem;
  background: var(--color-primary); color: #fff;
  font-size: .65rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: .25rem .7rem; border-radius: 0 0 8px 8px;
}
.lp-aud-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--aud-bg, rgba(99,102,241,.1));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.lp-aud-title { font-size: 1.05rem; font-weight: 600; margin-bottom: .5rem; letter-spacing: -.1px; }
.lp-aud-desc  { font-size: .9375rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 1.25rem; font-weight: 400; }

/* Check list */
.lp-check-list {
  list-style: none; padding: 0; margin: 0 0 1.5rem;
  display: flex; flex-direction: column; gap: .5rem;
}
.lp-check-list li {
  display: flex; align-items: center; gap: .5rem;
  font-size: .9375rem; color: var(--text-muted); font-weight: 400;
}
.lp-check-list li::before {
  content: '';
  width: 16px; height: 16px; flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2310b981'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ── COMPARE ── */
.lp-compare-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0; align-items: center;
  max-width: 820px; margin: 0 auto;
}
.lp-compare-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 2rem 1.75rem;
}
.lp-compare-card--accent { border-color: #f59e0b; }
.lp-compare-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.lp-compare-title { font-size: 1.05rem; font-weight: 600; margin-bottom: .75rem; }
.lp-compare-tag {
  display: inline-flex; font-size: .72rem; font-weight: 700;
  background: rgba(99,102,241,.1); color: #6366f1;
  padding: .25rem .7rem; border-radius: 9999px; margin-top: 1rem;
}
.lp-compare-tag--amber { background: rgba(245,158,11,.1); color: #d97706; }
.lp-compare-mid { padding: 1.5rem; text-align: center; }
.lp-compare-or {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700; line-height: 1.4;
  text-align: center; margin: 0 auto;
}

/* ── STEPS ── */
.lp-steps {
  display: flex; align-items: flex-start; flex-wrap: nowrap;
  gap: 0; justify-content: center; overflow-x: auto; padding-bottom: .5rem;
}
.lp-steps--4 { justify-content: space-between; }
.lp-step {
  flex: 1 1 160px; max-width: 220px; min-width: 130px;
  text-align: center; padding: 0 1rem; position: relative;
}
.lp-step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--color-primary); color: #fff;
  font-size: .78rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto .7rem;
}
.lp-step-icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto .7rem;
}
.lp-step-title { font-size: .95rem; font-weight: 600; margin-bottom: .4rem; }
.lp-step-desc  { font-size: .875rem; color: var(--text-muted); line-height: 1.7; font-weight: 400; }
.lp-step-arrow {
  color: var(--border); flex-shrink: 0;
  margin-top: 3.5rem; padding: 0 .25rem;
}

/* ── FEATURES ── */
.lp-feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.lp-feat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 1.75rem 1.5rem;
  transition: box-shadow .15s, transform .15s;
}
.lp-feat-card:hover { box-shadow: 0 6px 24px rgba(99,102,241,.1); transform: translateY(-2px); }
.lp-feat-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: .875rem;
}
.lp-feat-title { font-size: .975rem; font-weight: 600; margin-bottom: .4rem; }
.lp-feat-desc  { font-size: .9rem; color: var(--text-muted); line-height: 1.7; font-weight: 400; }

/* ── PRICING ── */
.lp-price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.25rem;
}
.lp-price-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 2rem 1.5rem;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: .5rem;
}
.lp-price-card--featured {
  border-color: var(--color-primary);
  box-shadow: 0 8px 32px rgba(99,102,241,.14);
}
.lp-price-hot {
  position: absolute; top: 0; right: 1.25rem;
  background: var(--color-primary); color: #fff;
  font-size: .65rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: .25rem .7rem; border-radius: 0 0 8px 8px;
}
.lp-price-badge {
  display: inline-flex; font-size: .72rem; font-weight: 700;
  padding: .25rem .75rem; border-radius: 9999px; align-self: flex-start;
  margin-bottom: .25rem;
}
.lp-price-amount { line-height: 1.1; }
.lp-price-num  { font-size: 1.45rem; font-weight: 700; color: var(--color-primary); letter-spacing: -.3px; }
.lp-price-per  { font-size: .85rem; color: var(--text-muted); font-weight: 400; }
.lp-price-desc { font-size: .875rem; color: var(--text-muted); margin-bottom: .5rem; font-weight: 400; }
.lp-price-card .lp-check-list { margin-bottom: auto; flex: 1; }

/* ── FAQ ── */
.lp-faq { display: flex; flex-direction: column; gap: .5rem; }
.lp-faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
}
.lp-faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; padding: 1.1rem 1.25rem;
  background: none; border: none; cursor: pointer;
  font-size: .95rem; font-weight: 600; color: var(--text);
  text-align: left;
}
.lp-faq-q:hover { background: var(--surface-alt, #f8f9fa); }
.lp-faq-chevron { flex-shrink: 0; color: var(--text-muted); transition: transform .25s; }
.lp-faq-q[aria-expanded="true"] .lp-faq-chevron { transform: rotate(180deg); }
.lp-faq-a { padding: 0 1.25rem 1.1rem; }
.lp-faq-a p { font-size: .9rem; color: var(--text-muted); line-height: 1.7; margin: 0; }

/* ── FINAL CTA ── */
.lp-final-cta {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}
.lp-cta-btns {
  display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center;
}
.lp-cta-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.75rem; border-radius: 10px;
  font-weight: 700; font-size: .92rem;
  text-decoration: none !important;
  transition: transform .15s, box-shadow .15s;
}
.lp-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.2); text-decoration: none !important; }
.lp-cta-btn--white { background: #fff; color: #4f46e5; }
.lp-cta-btn--outline { border: 2px solid rgba(255,255,255,.4); color: #fff; }
.lp-cta-btn--outline:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.7); }

/* ── FOOTER ── */
.lp-footer {
  background: #13113a; color: rgba(255,255,255,.7);
  padding: clamp(3rem, 7vw, 5rem) 0 2rem;
}
.lp-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.lp-footer-logo {
  display: flex; align-items: center; gap: .5rem;
  font-size: 1.15rem; font-weight: 800; color: #fff;
  margin-bottom: .875rem;
}
.lp-footer-desc { font-size: .82rem; line-height: 1.7; max-width: 300px; }
.lp-footer-heading { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.4); margin-bottom: .875rem; }
.lp-footer-col nav { display: flex; flex-direction: column; gap: .5rem; }
.lp-footer-col a { font-size: .85rem; color: rgba(255,255,255,.6); text-decoration: none; transition: color .15s; }
.lp-footer-col a:hover { color: #fff; }
.lp-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
  font-size: .78rem;
}
.lp-footer-langs { display: flex; gap: .75rem; }
.lp-footer-langs a { color: rgba(255,255,255,.5); text-decoration: none; font-weight: 600; font-size: .78rem; }
.lp-footer-langs a:hover { color: #fff; }

/* ── LP RESPONSIVE ── */
@media (max-width: 900px) {
  .lp-hero-visual { justify-content: center; }
  .lp-hero-copy, .lp-hero-visual { flex-basis: 100%; }
  .hm-wrap { max-width: 100%; }

  .lp-compare-grid { grid-template-columns: 1fr; }
  .lp-compare-mid { padding: .5rem; }
  .lp-compare-or { width: 52px; height: 52px; font-size: .65rem; }

  .lp-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .lp-hero-btns { flex-direction: column; }
  .lp-hero-btns .btn { justify-content: center; }
  .lp-steps { flex-direction: column; align-items: center; }
  .lp-step-arrow { display: none; }
  .lp-step { max-width: 100%; min-width: 0; flex-basis: auto; padding: 0; }
  .lp-stat-sep { display: none; }
  .lp-stat-item { padding: .5rem 1rem; }
  .lp-footer-grid { grid-template-columns: 1fr 1fr; }
  .lp-cta-btns { flex-direction: column; align-items: center; }
  .lp-cta-btn { width: 100%; max-width: 320px; justify-content: center; }
  .lp-footer-bottom { flex-direction: column; text-align: center; }
}
@media (max-width: 400px) {
  .lp-cat-grid { grid-template-columns: repeat(2,1fr); }
  .lp-footer-grid { grid-template-columns: 1fr; }
}

/* Dark mode overrides for landing */
[data-theme="dark"] .lp-hero {
  background: linear-gradient(135deg, #0f0f1a 0%, #13131f 50%, #16162a 100%);
}
[data-theme="dark"] .lp-hero::before {
  background: radial-gradient(circle, rgba(99,102,241,.18) 0%, transparent 70%);
}
[data-theme="dark"] .hm-chrome { background: #1e1e2e; }
[data-theme="dark"] .hm-score-ring::after { background: var(--surface); }
[data-theme="dark"] .lp-section--alt { background: #13131f; }
[data-theme="dark"] .lp-footer { background: #0c0a2a; }
[data-theme="dark"] .lp-compare-grid .lp-compare-card { background: var(--surface); }

/* Backward-compat aliases used by tests */
.cta-banner   { /* alias → .lp-final-cta */ }
.pricing-card { /* alias → .lp-price-card */ }

/* ===== RESPONSIVE — mobile-first breakpoints ===== */

/* prevent horizontal overflow everywhere */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; }

/* tables scroll on mobile */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-responsive table { min-width: 600px; }

/* inputs/selects: 44px min tap target */
input, select, textarea, button { min-height: 44px; font-size: 16px; }

/* cards: 1 col by default */
.card-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }

/* stat cards: 1 col mobile */
.stat-cards { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

/* sidebar-overlay for new mobile toggle (open/close class) */
.sidebar-overlay.open { display: block; }

/* hamburger visible by default on mobile, hidden on desktop via 768px block */

/* hamburger button */
.hamburger-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: transparent; border: none; cursor: pointer; color: var(--text); }

/* exam bottom action bar */
.exam-action-bar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 100; background: var(--surface); border-top: 1px solid var(--border); padding: .75rem 1rem; display: flex; gap: .75rem; align-items: center; box-shadow: 0 -4px 16px rgba(0,0,0,.08); }
.exam-content-pad { padding-bottom: 80px; }

/* result breakdown */
.result-topic-grid { display: grid; grid-template-columns: 1fr; gap: .75rem; }

@media (min-width: 480px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .sidebar-overlay { display: none !important; }
  .hamburger-btn { display: none; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .result-topic-grid { grid-template-columns: repeat(2, 1fr); }
  .exam-action-bar { position: static; border-top: none; box-shadow: none; padding: 0; background: transparent; }
  .exam-content-pad { padding-bottom: 0; }
}

@media (min-width: 1024px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-cards { grid-template-columns: repeat(4, 1fr); }
  .result-topic-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Hero */
.lp-hero { padding: 3rem 1rem 2rem; }
.lp-hero-title { font-size: clamp(1.9rem, 7vw, 4rem); line-height: 1.15; }
.lp-hero-subtitle { font-size: clamp(.95rem, 3vw, 1.2rem); }
.lp-hero-actions { flex-direction: column; gap: .75rem; }
.lp-hero-actions .btn { width: 100%; justify-content: center; }
.lp-hero-inner { flex-direction: column; gap: 2rem; }
.lp-hero-text { text-align: center; }
.lp-hero-mockup { width: 100%; max-width: 420px; margin: 0 auto; }

/* category strip */
.lp-cat-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }

/* section padding */
.lp-section { padding: 3rem 1rem; }
.lp-section-title { font-size: clamp(1.4rem, 5vw, 2.2rem); }

/* audience, compare, features grids */
.lp-aud-grid, .lp-compare-grid, .lp-feat-grid { grid-template-columns: 1fr; gap: 1.25rem; }
.lp-aud3 { grid-template-columns: 1fr; }
.lp-feat2-grid { flex-direction: column; align-items: stretch; }
.lp-cmp2 { grid-template-columns: 1fr; }
.lp-cmp2-vs { display: none; }
.lp-diff-grid { grid-template-columns: 1fr; gap: 1rem; }
.lp-diff2-grid { grid-template-columns: 1fr; gap: .875rem; }
.lp-progress-layout { flex-direction: column; gap: 2rem; }

/* pricing */
.lp-pricing-grid { grid-template-columns: 1fr; gap: 1rem; }

/* FAQ */
.lp-faq-wrap { grid-template-columns: 1fr; }

/* footer */
.lp-footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.lp-footer-brand { grid-column: 1 / -1; }

@media (min-width: 600px) {
  .lp-cat-strip, .lp-cat-grid { grid-template-columns: repeat(3, 1fr); }
  .lp-hero-actions { flex-direction: row; flex-wrap: wrap; }
  .lp-hero-actions .btn { width: auto; }
}

@media (min-width: 480px) {
  .lp-feat2-grid { flex-direction: row; align-items: center; }
  .lp-feat2-card { flex: 0 1 auto; }
}

@media (min-width: 640px) {
  .lp-aud3 { grid-template-columns: repeat(2, 1fr); }
  .lp-cmp2 { grid-template-columns: 1fr auto 1fr; }
  .lp-cmp2-vs { display: flex; }
}

@media (min-width: 768px) {
  .lp-hero { padding: 5rem 2rem 3rem; }
  .lp-hero-inner { flex-direction: row; align-items: center; }
  .lp-hero-text { text-align: left; }
  .lp-hero-mockup { width: 45%; }
  .lp-cat-strip, .lp-cat-grid { grid-template-columns: repeat(4, 1fr); }
  .lp-aud-grid { grid-template-columns: repeat(3, 1fr); }
  .lp-aud3 { grid-template-columns: repeat(3, 1fr); }
  .lp-compare-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-feat-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-diff-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-diff2-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-progress-layout { flex-direction: row; align-items: flex-start; }
  .lp-pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-footer-grid { grid-template-columns: repeat(3, 1fr); }
  .lp-footer-brand { grid-column: auto; }
}

@media (min-width: 1024px) {
  .lp-hero { padding: 6rem 2rem 4rem; }
  .lp-cat-strip, .lp-cat-grid { grid-template-columns: repeat(6, 1fr); }
  .lp-feat-grid { grid-template-columns: repeat(3, 1fr); }
  .lp-diff-grid { grid-template-columns: repeat(3, 1fr); }
  .lp-diff2-grid { grid-template-columns: repeat(3, 1fr); }
  .lp-pricing-grid { grid-template-columns: repeat(3, 1fr); }
  .lp-footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

/* Mobile public navbar */
.pub-nav-links { display: none; }
.pub-nav-mobile-btn { display: flex; }
.pub-nav-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 280px; background: var(--surface); z-index: 300; transform: translateX(100%); transition: transform .3s; box-shadow: -4px 0 24px rgba(0,0,0,.18); padding: 1.5rem; display: flex; flex-direction: column; gap: .5rem; }
.pub-nav-drawer.open { transform: translateX(0); }
.pub-nav-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 299; }
.pub-nav-overlay.open { display: block; }

@media (min-width: 768px) {
  .pub-nav-links { display: flex; }
  .pub-nav-mobile-btn { display: none; }
}

@media (max-width: 767px) {
  .form-grid-2 { grid-template-columns: 1fr !important; }
  .page-header { flex-direction: column; gap: .75rem; align-items: flex-start; }
  .page-header-actions { width: 100%; }
  .page-header-actions .btn { width: 100%; }
}

/* ===== DIFFERENTIATION SECTION ===== */
.lp-diff-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: transform .2s, box-shadow .2s;
}
.lp-diff-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(99,102,241,.1);
}
.lp-diff-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.lp-diff-title {
  font-size: 1rem; font-weight: 700;
  color: var(--text);
  margin: 0 0 .5rem;
}
.lp-diff-desc {
  font-size: .875rem; color: var(--text-muted);
  line-height: 1.65; margin: 0;
}

/* ===== DIFFERENTIATION SECTION v2 ===== */
.lp-diff2-grid {
  display: grid;
  gap: .875rem;
}
.lp-diff2-card {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--dc, #6366f1);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  transition: transform .18s, box-shadow .18s;
}
.lp-diff2-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,.08);
}
.lp-diff2-icon {
  width: 46px; height: 46px; flex-shrink: 0;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.lp-diff2-body { flex: 1; min-width: 0; }
.lp-diff2-title {
  font-size: .9375rem; font-weight: 700;
  color: var(--text); margin: 0 0 .3rem;
}
.lp-diff2-desc {
  font-size: .8125rem; color: var(--text-muted);
  line-height: 1.6; margin: 0;
}
[data-theme="dark"] .lp-diff2-card {
  background: #1a1830;
  border-color: rgba(255,255,255,.06);
  border-left-color: var(--dc, #6366f1);
}

/* ===== ANALYTICS MOCKUP ===== */
.lp-analytics-mock {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 8px 40px rgba(99,102,241,.1), 0 2px 8px rgba(0,0,0,.06);
}
[data-theme="dark"] .lp-analytics-mock {
  background: #1a1830;
  border-color: rgba(99,102,241,.2);
  box-shadow: 0 8px 40px rgba(0,0,0,.4);
}
[data-theme="dark"] .lp-diff-card {
  background: #1a1830;
  border-color: rgba(99,102,241,.15);
}

/* progress layout */
.lp-progress-layout {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

/* mobile overrides already in responsive block above */


/* ============================================================
   PRINT STYLESHEET
   ============================================================ */
@media print {
  /* Hide navigation, sidebars, interactive elements */
  .sidebar, .topbar, .topbar-wrapper,
  .exam-action-bar, .modal-overlay,
  .btn, .badge, form,
  .lp-nav, .lp-footer,
  .lp-hero-cta, .lp-scroll-hint,
  nav, header, footer { display: none !important; }

  /* Reset layout */
  body { background: #fff !important; color: #000 !important; font-size: 11pt; }
  .main-content, .page-content { margin: 0 !important; padding: 0 !important; }

  /* Result / certificate pages */
  .result-card, .card { box-shadow: none !important; border: 1px solid #ccc; page-break-inside: avoid; }

  /* Question text legibility */
  .question-text { font-size: 12pt; line-height: 1.6; }

  /* Links: show URL */
  a[href]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
  a.btn::after, a[href^="#"]::after { content: "" !important; }

  /* Page breaks */
  h1, h2, h3 { page-break-after: avoid; }
  .question-body { page-break-inside: avoid; }
}

/* === PWA INSTALL BANNER === */
.pwa-banner {
  position: fixed;
  bottom: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: min(480px, calc(100vw - 2rem));
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,.16);
  padding: .875rem 1rem .875rem 1.1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  z-index: 9999;
  transition: bottom .4s cubic-bezier(.34,1.56,.64,1);
}
.pwa-banner.show { bottom: 1.25rem; }
.pwa-banner-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: linear-gradient(135deg,#6366f1,#818cf8);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.pwa-banner-icon svg { width: 22px; height: 22px; }
.pwa-banner-body { flex: 1; min-width: 0; }
.pwa-banner-title { font-size: .875rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.pwa-banner-sub { font-size: .75rem; color: var(--text-muted); margin-top: 1px; }
.pwa-banner-install {
  flex-shrink: 0;
  background: #6366f1; color: #fff;
  border: none; border-radius: 10px;
  padding: .5rem .875rem;
  font-size: .8125rem; font-weight: 700;
  cursor: pointer; transition: background .15s;
}
.pwa-banner-install:hover { background: #4f46e5; }
.pwa-banner-close {
  flex-shrink: 0; background: transparent; border: none;
  color: var(--text-muted); cursor: pointer; padding: .25rem;
  font-size: 1rem; line-height: 1; border-radius: 6px;
  transition: color .15s;
}
.pwa-banner-close:hover { color: var(--text); }

/* footer install button */
.pwa-footer-btn {
  display: none;
  align-items: center; gap: .5rem;
  background: rgba(99,102,241,.12);
  border: 1.5px solid rgba(99,102,241,.3);
  color: #818cf8; border-radius: 10px;
  padding: .5rem .875rem;
  font-size: .8125rem; font-weight: 600;
  cursor: pointer; transition: background .15s;
  margin-top: .75rem;
}
.pwa-footer-btn:hover { background: rgba(99,102,241,.2); }
.pwa-footer-btn svg { flex-shrink: 0; }
