/* ==========================================================================
   CodeyHub — Design Tokens (UPDATED)
   Learn JavaScript, one concept at a time.
   Fonts are loaded via <link rel="preload"> in each page's <head> instead of
   an @import here — @import blocks CSS parsing until it resolves, which
   delays first paint. See the preconnect/preload links in <head>.
   ========================================================================== */

:root {
  /* ---- Premium ed-tech light theme (permanent — only theme) ---- */
  --bg: #FFFFFF;
  --bg-elevated: #FFFFFF;
  --bg-elevated-2: #F5F8FF;
  --bg-elevated-3: #E9EFFF;
  --border: #E5E7EB;
  --border-light: #D6DEEF;
  --text: #111827;
  --text-muted: #4B5563;
  --text-faint: #9CA3AF;
  --text-light: #6B7280;

  /* Accents — premium blue brand palette (ed-tech) */
  --js-yellow: #1F5EFF;              /* primary brand blue (kept var name for compatibility) */
  --js-yellow-dim: rgba(31, 94, 255, 0.08);
  --accent-green: #16A34A;
  --accent-green-dim: rgba(22, 163, 74, 0.1);
  --accent-red: #DC2626;
  --accent-red-dim: rgba(220, 38, 38, 0.08);
  --accent-blue: #4F86FF;
  --accent-blue-dim: rgba(79, 134, 255, 0.1);
  --accent-purple: #6D5DF3;
  --accent-orange: #F59E0B;

  /* Aliases used by a couple of legacy components */
  --bg-primary: var(--bg-elevated);
  --bg-secondary: var(--bg-elevated-2);
  --text-primary: var(--text);
  --text-secondary: var(--text-muted);

  /* Type */
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout */
  --max-width: 1200px;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-card: 24px;
  --radius-btn: 16px;
  --radius-nav: 28px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(15,23,42,0.04);
  --shadow-md: 0 12px 32px rgba(15,23,42,0.08);
  --shadow-nav: 0 8px 30px rgba(15,23,42,0.06);
  --shadow-lg: 0 20px 50px rgba(15,23,42,0.12);
  --shadow-btn-glow: 0 8px 20px rgba(31,94,255,0.25);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;
}

/* Hero-tint background used by a few sections */
.hero,
.hero-tint {
  background: #F5F8FF;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.3s ease, color 0.3s ease;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

::selection {
  background: var(--js-yellow);
  color: #FFFFFF;
}

:focus-visible {
  outline: 2px solid var(--js-yellow);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-elevated); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* ---------- Eyebrow ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--js-yellow);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.eyebrow.centered { justify-content: center; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}
h1 { font-size: clamp(38px, 5.5vw, 64px); font-weight: 800; }
h2 { font-size: clamp(30px, 4vw, 48px); margin-bottom: 12px; }
h3 { font-size: clamp(18px, 2vw, 22px); }
h4 { font-size: 17px; }

p { color: var(--text-muted); line-height: 1.7; font-size: 18px; }
p.lead { font-size: 18px; color: var(--text-light); }

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-elevated-2);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--js-yellow);
  border: 1px solid var(--border);
}

pre code {
  background: transparent;
  border: none;
  padding: 0;
}

.muted { color: var(--text-faint); }
.text-center { text-align: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 16px;
  z-index: 100;
  max-width: calc(var(--max-width) + 24px);
  margin: 16px auto 0;
  background: color-mix(in srgb, var(--bg-elevated) 96%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius-nav);
  box-shadow: var(--shadow-nav);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  padding: 0 14px 0 24px;
  max-width: none;
}
.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  display: flex;
  align-items: center;
  gap: 2px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.logo .dot { color: var(--js-yellow); }
.logo:hover .dot { animation: pulse-dot 0.6s ease; }
.logo-img {
  height: 34px;
  width: auto;
  display: block;
}
@media (max-width: 480px) {
  .logo-img { height: 28px; }
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

.nav-links {
  display: flex;
  gap: 32px;
  font-size: 14.5px;
  font-weight: 500;
  align-items: center;
}
.nav-links a {
  color: var(--text-muted);
  transition: color var(--transition-fast);
  position: relative;
  padding: 4px 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--js-yellow);
  transition: width var(--transition-fast);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text);
}
.nav-links a:hover::after, .nav-links a.active::after {
  width: 100%;
}
.nav-links a.active { color: var(--text); }

/* ---------- "Resources" nav item (prominent, with New badge) ---------- */
.nav-resources-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-new-badge {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--js-yellow);
  background: var(--js-yellow-dim);
  border: 1px solid var(--js-yellow-dim);
  border-radius: var(--radius-full);
  padding: 2px 7px;
  line-height: 1.4;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all var(--transition-fast);
}
.theme-toggle:hover {
  border-color: var(--js-yellow);
  transform: scale(1.05);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 38px;
  height: 38px;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.nav-toggle:hover {
  border-color: var(--js-yellow);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  padding: 0 24px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: var(--font-body);
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--js-yellow);
  color: #FFFFFF;
}
.btn-primary:hover {
  background: #184FE0;
  transform: translateY(-2px);
  box-shadow: var(--shadow-btn-glow);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--bg-elevated-2);
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--bg-elevated-2);
  border-color: var(--border-light);
}

.btn-sm { height: 42px; padding: 0 18px; font-size: 13.5px; border-radius: 12px; }
.btn-lg { height: 60px; padding: 0 32px; font-size: 16px; }
.btn-icon { height: 42px; width: 42px; padding: 0; font-size: 18px; }

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 88px;
  border-bottom: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.hero h1 { margin: 16px 0 20px; }
.hero h1 .hl-yellow { color: var(--js-yellow); }
.hero h1 .hl-green { color: var(--accent-green); }
.hero h1 .hl-blue { color: var(--accent-blue); }
.hero p.lead {
  font-size: 17px;
  max-width: 480px;
  margin-bottom: 30px;
}
.hero-actions { display: flex; gap: 14px; margin-bottom: 34px; flex-wrap: wrap; }
.hero-meta {
  display: flex;
  gap: 28px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-faint);
  flex-wrap: wrap;
}
.hero-meta strong { color: var(--text); font-weight: 600; }
.hero-meta span { display: flex; align-items: center; gap: 4px; }

/* ---------- Code Card ---------- */
.code-card {
  background: #0F1626;
  border: 1px solid var(--border);
  border-radius: var(--radius-nav);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.code-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.code-card-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}
.code-card-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-faint);
  opacity: 0.5;
}
.code-card-bar span:first-child { background: #FF6B6B; opacity: 1; }
.code-card-bar span:nth-child(2) { background: #FFA657; opacity: 1; }
.code-card-bar span:nth-child(3) { background: #3ECF8E; opacity: 1; }
.code-card-bar .fname {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
}
.code-card pre {
  padding: 24px 22px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.8;
  overflow-x: auto;
  color: #F3F6FF;
}

/* Syntax Highlighting */
.tok-kw { color: #C792EA; }
.tok-fn { color: var(--accent-blue); }
.tok-str { color: var(--accent-green); }
.tok-com { color: var(--text-faint); }
.tok-yellow { color: var(--js-yellow); }
.tok-red { color: var(--accent-red); }
.tok-orange { color: var(--accent-orange); }
.tok-purple { color: var(--accent-purple); }
.tok-number { color: var(--accent-orange); }
.tok-boolean { color: var(--accent-red); }
.tok-type { color: var(--accent-blue); }

.blink { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Why CodeyHub — blue section ---------- */
.why-codeyhub {
  background: linear-gradient(135deg, var(--js-yellow), #143FCC);
  border-top: none;
}
.why-codeyhub .eyebrow,
.why-codeyhub .eyebrow.centered {
  color: rgba(255,255,255,0.85);
}
.why-codeyhub .section-head h2 {
  color: #FFFFFF;
}
.why-codeyhub .section-head p {
  color: rgba(255,255,255,0.85);
}
.why-codeyhub .card {
  background: #FFFFFF;
  border: 1px solid rgba(255,255,255,0.15);
}
.why-codeyhub .card h3 {
  color: #111827;
}
.why-codeyhub .card p {
  color: #4B5563;
}
.why-codeyhub .card .icon {
  background: var(--js-yellow-dim);
  color: var(--js-yellow);
}

/* ---------- Sections ---------- */
.section {
  padding: 96px 0;
  border-bottom: 1px solid var(--border);
}
.section:last-of-type { border-bottom: none; }

.section-head {
  margin-bottom: 44px;
  max-width: 620px;
}
.section-head.centered {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.section-head h2 { margin-top: 10px; }
.section-head p { font-size: 18px; }

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

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}
.card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.card .icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--js-yellow);
  color: #FFFFFF;
  margin-bottom: 18px;
  font-size: 20px;
}
.card h3 { margin-bottom: 8px; }
.card p { font-size: 14.5px; }
.card .card-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--js-yellow);
  font-weight: 600;
  font-size: 14px;
}
.card .card-link:hover { text-decoration: underline; }

/* ---------- Lesson Cards (Learn Page) ---------- */
.lesson-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lesson-card:hover {
  border-color: var(--js-yellow);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.lesson-card .top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.lesson-card .num {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-faint);
}
.lesson-card h3 {
  font-size: 17px;
  margin: 0;
}
.lesson-card h3 a {
  color: var(--text);
  transition: color var(--transition-fast);
}
.lesson-card h3 a:hover { color: var(--js-yellow); }
.lesson-card p { font-size: 14px; margin: 4px 0; }
.lesson-card .meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 6px;
}
.lesson-card .badge {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.lesson-card .badge.beginner { color: var(--accent-green); border-color: var(--accent-green-dim); }
.lesson-card .badge.intermediate { color: var(--js-yellow); border-color: var(--js-yellow-dim); }
.lesson-card .badge.advanced { color: var(--accent-red); border-color: var(--accent-red-dim); }
.lesson-card .badge.coming-soon { color: var(--text-faint); border-color: var(--border); }

/* Generic reusable badge (same look, usable outside .lesson-card) */
.badge {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}
.badge.beginner { color: var(--accent-green); border-color: var(--accent-green-dim); }
.badge.intermediate { color: var(--js-yellow); border-color: var(--js-yellow-dim); }
.badge.advanced { color: var(--accent-red); border-color: var(--accent-red-dim); }

.lesson-card .progress-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  margin-right: 4px;
}
.lesson-card .progress-dot.done { background: var(--accent-green); }
.lesson-card .progress-dot.active { background: var(--js-yellow); }

/* ---------- Track Groups ---------- */
.track-group { margin-bottom: 48px; }
.track-group:last-child { margin-bottom: 0; }
.track-group .track-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.track-group .track-header .emoji { font-size: 24px; }
.track-group .track-header h2 { margin: 0; font-size: 22px; }
.track-group > p { font-size: 14px; color: var(--text-faint); margin-bottom: 20px; }

/* ---------- Lesson Page ---------- */
.lesson-header {
  padding: 40px 0 30px;
  border-bottom: 1px solid var(--border);
}
.lesson-breadcrumb {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.lesson-breadcrumb a {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}
.lesson-breadcrumb a:hover { color: var(--js-yellow); }

.lesson-progress {
  display: flex;
  gap: 6px;
  margin-top: 18px;
}
.lesson-progress .dot {
  width: 24px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  transition: background var(--transition-base);
}
.lesson-progress .dot.active { background: var(--js-yellow); }
.lesson-progress .dot.done { background: var(--accent-green); }

.lesson-body {
  padding: 50px 0;
  max-width: 760px;
}
.lesson-body h2 {
  margin: 44px 0 16px;
  font-size: clamp(22px, 2.5vw, 28px);
}
.lesson-body h2:first-child { margin-top: 0; }
.lesson-body h3 { margin: 28px 0 12px; font-size: 19px; }
.lesson-body p {
  margin-bottom: 16px;
  font-size: 16px;
  color: var(--text);
}
.lesson-body p.muted { color: var(--text-muted); }
.lesson-body ul, .lesson-body ol {
  margin: 0 0 16px 22px;
}
.lesson-body li {
  margin-bottom: 8px;
  color: var(--text-muted);
}

.lesson-body .callout {
  border-left: 3px solid var(--js-yellow);
  background: var(--bg-elevated);
  padding: 18px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 24px 0;
  font-size: 14.5px;
}
.lesson-body .callout strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-body);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--js-yellow);
}
.lesson-body .callout.warning { border-color: var(--accent-orange); }
.lesson-body .callout.warning strong { color: var(--accent-orange); }
.lesson-body .callout.tip { border-color: var(--accent-blue); }
.lesson-body .callout.tip strong { color: var(--accent-blue); }
.lesson-body .callout.danger { border-color: var(--accent-red); }
.lesson-body .callout.danger strong { color: var(--accent-red); }

/* ---------- Playground ---------- */
.playground {
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  margin: 24px 0;
}
.playground-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated-2);
}
.playground-bar .label {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
}
.playground-panes {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.playground textarea {
  width: 100%;
  min-height: 220px;
  background: var(--bg-elevated);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.7;
  border: none;
  padding: 16px;
  resize: vertical;
  border-right: 1px solid var(--border);
}
.playground textarea:focus {
  outline: none;
  background: var(--bg-elevated-2);
}
.playground iframe {
  width: 100%;
  min-height: 220px;
  border: none;
  background: #fff;
}
.playground-output-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  padding: 6px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated-2);
}
.console-log {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 10px 14px;
  background: #0B0C0F;
  color: #ECE9E2;
  min-height: 60px;
  max-height: 140px;
  overflow-y: auto;
  white-space: pre-wrap;
  border-bottom: 1px solid var(--border);
}
.console-log {
  background: #1a1a1a;
  color: #f0f0f0;
}

/* ---------- Quiz ---------- */
.quiz-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  padding: 28px;
  background: var(--bg-elevated);
  margin: 24px 0;
}
.quiz-box h3 {
  margin-bottom: 16px;
  font-size: 18px;
}
.quiz-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  margin-bottom: 8px;
  cursor: pointer;
  font-size: 14.5px;
  font-family: var(--font-body);
  transition: all var(--transition-fast);
}
.quiz-option:hover:not(:disabled) {
  border-color: var(--js-yellow);
  background: var(--js-yellow-dim);
}
.quiz-option:disabled { cursor: not-allowed; opacity: 0.7; }
.quiz-option.correct {
  border-color: var(--accent-green);
  background: var(--accent-green-dim);
}
.quiz-option.wrong {
  border-color: var(--accent-red);
  background: var(--accent-red-dim);
}
.quiz-feedback {
  font-size: 14px;
  margin-top: 12px;
  font-family: var(--font-body);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated-2);
}

/* ---------- Lesson Navigation ---------- */
.lesson-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  margin-top: 40px;
  border-top: 1px solid var(--border);
  gap: 16px;
  flex-wrap: wrap;
}
.lesson-nav .nav-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lesson-nav .nav-item .label {
  font-size: 12px;
  color: var(--text-faint);
  font-family: var(--font-body);
}
.lesson-nav .nav-item .title {
  font-weight: 600;
  color: var(--text);
  transition: color var(--transition-fast);
}
.lesson-nav .nav-item .title:hover { color: var(--js-yellow); }
.lesson-nav .nav-item.next { text-align: right; }

/* ---------- Blog ---------- */
.blog-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-light);
}
.blog-card .content { padding: 24px; }
.blog-card .tag {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--accent-green);
  background: var(--accent-green-dim);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 8px;
}
.blog-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}
.blog-card h3 a { color: var(--text); transition: color var(--transition-fast); }
.blog-card h3 a:hover { color: var(--js-yellow); }
.blog-card p { font-size: 14px; }
.blog-card .meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-faint);
  margin-top: 12px;
  font-family: var(--font-mono);
}

/* ---------- Tools ---------- */
.tool-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all var(--transition-base);
}
.tool-card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.tool-card .icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  color: var(--js-yellow);
  font-size: 18px;
}
.tool-card h3 { font-size: 16px; }
.tool-card p { font-size: 13.5px; }
.tool-card .go {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--js-yellow);
  margin-top: auto;
  font-weight: 600;
  transition: transform var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.tool-card .go:hover { transform: translateX(4px); }

.tool-header { padding: 40px 0 24px; border-bottom: 1px solid var(--border); }
.tool-body { padding: 40px 0; }
.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.tool-grid textarea, .tool-grid pre {
  width: 100%;
  min-height: 320px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13.5px;
  padding: 16px;
  resize: vertical;
  white-space: pre-wrap;
  overflow: auto;
}
.tool-grid textarea:focus {
  outline: none;
  border-color: var(--js-yellow);
}
.tool-actions { display: flex; gap: 10px; margin: 16px 0; flex-wrap: wrap; }
.tool-status {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-faint);
  margin-top: 6px;
}
.tool-status.err { color: var(--accent-red); }
.tool-status.ok { color: var(--accent-green); }

/* ---------- Newsletter ---------- */
.newsletter {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  padding: 48px;
  text-align: center;
}
.newsletter h2 { margin-bottom: 8px; }
.newsletter p { max-width: 420px; margin: 0 auto 20px; }
.newsletter form {
  display: flex;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
}
.newsletter input {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color var(--transition-fast);
}
.newsletter input:focus {
  outline: none;
  border-color: var(--js-yellow);
}
.newsletter input::placeholder { color: var(--text-faint); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 88px 0 32px;
  margin-top: 60px;
  background: var(--bg-elevated);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-col h4 {
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text);
  margin-bottom: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 10px;
  transition: color var(--transition-fast);
}
.footer-col a:hover { color: var(--text); }
.footer-col .social {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}
.footer-col .social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 16px;
  transition: all var(--transition-fast);
  margin: 0;
}
.footer-col .social a:hover {
  border-color: var(--js-yellow);
  color: var(--text);
  transform: translateY(-2px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 22px;
  font-size: 13px;
  color: var(--text-faint);
}
.footer-bottom-links {
  display: flex;
  gap: 20px;
}
.footer-bottom-links a {
  color: var(--text-faint);
  transition: color var(--transition-fast);
}
.footer-bottom-links a:hover { color: var(--text); }

/* ---------- Page Header ---------- */
.page-header {
  padding: 56px 0 20px;
  border-bottom: 1px solid var(--border);
}
.page-body {
  padding: 20px 0 70px;
  max-width: 720px;
}
.page-body h2 {
  margin: 30px 0 14px;
}
.page-body p {
  margin-bottom: 14px;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 20px;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact-form label {
  font-weight: 500;
  font-size: 14px;
}
.contact-form input,
.contact-form textarea {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color var(--transition-fast);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--js-yellow);
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.contact-info .item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.contact-info .item .icon {
  font-size: 20px;
  color: var(--js-yellow);
  width: 32px;
  flex-shrink: 0;
}
.contact-info .item h4 { font-size: 15px; margin-bottom: 2px; }
.contact-info .item p { font-size: 14px; }

/* ---------- FAQ ---------- */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-item .question {
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item .question:hover { color: var(--js-yellow); }
.faq-item .question .toggle { font-size: 18px; transition: transform var(--transition-fast); }
.faq-item .question .toggle.open { transform: rotate(180deg); }
.faq-item .answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}
.faq-item .answer.show { max-height: 200px; padding-top: 12px; }
.faq-item .answer p { font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { gap: 24px; }
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 0 0 24px 24px;
    box-shadow: var(--shadow-md);
    padding: 16px 24px 24px;
    flex-direction: column;
    gap: 12px;
  }
  .site-header.open .nav-links {
    display: flex;
  }
  .site-header.open {
    border-radius: var(--radius-nav) var(--radius-nav) 24px 24px;
  }
  .nav-toggle { display: flex; }

  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }

  .playground-panes { grid-template-columns: 1fr; }
  .playground textarea {
    border-right: none;
    border-bottom: 1px solid var(--border);
    min-height: 150px;
  }

  .tool-grid { grid-template-columns: 1fr; }

  .newsletter { padding: 32px 20px; }
  .newsletter form {
    flex-direction: column;
    width: 100%;
  }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .footer-bottom-links { flex-wrap: wrap; justify-content: center; }

  .hero { padding: 50px 0 40px; }
  .section { padding: 50px 0; }
  .hero-meta { gap: 16px; }

  .lesson-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .lesson-nav .nav-item.next { text-align: left; }

  .contact-grid { gap: 24px; }
}

@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .btn { padding: 10px 18px; font-size: 13px; }
  .card { padding: 20px; }
  .code-card pre { font-size: 13px; padding: 16px; }
}

/* ==========================================================================
   Contact Page Specific Styles
   ========================================================================== */

/* Contact Grid */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 20px;
}

/* Form Wrapper */
.contact-form-wrapper {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  padding: 32px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
}

.form-group input,
.form-group textarea {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color var(--transition-fast);
  width: 100%;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--js-yellow);
  box-shadow: 0 0 0 3px var(--js-yellow-dim);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

/* Contact Info */
.contact-info-wrapper {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  padding: 32px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.contact-item:last-child {
  border-bottom: none;
}

.contact-icon {
  font-size: 22px;
  color: var(--js-yellow);
  width: 36px;
  flex-shrink: 0;
  text-align: center;
}

.contact-detail h4 {
  font-size: 15px;
  margin-bottom: 2px;
  color: var(--text);
}

.contact-detail p {
  font-size: 14px;
  margin: 0;
  color: var(--text-muted);
}

.contact-note {
  font-size: 12.5px !important;
  color: var(--text-faint) !important;
  margin-top: 2px !important;
}

/* FAQ Section */
.faq-section {
  margin-top: 8px;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-item .question {
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
  font-size: 15px;
  padding: 4px 0;
  transition: color var(--transition-fast);
}

.faq-item .question:hover {
  color: var(--js-yellow);
}

.faq-item .question .toggle {
  font-size: 14px;
  transition: transform var(--transition-fast);
  color: var(--text-faint);
}

.faq-item .question .toggle.open {
  transform: rotate(180deg);
}

.faq-item .answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}

.faq-item .answer.show {
  max-height: 300px;
  padding-top: 12px;
}

.faq-item .answer p {
  font-size: 14px;
  margin: 0;
  color: var(--text-muted);
}

/* Status Messages */
.tool-status {
  font-family: var(--font-body);
  font-size: 13px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated-2);
}

.tool-status.err {
  color: var(--accent-red);
  background: var(--accent-red-dim);
  border: 1px solid var(--accent-red);
}

.tool-status.ok {
  color: var(--accent-green);
  background: var(--accent-green-dim);
  border: 1px solid var(--accent-green);
}

/* Responsive */
@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .contact-form-wrapper,
  .contact-info-wrapper {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .contact-form-wrapper,
  .contact-info-wrapper {
    padding: 16px;
  }
  
  .contact-item {
    gap: 12px;
  }
  
  .contact-icon {
    font-size: 18px;
    width: 28px;
  }
  
  .faq-item .question {
    font-size: 14px;
  }
}

/* Add this at the end of style.css */

/* Keep navbar stable - prevent shifting */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 120px; /* Reserve space for the button */
  justify-content: flex-end;
}

/* Hide button on non-home pages but keep space */
body:not(.home-page) .header-actions .btn-primary {
  visibility: hidden;
  pointer-events: none;
  width: 120px; /* Keep the space */
}

/* On home page, show button normally */
body.home-page .header-actions .btn-primary {
  visibility: visible;
  pointer-events: auto;
  width: auto;
}

/* ============================================================
   NAVBAR STABILITY FIX - Keep navbar from shifting
   ============================================================ */

/* Reserve space for the header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 160px;
  justify-content: flex-end;
}

/* Hide "Start learning" button on non-home pages but keep space */
body:not(.home-page) .header-actions .btn-primary {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  width: 120px;
}

/* Show "Start learning" button on home page */
body.home-page .header-actions .btn-primary {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  width: auto;
}

/* Mobile fix */
@media (max-width: 720px) {
  .header-actions {
    min-width: 100px;
  }
  body:not(.home-page) .header-actions .btn-primary {
    width: 80px;
  }
}

/* ---------- Subscription Popup Styles ---------- */
.subscription-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.subscription-overlay.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.subscription-popup {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  max-width: 480px;
  width: 90%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.subscription-popup .close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-faint);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.subscription-popup .close-btn:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.subscription-popup .popup-icon {
  font-size: 48px;
  text-align: center;
  margin-bottom: 12px;
}

.subscription-popup h2 {
  margin: 0 0 8px 0;
  font-size: 24px;
  text-align: center;
}

.subscription-popup p {
  color: var(--text-faint);
  text-align: center;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.subscription-popup .benefits {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  padding: 0;
  list-style: none;
}

.subscription-popup .benefits li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.subscription-popup .benefits li .check {
  color: var(--js-yellow);
  font-weight: bold;
  font-size: 18px;
}

.subscription-popup form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.subscription-popup form input[type="email"] {
  flex: 1;
  min-width: 180px;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

.subscription-popup form input[type="email"]:focus {
  border-color: var(--js-yellow);
}

.subscription-popup form .btn {
  padding: 12px 24px;
  font-size: 15px;
  white-space: nowrap;
}

.subscription-popup .skip-link {
  display: block;
  text-align: center;
  margin-top: 16px;
  color: var(--text-faint);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s;
}

.subscription-popup .skip-link:hover {
  color: var(--text-primary);
}

.subscription-popup .popup-status {
  margin-top: 12px;
  font-size: 14px;
  text-align: center;
  min-height: 24px;
}

/* Different popup triggers */
.popup-trigger {
  display: inline-block;
}

/* Responsive */
@media (max-width: 600px) {
  .subscription-popup {
    padding: 28px 20px;
    margin: 16px;
  }
  
  .subscription-popup form {
    flex-direction: column;
  }
  
  .subscription-popup form input[type="email"] {
    min-width: auto;
  }
  
  .subscription-popup form .btn {
    width: 100%;
    justify-content: center;
  }
}
/* ==========================================================================
   Tutorials Mega-Menu Dropdown (nav)
   ========================================================================== */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 14.5px;
  font-weight: 500;
  padding: 4px 0;
  cursor: pointer;
  transition: color var(--transition-fast);
}
.nav-dropdown-toggle .chevron {
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}
.nav-dropdown-toggle:hover,
.nav-dropdown.open .nav-dropdown-toggle,
.nav-dropdown-toggle.active { color: var(--text); }
.nav-dropdown.open .nav-dropdown-toggle .chevron { transform: rotate(180deg); }

.nav-dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  transform: translateX(-50%);
  width: 340px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 20px;
  z-index: 200;
}
.nav-dropdown.open .nav-dropdown-panel { display: block; }

.tutorial-feature-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.tutorial-feature-icon {
  font-size: 26px;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--js-yellow-dim);
  border-radius: var(--radius-sm);
}
.tutorial-feature-card h4 { margin-bottom: 4px; font-size: 15.5px; }
.tutorial-feature-card p { font-size: 13.5px; margin-bottom: 14px; line-height: 1.55; }

@media (max-width: 720px) {
  .nav-dropdown { width: 100%; }
  .nav-dropdown-toggle {
    width: 100%;
    justify-content: center;
    padding: 4px 0;
  }
  .nav-dropdown-panel {
    display: none;
    position: static;
    transform: none;
    width: auto;
    box-shadow: none;
    border: none;
    background: var(--bg-elevated-2);
    border-radius: var(--radius-sm);
    margin-top: 10px;
    padding: 14px;
  }
  .nav-dropdown.open .nav-dropdown-panel { display: block; }
}

/* ==========================================================================
   Notes & Interview Questions Page
   ========================================================================== */
.notes-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.notes-search {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 360px;
}
.notes-search input {
  width: 100%;
  padding: 12px 16px 12px 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition-fast);
}
.notes-search input:focus { border-color: var(--js-yellow); }
.notes-search::before {
  content: "🔍";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: 0.6;
  pointer-events: none;
}
.notes-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 9px 16px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.filter-btn:hover { border-color: var(--border-light); color: var(--text); }
.filter-btn.active {
  background: var(--js-yellow);
  border-color: var(--js-yellow);
  color: #FFFFFF;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.note-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all var(--transition-base);
}
.note-card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.note-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.note-card .card-icon { font-size: 26px; }
.note-card .card-tag {
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent-green);
  background: var(--accent-green-dim);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}
.note-card h3 { font-size: 17px; }
.note-card .card-description { font-size: 13.5px; }
.note-card .card-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.note-card .topic-tag {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-faint);
  background: var(--bg-elevated-2);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: var(--radius-sm);
}
.note-card .card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.note-card .card-stats {
  display: flex;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-faint);
}
.note-card .card-stats i { margin-right: 4px; }
.note-card .pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--js-yellow-dim);
  color: var(--js-yellow);
  border: 1px solid transparent;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.note-card .pdf-btn:hover {
  background: var(--js-yellow);
  color: #FFFFFF;
}
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-faint);
}
.no-results h3 { margin-bottom: 8px; color: var(--text-light); }

@media (max-width: 860px) {
  .notes-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .notes-grid { grid-template-columns: 1fr; }
  .notes-toolbar { flex-direction: column; align-items: stretch; }
  .notes-search { max-width: none; }
}

/* ==========================================================================
   Donation Popup (shown before opening a notes PDF)
   ========================================================================== */
.donation-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 16px;
}
.donation-overlay.active { display: flex; animation: fadeIn 0.3s ease; }
.donation-popup {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px;
  max-width: 440px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.4s ease;
}
.donation-popup .popup-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text-faint);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all var(--transition-fast);
  line-height: 1;
}
.donation-popup .popup-close:hover { color: var(--text); background: var(--bg-elevated-2); }
.donation-popup .popup-icon { font-size: 44px; text-align: center; margin-bottom: 10px; }
.donation-popup h2 { text-align: center; font-size: 22px; margin-bottom: 8px; }
.donation-popup p.popup-sub {
  color: var(--text-faint);
  text-align: center;
  font-size: 14.5px;
  line-height: 1.6;
  margin-bottom: 22px;
}
.donation-amounts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.donate-btn {
  background: var(--bg-elevated-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 8px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.donate-btn:hover {
  border-color: var(--js-yellow);
  background: var(--js-yellow-dim);
  transform: translateY(-2px);
}
.donation-note {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
  margin-bottom: 18px;
}
.continue-link {
  display: block;
  text-align: center;
  color: var(--text-faint);
  font-size: 13.5px;
  cursor: pointer;
  text-decoration: underline;
  transition: color var(--transition-fast);
  background: none;
  border: none;
  width: 100%;
  padding: 6px;
  font-family: var(--font-body);
}
.continue-link:hover { color: var(--text); }

@media (max-width: 480px) {
  .donation-popup { padding: 26px 20px; }
  .donation-amounts { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   Support Popup — 4-amount variant (tea / coffee / snacks / meal)
   Used by js/support-popup.js on every paid resource across the site
   ========================================================================== */
.donation-amounts-4 {
  grid-template-columns: repeat(2, 1fr);
}
.donation-amounts-4 .donate-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
}
.donation-amounts-4 .donate-amt {
  font-size: 18px;
  font-weight: 700;
  color: var(--js-yellow);
}
.donation-amounts-4 .donate-label {
  font-size: 12px;
  color: var(--text-faint);
  font-weight: 500;
}

/* Step 2 — "We don't run ads" confirm popup */
.confirm-popup .confirm-btn-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}
.confirm-popup .confirm-btn-row .btn {
  width: 100%;
  text-align: center;
  justify-content: center;
}

@media (max-width: 480px) {
  .donation-amounts-4 { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   Raw Notes & Quick Links section (notes.html)
   ========================================================================== */
.raw-notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.raw-note-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}
.raw-note-card:hover {
  border-color: var(--js-yellow);
  transform: translateY(-3px);
}
.raw-note-card .raw-note-icon { font-size: 26px; }
.raw-note-card h4 { font-size: 15.5px; margin: 0; }
.raw-note-card p {
  font-size: 13px;
  color: var(--text-faint);
  line-height: 1.5;
  margin: 0;
  flex-grow: 1;
}
.view-btn {
  margin-top: 8px;
  background: var(--bg-elevated-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}
.view-btn:hover {
  border-color: var(--js-yellow);
  background: var(--js-yellow-dim);
}

/* ==========================================================================
   Notes ▾ dropdown (category quick-links in navbar)
   ========================================================================== */
.notes-dropdown-panel { width: 300px; }
.notes-dropdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.notes-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated-2);
  border: 1px solid var(--border);
  color: var(--text-light);
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--transition-fast);
}
.notes-dropdown-item:hover {
  border-color: var(--js-yellow);
  color: var(--text);
  transform: translateY(-2px);
}
.notes-dropdown-item span { font-size: 16px; }
.notes-dropdown-viewall {
  display: block;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--js-yellow);
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

@media (max-width: 720px) {
  .notes-dropdown-panel { width: auto; }
}

/* ==========================================================================
   JavaScript Hub — Roadmap page
   ========================================================================== */
.roadmap-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin: 30px 0 10px;
}
.roadmap-stage {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  padding: 24px;
  position: relative;
}
.roadmap-stage .stage-num {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.roadmap-stage h3 { font-size: 19px; margin: 6px 0 4px; }
.roadmap-stage .stage-desc { font-size: 13.5px; color: var(--text-faint); margin-bottom: 16px; }
.roadmap-stage ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.roadmap-stage li a {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--text-light);
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
  transition: color var(--transition-fast);
}
.roadmap-stage li:last-child a { border-bottom: none; }
.roadmap-stage li a:hover { color: var(--js-yellow); }
.roadmap-stage li a .step-index {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-faint);
  width: 20px;
  flex-shrink: 0;
}

.hub-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 36px 0;
}
.hub-link-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  padding: 24px;
  transition: all var(--transition-base);
}
.hub-link-card:hover { border-color: var(--js-yellow); transform: translateY(-3px); }
.hub-link-card .icon { font-size: 26px; display: block; margin-bottom: 10px; }
.hub-link-card h3 { font-size: 16px; margin-bottom: 6px; }
.hub-link-card p { font-size: 13px; color: var(--text-faint); margin-bottom: 12px; }
.hub-link-card .go { font-size: 13px; font-weight: 600; color: var(--js-yellow); }

@media (max-width: 860px) {
  .roadmap-track { grid-template-columns: 1fr; }
  .hub-links { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .hub-links { grid-template-columns: 1fr; }
}

/* ==========================================================================
   JavaScript Projects page
   ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.project-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all var(--transition-base);
}
.project-card:hover { border-color: var(--border-light); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.project-card .top { display: flex; align-items: center; justify-content: space-between; }
.project-card .icon { font-size: 24px; }
.project-card h3 { font-size: 16.5px; }
.project-card p.desc { font-size: 13.5px; }
.project-card .stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0;
}
.project-card .stack span {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-faint);
  background: var(--bg-elevated-2);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: var(--radius-sm);
}
.project-card .learn-list {
  list-style: none;
  font-size: 12.5px;
  color: var(--text-light);
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.project-card .learn-list li::before { content: "✓ "; color: var(--accent-green); }
.project-card .linked-lesson {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--js-yellow);
  font-weight: 600;
}

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

/* ==========================================================================
   Common Mistakes page
   ========================================================================== */
.mistake-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  padding: 28px;
  margin-bottom: 20px;
}
.mistake-card .mistake-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  margin-bottom: 14px;
}
.mistake-card .mistake-title .num {
  font-family: var(--font-body);
  font-size: 12px;
  color: #FFFFFF;
  background: var(--accent-red);
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mistake-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 14px 0;
}
.mistake-compare .bad, .mistake-compare .good {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}
.mistake-compare .label {
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 700;
  padding: 7px 12px;
  letter-spacing: 0.04em;
}
.mistake-compare .bad .label { background: var(--accent-red-dim); color: var(--accent-red); }
.mistake-compare .good .label { background: var(--accent-green-dim); color: var(--accent-green); }
.mistake-compare pre { margin: 0; border-radius: 0; font-size: 12.5px; }
.mistake-card .why { font-size: 13.5px; color: var(--text-light); }

@media (max-width: 700px) {
  .mistake-compare { grid-template-columns: 1fr; }
}

/* ==========================================================================
   JavaScript Interview Questions (card / accordion UI)
   ========================================================================== */
.iq-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.iq-list { display: flex; flex-direction: column; gap: 12px; }
.iq-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.iq-card summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  font-size: 14.5px;
}
.iq-card summary::-webkit-details-marker { display: none; }
.iq-card summary .q-num {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-faint);
  flex-shrink: 0;
}
.iq-card summary .q-text { flex: 1; }
.iq-card summary .diff-badge {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  white-space: nowrap;
}
.diff-badge.easy { color: var(--accent-green); background: var(--accent-green-dim); }
.diff-badge.medium { color: var(--js-yellow); background: var(--js-yellow-dim); }
.diff-badge.hard { color: var(--accent-red); background: var(--accent-red-dim); }
.iq-card summary .chevron-caret {
  transition: transform var(--transition-fast);
  color: var(--text-faint);
  flex-shrink: 0;
}
.iq-card[open] summary .chevron-caret { transform: rotate(90deg); }
.iq-card .iq-answer {
  padding: 0 20px 18px 48px;
  font-size: 13.5px;
  color: var(--text-light);
  line-height: 1.65;
}
.iq-card .iq-answer a { color: var(--js-yellow); font-weight: 600; }

@media (max-width: 600px) {
  .iq-card summary { flex-wrap: wrap; }
  .iq-card .iq-answer { padding-left: 20px; }
}

/* ==========================================================================
   "Coming soon" preview banner (used on mockup-only pages)
   ========================================================================== */
.preview-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--js-yellow-dim);
  border: 1px solid var(--js-yellow);
  color: var(--js-yellow);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.breadcrumb {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px 0;
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--text-faint);
}
.breadcrumb a { color: var(--text-faint); transition: color var(--transition-fast); }
.breadcrumb a:hover { color: var(--js-yellow); }
.breadcrumb .crumb-sep { margin: 0 2px; opacity: 0.5; }
.breadcrumb span[aria-current] { color: var(--text-light); }

/* ==========================================================================
   Premium Resources — pricing cards, free-resource cards, PDF-style preview
   Used on: index.html (compact section) and resources.html (full hub)
   ========================================================================== */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: stretch;
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 30px 26px;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}
.pricing-card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.pricing-card.featured {
  border-color: var(--js-yellow);
  background: linear-gradient(180deg, var(--js-yellow-dim) 0%, var(--bg-elevated) 140px);
  box-shadow: 0 0 0 1px var(--js-yellow), var(--shadow-lg);
}
.pricing-card.featured:hover { transform: translateY(-6px); }

.pricing-ribbon {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--js-yellow);
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-btn-glow);
  white-space: nowrap;
}

.pricing-card .pricing-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: var(--js-yellow);
  color: #FFFFFF;
  font-size: 19px;
  margin-bottom: 16px;
}
.pricing-card h3 {
  font-size: 18px;
  margin-bottom: 6px;
}
.pricing-card .pricing-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 18px;
}
.pricing-card .price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}
.pricing-card .price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  color: var(--text);
  letter-spacing: -0.02em;
}
.pricing-card .price-original {
  font-size: 14px;
  color: var(--text-faint);
  text-decoration: line-through;
}
.pricing-card .price-note {
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 20px;
}
.pricing-card ul.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 24px;
  flex: 1;
}
.pricing-card ul.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-light);
  line-height: 1.45;
}
.pricing-card ul.pricing-features li .tick {
  color: var(--accent-green);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.pricing-card .btn { width: 100%; }

/* ---------- Free resource cards ---------- */
.free-resource-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}
.free-resource-card:hover {
  border-color: var(--accent-green);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.free-resource-card .icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: var(--accent-green-dim);
  color: var(--accent-green);
  font-size: 19px;
  margin-bottom: 16px;
}
.free-resource-card h3 { font-size: 17px; margin-bottom: 6px; }
.free-resource-card p { font-size: 13.5px; margin-bottom: 16px; flex: 1; }
.free-resource-card .card-link { margin-top: 0; }

/* ---------- PDF-style notes preview ---------- */
.pdf-preview {
  max-width: 620px;
  margin: 0 auto;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.pdf-preview-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
  background: var(--bg-elevated-2);
  border-bottom: 1px solid var(--border);
}
.pdf-preview-toolbar .pdf-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  opacity: 0.9;
}
.pdf-preview-toolbar .pdf-dot.red { background: #FF6B6B; }
.pdf-preview-toolbar .pdf-dot.yellow { background: #FFA657; }
.pdf-preview-toolbar .pdf-dot.green { background: #3ECF8E; }
.pdf-preview-toolbar .pdf-filename {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
}
.pdf-preview-toolbar .pdf-pagecount {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 3px 10px;
}
.pdf-preview-page {
  background: #FFFFFF;
  padding: 34px 34px 0;
}
.pdf-preview-page .eyebrow { color: #1F5EFF; }
.pdf-preview-page h3 {
  color: #111827;
  font-size: 20px;
  margin: 8px 0 4px;
}
.pdf-preview-page > p {
  color: #6B7280;
  font-size: 13.5px;
  margin-bottom: 22px;
}
.pdf-toc {
  list-style: none;
  display: flex;
  flex-direction: column;
}
.pdf-toc li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed #E5E7EB;
  font-size: 14.5px;
  color: #1F2937;
}
.pdf-toc li .pdf-toc-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #9CA3AF;
  width: 22px;
  flex-shrink: 0;
}
.pdf-toc li .pdf-toc-name { flex: 1; font-weight: 500; }
.pdf-toc li .pdf-toc-page {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #9CA3AF;
}
.pdf-preview-locked {
  margin-top: 6px;
  padding: 26px 20px 32px;
  text-align: center;
  background: #F9FAFB;
  border-top: 1px solid #E5E7EB;
}
.pdf-preview-locked .pdf-lock { font-size: 22px; display: block; margin-bottom: 8px; }
.pdf-preview-locked p {
  color: #4B5563;
  font-size: 13.5px;
  max-width: 380px;
  margin: 0 auto 18px;
}

@media (max-width: 1024px) {
  .pricing-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card.featured { order: -1; }
  .pdf-preview-page { padding: 26px 20px 0; }
  .pdf-preview-locked { padding: 22px 16px 26px; }
}

/* ==========================================================================
   RunCode by CodeyHub — Compiler section, language cards, coming-soon
   categories, and redirect page (added in v2 restructure)
   ========================================================================== */

.footer-grid-5 {
  grid-template-columns: 1.3fr 1fr 1fr 1fr 1fr;
}

/* ---------- Language / Compiler cards ---------- */
.grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.lang-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px 22px;
  text-align: center;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lang-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--js-yellow-dim);
}
.lang-card .lang-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  color: #fff;
}
.lang-card h3 { font-size: 17px; margin-bottom: 6px; }
.lang-card p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 18px;
  flex-grow: 1;
}
.lang-card .lang-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.lang-card .lang-actions .btn { width: 100%; justify-content: center; }

.lang-icon.lang-c { background: linear-gradient(135deg, #5C6BC0, #283593); }
.lang-icon.lang-cpp { background: linear-gradient(135deg, #42A5F5, #0D47A1); }
.lang-icon.lang-java { background: linear-gradient(135deg, #EF5350, #B71C1C); }
.lang-icon.lang-js { background: linear-gradient(135deg, #F0DB4F, #C9A62A); color: #1F2430; }
.lang-icon.lang-python { background: linear-gradient(135deg, #4B8BBE, #306998); }

@media (max-width: 1024px) {
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .grid-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .grid-5 { grid-template-columns: 1fr; }
}

/* ---------- Compiler Hub page ---------- */
.compiler-hero {
  background: #F5F8FF;
  padding: 64px 0 48px;
  text-align: center;
}
.compiler-hero .eyebrow { justify-content: center; }
.compiler-hero h1 { margin: 14px 0; font-size: clamp(30px, 4.5vw, 46px); }
.compiler-hero p.lead { max-width: 620px; margin: 0 auto; }

.why-runcode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 860px) {
  .why-runcode-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .why-runcode-grid { grid-template-columns: 1fr; }
}

/* ---------- Coming-soon category cards (Learn / Notes) ---------- */
.category-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 26px 22px;
  position: relative;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.category-card.available:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.category-card .icon { font-size: 26px; display: block; margin-bottom: 12px; }
.category-card h3 { font-size: 16px; margin-bottom: 6px; }
.category-card p { font-size: 13.5px; color: var(--text-muted); margin-bottom: 14px; }
.category-card.disabled { opacity: 0.62; }
.category-card .badge.coming-soon {
  position: absolute;
  top: 20px;
  right: 20px;
}

/* ---------- Coming-soon note cards ---------- */
.note-card-disabled { opacity: 0.65; }

/* ---------- Redirect / moved page ---------- */
.redirect-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
}
.redirect-page .redirect-card {
  max-width: 480px;
}
.redirect-page .redirect-icon { font-size: 40px; margin-bottom: 18px; display: block; }
.redirect-page h1 { font-size: 26px; margin-bottom: 12px; }
.redirect-page p { color: var(--text-muted); margin-bottom: 24px; }

/* ==========================================================================
   RunCode — live IDE widget (Monaco + Piston)
   ========================================================================== */
.runcode-app {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.runcode-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: rgba(245, 248, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.runcode-toolbar-left,
.runcode-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.runcode-lang-select {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
}
.runcode-version {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  white-space: nowrap;
}
.rc-icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1;
}
.rc-icon-btn:hover {
  border-color: var(--js-yellow);
  transform: translateY(-1px);
}

.runcode-editor-wrap { border-bottom: 1px solid var(--border); }
.runcode-monaco { width: 100%; height: 420px; }
.runcode-fallback {
  padding: 40px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.runcode-io-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 1px;
  background: var(--border);
}
.runcode-io-col { background: var(--bg-elevated); padding: 16px; }
.runcode-io-label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  font-weight: 700;
  margin-bottom: 8px;
}
.runcode-io-label span { text-transform: none; letter-spacing: 0; font-weight: 500; }
.runcode-input,
.runcode-output {
  width: 100%;
  min-height: 130px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated-2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  padding: 12px;
  box-sizing: border-box;
}
.runcode-output {
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.runcode-error {
  padding: 16px;
  background: var(--accent-red-dim);
  border-top: 1px solid var(--border);
}
.runcode-error.hidden { display: none; }
.runcode-error-console {
  margin: 0;
  color: var(--accent-red);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 200px;
  overflow: auto;
}

.runcode-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-elevated-2);
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.runcode-note {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-faint);
  text-align: center;
}
.runcode-note a { color: var(--js-yellow); }

/* Dark IDE theme (toggled independently of the site's light theme) */
.runcode-app.theme-dark {
  background: #1E1E2E;
  border-color: #2E2E3E;
}
.runcode-app.theme-dark .runcode-toolbar {
  background: rgba(24, 24, 37, 0.85);
  border-color: #2E2E3E;
}
.runcode-app.theme-dark .runcode-lang-select {
  background: #181825;
  border-color: #2E2E3E;
  color: #E4E4F0;
}
.runcode-app.theme-dark .rc-icon-btn {
  background: #181825;
  border-color: #2E2E3E;
  color: #E4E4F0;
}
.runcode-app.theme-dark .runcode-editor-wrap { border-color: #2E2E3E; }
.runcode-app.theme-dark .runcode-io-grid { background: #2E2E3E; }
.runcode-app.theme-dark .runcode-io-col { background: #1E1E2E; }
.runcode-app.theme-dark .runcode-io-label { color: #8B8BA3; }
.runcode-app.theme-dark .runcode-input,
.runcode-app.theme-dark .runcode-output {
  background: #181825;
  border-color: #2E2E3E;
  color: #E4E4F0;
}
.runcode-app.theme-dark .runcode-status {
  background: #181825;
  border-color: #2E2E3E;
  color: #8B8BA3;
}
.runcode-app.theme-dark .runcode-error { background: rgba(220, 38, 38, 0.12); }

@media (max-width: 720px) {
  .runcode-io-grid { grid-template-columns: 1fr; }
  .runcode-monaco { height: 320px; }
  .runcode-toolbar { justify-content: flex-start; }
  .runcode-toolbar-right { width: 100%; justify-content: space-between; }
}

/* ==========================================================================
   Part 3 — Tutorial & Notes (revision) pages: C / C++ / Java / Python
   ========================================================================== */
.code-block {
  background: #0B0F1A;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px 22px;
  overflow-x: auto;
  color: #E5E7EB;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.7;
  margin: 14px 0 24px;
}
.code-block .code-label {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 10px;
  font-weight: 700;
}
.output-block {
  background: var(--bg-elevated-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text-muted);
  white-space: pre-wrap;
  margin: 0 0 24px;
}
.output-block .code-label {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 8px;
  font-weight: 700;
}
.notes-list { margin: 0 0 26px; }
.notes-list.mistakes li::marker { color: var(--accent-red); }
.notes-list.points li::marker { color: var(--accent-green); }

.revision-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 6px;
}
.revision-topics a {
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-elevated);
}
.revision-topics a.current {
  color: #fff;
  background: var(--js-yellow);
  border-color: var(--js-yellow);
}
