/* N40 Academy Premium CSS v2.3 — 2026-03-28 */
body { background-color: #000000; color: #e2e2e2; font-family: 'Manrope', sans-serif; -webkit-font-smoothing: antialiased; }
*, *::before, *::after { font-family: 'Manrope', sans-serif !important; }
html, body { font-family: 'Manrope', sans-serif !important; }
.font-mono, [class*="font-mono"], code, pre { font-family: 'JetBrains Mono', 'DejaVu Mono', monospace !important; }
.material-symbols-outlined { font-family: 'Material Symbols Outlined' !important; }

:root {
  /* Typography scale */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.25rem;    /* 20px */
  --text-xl: 1.5rem;     /* 24px */
  --text-2xl: 2rem;      /* 32px */

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

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Shadows - dark theme */
  --shadow-card: 0 2px 8px rgba(0,0,0,0.2), 0 0 1px rgba(255,255,255,0.05);
  --shadow-card-hover: 0 8px 24px rgba(0,0,0,0.3), 0 0 1px rgba(255,255,255,0.08);
  --shadow-popup: 0 16px 48px rgba(0,0,0,0.4);
}

h1 { font-size: var(--text-2xl); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
h2 { font-size: var(--text-xl); font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }
h3 { font-size: var(--text-lg); font-weight: 600; line-height: 1.4; }
p, li { font-size: var(--text-sm); line-height: 1.6; }
small, .text-meta { font-size: var(--text-xs); }
/* .glass-card base styles moved to premium section (line ~683) */
.inner-glow { box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.05); }
.material-symbols-outlined { font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24; }

html { scroll-behavior: smooth; }

/* ── SIDEBAR COLLAPSE ── */
#academy-nav {
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  will-change: width;
}
#academy-nav.sidebar-collapsed {
  width: 64px;
  padding-left: 8px;
  padding-right: 8px;
}
#academy-nav.sidebar-collapsed .nav-text,
#academy-nav.sidebar-collapsed .sidebar-bottom-text {
  opacity: 0;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.15s ease, width 0.15s ease;
}
#academy-nav .nav-text,
#academy-nav .sidebar-bottom-text {
  transition: opacity 0.2s ease 0.1s, width 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
}
#academy-nav.sidebar-collapsed nav a,
#academy-nav.sidebar-collapsed nav > a,
#academy-nav.sidebar-collapsed .sidebar-bottom a,
#academy-nav.sidebar-collapsed .sidebar-bottom button {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}
#academy-nav.sidebar-collapsed img.sidebar-logo {
  height: 24px;
  transition: height 0.3s ease;
}
img.sidebar-logo {
  transition: height 0.3s ease;
}
#main-header { transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
main { transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1); }

/* ── ANIMATIONS ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes countUp { from { opacity: 0; } to { opacity: 1; } }
@keyframes progressGrow { from { width: 0; } }

.animate-in { animation: fadeInUp 0.5s ease forwards; opacity: 0; }

.stats-row .stat-card:nth-child(1) { animation-delay: 0.1s; }
.stats-row .stat-card:nth-child(2) { animation-delay: 0.2s; }
.stats-row .stat-card:nth-child(3) { animation-delay: 0.3s; }
.stats-row .stat-card:nth-child(4) { animation-delay: 0.4s; }

.course-grid .course-card:nth-child(1) { animation-delay: 0.1s; }
.course-grid .course-card:nth-child(2) { animation-delay: 0.15s; }
.course-grid .course-card:nth-child(3) { animation-delay: 0.2s; }
.course-grid .course-card:nth-child(4) { animation-delay: 0.25s; }
.course-grid .course-card:nth-child(5) { animation-delay: 0.3s; }
.course-grid .course-card:nth-child(6) { animation-delay: 0.35s; }
.course-grid .course-card:nth-child(7) { animation-delay: 0.4s; }
.course-grid .course-card:nth-child(8) { animation-delay: 0.45s; }
.course-grid .course-card:nth-child(9) { animation-delay: 0.5s; }
.course-grid .course-card:nth-child(10) { animation-delay: 0.55s; }
.course-grid .course-card:nth-child(11) { animation-delay: 0.6s; }
.course-grid .course-card:nth-child(12) { animation-delay: 0.65s; }
.course-grid .course-card:nth-child(13) { animation-delay: 0.7s; }

.cc-progress-fill {
  transition: width 1s ease-in-out;
  animation: progressGrow 1s ease-in-out;
}

.progress-fill {
  transition: width 1s ease-in-out;
  animation: progressGrow 1s ease-in-out;
}

/* Auth gate — hidden by default, shown via JS if no session */

/* News expand */
.news-item.hidden-news { display: none; }
.news-item.hidden-news.show-all { display: block; }

/* ── LEVEL PROGRESSION — FORGE PATH ── */
@keyframes forge-glow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
@keyframes forge-ring {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes forge-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(204,27,27,0.4); }
  50% { transform: scale(1.03); box-shadow: 0 0 30px 4px rgba(139,0,0,0.15); }
}
@keyframes forge-beam {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes forge-enter {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes badge-bounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.15); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.level-card {
  animation: forge-enter 0.6s ease forwards;
}
.level-badge.bounce { animation: badge-bounce 0.5s ease; }

/* Forge connectors */
.forge-connector-fill {
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.forge-connector.done .forge-connector-fill { transform: scaleX(1); }
.forge-connector.partial .forge-connector-fill {
  background: linear-gradient(90deg, #8B0000, #CC1B1B, rgba(204,27,27,0.3));
}
.forge-connector.active .forge-connector-fill::after {
  content: ''; position: absolute; inset: -1px 0;
  background: linear-gradient(90deg, transparent, rgba(255,100,100,0.4), transparent);
  background-size: 200% 100%;
  animation: forge-beam 2s linear infinite;
  border-radius: 2px;
}

/* Forge current node pulse */
.forge-step.current .forge-node {
  animation: forge-pulse 3s ease-in-out infinite;
}
.forge-step.current .forge-node::before {
  content: ''; position: absolute; inset: -12px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139,0,0,0.12) 0%, transparent 70%);
  animation: forge-glow 3s ease-in-out infinite;
  pointer-events: none;
}
/* Spinning dashed ring on badge */
.level-badge-wrap::before {
  content: ''; position: absolute; inset: -8px; border-radius: 50%;
  border: 2px dashed rgba(204,27,27,0.25);
  animation: forge-ring 20s linear infinite;
}
.level-badge-wrap::after {
  content: ''; position: absolute; inset: -16px; border-radius: 50%;
  border: 1px solid rgba(139,0,0,0.1);
}

/* Course card hover gradient overlay */
.course-card::before {
  content: ''; position: absolute; inset: 0; border-radius: 1.5rem;
  background: linear-gradient(135deg, rgba(139,0,0,0.2), transparent 60%);
  opacity: 0; transition: opacity 0.5s;
  pointer-events: none; z-index: 1;
}
.course-card:hover::before { opacity: 1; }
.course-card.coming-soon:hover::before { opacity: 0; }
/* Ensure buttons inside cards are clickable above the ::before overlay */
.course-card button, .course-card a { position: relative; z-index: 2; }
.course-card .flex.items-center.gap-2 { position: relative; z-index: 2; }

/* Card entrance */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.card-animate {
  animation: cardIn 0.4s ease forwards;
  opacity: 0;
}

/* ── STAT CARD FLOAT ANIMATION ── */
@keyframes statFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.stats-row .stat-card {
  animation: fadeInUp 0.5s ease forwards, statFloat 5s ease-in-out infinite;
  animation-delay: 0.1s, 1.5s;
  opacity: 0;
}
.stats-row .stat-card:nth-child(2) { animation-delay: 0.2s, 2s; }
.stats-row .stat-card:nth-child(3) { animation-delay: 0.3s, 2.5s; }
.stats-row .stat-card:nth-child(4) { animation-delay: 0.4s, 3s; }

/* ── MOBILE SIDEBAR OVERLAY ── */
#sidebar-overlay {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
#sidebar-overlay.active { opacity: 1; pointer-events: auto; }

/* ── LEADERBOARD PREMIUM ── */
.lb-podium { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.lb-podium-card {
  display: flex; flex-direction: column; align-items: center;
  padding: 20px 12px 16px; border-radius: 16px;
  position: relative; overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.lb-podium-card:hover { transform: translateY(-4px); }
.lb-podium-card.gold {
  background: linear-gradient(135deg, rgba(245,183,49,0.12) 0%, rgba(139,0,0,0.08) 100%);
  border: 1px solid rgba(245,183,49,0.2); order: 2;
  box-shadow: 0 0 30px rgba(245,183,49,0.08);
}
.lb-podium-card.silver {
  background: linear-gradient(135deg, rgba(192,192,192,0.1) 0%, rgba(100,100,100,0.05) 100%);
  border: 1px solid rgba(192,192,192,0.15); order: 1;
}
.lb-podium-card.bronze {
  background: linear-gradient(135deg, rgba(205,127,50,0.1) 0%, rgba(139,69,19,0.05) 100%);
  border: 1px solid rgba(205,127,50,0.15); order: 3;
}
.lb-medal { font-size: 28px; margin-bottom: 8px; }
.lb-avatar { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 8px; flex-shrink: 0; text-transform: uppercase; }
.lb-podium-card.gold .lb-avatar { box-shadow: 0 0 20px rgba(245,183,49,0.25); border: 2px solid rgba(245,183,49,0.4); }
.lb-podium-card.silver .lb-avatar { border: 2px solid rgba(192,192,192,0.3); }
.lb-podium-card.bronze .lb-avatar { border: 2px solid rgba(205,127,50,0.3); }
.lb-name { font-size: 13px; font-weight: 700; text-align: center; margin-bottom: 2px; }
.lb-score { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: rgba(255,255,255,0.4); }
.lb-rest-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background 0.2s;
}
.lb-rest-row:last-child { border-bottom: none; }
.lb-rest-row:hover { background: rgba(255,255,255,0.02); border-radius: 8px; margin: 0 -8px; padding: 10px 8px; }
.lb-rest-row.is-me { background: rgba(139,0,0,0.08); border-radius: 10px; margin: 0 -8px; padding: 10px 8px; border: 1px solid rgba(139,0,0,0.15); }
.lb-rank { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); color: rgba(255,255,255,0.3); }
.lb-rest-avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0; text-transform: uppercase; }
@media (max-width: 640px) {
  .lb-podium { grid-template-columns: 1fr; gap: 8px; }
  .lb-podium-card { flex-direction: row; padding: 12px 16px; gap: 12px; }
  .lb-podium-card.gold, .lb-podium-card.silver, .lb-podium-card.bronze { order: unset; }
  .lb-medal { font-size: 22px; margin-bottom: 0; }
  .lb-avatar { width: 36px; height: 36px; font-size: 14px; margin-bottom: 0; }
}
/* Light theme leaderboard */
html:not(.dark) .lb-podium-card.gold { background: linear-gradient(135deg, rgba(245,183,49,0.1) 0%, rgba(255,255,255,0.8) 100%); border-color: rgba(245,183,49,0.3); }
html:not(.dark) .lb-podium-card.silver { background: linear-gradient(135deg, rgba(180,180,180,0.1) 0%, rgba(255,255,255,0.8) 100%); border-color: rgba(180,180,180,0.3); }
html:not(.dark) .lb-podium-card.bronze { background: linear-gradient(135deg, rgba(205,127,50,0.1) 0%, rgba(255,255,255,0.8) 100%); border-color: rgba(205,127,50,0.3); }
html:not(.dark) .lb-rest-row { border-bottom-color: rgba(0,0,0,0.05); }
html:not(.dark) .lb-rest-row.is-me { background: rgba(139,0,0,0.04); border-color: rgba(139,0,0,0.12); }
html:not(.dark) .lb-rank { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.06); color: #888; }
html:not(.dark) .lb-name { color: #1a1a1a !important; }
html:not(.dark) .lb-score { color: #888 !important; }

/* Responsive */
@media (max-width: 1024px) {
  #academy-nav { display: none !important; }
  #dashboard { margin-left: 0 !important; }
  #main-header { left: 0 !important; width: 100% !important; right: 0 !important; }
  main, [id="dashboard"], [id="main-content"], [id="main-page"] { margin-left: 0 !important; }
  .ml-64 { margin-left: 0 !important; }
  #academy-nav[style*="flex"] {
    display: flex !important;
    position: fixed; z-index: 60; width: 260px;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
  }
  html:not(.dark) #academy-nav[style*="flex"] {
    box-shadow: 0 0 40px rgba(0,0,0,0.15) !important;
  }
}
@media (max-width: 768px) {
  .forge-node { width: 40px !important; height: 40px !important; font-size: 12px !important; }
  .forge-step.current .forge-node { width: 48px !important; height: 48px !important; font-size: 15px !important; }
  .forge-connector { margin-top: -20px !important; }
  .forge-label-name { font-size: 9px !important; }
  .forge-label-courses { display: none !important; }
  .forge-path { flex-direction: column !important; align-items: stretch !important; gap: 8px; }
  .forge-connector { display: none !important; }
  .forge-step { flex-direction: row !important; gap: 12px; }
  .forge-label { margin-top: 0 !important; text-align: left !important; }
  footer .grid { grid-template-columns: 1fr !important; }
  #main-header .w-72 { width: 10rem; }
  .pricing-card-wrap > div { height: auto !important; min-height: 0 !important; }
  .compare-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .compare-table-wrap table { min-width: 600px; }
}
@media (max-width: 640px) {
  .breadcrumb, #main-header .flex.items-center.gap-2.text-zinc-400 { display: none; }
  #main-header { padding: 0 16px !important; }
  #dashboard { padding-left: 1rem !important; padding-right: 1rem !important; }
  #main-content { padding-left: 1rem; padding-right: 1rem; }
  #filter-chips { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; gap: 8px; padding-bottom: 8px; }
  #filter-chips::-webkit-scrollbar { display: none; }
  #filter-chips .filter-chip { flex-shrink: 0; }
  #source-filters { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; gap: 8px; padding-bottom: 8px; }
  #source-filters::-webkit-scrollbar { display: none; }
  #source-filters > * { flex-shrink: 0; }
  .job-card h3 { font-size: 1.125rem; }
  .job-card li { font-size: 0.8125rem; }
}
@media (max-width: 480px) {
  .glass-card.inner-glow.rounded-xl.p-8 { padding: 1rem; }
  h1 { font-size: 1.75rem !important; }
}


/* ══════ LIGHT THEME ══════ */
html:not(.dark) body { background-color: #f8f8f8; color: #1a1a1a; }

/* Sidebar */
html:not(.dark) #academy-nav { background: rgba(255,255,255,0.95); border-right: 1px solid #e0e0e0; box-shadow: 2px 0 20px rgba(0,0,0,0.05); }
html:not(.dark) #academy-nav a,
html:not(.dark) #academy-nav button { color: #555; }
html:not(.dark) #academy-nav a:hover,
html:not(.dark) #academy-nav button:hover { color: #1a1a1a; background: rgba(0,0,0,0.04); }
html:not(.dark) #academy-nav .bg-red-950\/30,
html:not(.dark) #academy-nav a[class*="text-red-500"] { background: rgba(139,0,0,0.06) !important; color: #8b0000 !important; border-color: #8b0000 !important; }
html:not(.dark) #academy-nav .border-white\/5 { border-color: #e0e0e0; }

/* Header */
html:not(.dark) #main-header,
html:not(.dark) header[class*="backdrop-blur"] { background: rgba(255,255,255,0.9) !important; border-bottom: 1px solid #e8e8e8; }
html:not(.dark) #main-header span,
html:not(.dark) #main-header .text-zinc-400 { color: #888; }
html:not(.dark) #main-header .text-white,
html:not(.dark) header .text-white { color: #1a1a1a !important; }

/* Glass cards (light) — see Problem 6 section for final .glass-card override */
html:not(.dark) .inner-glow { box-shadow: 0 1px 3px rgba(0,0,0,0.06); }

/* Surface colors */
html:not(.dark) .bg-surface-container-low,
html:not(.dark) [class*="bg-surface-container-low"] { background-color: #ffffff !important; }
html:not(.dark) .bg-surface-container-lowest,
html:not(.dark) [class*="bg-surface-container-lowest"] { background-color: #f0f0f0 !important; }
html:not(.dark) .bg-surface-container-high,
html:not(.dark) [class*="bg-surface-container-high"] { background-color: #e8e8e8 !important; }
html:not(.dark) .bg-surface-container-highest { background-color: #e0e0e0 !important; }
html:not(.dark) .bg-surface-container { background-color: #f5f5f5 !important; }
html:not(.dark) .bg-surface-bright\/30,
html:not(.dark) [class*="bg-surface-bright"] { background-color: rgba(0,0,0,0.04) !important; }
html:not(.dark) .bg-zinc-900\/60 { background: rgba(255,255,255,0.95) !important; }
html:not(.dark) .bg-zinc-800\/40 { background: rgba(0,0,0,0.04) !important; }
html:not(.dark) .bg-black\/40 { background: rgba(255,255,255,0.9) !important; }

/* Text colors */
html:not(.dark) .text-on-surface,
html:not(.dark) .text-white,
html:not(.dark) h1, html:not(.dark) h2, html:not(.dark) h3, html:not(.dark) h4 { color: #1a1a1a !important; }
html:not(.dark) .text-on-surface-variant { color: #555 !important; }
html:not(.dark) .text-on-surface-variant\/70 { color: #666 !important; }
html:not(.dark) .text-on-background { color: #1a1a1a !important; }
html:not(.dark) .text-zinc-500 { color: #888 !important; }
html:not(.dark) .text-zinc-400 { color: #999 !important; }
html:not(.dark) .text-zinc-600 { color: #777 !important; }
html:not(.dark) .text-zinc-700 { color: #666 !important; }
html:not(.dark) .text-on-primary-container { color: #8b0000 !important; }
html:not(.dark) .text-primary { color: #8b0000 !important; }
html:not(.dark) .text-on-secondary-container { color: #555 !important; }
html:not(.dark) .text-red-500 { color: #8b0000 !important; }

/* Borders */
html:not(.dark) .border-white\/5,
html:not(.dark) [class*="border-white\/"] { border-color: #e0e0e0 !important; }
html:not(.dark) .border-outline-variant\/5,
html:not(.dark) .border-outline-variant\/10 { border-color: #d0d0d0 !important; }
html:not(.dark) .ring-white\/5 { --tw-ring-color: #d0d0d0 !important; }

/* Backgrounds with opacity */
html:not(.dark) .bg-primary-container\/90 { background: rgba(139,0,0,0.85) !important; }
html:not(.dark) .bg-primary-container\/20 { background: rgba(139,0,0,0.06) !important; }
html:not(.dark) .bg-white\/5 { background: rgba(0,0,0,0.03) !important; }
html:not(.dark) .bg-white\/10 { background: rgba(0,0,0,0.05) !important; }

/* Logo */
html:not(.dark) img.invert,
html:not(.dark) img.logo-invert,
html:not(.dark) img.logo-img,
html:not(.dark) img.sidebar-logo { filter: invert(0) !important; }

/* Decorative blurs */
html:not(.dark) .bg-primary-container\/5 { background: rgba(139,0,0,0.03) !important; }
html:not(.dark) .bg-primary-container\/3 { background: rgba(139,0,0,0.02) !important; }

/* Course cards specific — consolidated into Problem 1 section */

/* Pricing cards */
html:not(.dark) .shadow-primary-container\/20 { box-shadow: 0 8px 30px rgba(139,0,0,0.1) !important; }

/* Scrollbar (light) — consolidated into Custom scrollbar section */
/* Dark card borders */
.dark .bg-surface-container-low.rounded-3xl,
[class*="bg-surface-container-low"][class*="rounded-3xl"] {
  border: 1px solid rgba(255,255,255,0.06);
}
html:not(.dark) .border-white\/\[0\.06\] { border-color: transparent !important; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }

/* ── FOOTER (light) ── */
html:not(.dark) .dash-footer,
html:not(.dark) footer { color: #555; }
html:not(.dark) footer .text-on-surface-variant\/40,
html:not(.dark) footer [class*="text-on-surface-variant"] { color: #888 !important; }
html:not(.dark) footer img.invert { filter: invert(0) !important; }
html:not(.dark) footer a { color: #666; }
html:not(.dark) footer a:hover { color: #8b0000; }
html:not(.dark) footer .border-outline-variant\/10,
html:not(.dark) footer .border-t { border-color: #e0e0e0 !important; }
html:not(.dark) footer svg { fill: #888 !important; }
html:not(.dark) .text-on-surface-variant\/40 { color: #999 !important; }
html:not(.dark) .text-on-surface-variant\/50 { color: #888 !important; }

/* ── GENERAL LIGHT PATTERNS ── */
/* Text with opacity */
html:not(.dark) .text-on-surface-variant\/80 { color: #555 !important; }
html:not(.dark) .text-on-primary-container\/80 { color: rgba(139,0,0,0.8) !important; }

/* Backgrounds with opacity */
html:not(.dark) .bg-red-950\/30 { background: rgba(139,0,0,0.06) !important; }
html:not(.dark) .bg-gradient-to-br { background: linear-gradient(to bottom right, rgba(139,0,0,0.08), #f0f0f0) !important; }
html:not(.dark) .bg-gradient-to-r { background: linear-gradient(to right, rgba(139,0,0,0.04), transparent) !important; }

/* ── EXTERNAL RESOURCES BLOCK ── */
.ext-resources {
  margin-top: 2.5rem; padding: 1.5rem 1.75rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(139,0,0,0.06) 0%, rgba(27,27,27,0.4) 100%);
  border: 1px solid rgba(139,0,0,0.12);
  backdrop-filter: blur(8px);
}
.ext-resources-title {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: rgba(255,180,168,0.7); margin-bottom: 1rem;
}
.ext-resources-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.ext-link {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px; border-radius: 10px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.04);
  text-decoration: none; transition: all 0.2s ease;
}
.ext-link:hover { background: rgba(139,0,0,0.1); border-color: rgba(139,0,0,0.2); transform: translateY(-1px); }
.ext-link-icon {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; margin-top: 2px;
}
.ext-link-icon.doc { background: rgba(74,159,255,0.12); color: #4A9FFF; }
.ext-link-icon.video { background: rgba(255,0,0,0.1); color: #FF4444; }
.ext-link-icon.article { background: rgba(46,204,142,0.12); color: #2ECC8E; }
.ext-link-icon.tool { background: rgba(245,183,49,0.12); color: #F5B731; }
.ext-link-icon.research { background: rgba(168,85,247,0.12); color: #A855F7; }
.ext-link-icon.community { background: rgba(59,130,246,0.12); color: #3B82F6; }
.ext-link-body { flex: 1; min-width: 0; }
.ext-link-name { font-size: 13px; font-weight: 600; color: #e2e2e2; line-height: 1.3; margin-bottom: 2px; }
.ext-link-desc { font-size: 11px; color: rgba(255,255,255,0.35); line-height: 1.4; }
.ext-link-tag { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 6px; border-radius: 4px; background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.3); margin-top: 4px; display: inline-block; }
/* Light theme */
html:not(.dark) .ext-resources { background: linear-gradient(135deg, rgba(139,0,0,0.04) 0%, rgba(255,255,255,0.8) 100%); border-color: rgba(139,0,0,0.1); }
html:not(.dark) .ext-resources-title { color: #8b0000; }
html:not(.dark) .ext-link { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.06); }
html:not(.dark) .ext-link:hover { background: rgba(139,0,0,0.05); }
html:not(.dark) .ext-link-name { color: #1a1a1a; }
html:not(.dark) .ext-link-desc { color: #888; }
html:not(.dark) .ext-link-tag { background: rgba(0,0,0,0.04); color: #888; }

/* Divide colors */
html:not(.dark) .divide-outline-variant\/10 > * + * { border-color: #e0e0e0 !important; }

/* Placeholder text */
html:not(.dark) ::placeholder { color: #aaa !important; }
html:not(.dark) .placeholder\:text-surface-variant::placeholder { color: #aaa !important; }

/* ── INDEX-SPECIFIC: Leaderboard ── */
html:not(.dark) .leaderboard-row,
html:not(.dark) [id*="leaderboard"] .glass-card { background: #ffffff !important; }

/* ── INDEX-SPECIFIC: Forge Path / Level progression ── */
html:not(.dark) .forge-node { background: #ffffff !important; border: 2px solid #d0d0d0; color: #1a1a1a !important; }
html:not(.dark) .forge-step.done .forge-node { background: rgba(139,0,0,0.08) !important; border-color: #8b0000; }
html:not(.dark) .forge-step.current .forge-node { background: #8b0000 !important; color: #fff !important; border-color: #8b0000; }
html:not(.dark) .forge-connector { background: #e0e0e0; }
html:not(.dark) .forge-connector-fill { background: linear-gradient(90deg, #8b0000, #cc1b1b) !important; }
html:not(.dark) .forge-label-name { color: #555 !important; }
html:not(.dark) .forge-label-courses { color: #888 !important; }
html:not(.dark) .level-badge-wrap::before { border-color: rgba(139,0,0,0.15); }
html:not(.dark) .level-badge-wrap::after { border-color: rgba(139,0,0,0.08); }

/* ── INDEX-SPECIFIC: Auth gate ── */
html:not(.dark) #auth-gate { background: #f0f0f0 !important; }
html:not(.dark) #auth-gate .glass-card { background: #ffffff !important; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
html:not(.dark) #auth-gate input { background: #f5f5f5 !important; border-color: #d0d0d0 !important; color: #1a1a1a !important; }

/* ── INDEX-SPECIFIC: News items ── */
html:not(.dark) .news-item { border-color: #e0e0e0 !important; }

/* ── INDEX-SPECIFIC: Course cards ── */
html:not(.dark) .course-card { background: #ffffff !important; border: 1px solid #e8e8e8; }
html:not(.dark) .course-card.coming-soon { opacity: 0.6; }

/* ── DESIGN UPGRADE: Card hover effects ── */
.course-card { transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease; }
.course-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }

/* ── DESIGN UPGRADE: Stat cards premium ── (consolidated into PREMIUM UPGRADE section) */
.stat-value {
  font-family: 'Manrope', sans-serif !important;
  font-size: 2.5rem !important;
  font-weight: 800 !important;
}

/* ── Leaderboard rows ── */
.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  transition: all 0.3s ease;
  font-family: 'Manrope', sans-serif !important;
}
.leaderboard-row:hover {
  background: rgba(139,0,0,0.05);
}
.leaderboard-rank {
  font-family: 'Manrope', sans-serif !important;
  font-size: 0.75rem;
  text-align: center;
}

/* ── Light theme: lang switcher visibility ── */
html:not(.dark) .lang-switcher button { color: #666; }
html:not(.dark) .lang-switcher button:hover { color: #1a1a1a; }
html:not(.dark) .lang-switcher button.bg-primary-container { color: #fff !important; }

/* ── Light theme: coming soon cards ── */
html:not(.dark) .bg-surface-bright\/10 { background: rgba(0,0,0,0.04) !important; }
html:not(.dark) .backdrop-blur-md { backdrop-filter: blur(12px); }

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent; }
html:not(.dark) ::-webkit-scrollbar-track { background: #f0f0f0; }
html:not(.dark) ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); }
html:not(.dark) ::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.3); }
html:not(.dark) * { scrollbar-color: rgba(0,0,0,0.15) transparent; }

/* Lang switcher light theme */
html:not(.dark) .lang-switcher .bg-surface-container-high\/50 { background: rgba(0,0,0,0.05); }
html:not(.dark) .lang-switcher button.text-zinc-500 { color: #888; }
html:not(.dark) .lang-switcher button.text-zinc-500:hover { color: #333; }

/* Focus-visible */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid rgba(139,0,0,0.5);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Smooth transitions */
button, a { transition: all 0.2s ease; }

/* ══════ PREMIUM UPGRADE ══════ */

/* 1. Sidebar — premium */
#academy-nav {
  background: linear-gradient(180deg, rgba(20,20,20,0.95) 0%, rgba(10,10,10,0.98) 100%);
  border-right: 1px solid rgba(255,255,255,0.04);
}
#academy-nav a, #academy-nav button {
  border-radius: 10px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
#academy-nav a:hover, #academy-nav button:hover {
  background: rgba(255,255,255,0.05);
  transform: translateX(2px);
}
#academy-nav .bg-red-950\/30 {
  box-shadow: inset 3px 0 0 #8b0000, 0 0 20px rgba(139,0,0,0.1);
  background: rgba(139,0,0,0.08);
}
html:not(.dark) #academy-nav {
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,248,248,0.98) 100%);
  box-shadow: 1px 0 20px rgba(0,0,0,0.03);
}
html:not(.dark) #academy-nav .bg-red-950\/30 {
  box-shadow: inset 3px 0 0 #8b0000, 0 0 15px rgba(139,0,0,0.05);
}

/* 2. Header — premium */
#main-header {
  background: rgba(0,0,0,0.6) !important;
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
html:not(.dark) #main-header {
  background: rgba(255,255,255,0.85) !important;
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

/* 3. Glass cards — premium */
.glass-card {
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-card:hover {
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
/* html:not(.dark) .glass-card — consolidated into Problem 6 section */
html:not(.dark) .glass-card:hover {
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* 4. Stat cards — premium glow */
.stat-card {
  background: rgba(20,20,20,0.5);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.stat-card:hover {
  border-color: rgba(139,0,0,0.3);
  box-shadow: 0 0 30px rgba(139,0,0,0.08);
  transform: translateY(-2px);
}

/* 6. Leaderboard rows — premium */
.leaderboard-item {
  padding: 12px 16px;
  border-radius: 12px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}
.leaderboard-item:hover {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.06);
  transform: translateX(4px);
}

/* 7. Forge Path — premium glow */
.forge-node.current {
  box-shadow: 0 0 20px rgba(139,0,0,0.4), 0 0 40px rgba(139,0,0,0.1);
}
.forge-node {
  transition: all 0.3s ease;
}
.forge-node:hover {
  transform: scale(1.1);
}

/* 8. Footer — premium */
footer {
  border-top: 1px solid rgba(255,255,255,0.04);
  background: rgba(0,0,0,0.3);
}
footer a {
  transition: color 0.2s ease, transform 0.2s ease;
}
footer a:hover {
  color: #ffb4a8;
  transform: translateX(2px);
}
html:not(.dark) footer {
  background: rgba(0,0,0,0.02);
  border-top: 1px solid rgba(0,0,0,0.06);
}

/* 9. Inputs and forms — premium focus */
input, select, textarea {
  transition: all 0.25s ease;
  border: 1px solid rgba(255,255,255,0.06);
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(139,0,0,0.4);
  box-shadow: 0 0 0 3px rgba(139,0,0,0.1);
}
html:not(.dark) input:focus, html:not(.dark) select:focus {
  border-color: rgba(139,0,0,0.3);
  box-shadow: 0 0 0 3px rgba(139,0,0,0.08);
}

/* 10. Page entrance animation */
main { animation: pageEnter 0.4s ease; }
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Light theme fixes === */
/* Problem 5: Force Manrope on all headings */
h1, h2, h3, h4, h5 { font-family: 'Manrope', sans-serif !important; }

/* Problem 1: Course cards text & buttons */
html:not(.dark) .bg-surface-container-low.rounded-3xl,
html:not(.dark) [class*="bg-surface-container-low"][class*="rounded-3xl"] {
  background: #ffffff !important;
  border: 1px solid #e2e2e2 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
html:not(.dark) .bg-surface-container-low h3,
html:not(.dark) .bg-surface-container-low h4,
html:not(.dark) .bg-surface-container-low .text-on-surface {
  color: #1a1a1a !important;
}
html:not(.dark) .bg-surface-container-low .text-on-surface-variant,
html:not(.dark) .bg-surface-container-low .text-on-surface-variant\/70,
html:not(.dark) .bg-surface-container-low p {
  color: #555 !important;
}
html:not(.dark) .bg-surface-container-low .text-zinc-500,
html:not(.dark) .bg-surface-container-low .text-xs {
  color: #777 !important;
}
html:not(.dark) .bg-primary-container {
  background: #8b0000 !important;
  color: #ffffff !important;
}
/* Problem 2: Filter pills + surface-container-high (consolidated) */
html:not(.dark) .bg-surface-container-high {
  background: #e8e8e8 !important;
  color: #333 !important;
}
html:not(.dark) .bg-surface-container-high .text-zinc-500 {
  color: #888 !important;
}

/* Problem 3: Sidebar active link */
html:not(.dark) #academy-nav .bg-red-950\/30 {
  background: rgba(139,0,0,0.06) !important;
  color: #8b0000 !important;
  border-color: #8b0000 !important;
  border-left: 3px solid #8b0000;
  border-right: none;
}
html:not(.dark) #academy-nav a:not(.bg-red-950\/30) {
  color: #444 !important;
}
html:not(.dark) #academy-nav a:not(.bg-red-950\/30):hover {
  color: #1a1a1a !important;
  background: rgba(0,0,0,0.03) !important;
}

/* Problem 4: Lang toggle */
html:not(.dark) .lang-switcher .bg-primary-container {
  background: #8b0000 !important;
  color: #ffffff !important;
}
html:not(.dark) .lang-switcher button:not(.bg-primary-container) {
  color: #666 !important;
  background: transparent !important;
}
html:not(.dark) .lang-switcher button:not(.bg-primary-container):hover {
  color: #1a1a1a !important;
}
html:not(.dark) .lang-switcher > div {
  background: rgba(0,0,0,0.04) !important;
}

/* Problem 6: Glass card text */
html:not(.dark) .glass-card {
  background: rgba(255,255,255,0.9) !important;
  border: 1px solid #e2e2e2 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
html:not(.dark) .glass-card h1, html:not(.dark) .glass-card h2,
html:not(.dark) .glass-card h3, html:not(.dark) .glass-card h4 {
  color: #1a1a1a !important;
}
html:not(.dark) .glass-card p, html:not(.dark) .glass-card span,
html:not(.dark) .glass-card li {
  color: #444 !important;
}

/* ── Light theme: font consistency ── */
html:not(.dark) * { color: inherit; }

/* ── Light theme: sidebar avatar ── */
html:not(.dark) .sidebar-avatar { background: #e0e0e0 !important; color: #666 !important; }
html:not(.dark) .sidebar-avatar img { filter: none; }

/* ── Light theme: active nav fix ── */
html:not(.dark) #academy-nav .bg-surface-container-high\/30 { background: rgba(139,0,0,0.06) !important; }
html:not(.dark) #academy-nav .border-primary-container { border-color: #8b0000 !important; }
html:not(.dark) #academy-nav .text-on-surface { color: #8b0000 !important; }

/* ── Light theme: footer details ── */
html:not(.dark) .dash-footer h4 { color: #888 !important; }
html:not(.dark) .dash-footer p { color: #999 !important; }

/* ══════ LIGHT THEME AUDIT — MISSING RULES ══════ */

/* ── Page loader ── */
html:not(.dark) #page-loader { background: #f8f8f8 !important; }

/* ── Stat card light hover ── */
html:not(.dark) .stat-card {
  background: #ffffff !important;
  backdrop-filter: none;
  border: 1px solid #e8e8e8 !important;
}
html:not(.dark) .stat-card:hover {
  border-color: rgba(139,0,0,0.2) !important;
  box-shadow: 0 0 20px rgba(139,0,0,0.06);
}
html:not(.dark) .stat-value { color: #1a1a1a !important; }
html:not(.dark) .stat-sub { color: #888 !important; }

/* ── Progress bar (courses) ── */
html:not(.dark) .bg-surface-container-high.rounded-full { background: #e0e0e0 !important; }

/* ── Leaderboard rows light ── */
html:not(.dark) .leaderboard-row:hover { background: rgba(139,0,0,0.04); }
html:not(.dark) .leaderboard-item:hover {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.06);
}
html:not(.dark) .leaderboard-rank { color: #888 !important; }

/* ── Level card (Forge Path) — override dark gradient ── */
html:not(.dark) .level-card {
  background: #ffffff !important;
  border: 1px solid #e8e8e8;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
html:not(.dark) .level-card .bg-\[radial-gradient\(ellipse\,rgba\(139\,0\,0\,0\.08\)_0\%\,transparent_70\%\)\] { background: none !important; }
html:not(.dark) .level-current { color: #1a1a1a !important; }
html:not(.dark) .level-sub { color: #666 !important; }
html:not(.dark) .level-progress-text { color: #8b0000 !important; background: rgba(139,0,0,0.06) !important; border-color: rgba(139,0,0,0.12) !important; }
html:not(.dark) #forge-progress-pct { color: #1a1a1a !important; }

/* ── Auth gate sub-elements ── */
html:not(.dark) #auth-gate .bg-surface-bright { background: rgba(0,0,0,0.04) !important; }
html:not(.dark) #auth-gate .bg-surface-container-lowest { background: #f0f0f0 !important; }
html:not(.dark) #auth-gate .text-outline { color: #999 !important; }
html:not(.dark) #auth-gate .text-surface-variant { color: #999 !important; }
html:not(.dark) #auth-gate .text-outline-variant { color: #888 !important; }
html:not(.dark) #auth-gate .text-on-secondary-container { color: #666 !important; }
html:not(.dark) #auth-gate .bg-white\/5 { background: rgba(0,0,0,0.04) !important; }
html:not(.dark) #auth-gate .ring-white\/5 { --tw-ring-color: #d0d0d0 !important; }
html:not(.dark) #auth-gate .bg-surface-bright\/20 { background: rgba(0,0,0,0.04) !important; color: #1a1a1a !important; }
html:not(.dark) #auth-gate .text-error { color: #8b0000 !important; }

/* ── Nickname modal overlay ── */
html:not(.dark) #nickname-modal { background: rgba(0,0,0,0.3) !important; }
html:not(.dark) #nickname-modal > div {
  background: #ffffff !important;
  border: 1px solid #e0e0e0 !important;
  box-shadow: 0 16px 48px rgba(0,0,0,0.12);
}
html:not(.dark) #nickname-modal h3 { color: #1a1a1a !important; }
html:not(.dark) #nickname-modal p { color: #666 !important; }
html:not(.dark) #nickname-modal input {
  background: #f5f5f5 !important;
  border-color: #d0d0d0 !important;
  color: #1a1a1a !important;
}
html:not(.dark) #nickname-modal button:first-of-type {
  background: #f5f5f5 !important;
  border-color: #d0d0d0 !important;
  color: #555 !important;
}

/* ── Bookmark button states ── */
html:not(.dark) [data-bookmark] {
  background: #f0f0f0 !important;
  color: #888 !important;
}
html:not(.dark) [data-bookmark]:hover { color: #d97706 !important; }
html:not(.dark) [data-bookmark].bg-amber-600\/20 {
  background: rgba(217,119,6,0.1) !important;
  color: #d97706 !important;
}

/* ── Sidebar toggle button ── */
html:not(.dark) #sidebar-toggle-btn { color: #999 !important; }
html:not(.dark) #sidebar-toggle-btn:hover { color: #1a1a1a !important; background: rgba(0,0,0,0.04) !important; }

/* ── Header mobile hamburger ── */
html:not(.dark) #main-header .lg\:hidden { color: #888 !important; }
html:not(.dark) #main-header .lg\:hidden:hover { color: #1a1a1a !important; }

/* ── Header theme toggle icon ── */
html:not(.dark) #theme-icon-sun { color: #d97706 !important; }
html:not(.dark) #theme-icon-moon { color: #888 !important; }
html:not(.dark) #main-header button[onclick*="toggleTheme"] { color: #888 !important; }
html:not(.dark) #main-header button[onclick*="toggleTheme"]:hover { color: #8b0000 !important; }

/* ── Header profile icon ── */
html:not(.dark) #main-header a[href*="profile"] { color: #888 !important; }
html:not(.dark) #main-header a[href*="profile"]:hover { color: #8b0000 !important; }

/* ── Breadcrumb in header ── */
html:not(.dark) .breadcrumb { color: #999; }
html:not(.dark) .breadcrumb .text-white { color: #1a1a1a !important; }
html:not(.dark) .breadcrumb .material-symbols-outlined { color: #ccc !important; }

/* ── Course card hover — softer shadow in light ── */
html:not(.dark) .course-card:hover {
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

/* ── Scroll-to-top button ── */
html:not(.dark) .scroll-top,
html:not(.dark) #scroll-top {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1) !important;
}

/* ── Footer SSL/GDPR badges ── */
html:not(.dark) footer .text-zinc-600 { color: #999 !important; }
html:not(.dark) footer .border-white\/5 { border-color: #e0e0e0 !important; }

/* ── Footer bottom links ── */
html:not(.dark) .text-on-surface-variant\/30 { color: #999 !important; }

/* ── Footer social icon buttons ── */
html:not(.dark) footer .bg-surface-container {
  background: #f0f0f0 !important;
  border-color: #e0e0e0 !important;
}
html:not(.dark) footer .bg-surface-container:hover {
  background: #e8e8e8 !important;
}
html:not(.dark) footer .fill-on-surface-variant\/50 { fill: #888 !important; }
html:not(.dark) footer svg.fill-on-surface-variant\/50 { fill: #888 !important; }

/* ── Section badge (index page) ── */
html:not(.dark) .section-badge {
  background: rgba(0,0,0,0.05) !important;
  color: #888 !important;
}

/* ── Filter chip/pill active in courses ── */
html:not(.dark) .filter-pill { color: #666; }
html:not(.dark) .filter-pill:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
html:not(.dark) .filter-pill.active { box-shadow: 0 0 16px rgba(139,0,0,0.1); }

/* ── Profile page: spinner light ── */
html:not(.dark) .spinner { border-color: #d0d0d0; border-top-color: #8b0000; }

/* ── Pricing: billing pill default ── */
html:not(.dark) .billing-pill { background: #d0d0d0; }
html:not(.dark) .billing-pill.annual { background: #8b0000; }

/* ── Pricing: comparison table header ── */
html:not(.dark) .comp-row { border-color: #e8e8e8; }
html:not(.dark) .comp-row:hover { background: rgba(139,0,0,0.03); }
html:not(.dark) .comp-row td { border-color: #e8e8e8 !important; }

/* ── Pricing card wrap ── */
html:not(.dark) .pricing-card-wrap {
  background: #ffffff;
  border: 1px solid #e8e8e8;
}
html:not(.dark) .pricing-card-wrap:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

/* ── Toast notification ── */
html:not(.dark) .toast {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  color: #1a1a1a;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* ── News: source filter pills ── */
html:not(.dark) #source-filters .bg-surface-container-high { background: #e8e8e8 !important; }

/* ── Glossary: search input ── */
html:not(.dark) #searchInput {
  background: #f0f0f0 !important;
  color: #1a1a1a !important;
}
html:not(.dark) #searchInput:focus {
  box-shadow: 0 0 0 2px rgba(139,0,0,0.2), 0 4px 16px rgba(0,0,0,0.06);
}
html:not(.dark) .search-kbd {
  color: #999;
  background: rgba(0,0,0,0.04);
  border-color: #d0d0d0;
}

/* ── Glossary: term cards ── */
html:not(.dark) .term-card {
  background: #ffffff !important;
  border: 1px solid #e8e8e8;
  box-shadow: inset 0 1px 0 0 rgba(0,0,0,0.02);
}
html:not(.dark) .term-card:hover {
  border-color: #d0d0d0;
  border-left-color: #8b0000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
html:not(.dark) .term-name { color: #1a1a1a !important; }
html:not(.dark) .term-english { color: #888 !important; }
html:not(.dark) .term-definition { color: #555 !important; }

/* ── Glossary: pills ── */
html:not(.dark) .pill { background: #f0f0f0; border-color: #d0d0d0; color: #666; }
html:not(.dark) .pill:hover { border-color: #8b0000; color: #1a1a1a; }
html:not(.dark) .pill.active { background: rgba(139,0,0,0.08); border-color: #8b0000; color: #1a1a1a; }
html:not(.dark) .pill-count { color: #999; }

/* ── Glossary: category blocks ── */
html:not(.dark) .category-heading { border-bottom-color: #e0e0e0; }
html:not(.dark) .category-heading h2 { color: #1a1a1a !important; }
html:not(.dark) .category-tag { color: #8b0000; background: rgba(139,0,0,0.06); }
html:not(.dark) .category-count { color: #999; }

/* ── Glossary: search results + empty state ── */
html:not(.dark) .search-results-info { color: #888; }
html:not(.dark) .empty-state svg { color: #ccc; }
html:not(.dark) .empty-state h3 { color: #1a1a1a !important; }
html:not(.dark) .empty-state p { color: #888; }
html:not(.dark) mark { background: rgba(139,0,0,0.08); color: #1a1a1a; }

/* ── News: cards ── */
html:not(.dark) .news-card { background: #ffffff !important; border: 1px solid #e8e8e8; }
html:not(.dark) .news-card:hover { border-color: rgba(139,0,0,0.2); box-shadow: 0 12px 40px rgba(0,0,0,0.08); }
html:not(.dark) .source-badge { background: rgba(255,255,255,0.9) !important; border: 1px solid #e0e0e0; }
html:not(.dark) .featured-gradient { background: linear-gradient(to top, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.7) 40%, transparent 100%); }
html:not(.dark) .featured-gradient h3 { color: #1a1a1a !important; }
html:not(.dark) .featured-gradient p { color: #555 !important; }
html:not(.dark) .skeleton { background: linear-gradient(90deg, #e8e8e8 25%, #f0f0f0 50%, #e8e8e8 75%); background-size: 200% 100%; }
html:not(.dark) .line-clamp-2 { color: #666; }

/* ── Careers: job cards ── */
html:not(.dark) .job-card { background: #ffffff !important; border: 1px solid #e8e8e8; }
html:not(.dark) .job-card:hover { border-color: #d0d0d0; box-shadow: 0 12px 40px rgba(0,0,0,0.08); }
html:not(.dark) .job-card::before { background: linear-gradient(90deg, #8b0000, #cc1b1b, transparent); }
html:not(.dark) .benefit-card { background: #ffffff !important; border: 1px solid #e8e8e8; }
html:not(.dark) .benefit-card:hover { border-color: #d0d0d0; box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
html:not(.dark) .job-li-req::before { background: #ccc; }

/* ── Profile: form inputs ── */
html:not(.dark) .glass-card input,
html:not(.dark) .glass-card select,
html:not(.dark) .glass-card textarea { background: #f5f5f5 !important; border-color: #d0d0d0 !important; color: #1a1a1a !important; }
html:not(.dark) .glass-card input:focus,
html:not(.dark) .glass-card select:focus,
html:not(.dark) .glass-card textarea:focus { border-color: #8b0000 !important; }
html:not(.dark) .bg-gradient-to-r.from-primary-container { background: linear-gradient(to right, #8b0000, #a31515) !important; }
html:not(.dark) .inline-form input { background: #f5f5f5 !important; color: #1a1a1a !important; border-color: #d0d0d0 !important; }
html:not(.dark) .pf-msg.success { color: #166534; }
html:not(.dark) .pf-msg.error { color: #991b1b; }

/* ── Course viewer (course.html) ── */
html:not(.dark) #sidebar { background: rgba(255,255,255,0.95) !important; border-right: 1px solid #e0e0e0; }
html:not(.dark) .info-card { background: #ffffff; border-color: #e0e0e0; }
html:not(.dark) .info-card.blue { background: rgba(59,130,246,0.04); border-left: 3px solid #3b82f6; }
html:not(.dark) .info-card.gold { background: rgba(245,183,49,0.06); border-left: 3px solid #f5b731; }
html:not(.dark) .info-card.green { background: rgba(34,197,94,0.04); border-left: 3px solid #22c55e; }
html:not(.dark) .info-card.red { background: rgba(239,68,68,0.04); border-left: 3px solid #ef4444; }
html:not(.dark) .code-block { background: #f4f4f4; color: #333; border: 1px solid #e0e0e0; }
html:not(.dark) .compare-table th { background: #eaeaea; color: #1a1a1a; }
html:not(.dark) .compare-table td { background: #ffffff; color: #333; border-color: #e8e8e8; }
html:not(.dark) .tool-card { background: #ffffff; border-color: #e0e0e0; }
html:not(.dark) .highlight-box { background: rgba(139,0,0,0.03); border: 1px solid rgba(139,0,0,0.12); }
html:not(.dark) .notes-textarea { background: #f4f4f4; color: #1a1a1a; border: 1px solid #e0e0e0; }
html:not(.dark) #main { background: #f8f8f8; }
html:not(.dark) .sidebar-module-toggle { color: #555 !important; }
html:not(.dark) .sidebar-module-toggle:hover { color: #1a1a1a !important; background: rgba(0,0,0,0.04); }
html:not(.dark) .sidebar-lesson-btn { color: #666 !important; }
html:not(.dark) .sidebar-lesson-btn:hover { background: rgba(0,0,0,0.04) !important; }
html:not(.dark) .sidebar-lesson-btn.active { color: #8b0000 !important; background: rgba(139,0,0,0.06) !important; }
html:not(.dark) .quiz-section { background: #ffffff !important; border: 1px solid #e0e0e0; }
html:not(.dark) .quiz-opt { background: #ffffff !important; border-color: #d0d0d0 !important; color: #1a1a1a !important; }
html:not(.dark) .quiz-opt:hover { border-color: #bbb !important; background: #f5f5f5 !important; }
html:not(.dark) .quiz-opt.selected { border-color: #8b0000 !important; background: rgba(139,0,0,0.04) !important; color: #8b0000 !important; }
html:not(.dark) .quiz-opt.correct { border-color: #22c55e !important; background: rgba(34,197,94,0.06) !important; color: #166534 !important; }
html:not(.dark) .quiz-opt.wrong { border-color: #ef4444 !important; background: rgba(239,68,68,0.06) !important; color: #991b1b !important; }
html:not(.dark) .notes-toggle-btn { border-color: #d0d0d0 !important; color: #666 !important; }
html:not(.dark) .notes-toggle-btn:hover { border-color: #bbb !important; color: #1a1a1a !important; }
html:not(.dark) .lesson-body-content h2 { color: #1a1a1a; border-bottom-color: #e0e0e0; }
html:not(.dark) .lesson-body-content h3 { color: #1a1a1a; }
html:not(.dark) .lesson-body-content p { color: #444; }
html:not(.dark) .lesson-body-content li { color: #444; }
html:not(.dark) .lesson-body-content strong { color: #1a1a1a; }
html:not(.dark) .divider { background: #e0e0e0; }
html:not(.dark) .step-num { background: rgba(139,0,0,0.06); border-color: rgba(139,0,0,0.2); color: #8b0000; }
html:not(.dark) .step-content p { color: #666; }
html:not(.dark) .card-label { color: #888; }
html:not(.dark) .nav-btn-default { background: #ffffff !important; border-color: #d0d0d0 !important; color: #555 !important; }
html:not(.dark) .nav-btn-default:hover { color: #1a1a1a !important; border-color: #bbb !important; }
html:not(.dark) .scroll-progress { background: linear-gradient(90deg, #8b0000, #cc1b1b); }
html:not(.dark) #sidebar::-webkit-scrollbar-track { background: #fafafa; }
html:not(.dark) #sidebar::-webkit-scrollbar-thumb { background: #ccc; }
html:not(.dark) .tool-name { color: #1a1a1a !important; }
html:not(.dark) .tool-role { color: #8b0000; }
html:not(.dark) .tool-desc { color: #666; }
html:not(.dark) .tag-good { background: rgba(34,197,94,0.08); color: #166534; }
html:not(.dark) .tag-ok { background: rgba(0,0,0,0.04); color: #555; }
html:not(.dark) .tag-no { background: rgba(239,68,68,0.06); color: #991b1b; }
html:not(.dark) .stat-val { color: #1a1a1a !important; }
html:not(.dark) .progress-track { background: #e0e0e0 !important; }
html:not(.dark) .breadcrumb-text { color: #999; }
html:not(.dark) .lesson-title-text { color: #1a1a1a !important; }
html:not(.dark) .lesson-subtitle-text { color: #666 !important; }
html:not(.dark) .course-title-text { color: #1a1a1a !important; }
html:not(.dark) .header-title { color: #666 !important; }
html:not(.dark) .module-num-badge { background: #f0f0f0 !important; border-color: #d0d0d0 !important; }
html:not(.dark) .lesson-nav-divider { border-color: #e0e0e0 !important; }

/* ── About page ── */
html:not(.dark) nav.bg-black\/60 { background: rgba(255,255,255,0.9) !important; border-bottom: 1px solid #e8e8e8; }
html:not(.dark) nav .text-neutral-500 { color: #888 !important; }
html:not(.dark) nav .text-neutral-500:hover { color: #8b0000 !important; }
html:not(.dark) .bento-card { background: rgba(255,255,255,0.8) !important; border-color: #e0e0e0 !important; }
html:not(.dark) .bento-card .text-white { color: #1a1a1a !important; }
html:not(.dark) .category-card { background: rgba(255,255,255,0.8) !important; border-color: #e0e0e0 !important; }
html:not(.dark) .testimonial-card { background: rgba(255,255,255,0.8) !important; border-color: #e0e0e0 !important; }

/* ── Mobile sidebar overlay shadow ── (consolidated into main 1024px breakpoint) */
