/**
 * ExamHub Pro — Main Stylesheet
 * Dark theme, Bootstrap 5 overrides, RTL support, component library.
 */

/* ═══════════════════════════════════════════════════════════════════════
   1. CSS CUSTOM PROPERTIES (Dark Theme)
═══════════════════════════════════════════════════════════════════════ */
:root {
  --eh-bg-primary:     #0d0f14;
  --eh-bg-secondary:   #161923;
  --eh-bg-tertiary:    #1e2330;
  --eh-bg-card:        #1a1f2e;
  --eh-bg-card-hover:  #212840;
  --eh-bg-input:       #12151f;

  --eh-border:         #2a3050;
  --eh-border-light:   #363d5a;
  --eh-border-focus:   #4361ee;

  --eh-text-primary:   #e8eaf6;
  --eh-text-secondary: #9ba3c9;
  --eh-text-muted:     #6270a0;
  --eh-text-disabled:  #3d4568;

  --eh-accent:         #4361ee;
  --eh-accent-hover:   #3651d4;
  --eh-accent-light:   rgba(67, 97, 238, 0.15);
  --eh-accent-glow:    rgba(67, 97, 238, 0.3);

  --eh-success:        #22c55e;
  --eh-success-bg:     rgba(34, 197, 94, 0.12);
  --eh-danger:         #ef4444;
  --eh-danger-bg:      rgba(239, 68, 68, 0.12);
  --eh-warning:        #f59e0b;
  --eh-warning-bg:     rgba(245, 158, 11, 0.12);
  --eh-info:           #06b6d4;
  --eh-info-bg:        rgba(6, 182, 212, 0.12);

  --eh-gold:           #f6c90e;
  --eh-silver:         #9ba3c9;
  --eh-bronze:         #cd7f32;

  --eh-radius-sm:      6px;
  --eh-radius:         10px;
  --eh-radius-lg:      16px;
  --eh-radius-xl:      24px;

  --eh-shadow-sm:      0 1px 3px rgba(0,0,0,.4);
  --eh-shadow:         0 4px 20px rgba(0,0,0,.5);
  --eh-shadow-lg:      0 10px 40px rgba(0,0,0,.6);

  --eh-transition:     all 0.2s ease;
  --eh-font:           'Cairo', 'Tajawal', sans-serif;
  --eh-font-en:        'Inter', 'Segoe UI', sans-serif;

  /* Exam UI */
  --eh-correct-bg:     rgba(34, 197, 94, 0.18);
  --eh-wrong-bg:       rgba(239, 68, 68, 0.18);
  --eh-selected-bg:    rgba(67, 97, 238, 0.2);
  --eh-review-color:   #f59e0b;

  /* Sidebar width */
  --eh-sidebar-width:  260px;

  /* Scrollbar */
  --eh-scrollbar-bg:    #1e2330;
  --eh-scrollbar-thumb: #363d5a;
}

/* ═══════════════════════════════════════════════════════════════════════
   2. RESET & BASE
═══════════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--eh-bg-primary);
  color: var(--eh-text-primary);
  font-family: var(--eh-font);
  line-height: 1.7;
  direction: rtl;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body.ltr,
body.en { direction: ltr; font-family: var(--eh-font-en); }

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--eh-scrollbar-bg); }
::-webkit-scrollbar-thumb { background: var(--eh-scrollbar-thumb); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--eh-border-light); }

/* Links */
a { color: var(--eh-accent); text-decoration: none; transition: var(--eh-transition); }
a:hover { color: var(--eh-accent-hover); }

/* Images */
img { max-width: 100%; height: auto; }

/* ═══════════════════════════════════════════════════════════════════════
   3. BOOTSTRAP OVERRIDES
═══════════════════════════════════════════════════════════════════════ */

/* Body & containers */
.bg-body { background-color: var(--eh-bg-primary) !important; }
.container, .container-fluid { --bs-gutter-x: 1.5rem; }

/* Cards */
.card {
  background-color: var(--eh-bg-card);
  border: 1px solid var(--eh-border);
  border-radius: var(--eh-radius-lg);
  color: var(--eh-text-primary);
  box-shadow: var(--eh-shadow-sm);
  transition: var(--eh-transition);
}
.card:hover { border-color: var(--eh-border-light); box-shadow: var(--eh-shadow); }
.card-header, .card-footer {
  background-color: var(--eh-bg-tertiary);
  border-color: var(--eh-border);
}

/* Buttons */
.btn {
  border-radius: var(--eh-radius);
  font-family: var(--eh-font);
  font-weight: 600;
  transition: var(--eh-transition);
  border: none;
  padding: 0.55rem 1.4rem;
}
.btn-primary {
  background-color: var(--eh-accent);
  color: #fff;
}
.btn-primary:hover {
  background-color: var(--eh-accent-hover);
  box-shadow: 0 0 15px var(--eh-accent-glow);
}
.btn-outline-primary {
  border: 1px solid var(--eh-accent);
  color: var(--eh-accent);
  background: transparent;
}
.btn-outline-primary:hover {
  background-color: var(--eh-accent-light);
  color: var(--eh-accent);
}
.btn-ghost {
  background: transparent;
  color: var(--eh-text-secondary);
  border: 1px solid var(--eh-border);
}
.btn-ghost:hover {
  background-color: var(--eh-bg-tertiary);
  color: var(--eh-text-primary);
  border-color: var(--eh-border-light);
}
.btn-success  { background-color: var(--eh-success); }
.btn-danger   { background-color: var(--eh-danger); }
.btn-warning  { background-color: var(--eh-warning); color: #000; }
.btn-sm { padding: 0.35rem 0.9rem; font-size: 0.85rem; border-radius: var(--eh-radius-sm); }
.btn-lg { padding: 0.75rem 2rem; font-size: 1.05rem; border-radius: var(--eh-radius-lg); }

/* Forms */
.form-control, .form-select {
  background-color: var(--eh-bg-input);
  border: 1px solid var(--eh-border);
  border-radius: var(--eh-radius);
  color: var(--eh-text-primary);
  font-family: var(--eh-font);
  padding: 0.6rem 1rem;
  transition: var(--eh-transition);
}
.form-control:focus, .form-select:focus {
  background-color: var(--eh-bg-input);
  border-color: var(--eh-border-focus);
  color: var(--eh-text-primary);
  box-shadow: 0 0 0 3px var(--eh-accent-light);
  outline: none;
}
.form-control::placeholder { color: var(--eh-text-muted); }
.form-label {
  color: var(--eh-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}
.form-text { color: var(--eh-text-muted); }

/* Badges */
.badge {
  border-radius: var(--eh-radius-sm);
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.3em 0.7em;
}
.badge-success { background-color: var(--eh-success-bg); color: var(--eh-success); }
.badge-danger  { background-color: var(--eh-danger-bg);  color: var(--eh-danger); }
.badge-warning { background-color: var(--eh-warning-bg); color: var(--eh-warning); }
.badge-info    { background-color: var(--eh-info-bg);    color: var(--eh-info); }
.badge-accent  { background-color: var(--eh-accent-light); color: var(--eh-accent); }

/* Alerts */
.alert {
  border-radius: var(--eh-radius);
  border: none;
  padding: 1rem 1.25rem;
}
.alert-success { background-color: var(--eh-success-bg); color: var(--eh-success); }
.alert-danger  { background-color: var(--eh-danger-bg);  color: var(--eh-danger); }
.alert-warning { background-color: var(--eh-warning-bg); color: var(--eh-warning); }
.alert-info    { background-color: var(--eh-info-bg);    color: var(--eh-info); }

/* Nav pills / tabs */
.nav-pills .nav-link { color: var(--eh-text-secondary); border-radius: var(--eh-radius); padding: 0.5rem 1.2rem; font-weight: 500; }
.nav-pills .nav-link.active { background-color: var(--eh-accent); color: #fff; }
.nav-pills .nav-link:hover:not(.active) { background-color: var(--eh-bg-tertiary); color: var(--eh-text-primary); }

/* Tables */
.table { color: var(--eh-text-primary); }
.table > :not(caption) > * > * { background-color: transparent; border-color: var(--eh-border); }
.table-hover > tbody > tr:hover > * { background-color: var(--eh-bg-tertiary); }
.table-striped > tbody > tr:nth-of-type(odd) > * { background-color: rgba(255,255,255,.03); }

/* Modal */
.modal-content { background-color: var(--eh-bg-card); border: 1px solid var(--eh-border); border-radius: var(--eh-radius-lg); color: var(--eh-text-primary); }
.modal-header, .modal-footer { border-color: var(--eh-border); }
.modal-header { padding: 1.25rem 1.5rem; }
.btn-close { filter: invert(1); opacity: 0.6; }
.btn-close:hover { opacity: 1; }

/* Dropdown */
.dropdown-menu { background-color: var(--eh-bg-card); border: 1px solid var(--eh-border); border-radius: var(--eh-radius); box-shadow: var(--eh-shadow-lg); }
.dropdown-item { color: var(--eh-text-secondary); font-family: var(--eh-font); padding: 0.55rem 1rem; }
.dropdown-item:hover, .dropdown-item:focus { background-color: var(--eh-bg-tertiary); color: var(--eh-text-primary); }
.dropdown-divider { border-color: var(--eh-border); }

/* Progress bar */
.progress { background-color: var(--eh-bg-tertiary); border-radius: 50px; height: 8px; }
.progress-bar { background-color: var(--eh-accent); border-radius: 50px; }
.progress-bar.bg-success { background-color: var(--eh-success) !important; }
.progress-bar.bg-warning { background-color: var(--eh-warning) !important; }
.progress-bar.bg-danger  { background-color: var(--eh-danger) !important; }

/* Tooltip */
.tooltip-inner { background-color: var(--eh-bg-card); color: var(--eh-text-primary); border: 1px solid var(--eh-border); }

/* Breadcrumb */
.breadcrumb-item + .breadcrumb-item::before { color: var(--eh-text-muted); }
.breadcrumb-item a { color: var(--eh-text-secondary); }
.breadcrumb-item.active { color: var(--eh-text-muted); }

/* ═══════════════════════════════════════════════════════════════════════
   4. LAYOUT — NAVBAR
═══════════════════════════════════════════════════════════════════════ */
.eh-navbar {
  background-color: var(--eh-bg-secondary);
  border-bottom: 1px solid var(--eh-border);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 1030;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background-color: rgba(22, 25, 35, 0.9);
}
.eh-brand-cluster {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  flex-shrink: 0;
}
.eh-navbar .navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  color: var(--eh-text-primary);
  text-decoration: none;
}
.eh-nav-float-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid rgba(67,97,238,.2);
  background:
    radial-gradient(circle at 30% 20%, rgba(67,97,238,.18), transparent 58%),
    linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  color: var(--eh-text-primary);
  box-shadow: 0 12px 28px rgba(15,23,42,.22);
  transition: var(--eh-transition);
}
.eh-nav-float-icon:hover {
  color: var(--eh-accent);
  border-color: rgba(67,97,238,.38);
  transform: translateY(-1px);
}
.eh-nav-float-icon i {
  font-size: 1.1rem;
}
.eh-brand-mark {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background:
    radial-gradient(circle at top, rgba(67,97,238,.28), transparent 65%),
    linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  border: 1px solid rgba(67,97,238,.22);
  box-shadow: 0 10px 30px rgba(15,23,42,.24);
  flex-shrink: 0;
}
.eh-brand-mark img {
  max-width: 34px;
  max-height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(67,97,238,.18));
}
.eh-brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.1;
}
.eh-brand-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--eh-accent);
  letter-spacing: -0.03em;
  text-shadow: 0 0 18px rgba(67,97,238,.18);
  white-space: nowrap;
}
.eh-brand-tagline {
  margin-top: 0.22rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--eh-text-muted);
  opacity: 0.95;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.eh-navbar .nav-link { color: var(--eh-text-secondary); font-weight: 500; padding: 0.5rem 0.75rem !important; border-radius: var(--eh-radius-sm); }
.eh-navbar .nav-link:hover { color: var(--eh-text-primary); background-color: var(--eh-bg-tertiary); }
.eh-navbar .nav-link.active { color: var(--eh-accent); }
.eh-nav-more .nav-link.show,
.eh-nav-more .nav-link[aria-expanded="true"] {
  color: var(--eh-text-primary);
  background-color: rgba(67,97,238,.08);
}
.eh-nav-more .nav-link.show i,
.eh-nav-more .nav-link[aria-expanded="true"] i {
  color: var(--eh-accent);
}
.eh-nav-more .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}
.eh-nav-dropdown {
  min-width: 220px;
  padding: 0.45rem;
  margin-top: 0.55rem;
  border-radius: 18px;
  background: rgba(17,20,30,.98);
  border: 1px solid rgba(148,163,184,.14);
  box-shadow: 0 20px 44px rgba(2,6,23,.32);
}
.eh-nav-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  color: var(--eh-text-secondary);
  font-weight: 600;
}
.eh-nav-dropdown .dropdown-item i {
  color: var(--eh-accent);
  font-size: 0.95rem;
}
.eh-nav-dropdown .dropdown-item:hover,
.eh-nav-dropdown .dropdown-item:focus,
.eh-nav-dropdown .dropdown-item.active {
  background: rgba(67,97,238,.12);
  color: var(--eh-text-primary);
}

.eh-navbar .nav-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--eh-accent);
  object-fit: cover;
  object-position: center;
  display: block;
  min-width: 36px;
  min-height: 36px;
  background: var(--eh-bg-tertiary);
}

.eh-avatar {
  border-radius: 50% !important;
  object-fit: cover !important;
  object-position: center !important;
  background: var(--eh-bg-tertiary);
}

/* XP badge in navbar */
.eh-xp-badge {
  background: var(--eh-accent-light);
  color: var(--eh-accent);
  border: 1px solid var(--eh-accent-glow);
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════════════
   5. LAYOUT — MAIN CONTENT
═══════════════════════════════════════════════════════════════════════ */
.eh-main { min-height: calc(100vh - 80px); padding: 2rem 0; }
.eh-page-header { padding: 2rem 0 1.5rem; border-bottom: 1px solid var(--eh-border); margin-bottom: 2rem; }
.eh-page-title { font-size: 1.75rem; font-weight: 800; color: var(--eh-text-primary); margin: 0; }
.eh-page-subtitle { color: var(--eh-text-secondary); margin-top: 0.25rem; }

/* ═══════════════════════════════════════════════════════════════════════
   6. COMPONENTS — SUBJECT CARDS
═══════════════════════════════════════════════════════════════════════ */
.eh-subject-card {
  background-color: var(--eh-bg-card);
  border: 1px solid var(--eh-border);
  border-radius: var(--eh-radius-lg);
  padding: 1.5rem;
  cursor: pointer;
  transition: var(--eh-transition);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.eh-subject-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--subject-color, var(--eh-accent));
}
.eh-subject-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--eh-shadow);
  border-color: var(--eh-border-light);
}
.eh-subject-card .subject-icon { font-size: 2.5rem; margin-bottom: 0.75rem; display: block; }
.eh-subject-card .subject-name { font-weight: 700; font-size: 1rem; color: var(--eh-text-primary); }
.eh-subject-card .exam-count { font-size: 0.8rem; color: var(--eh-text-muted); margin-top: 0.25rem; }

/* ═══════════════════════════════════════════════════════════════════════
   7. COMPONENTS — EXAM CARDS
═══════════════════════════════════════════════════════════════════════ */
.eh-exam-card {
  background-color: var(--eh-bg-card);
  border: 1px solid var(--eh-border);
  border-radius: var(--eh-radius-lg);
  overflow: hidden;
  transition: var(--eh-transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.eh-exam-card:hover { transform: translateY(-2px); box-shadow: var(--eh-shadow); border-color: var(--eh-accent); }
.eh-exam-card .card-thumb {
  height: 160px;
  background: linear-gradient(135deg, var(--eh-bg-tertiary), var(--eh-bg-secondary));
  position: relative;
  overflow: hidden;
}
.eh-exam-card .card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.eh-exam-card .card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.eh-exam-card .exam-title { font-weight: 700; font-size: 0.95rem; color: var(--eh-text-primary); margin-bottom: 0.5rem; }
.eh-exam-card .exam-meta { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.eh-exam-card .exam-meta-item { font-size: 0.78rem; color: var(--eh-text-muted); display: flex; align-items: center; gap: 0.25rem; }
.eh-exam-card .card-footer-action { margin-top: auto; }
.eh-exam-card.completed {
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.12), rgba(100, 116, 139, 0.08)), var(--eh-bg-card);
  border-color: rgba(148, 163, 184, 0.35);
}
.eh-exam-card.completed:hover {
  border-color: rgba(148, 163, 184, 0.55);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
}
.eh-exam-card.completed .card-thumb {
  filter: grayscale(1);
}
.eh-exam-card.completed .card-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.18);
}
.eh-exam-card.completed .exam-title,
.eh-exam-card.completed .exam-title a,
.eh-exam-card.completed .exam-meta-item,
.eh-exam-card.completed .badge-accent {
  color: #b8c0d4 !important;
}
.eh-exam-card.completed .card-body > .mb-2 .badge:not(.eh-exam-completed-badge) {
  background: rgba(148, 163, 184, 0.14) !important;
  color: #cbd5e1 !important;
  border-color: rgba(148, 163, 184, 0.3) !important;
}
.eh-exam-card .eh-exam-completed-badge {
  z-index: 1;
  background: rgba(100, 116, 139, 0.92);
  color: #fff;
  border: 1px solid rgba(203, 213, 225, 0.28);
}
.eh-exam-card.completed .btn.btn-secondary {
  background: #6b7280;
  border-color: #6b7280;
  color: #fff;
}
.eh-exam-card.completed .btn.btn-secondary:hover {
  background: #4b5563;
  border-color: #4b5563;
}

/* Lock overlay for paywall */
.eh-exam-card.locked .card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(3px);
}
.eh-exam-card.locked .lock-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  font-size: 2rem;
  color: var(--eh-gold);
}

/* Difficulty badge */
.badge-easy   { background: var(--eh-success-bg); color: var(--eh-success); }
.badge-medium { background: var(--eh-warning-bg); color: var(--eh-warning); }
.badge-hard   { background: var(--eh-danger-bg);  color: var(--eh-danger); }

/* ═══════════════════════════════════════════════════════════════════════
   8. COMPONENTS — FILTER BAR
═══════════════════════════════════════════════════════════════════════ */
.eh-filter-bar {
  background-color: var(--eh-bg-secondary);
  border: 1px solid var(--eh-border);
  border-radius: var(--eh-radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.eh-filter-steps { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.eh-filter-step {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 160px;
  flex: 1;
}
.eh-filter-step label { font-size: 0.8rem; color: var(--eh-text-muted); font-weight: 500; }
.eh-filter-step .form-select { background-color: var(--eh-bg-input); font-size: 0.9rem; }
.eh-filter-arrow { color: var(--eh-text-muted); align-self: flex-end; padding-bottom: 0.5rem; font-size: 1.1rem; }

/* ═══════════════════════════════════════════════════════════════════════
   9. COMPONENTS — STATS CARDS (Dashboard)
═══════════════════════════════════════════════════════════════════════ */
.eh-stat-card {
  background-color: var(--eh-bg-card);
  border: 1px solid var(--eh-border);
  border-radius: var(--eh-radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.eh-stat-card .stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--eh-radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.eh-stat-card .stat-value { font-size: 1.6rem; font-weight: 800; color: var(--eh-text-primary); line-height: 1.1; }
.eh-stat-card .stat-label { font-size: 0.82rem; color: var(--eh-text-muted); margin-top: 0.15rem; }
.eh-stat-card .stat-change { font-size: 0.78rem; margin-top: 0.25rem; }
.eh-stat-card .stat-change.positive { color: var(--eh-success); }
.eh-stat-card .stat-change.negative { color: var(--eh-danger); }

/* Colored stat icons */
.icon-accent  { background: var(--eh-accent-light); color: var(--eh-accent); }
.icon-success { background: var(--eh-success-bg);   color: var(--eh-success); }
.icon-warning { background: var(--eh-warning-bg);   color: var(--eh-warning); }
.icon-danger  { background: var(--eh-danger-bg);    color: var(--eh-danger); }
.icon-info    { background: var(--eh-info-bg);      color: var(--eh-info); }
.icon-gold    { background: rgba(246,201,14,.15);    color: var(--eh-gold); }

/* ═══════════════════════════════════════════════════════════════════════
   10. COMPONENTS — XP / LEVEL DISPLAY
═══════════════════════════════════════════════════════════════════════ */
.eh-level-card {
  background: linear-gradient(135deg, var(--eh-bg-tertiary), var(--eh-bg-card));
  border: 1px solid var(--eh-border);
  border-radius: var(--eh-radius-lg);
  padding: 1.5rem;
}
.eh-level-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--eh-accent-light);
  border: 1px solid var(--eh-accent-glow);
  border-radius: 20px;
  padding: 0.3rem 1rem;
  font-weight: 700; font-size: 0.85rem; color: var(--eh-accent);
  margin-bottom: 0.75rem;
}
.eh-xp-progress .progress { height: 10px; }
.eh-xp-text { font-size: 0.8rem; color: var(--eh-text-muted); margin-top: 0.4rem; }

/* ═══════════════════════════════════════════════════════════════════════
   11. COMPONENTS — LEADERBOARD
═══════════════════════════════════════════════════════════════════════ */
.eh-leaderboard-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.875rem 1rem;
  border-radius: var(--eh-radius);
  transition: var(--eh-transition);
  border: 1px solid transparent;
}
.eh-leaderboard-item:hover { background-color: var(--eh-bg-tertiary); border-color: var(--eh-border); }
.eh-leaderboard-item.rank-1 { background: rgba(246,201,14,.07); border-color: rgba(246,201,14,.3); }
.eh-leaderboard-item.rank-2 { background: rgba(155,163,201,.07); border-color: rgba(155,163,201,.3); }
.eh-leaderboard-item.rank-3 { background: rgba(205,127,50,.07); border-color: rgba(205,127,50,.3); }
.eh-leaderboard-item.is-current-user { background: var(--eh-accent-light); border-color: var(--eh-accent-glow); }

.lb-rank { width: 32px; font-weight: 800; font-size: 1rem; text-align: center; flex-shrink: 0; }
.lb-rank.gold   { color: var(--eh-gold); }
.lb-rank.silver { color: var(--eh-silver); }
.lb-rank.bronze { color: var(--eh-bronze); }
.lb-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.lb-name { font-weight: 600; font-size: 0.9rem; }
.lb-grade { font-size: 0.78rem; color: var(--eh-text-muted); }
.lb-xp { margin-right: auto; margin-left: auto; }
.lb-xp-val { font-weight: 700; color: var(--eh-accent); }
.lb-xp-label { font-size: 0.75rem; color: var(--eh-text-muted); }

/* ═══════════════════════════════════════════════════════════════════════
   12. COMPONENTS — SUBSCRIPTION PLANS
═══════════════════════════════════════════════════════════════════════ */
.eh-plan-card {
  background-color: var(--eh-bg-card);
  border: 1px solid var(--eh-border);
  border-radius: var(--eh-radius-xl);
  padding: 2rem;
  transition: var(--eh-transition);
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.eh-plan-card.featured {
  border-color: var(--eh-accent);
  box-shadow: 0 0 30px var(--eh-accent-glow);
}
.eh-plan-card .plan-badge {
  position: absolute;
  top: 1rem; left: 1rem;
  background: var(--eh-accent);
  color: #fff; border-radius: 20px;
  padding: 0.2rem 0.75rem; font-size: 0.75rem; font-weight: 700;
}
.eh-plan-card .plan-name { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; }
.eh-plan-card .plan-price { font-size: 2.5rem; font-weight: 800; color: var(--eh-accent); line-height: 1; }
.eh-plan-card .plan-price span { font-size: 1rem; color: var(--eh-text-muted); font-weight: 400; }
.eh-plan-card .plan-old-price {
  color: var(--eh-text-muted);
  font-size: 0.9rem;
  margin-top: 0.2rem;
}
.eh-plan-card .plan-old-price del {
  color: #f6b35f;
  font-weight: 700;
  text-decoration-thickness: 2px;
}
.eh-plan-card .plan-discount-badge {
  align-self: flex-start;
  background: rgba(246, 179, 95, 0.12);
  border: 1px solid rgba(246, 179, 95, 0.38);
  border-radius: 999px;
  color: #ffd28d;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  margin-top: 0.15rem;
  padding: 0.2rem 0.7rem;
}
.eh-plan-card .plan-duration { font-size: 0.85rem; color: var(--eh-text-muted); margin-top: 0.25rem; }
.eh-plan-card .plan-features { list-style: none; padding: 0; margin: 1.5rem 0; flex: 1; }
.eh-plan-card .plan-features li {
  padding: 0.4rem 0;
  font-size: 0.9rem; color: var(--eh-text-secondary);
  display: flex; align-items: center; gap: 0.5rem;
}
.eh-plan-card .plan-features li::before { content: '✓'; color: var(--eh-success); font-weight: 700; flex-shrink: 0; }
.eh-plan-card .plan-features li.unavailable { color: var(--eh-text-disabled); }
.eh-plan-card .plan-features li.unavailable::before { content: '✕'; color: var(--eh-text-disabled); }

.eh-offer-countdown {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(246, 179, 95, 0.14), rgba(67, 97, 238, 0.14)),
    var(--eh-bg-card);
  border: 1px solid rgba(246, 179, 95, 0.32);
  border-radius: var(--eh-radius-lg);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  overflow: hidden;
  padding: 1rem 1.15rem;
  position: relative;
}
.eh-offer-countdown::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  content: '';
  height: 100%;
  inset: 0 auto 0 -35%;
  position: absolute;
  transform: skewX(-18deg);
  width: 28%;
  animation: ehOfferShine 3.2s ease-in-out infinite;
}
.eh-offer-countdown-copy,
.eh-offer-countdown-timer {
  position: relative;
  z-index: 1;
}
.eh-offer-countdown-copy {
  display: grid;
  gap: 0.2rem;
  text-align: right;
}
.eh-offer-kicker {
  color: #ffd28d;
  font-size: 0.78rem;
  font-weight: 800;
}
.eh-offer-countdown-copy strong {
  color: var(--eh-text-primary);
  font-size: 1.05rem;
}
.eh-offer-countdown-timer {
  align-items: center;
  direction: ltr;
  display: flex;
  gap: 0.45rem;
}
.eh-countdown-unit {
  align-items: center;
  background: rgba(10, 14, 28, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--eh-radius);
  display: grid;
  justify-items: center;
  min-width: 68px;
  padding: 0.45rem 0.55rem;
}
.eh-countdown-unit strong {
  color: #fff;
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1;
}
.eh-countdown-unit span {
  color: var(--eh-text-muted);
  font-size: 0.72rem;
  margin-top: 0.2rem;
}
.eh-countdown-separator {
  color: #ffd28d;
  font-size: 1.4rem;
  font-weight: 900;
}

@keyframes ehOfferShine {
  0%, 52% { left: -35%; opacity: 0; }
  65% { opacity: 1; }
  100% { left: 112%; opacity: 0; }
}

/* Paywall overlay */
.eh-paywall-overlay {
  position: fixed; inset: 0; z-index: 1040;
  background: rgba(13, 15, 20, 0.85);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.eh-paywall-box {
  background-color: var(--eh-bg-card);
  border: 1px solid var(--eh-border);
  border-radius: var(--eh-radius-xl);
  padding: 2.5rem;
  max-width: 480px; width: 100%;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════
   13. COMPONENTS — BADGES (Achievement)
═══════════════════════════════════════════════════════════════════════ */
.eh-achievement-badge {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  padding: 1.25rem;
  background-color: var(--eh-bg-card);
  border: 1px solid var(--eh-border);
  border-radius: var(--eh-radius-lg);
  transition: var(--eh-transition);
  text-align: center;
}
.eh-achievement-badge:hover { border-color: var(--eh-gold); box-shadow: 0 0 15px rgba(246,201,14,.2); }
.eh-achievement-badge img { width: 64px; height: 64px; }
.eh-achievement-badge.locked { opacity: 0.4; filter: grayscale(1); }
.eh-achievement-badge.locked:hover { border-color: var(--eh-border); box-shadow: none; }
.eh-achievement-badge .badge-name { font-weight: 600; font-size: 0.85rem; color: var(--eh-text-secondary); }
.eh-achievement-badge .badge-xp { font-size: 0.75rem; color: var(--eh-accent); }

/* ═══════════════════════════════════════════════════════════════════════
   14. UTILITIES
═══════════════════════════════════════════════════════════════════════ */
.text-accent    { color: var(--eh-accent) !important; }
.text-secondary { color: var(--eh-text-secondary) !important; }
.text-muted     { color: var(--eh-text-muted) !important; }
.text-success   { color: var(--eh-success) !important; }
.text-danger    { color: var(--eh-danger) !important; }
.text-warning   { color: var(--eh-warning) !important; }
.text-light     { color: var(--eh-text-primary) !important; }
.text-muted-eh  { color: var(--eh-text-muted) !important; }
.text-secondary-eh { color: var(--eh-text-secondary) !important; }
.bg-card        { background-color: var(--eh-bg-card) !important; }
.bg-tertiary    { background-color: var(--eh-bg-tertiary) !important; }
.border-eh      { border-color: var(--eh-border) !important; }
.rounded-eh     { border-radius: var(--eh-radius) !important; }
.rounded-eh-lg  { border-radius: var(--eh-radius-lg) !important; }
.shadow-eh      { box-shadow: var(--eh-shadow) !important; }

/* Dividers */
.eh-divider { border-color: var(--eh-border); opacity: 1; }

/* Section headings */
.eh-section-title {
  font-size: 1.1rem; font-weight: 700; color: var(--eh-text-primary);
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 1rem;
}
.eh-section-title .icon { color: var(--eh-accent); }

/* Empty state */
.eh-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--eh-text-muted);
}
.eh-empty-state .empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }
.eh-empty-state h3 { font-size: 1rem; font-weight: 600; color: var(--eh-text-secondary); }

/* Loading spinner */
.eh-loading {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid var(--eh-border);
  border-top-color: var(--eh-accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Skeleton loader */
.eh-skeleton {
  background: linear-gradient(90deg, var(--eh-bg-tertiary) 25%, var(--eh-bg-card) 50%, var(--eh-bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--eh-radius);
}
@keyframes skeleton-shimmer { to { background-position: -200% 0; } }

/* Blur locked content */
.eh-blur-locked { filter: blur(5px); pointer-events: none; user-select: none; }

/* Streak fire */
.eh-streak-fire { color: var(--eh-warning); font-size: 1.1rem; }

/* ═══════════════════════════════════════════════════════════════════════
   15. FOOTER
═══════════════════════════════════════════════════════════════════════ */
.eh-footer {
  background-color: var(--eh-bg-secondary);
  border-top: 1px solid var(--eh-border);
  padding: 2rem 0 1rem;
  color: var(--eh-text-muted);
  font-size: 0.85rem;
}
.eh-footer a { color: var(--eh-text-secondary); }
.eh-footer a:hover { color: var(--eh-text-primary); }

/* ═══════════════════════════════════════════════════════════════════════
   16. MOBILE / RESPONSIVE
═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .eh-filter-steps { flex-direction: column; }
  .eh-filter-step { min-width: 100%; }
  .eh-filter-arrow { display: none; }
  .eh-page-title { font-size: 1.35rem; }
  .eh-plan-card { padding: 1.5rem; }
  .eh-offer-countdown {
    align-items: stretch;
    flex-direction: column;
  }
  .eh-offer-countdown-timer {
    justify-content: center;
  }
  .eh-countdown-unit {
    min-width: 0;
    width: 30%;
  }
  .eh-stat-card .stat-value { font-size: 1.3rem; }
  .eh-navbar .eh-xp-badge { display: none; }
  .eh-brand-cluster {
    gap: .55rem;
    max-width: calc(100vw - 110px);
  }
  .eh-navbar .navbar-brand {
    gap: .6rem;
    max-width: calc(100vw - 164px);
  }
  .eh-nav-float-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
  .eh-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }
  .eh-brand-title {
    font-size: 1.12rem;
  }
  .eh-brand-tagline {
    font-size: .62rem;
  }
  .eh-nav-dropdown {
    min-width: 100%;
  }

  /* Bottom navigation bar for mobile */
  .eh-mobile-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 1020;
    background-color: var(--eh-bg-secondary);
    border-top: 1px solid var(--eh-border);
    display: flex;
    padding: 0.5rem 0 calc(0.5rem + env(safe-area-inset-bottom));
  }
  .eh-mobile-nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
    padding: 0.4rem;
    color: var(--eh-text-muted); font-size: 0.7rem;
    text-decoration: none; transition: var(--eh-transition);
  }
  .eh-mobile-nav-item i { font-size: 1.3rem; }
  .eh-mobile-nav-item.active { color: var(--eh-accent); }
  .eh-main { padding-bottom: 80px; }

}

@media (min-width: 769px) {
  .eh-mobile-nav { display: none !important; }
}
/* Checkout page fixes */
.eh-checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.5rem;
  align-items: start;
}

.eh-checkout-layout h2 {
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 1rem !important;
}

#payment-methods-list {
  display: grid;
  gap: 0.85rem;
}

.eh-method-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: var(--eh-bg-card);
  border: 1px solid var(--eh-border);
  border-radius: var(--eh-radius-lg);
  padding: 0.95rem 1rem;
  cursor: pointer;
  transition: var(--eh-transition);
}

.eh-method-card:hover {
  border-color: var(--eh-border-light);
  background: var(--eh-bg-card-hover);
}

.eh-method-card.selected {
  border-color: var(--eh-accent);
  box-shadow: 0 0 0 2px var(--eh-accent-light);
}

.eh-method-card .method-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--eh-accent);
  background: var(--eh-accent-light);
  flex-shrink: 0;
}

.eh-method-card .method-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--eh-text-primary);
}

.eh-method-card .method-desc {
  font-size: 0.86rem;
  color: var(--eh-text-secondary);
  margin-top: 0.1rem;
}

.instant-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--eh-success);
  background: var(--eh-success-bg);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}

#method-instructions {
  background: var(--eh-bg-card);
  border: 1px solid var(--eh-border);
  border-radius: var(--eh-radius-lg);
}

#method-instructions h5 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
}

#method-instructions code {
  color: var(--eh-text-primary);
  background: var(--eh-bg-input);
  border: 1px solid var(--eh-border);
  border-radius: 8px;
  padding: 0.2rem 0.45rem;
}

#manual-proof-form {
  background: var(--eh-bg-card);
  border: 1px solid var(--eh-border);
  border-radius: var(--eh-radius-lg);
  padding: 1rem;
  margin-top: 1rem;
}

.eh-checkout-layout {
  align-items: start;
}

#method-instructions,
#manual-proof-form {
  background:
    linear-gradient(180deg, rgba(18, 26, 48, 0.82), rgba(15, 21, 38, 0.94)),
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.12), transparent 32%);
  border: 1px solid rgba(90, 117, 196, 0.28);
  box-shadow: 0 24px 60px rgba(4, 10, 24, 0.34);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.eh-proof-steps {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(67, 97, 238, 0.08));
}

.eh-proof-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--eh-text-primary);
  font-weight: 700;
}

.eh-proof-step-num {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #06b6d4, #4f46e5);
  color: #fff;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.eh-proof-fields {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.eh-proof-field {
  display: grid;
  gap: 0.45rem;
}

.eh-proof-label {
  color: var(--eh-text-primary);
  font-size: 0.95rem;
  font-weight: 700;
}

.eh-proof-label-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.eh-proof-help-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, 0.28);
  background: rgba(6, 182, 212, 0.08);
  color: #8be9fd;
  font-size: 0.82rem;
  font-weight: 700;
}

.eh-proof-help-btn:hover {
  background: rgba(6, 182, 212, 0.16);
  color: #d7f7ff;
}

.eh-proof-help-tooltip {
  position: relative;
  display: grid;
  gap: 0.65rem;
  margin-top: 0.85rem;
  padding: 0.95rem;
  border: 1px solid rgba(96, 119, 194, 0.28);
  border-radius: 18px;
  background: rgba(10, 16, 29, 0.96);
  box-shadow: 0 18px 40px rgba(4, 10, 24, 0.34);
}

.eh-proof-help-tooltip-title {
  color: var(--eh-text-primary);
  font-size: 0.92rem;
  font-weight: 800;
}

.eh-proof-help-image {
  width: min(100%, 420px);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #fff;
}

.eh-proof-input-wrap {
  position: relative;
  display: block;
}

.eh-proof-input-wrap i {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #7dd3fc;
  font-size: 1rem;
  pointer-events: none;
}

.eh-proof-input {
  min-height: 60px;
  border-radius: 18px;
  border: 1px solid rgba(96, 119, 194, 0.3);
  background: rgba(10, 16, 29, 0.88);
  color: #f5f7ff;
  padding-right: 2.8rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.eh-proof-input:focus {
  background: rgba(10, 16, 29, 0.96);
  border-color: rgba(6, 182, 212, 0.6);
  box-shadow: 0 0 0 0.2rem rgba(6, 182, 212, 0.12);
  color: #fff;
}

.eh-proof-upload {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  padding: 1.3rem 1rem;
  border: 1.5px dashed rgba(125, 211, 252, 0.38);
  border-radius: 22px;
  background: rgba(12, 18, 34, 0.72);
  text-align: center;
  cursor: pointer;
  transition: var(--eh-transition);
}

.eh-proof-upload:hover,
.eh-proof-upload.is-dragover {
  border-color: rgba(6, 182, 212, 0.85);
  background: rgba(12, 22, 40, 0.92);
  transform: translateY(-1px);
}

.eh-proof-upload-icon {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(79, 70, 229, 0.22));
  color: #8be9fd;
  font-size: 1.4rem;
}

.eh-proof-upload-title {
  color: var(--eh-text-primary);
  font-size: 1rem;
  font-weight: 800;
}

.eh-proof-upload-subtitle,
.eh-proof-file-name {
  color: var(--eh-text-secondary);
  font-size: 0.9rem;
}

.eh-proof-file-name {
  color: #c6d1ff;
  font-weight: 700;
}

.eh-proof-instruction-card {
  display: grid;
  gap: 0.8rem;
}

.eh-proof-instruction-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.eh-proof-instruction-method {
  color: var(--eh-text-primary);
  font-size: 1.05rem;
  font-weight: 800;
}

.eh-proof-instruction-badge {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.28);
  color: #86efac;
  font-size: 0.78rem;
  font-weight: 800;
}

.eh-proof-instruction-line,
.eh-proof-instruction-text {
  color: var(--eh-text-secondary);
  line-height: 1.8;
}

.eh-proof-instruction-line strong {
  color: var(--eh-text-primary);
}

.eh-proof-instruction-card code {
  font-size: 1.05rem;
  font-weight: 800;
}

#btn-pay-now {
  min-height: 60px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, #06b6d4, #4f46e5);
  box-shadow: 0 18px 40px rgba(79, 70, 229, 0.28);
  font-weight: 800;
  letter-spacing: 0;
}

#btn-pay-now:hover:not(.eh-btn-disabled):not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 22px 46px rgba(79, 70, 229, 0.34);
}

#btn-pay-now.eh-btn-disabled,
#btn-pay-now:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.eh-order-summary {
  background: var(--eh-bg-card);
  border: 1px solid var(--eh-border);
  border-radius: var(--eh-radius-lg);
  padding: 1.15rem;
  position: sticky;
  top: 92px;
}

#btn-pay-now {
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .eh-checkout-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .eh-order-summary {
    position: static;
  }

  .eh-checkout-layout h2 {
    font-size: 1.45rem;
  }

  .eh-method-card {
    padding: 0.8rem;
  }

  .eh-method-card .method-name {
    font-size: 0.95rem;
  }

  .eh-method-card .method-desc {
    font-size: 0.8rem;
  }

  .eh-proof-step {
    align-items: flex-start;
  }

  .eh-proof-instruction-head {
    align-items: flex-start;
  }

  .eh-proof-label-help {
    align-items: flex-start;
  }
}
/* Pricing table + FAQ color fixes */
.eh-pricing-compare-table,
.eh-pricing-compare-table th,
.eh-pricing-compare-table td {
  color: var(--eh-text-primary) !important;
}

.eh-pricing-compare-table thead th {
  color: var(--eh-text-primary) !important;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.01);
}

.eh-pricing-compare-table tbody td:first-child {
  color: var(--eh-text-primary) !important;
  font-weight: 600;
}

.eh-pricing-compare-table .text-muted {
  color: var(--eh-text-muted) !important;
}

.eh-pricing-faq .accordion-item {
  background: var(--eh-bg-card);
  border: 1px solid var(--eh-border);
}

.eh-pricing-faq .accordion-button,
.eh-pricing-faq .accordion-button:not(.collapsed) {
  color: var(--eh-text-primary) !important;
  background: transparent !important;
  box-shadow: none !important;
}

.eh-pricing-faq .accordion-button::after {
  filter: invert(75%) sepia(18%) saturate(597%) hue-rotate(191deg) brightness(96%) contrast(87%);
}

.eh-pricing-faq .accordion-body {
  color: var(--eh-text-secondary) !important;
}

/* Pricing subtitle readability */
.eh-pricing-subtitle {
  color: #aab4da !important;
  font-size: 1.04rem;
  line-height: 1.8;
}

/* Desktop quick menu near avatar */
.eh-desktop-quick-links {
  margin-inline-end: .35rem;
}

.eh-quick-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .38rem .72rem;
  border-radius: 999px;
  border: 1px solid var(--eh-border);
  background: rgba(255,255,255,.02);
  color: var(--eh-text-secondary);
  font-size: .8rem;
  font-weight: 700;
  line-height: 1;
}

.eh-quick-link:hover {
  color: var(--eh-text-primary);
  border-color: var(--eh-border-light);
  background: rgba(67,97,238,.12);
}

.eh-quick-link i {
  font-size: .86rem;
  color: var(--eh-accent);
}
/* Home landing page */
.eh-landing-page {
  position: relative;
}

.eh-landing-hero {
  position: relative;
  overflow: hidden;
  padding: 3rem 1.5rem;
  border: 1px solid var(--eh-border);
  border-radius: 24px;
  background: radial-gradient(1000px 360px at 70% -20%, rgba(67,97,238,.25), rgba(13,15,20,0)), linear-gradient(135deg, #171c2a 0%, #111522 65%, #0e111a 100%);
}

.eh-landing-glow {
  position: absolute;
  inset: auto auto -140px -100px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6,182,212,.2) 0%, rgba(6,182,212,0) 70%);
  pointer-events: none;
}

.eh-landing-chip {
  display: inline-block;
  padding: .35rem .85rem;
  border-radius: 999px;
  border: 1px solid var(--eh-border-light);
  color: var(--eh-text-secondary);
  font-size: .82rem;
  margin-bottom: 1rem;
}

.eh-landing-hero h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: .8rem;
}

.eh-landing-hero p {
  color: var(--eh-text-secondary);
  font-size: 1.05rem;
  max-width: 720px;
}

.eh-landing-cta {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.eh-landing-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: .8rem;
  margin-top: 1.6rem;
}

.eh-landing-stat {
  border: 1px solid var(--eh-border);
  background: rgba(255,255,255,.02);
  border-radius: 14px;
  padding: .9rem;
}

.eh-landing-stat strong {
  display: block;
  font-size: 1.35rem;
  color: var(--eh-text-primary);
}

.eh-landing-stat span {
  color: var(--eh-text-secondary);
  font-size: .9rem;
}

.eh-landing-section-title {
  font-size: 1.6rem;
  font-weight: 800;
}

.eh-landing-feature-card {
  background: var(--eh-bg-card);
  border: 1px solid var(--eh-border);
  border-radius: var(--eh-radius-lg);
  padding: 1.1rem;
  height: 100%;
}

.eh-landing-feature-card i {
  font-size: 1.45rem;
  color: var(--eh-accent);
}

.eh-landing-feature-card h3 {
  margin: .7rem 0 .3rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.eh-landing-feature-card p {
  color: var(--eh-text-secondary);
  margin: 0;
  font-size: .9rem;
}

.eh-landing-news-card {
  height: 100%;
}

.eh-landing-news-card .eh-blog-card-media {
  min-height: 220px;
}

.eh-landing-news-card .eh-blog-card-title {
  font-size: 1.2rem;
}

.eh-landing-news-card .eh-blog-card-excerpt {
  font-size: .95rem;
}

.eh-landing-news-card .eh-blog-card-footer {
  justify-content: flex-start;
}

.eh-landing-final-cta {
  text-align: center;
  border: 1px solid var(--eh-border);
  border-radius: 22px;
  padding: 2rem 1rem;
  background: linear-gradient(180deg, rgba(67,97,238,.12), rgba(67,97,238,.02));
}

.eh-landing-final-cta h2 {
  font-size: 1.7rem;
  font-weight: 800;
}

.eh-landing-final-cta p {
  color: var(--eh-text-secondary);
  margin: .6rem auto 0;
  max-width: 680px;
}

@media (max-width: 768px) {
  .eh-landing-hero {
    padding: 2rem 1rem;
  }

  .eh-landing-stats {
    grid-template-columns: 1fr;
  }
}

/* Auth pages */
.eh-auth-wrap {
  min-height: calc(100vh - 200px);
  display: grid;
  place-items: center;
  padding: 2rem 0;
}

.eh-auth-card {
  width: min(100%, 520px);
  background: linear-gradient(160deg, rgba(26,31,46,.96), rgba(18,21,31,.96));
  border: 1px solid var(--eh-border);
  border-radius: var(--eh-radius-xl);
  box-shadow: var(--eh-shadow);
  padding: 1.4rem;
}

.eh-auth-brand h1 {
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  font-weight: 800;
}

.eh-auth-brand p {
  color: var(--eh-text-secondary);
  font-size: .92rem;
}

.eh-auth-form {
  display: grid;
  gap: .9rem;
  margin-top: 1rem;
}

.eh-auth-sep {
  margin: 1rem 0;
  position: relative;
  text-align: center;
}

.eh-auth-sep::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid var(--eh-border);
  transform: translateY(-50%);
}

.eh-auth-sep span {
  position: relative;
  display: inline-block;
  padding: 0 .6rem;
  color: var(--eh-text-muted);
  background: var(--eh-bg-card);
}

.eh-google-btn {
  border: 1px solid var(--eh-border);
  background: rgba(255,255,255,.03);
  color: var(--eh-text-primary);
}

.eh-google-btn:hover {
  background: rgba(255,255,255,.06);
  color: var(--eh-text-primary);
  border-color: var(--eh-border-light);
}

.eh-auth-switch {
  margin-top: 1rem;
  text-align: center;
  color: var(--eh-text-secondary);
  font-size: .92rem;
}

.eh-auth-switch a {
  font-weight: 700;
}

/* Grade select readability fixes (profile/register) */
.eh-grade-select,
select[name="default_grade"] {
  color: var(--eh-text-primary) !important;
  background-color: var(--eh-bg-input) !important;
  border-color: var(--eh-border) !important;
}

.eh-grade-select option,
select[name="default_grade"] option {
  color: #e8eaf6 !important;
  background-color: #161923 !important;
}

.eh-grade-select:focus,
select[name="default_grade"]:focus {
  border-color: var(--eh-border-focus) !important;
  box-shadow: 0 0 0 3px var(--eh-accent-light) !important;
}

@media (max-width: 575px) {
  .eh-auth-wrap {
    min-height: auto;
    padding: 1rem 0;
  }

  .eh-auth-card {
    padding: 1rem;
    border-radius: 16px;
  }
}

.eh-empty-state {
  border: 1px dashed var(--eh-border);
  border-radius: 24px;
  padding: 3rem 1.25rem;
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(67,97,238,.04));
}

.eh-empty-state .empty-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: var(--eh-accent);
  background: rgba(67,97,238,.12);
  border: 1px solid rgba(67,97,238,.22);
  font-size: 2rem;
}

.eh-empty-state h3 {
  margin-bottom: .65rem;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  font-weight: 800;
}

.eh-empty-state p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--eh-text-secondary);
  line-height: 1.9;
}

.eh-empty-state-waitlist .eh-waitlist-btn {
  margin-top: 1.4rem;
  min-width: min(100%, 280px);
  padding: .9rem 1.4rem;
  border-radius: 16px;
  font-weight: 800;
}

.eh-empty-state-promo {
  margin-top: 1rem !important;
  font-size: .95rem;
  color: var(--eh-text-muted) !important;
}

@media (max-width: 575px) {
  .eh-empty-state {
    padding: 2rem 1rem;
  }
}

/* 404 page */
.eh-404-page {
  position: relative;
  padding: clamp(1.5rem, 3vw, 2.5rem) 0 3rem;
}

.eh-404-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(67,97,238,.16);
  border-radius: 32px;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  background:
    radial-gradient(circle at top right, rgba(6,182,212,.16), transparent 30%),
    radial-gradient(circle at bottom left, rgba(67,97,238,.18), transparent 38%),
    linear-gradient(145deg, rgba(26,31,46,.96), rgba(13,15,20,.98));
  box-shadow: 0 30px 80px rgba(0,0,0,.38);
}

.eh-404-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(10px);
  pointer-events: none;
}

.eh-404-glow-one {
  top: -70px;
  inset-inline-end: -50px;
  width: 220px;
  height: 220px;
  background: rgba(67,97,238,.18);
}

.eh-404-glow-two {
  bottom: -90px;
  inset-inline-start: -60px;
  width: 260px;
  height: 260px;
  background: rgba(6,182,212,.12);
}

.eh-404-content,
.eh-404-panel {
  position: relative;
  z-index: 1;
}

.eh-404-chip {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .9rem;
  border-radius: 999px;
  border: 1px solid rgba(6,182,212,.2);
  background: rgba(6,182,212,.08);
  color: #7dd3fc;
  font-size: .85rem;
  font-weight: 700;
}

.eh-404-code {
  margin-top: .9rem;
  font-size: clamp(4.6rem, 12vw, 8rem);
  line-height: .9;
  font-weight: 900;
  letter-spacing: -.06em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.14);
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(67,97,238,.25));
  -webkit-background-clip: text;
  background-clip: text;
}

.eh-404-content h1 {
  margin: .65rem 0 0;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 1.15;
  max-width: 11ch;
}

.eh-404-lead {
  max-width: 620px;
  margin-top: 1rem;
  color: var(--eh-text-secondary);
  font-size: 1.02rem;
}

.eh-404-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin-top: 1.5rem;
}

.eh-404-search {
  margin-top: 1.4rem;
}

.eh-404-search-box {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .8rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px;
  background: rgba(15,23,42,.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.eh-404-search-box > i {
  color: var(--eh-text-muted);
  font-size: 1rem;
}

.eh-404-search-box .form-control {
  border: 0;
  box-shadow: none;
  padding-inline: .2rem;
  background: transparent;
}

.eh-404-search-box .form-control:focus {
  box-shadow: none;
}

.eh-404-search-box .btn {
  flex-shrink: 0;
}

.eh-404-panel {
  min-height: 100%;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 28px;
  padding: 1.4rem;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
}

.eh-404-orbit {
  position: relative;
  height: 130px;
  margin-bottom: 1rem;
}

.eh-404-orbit::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(255,255,255,.12);
  border-radius: 999px;
}

.eh-404-orbit span {
  position: absolute;
  display: block;
  border-radius: 999px;
}

.eh-404-orbit span:nth-child(1) {
  top: 20px;
  inset-inline-start: 18%;
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, #60a5fa, #4361ee);
  box-shadow: 0 0 24px rgba(67,97,238,.45);
}

.eh-404-orbit span:nth-child(2) {
  top: 58px;
  inset-inline-end: 14%;
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, #22c55e, #14b8a6);
  box-shadow: 0 0 18px rgba(34,197,94,.35);
}

.eh-404-orbit span:nth-child(3) {
  bottom: 8px;
  inset-inline-start: 46%;
  width: 72px;
  height: 72px;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.9), rgba(255,255,255,.15) 28%, transparent 29%),
    linear-gradient(145deg, rgba(67,97,238,.96), rgba(6,182,212,.6));
  box-shadow: 0 16px 40px rgba(6,182,212,.22);
}

.eh-404-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.eh-404-card {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  min-height: 160px;
  padding: 1rem;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 22px;
  background: rgba(255,255,255,.03);
  color: var(--eh-text-primary);
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.eh-404-card:hover {
  transform: translateY(-4px);
  border-color: rgba(67,97,238,.34);
  background: rgba(67,97,238,.07);
  color: var(--eh-text-primary);
}

.eh-404-card-icon {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(67,97,238,.18), rgba(6,182,212,.12));
  border: 1px solid rgba(67,97,238,.18);
  color: #9cc7ff;
  font-size: 1.2rem;
}

.eh-404-card strong {
  font-size: 1rem;
  font-weight: 800;
}

.eh-404-card span {
  color: var(--eh-text-secondary);
  font-size: .9rem;
  line-height: 1.7;
}

@media (max-width: 991px) {
  .eh-404-content h1 {
    max-width: none;
  }
}

@media (max-width: 767px) {
  .eh-404-shell {
    border-radius: 24px;
  }

  .eh-404-search-box {
    flex-wrap: wrap;
  }

  .eh-404-search-box .form-control,
  .eh-404-search-box .btn {
    width: 100%;
  }

  .eh-404-card-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   BLOG
   ========================================================================== */
.eh-blog-shell {
  position: relative;
  overflow: hidden;
}

.eh-blog-shell::before,
.eh-blog-shell::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(14px);
  opacity: .6;
}

.eh-blog-shell::before {
  width: 260px;
  height: 260px;
  top: 40px;
  inset-inline-end: -120px;
  background: radial-gradient(circle, rgba(6,182,212,.24), transparent 70%);
}

.eh-blog-shell::after {
  width: 320px;
  height: 320px;
  bottom: 100px;
  inset-inline-start: -140px;
  background: radial-gradient(circle, rgba(67,97,238,.2), transparent 72%);
}

.eh-blog-hero,
.eh-article-hero,
.eh-blog-sidebar-card,
.eh-blog-card,
.eh-blog-featured,
.eh-article-body,
.eh-article-highlight {
  position: relative;
  z-index: 1;
}

.eh-blog-hero {
  padding: clamp(1.5rem, 3vw, 2.4rem);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(67,97,238,.18), rgba(6,182,212,.08)),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  box-shadow: var(--eh-shadow);
}

.eh-blog-kicker {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .8rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(156,199,255,.16);
  border-radius: 999px;
  background: rgba(67,97,238,.12);
  color: #a5c3ff;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.eh-blog-hero-title,
.eh-article-title {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.12;
  font-weight: 800;
  color: #fff;
}

.eh-blog-hero-text,
.eh-article-lead {
  max-width: 62ch;
  font-size: clamp(1rem, 1.7vw, 1.15rem);
  line-height: 1.95;
  color: #c7d2f3;
}

.eh-blog-hero-panel,
.eh-article-highlight {
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
  min-height: 100%;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 24px;
  background: rgba(9,12,20,.48);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.eh-blog-hero-stat {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.eh-blog-hero-stat strong {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1;
  color: #fff;
}

.eh-blog-hero-stat span,
.eh-article-highlight p {
  color: var(--eh-text-secondary);
}

.eh-blog-feed,
.eh-blog-grid {
  display: grid;
  gap: 1.5rem;
}

.eh-blog-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.eh-blog-card,
.eh-blog-featured {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015)),
    var(--eh-bg-card);
  box-shadow: var(--eh-shadow-sm);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.eh-blog-card:hover,
.eh-blog-featured:hover {
  transform: translateY(-5px);
  border-color: rgba(67,97,238,.34);
  box-shadow: 0 18px 40px rgba(0,0,0,.28);
}

.eh-blog-featured {
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  min-height: 420px;
}

.eh-blog-card-media {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 100%;
  background: linear-gradient(145deg, rgba(67,97,238,.18), rgba(6,182,212,.16));
}

.eh-blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}

.eh-blog-card:hover .eh-blog-card-media img,
.eh-blog-featured:hover .eh-blog-card-media img {
  transform: scale(1.05);
}

.eh-blog-card-placeholder {
  display: grid;
  place-items: center;
  min-height: 240px;
  font-size: 2.6rem;
  color: rgba(255,255,255,.72);
}

.eh-blog-card-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.35rem;
}

.eh-blog-card-meta,
.eh-article-author-row,
.eh-blog-card-footer,
.eh-blog-search {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  align-items: center;
}

.eh-blog-card-meta {
  row-gap: .65rem;
  color: var(--eh-text-secondary);
  font-size: .88rem;
}

.eh-blog-card-meta span {
  display: inline-flex;
  gap: .4rem;
  align-items: center;
}

.eh-blog-pill {
  display: inline-flex;
  align-items: center;
  padding: .38rem .8rem;
  border: 1px solid rgba(67,97,238,.16);
  border-radius: 999px;
  background: rgba(67,97,238,.1);
  color: #b9ccff;
  font-size: .8rem;
  font-weight: 700;
}

.eh-blog-pill:hover {
  color: #fff;
  border-color: rgba(67,97,238,.38);
  background: rgba(67,97,238,.18);
}

.eh-blog-card-title {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  line-height: 1.35;
}

.eh-blog-card-title a,
.eh-related-posts .eh-blog-card-title a {
  color: #fff;
}

.eh-blog-card-title a:hover,
.eh-related-posts .eh-blog-card-title a:hover {
  color: #bad0ff;
}

.eh-blog-card-excerpt {
  margin: 0;
  color: #c6cceb;
  line-height: 1.9;
}

.eh-blog-author-inline,
.eh-article-author,
.eh-article-author-card {
  display: inline-flex;
  align-items: center;
  gap: .85rem;
}

.eh-blog-author-avatar img {
  width: 44px;
  height: 44px;
  border: 2px solid rgba(255,255,255,.08);
  border-radius: 50%;
}

.eh-article-author-card .eh-blog-author-avatar img,
.eh-article-author .eh-blog-author-avatar img {
  width: 72px;
  height: 72px;
}

.eh-blog-author-inline strong,
.eh-article-author strong,
.eh-article-author-card strong {
  display: block;
  color: #fff;
  line-height: 1.3;
}

.eh-blog-author-inline span,
.eh-article-author small,
.eh-article-author-card p {
  color: var(--eh-text-secondary);
}

.eh-article-author-card p {
  margin: .45rem 0 0;
  line-height: 1.8;
}

.eh-blog-card-footer {
  justify-content: space-between;
  margin-top: auto;
}

.eh-blog-readmore,
.eh-share-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: #b7c9ff;
  font-weight: 700;
}

.eh-blog-readmore:hover,
.eh-share-link:hover {
  color: #fff;
}

.eh-blog-sidebar {
  display: grid;
  gap: 1rem;
}

.eh-blog-sidebar-sticky {
  position: sticky;
  top: 100px;
}

.eh-blog-sidebar-card {
  padding: 1.3rem;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015)),
    rgba(19,23,35,.92);
}

.eh-blog-sidebar-card h2,
.eh-blog-section-heading h2 {
  margin: 0;
  font-size: 1.25rem;
  color: #fff;
}

.eh-blog-sidebar-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.eh-blog-sidebar-heading span,
.eh-blog-mini-date {
  color: var(--eh-text-secondary);
  font-size: .88rem;
}

.eh-blog-search .form-control {
  flex: 1 1 220px;
}

.eh-blog-search .btn {
  flex-shrink: 0;
}

.eh-blog-topic-cloud,
.eh-blog-mini-list,
.eh-article-facts {
  display: grid;
  gap: .85rem;
}

.eh-blog-topic {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1rem;
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 18px;
  background: rgba(255,255,255,.02);
  color: var(--eh-text-primary);
}

.eh-blog-topic:hover,
.eh-blog-mini-post:hover {
  border-color: rgba(67,97,238,.28);
  background: rgba(67,97,238,.08);
  color: #fff;
}

.eh-blog-topic strong {
  color: #9cc7ff;
}

.eh-blog-mini-post {
  display: grid;
  gap: .3rem;
  padding: .95rem 1rem;
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 18px;
  background: rgba(255,255,255,.02);
  color: var(--eh-text-primary);
}

.eh-blog-mini-post strong {
  color: #fff;
  line-height: 1.6;
}

.eh-blog-cta {
  background:
    linear-gradient(145deg, rgba(67,97,238,.22), rgba(6,182,212,.12)),
    rgba(14,19,31,.96);
}

.eh-blog-cta p {
  color: #d3daf6;
  line-height: 1.9;
}

.eh-blog-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  justify-content: center;
}

.eh-blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 46px;
  padding: 0 1rem;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  background: rgba(255,255,255,.03);
  color: var(--eh-text-primary);
  font-weight: 700;
}

.eh-blog-pagination .page-numbers.current,
.eh-blog-pagination .page-numbers:hover {
  border-color: rgba(67,97,238,.34);
  background: rgba(67,97,238,.18);
  color: #fff;
}

.eh-blog-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  color: var(--eh-text-secondary);
}

.eh-blog-breadcrumb a {
  color: #b0c4ff;
}

.eh-article-featured-image {
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,.06);
}

.eh-article-featured-image img {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
}

.eh-article-body {
  padding: clamp(1.3rem, 3vw, 2rem);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015)),
    rgba(17,20,31,.96);
}

.eh-article .entry-content {
  color: #edf2ff;
  font-size: 1.06rem;
}

.eh-article .entry-content > *:last-child {
  margin-bottom: 0;
}

.eh-article .entry-content p,
.eh-article .entry-content li {
  line-height: 2;
  color: #d6dcf8;
}

.eh-article .entry-content h2,
.eh-article .entry-content h3,
.eh-article .entry-content h4,
.eh-article .entry-content h5,
.eh-article .entry-content h6 {
  scroll-margin-top: 110px;
  margin-top: 2rem;
  margin-bottom: .9rem;
  color: #fff;
  line-height: 1.35;
}

.eh-article .entry-content h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
}

.eh-article .entry-content h3 {
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
}

.eh-article .entry-content a {
  text-decoration: underline;
  text-decoration-color: rgba(156,199,255,.45);
  text-underline-offset: .18em;
}

.eh-article .entry-content blockquote {
  margin: 1.8rem 0;
  padding: 1.25rem 1.4rem;
  border-inline-start: 4px solid #5aa7ff;
  border-radius: 0 20px 20px 0;
  background: rgba(67,97,238,.1);
  color: #eff4ff;
}

.eh-article .entry-content ul,
.eh-article .entry-content ol {
  padding-inline-start: 1.3rem;
}

.eh-article .entry-content img,
.eh-article .entry-content iframe,
.eh-article .entry-content video,
.eh-article .entry-content .wp-block-image img {
  border-radius: 20px;
}

.eh-article .entry-content pre,
.eh-article .entry-content code {
  font-family: Consolas, Monaco, monospace;
}

.eh-article .entry-content pre {
  padding: 1rem 1.15rem;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 18px;
  background: #0a0d14;
  color: #e6efff;
  overflow: auto;
}

.eh-article .entry-content code {
  padding: .15rem .45rem;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
}

.eh-article .entry-content table {
  width: 100%;
  margin: 1.6rem 0;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 18px;
}

.eh-article .entry-content th,
.eh-article .entry-content td {
  padding: .9rem 1rem;
  border: 1px solid rgba(255,255,255,.07);
}

.eh-article .entry-content th {
  background: rgba(67,97,238,.15);
  color: #fff;
}

.eh-article-tags,
.eh-article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
}

.eh-share-link {
  padding: .6rem .9rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.03);
}

button.eh-share-link {
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.eh-article-share-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}

.eh-article-share-grid .eh-share-link {
  justify-content: center;
}

.eh-article-toc-card {
  padding: 0;
  overflow: hidden;
}

.eh-article-toc-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1rem 1.15rem;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: linear-gradient(135deg, rgba(67,97,238,.16), rgba(90,167,255,.07));
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.eh-article-toc-toggle span {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}

.eh-article-toc-toggle > .bi:last-child {
  transition: transform .2s ease;
}

.eh-article-toc-card.is-collapsed .eh-article-toc-toggle > .bi:last-child {
  transform: rotate(180deg);
}

.eh-article-toc {
  display: grid;
  gap: .35rem;
  padding: 1rem;
}

.eh-article-toc[hidden] {
  display: none;
}

.eh-article-toc-link {
  display: block;
  padding: .6rem .75rem;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #cbd8ff;
  line-height: 1.6;
  text-decoration: none;
}

.eh-article-toc-link:hover,
.eh-article-toc-link:focus {
  border-color: rgba(90,167,255,.26);
  background: rgba(90,167,255,.08);
  color: #fff;
}

.eh-article-toc-level-3 {
  margin-inline-start: .8rem;
  font-size: .94rem;
}

.eh-article-toc-level-4 {
  margin-inline-start: 1.45rem;
  font-size: .9rem;
  color: #aebdec;
}

.eh-article-facts div {
  display: grid;
  gap: .2rem;
  padding: .9rem 1rem;
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 18px;
  background: rgba(255,255,255,.02);
}

.eh-article-facts span {
  color: var(--eh-text-secondary);
  font-size: .85rem;
}

.eh-article-facts strong {
  color: #fff;
}

.eh-blog-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.25rem;
}

.eh-article-pages {
  margin-top: 2rem;
}

@media (max-width: 1199px) {
  .eh-blog-sidebar-sticky {
    position: static;
  }
}

@media (max-width: 991px) {
  .eh-blog-featured,
  .eh-blog-grid {
    grid-template-columns: 1fr;
  }

  .eh-blog-hero,
  .eh-article-body,
  .eh-blog-sidebar-card {
    border-radius: 24px;
  }

  .eh-blog-card-footer {
    align-items: flex-start;
  }
}

@media (max-width: 767px) {
  .eh-blog-hero-title,
  .eh-article-title {
    font-size: 2rem;
  }

  .eh-blog-card-content,
  .eh-blog-sidebar-card,
  .eh-article-body {
    padding: 1.1rem;
  }

  .eh-blog-search .form-control,
  .eh-blog-search .btn,
  .eh-article-actions .eh-share-link,
  .eh-article-share-grid .eh-share-link {
    width: 100%;
  }

  .eh-article-share-grid {
    grid-template-columns: 1fr;
  }

  .eh-blog-card-footer,
  .eh-article-author-row,
  .eh-blog-sidebar-heading,
  .eh-blog-section-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .eh-article .entry-content {
    font-size: 1rem;
  }
}

/* Book Store */
.eh-books-hero,
.eh-book-single,
.eh-book-card,
.eh-cart-item,
.eh-check-choice {
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.94), rgba(15, 23, 42, 0.9));
  border-radius: 24px;
}

.eh-books-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.5rem;
}

.eh-books-hero__eyebrow,
.eh-book-card__badge,
.eh-book-single__chips span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.16);
  color: #93c5fd;
  font-size: 0.82rem;
}

.eh-book-card {
  overflow: hidden;
  height: 100%;
}

.eh-book-card__media,
.eh-book-single__media {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
}

.eh-book-card__media img,
.eh-book-single__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.eh-book-card__media {
  aspect-ratio: 4 / 3;
}

.eh-book-single__media {
  border-radius: 28px;
  min-height: 420px;
}

.eh-book-card__placeholder,
.eh-book-single__placeholder,
.eh-cart-item__media span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  color: rgba(255, 255, 255, 0.55);
  font-size: 3rem;
}

.eh-book-card__badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.eh-book-card__body,
.eh-book-single {
  padding: 1.25rem;
}

.eh-book-card__meta,
.eh-book-card__footer,
.eh-book-single__price,
.eh-cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.eh-book-card__meta {
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
  color: #94a3b8;
  font-size: 0.85rem;
}

.eh-book-card__title {
  font-size: 1.18rem;
  line-height: 1.5;
  margin-bottom: 0.65rem;
}

.eh-book-card__title a,
.eh-cart-item__title,
.eh-book-single__back {
  color: #f8fafc;
  text-decoration: none;
}

.eh-book-card__excerpt {
  color: #94a3b8;
  min-height: 54px;
}

.eh-book-single__summary {
  color: #cbd5e1;
  font-size: 1rem;
  line-height: 1.9;
  max-width: 58ch;
}

.eh-book-card__price strong,
.eh-book-single__price strong {
  font-size: 1.3rem;
  color: #f8fafc;
}

.eh-book-card__price span,
.eh-book-single__price span {
  color: #64748b;
  text-decoration: line-through;
  margin-inline-start: 0.45rem;
}

.eh-book-card__price em,
.eh-book-single__price em {
  color: #34d399;
  font-style: normal;
  margin-inline-start: 0.45rem;
}

.eh-book-card__soldout {
  color: #fca5a5;
  font-size: 0.9rem;
}

.eh-book-single__back {
  display: inline-block;
  margin-bottom: 0.85rem;
  color: #93c5fd;
}

.eh-book-single__chips {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.eh-book-single__info,
.eh-book-single__content {
  border-radius: 22px;
}

.eh-cart-item {
  padding: 1rem 1.1rem;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  background: transparent;
}

.eh-cart-item:last-child {
  border-bottom: 0;
}

.eh-cart-item__media {
  width: 86px;
  height: 86px;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.85);
  flex-shrink: 0;
}

.eh-cart-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.eh-cart-item__body {
  flex: 1;
}

.eh-cart-item__qty {
  width: 92px;
}

.eh-cart-item__subtotal {
  min-width: 110px;
  text-align: end;
  font-weight: 700;
  color: #f8fafc;
}

.eh-check-choice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  cursor: pointer;
}

.eh-check-choice input {
  accent-color: #3b82f6;
}

.eh-book-pre {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.93rem;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.7);
  border-radius: 16px;
  padding: 0.9rem;
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .eh-books-hero,
  .eh-cart-item,
  .eh-book-card__footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .eh-cart-item__qty,
  .eh-cart-item__subtotal {
    width: 100%;
    text-align: start;
  }
}
