/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ──────────────────────────────────────────────────── */
:root {
  --bg0:       #0b0b1e;
  --bg1:       #111128;
  --bg2:       #18183a;
  --bg3:       #1f1f44;
  --bg4:       #27274e;
  --purple:    #7c3aed;
  --purple-lt: #9d5cf6;
  --blue:      #3b82f6;
  --green:     #10b981;
  --orange:    #f59e0b;
  --red:       #ef4444;
  --txt:       #e2e0f0;
  --txt2:      #9b99b8;
  --txt3:      #6b6988;
  --border:    #252545;
  --border2:   #2f2f55;
  --sidebar-w: 272px;
  --panel-w:   380px;
  --radius:    10px;
}

html, body {
  height: 100%;
  background: var(--bg0);
  color: var(--txt);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

/* Pages with scrollable content override overflow:hidden */
body.page-scrollable { overflow: auto; height: auto; }

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; color: inherit; font: inherit; }
textarea, input { font: inherit; }

/* ── Flash messages ──────────────────────────────────────────── */
.flash {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 1000; padding: 10px 20px; border-radius: 8px;
  font-size: 13.5px; font-weight: 500;
  animation: slideDown 0.25s ease, fadeOut 0.4s 3.5s ease forwards;
  white-space: nowrap;
}
.flash-notice { background: rgba(16,185,129,.15); color: var(--green); border: 1px solid rgba(16,185,129,.35); }
.flash-alert  { background: rgba(239,68,68,.12);  color: #f87171;      border: 1px solid rgba(239,68,68,.3); }
@keyframes slideDown  { from { opacity:0; transform: translateX(-50%) translateY(-10px); } to { opacity:1; transform: translateX(-50%) translateY(0); } }
@keyframes fadeOut    { from { opacity:1; } to { opacity:0; } }

/* ── App shell ──────────────────────────────────────────────── */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr var(--panel-w);
  grid-template-rows: 1fr;
  height: 100vh;
  overflow: hidden;
}

/* ─────────────────────────────────────────────────────────────
   MOBILE BAR (hidden on desktop)
───────────────────────────────────────────────────────────── */
.mobile-bar { display: none; }
.sidebar-overlay { display: none; }

/* ─────────────────────────────────────────────────────────────
   SIDEBAR
───────────────────────────────────────────────────────────── */
.sidebar {
  background: var(--bg1);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  height: 100vh; overflow: hidden;
  grid-row: 1;
}

.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.logo-icon-wrap {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; flex-shrink: 0;
}
.logo-text { font-size: 16px; font-weight: 500; }
.logo-text strong { font-weight: 800; }

.course-card {
  margin: 14px 14px 0; background: var(--bg2);
  border-radius: var(--radius); padding: 14px; flex-shrink: 0;
}
.course-name { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.progress-bar-track { height: 6px; background: var(--bg4); border-radius: 99px; overflow: hidden; }
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--blue));
  border-radius: 99px; transition: width 0.5s ease;
}
.progress-label { font-size: 11px; color: var(--txt2); margin-top: 6px; }

.nav-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  color: var(--txt3); padding: 16px 18px 6px; flex-shrink: 0;
}

.course-nav {
  flex: 1; overflow-y: auto; padding: 0 10px 10px;
  scrollbar-width: thin; scrollbar-color: var(--border2) transparent;
}
.course-nav::-webkit-scrollbar { width: 4px; }
.course-nav::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

.module-block { margin-bottom: 4px; }
.module-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 9px 10px; border-radius: 8px; background: none;
  color: var(--txt); font-size: 12.5px; font-weight: 600;
  transition: background 0.15s; gap: 8px;
}
.module-toggle:hover { background: var(--bg2); }
.module-toggle .chevron { transform: rotate(-90deg); transition: transform 0.2s; flex-shrink: 0; }
.module-toggle.open .chevron { transform: rotate(0deg); }
.module-title { flex: 1; text-align: left; }
.module-meta { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.module-count { font-size: 11px; color: var(--txt2); background: var(--bg3); padding: 1px 7px; border-radius: 99px; }

.lesson-list { list-style: none; display: none; padding: 2px 0 4px 8px; }
.lesson-list.visible { display: block; }

.lesson-link {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 7px;
  color: var(--txt2); font-size: 12.5px;
  transition: background 0.12s, color 0.12s;
}
.lesson-link:hover { background: var(--bg2); color: var(--txt); }
.lesson-link.current {
  background: linear-gradient(90deg, rgba(124,58,237,.25), rgba(59,130,246,.12));
  color: var(--txt); border-left: 2px solid var(--purple); padding-left: 8px;
}
.lesson-link.locked { cursor: default; opacity: .45; }
.lesson-link.locked:hover { background: none; color: var(--txt2); }
.lesson-link.skipped-item .lesson-link-title { color: var(--orange); }

.lesson-status-icon { width: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dot-active { width: 8px; height: 8px; border-radius: 50%; background: var(--purple-lt); display: block; }
.dot-empty  { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--txt3); display: block; }
.lesson-link-title { flex: 1; }

.sidebar-footer { padding: 10px; flex-shrink: 0; border-top: 1px solid var(--border); }

.user-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg2); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px;
}
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.user-email { font-size: 11.5px; color: var(--txt2); margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
.sign-out-link { font-size: 11px; color: var(--txt3); transition: color 0.12s; }
.sign-out-link:hover { color: var(--red); }

.certificate-card {
  background: var(--bg2); border-radius: var(--radius);
  padding: 11px 12px; display: flex; align-items: center; gap: 10px;
}
.cert-icon { font-size: 20px; flex-shrink: 0; }
.cert-title { font-size: 12px; font-weight: 600; }
.cert-desc { font-size: 11px; color: var(--txt2); }

/* ─────────────────────────────────────────────────────────────
   MAIN CONTENT
───────────────────────────────────────────────────────────── */
.main-content {
  background: var(--bg0);
  height: 100vh; display: flex; flex-direction: column; overflow: hidden;
  grid-column: 2;
}

.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  padding: 14px 24px 10px; font-size: 12.5px; color: var(--txt2); flex-shrink: 0;
  flex-wrap: wrap;
}
.breadcrumb svg { color: var(--txt3); }
.status-pill {
  font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 99px; letter-spacing: .04em;
}
.pill-done { background: rgba(16,185,129,.15); color: var(--green); }
.pill-skip { background: rgba(245,158,11,.15); color: var(--orange); }
.pill-prog { background: rgba(124,58,237,.15); color: var(--purple-lt); }

.lesson-scroll {
  flex: 1; overflow-y: auto; padding: 0 24px 20px;
  scrollbar-width: thin; scrollbar-color: var(--border2) transparent;
}
.lesson-scroll::-webkit-scrollbar { width: 5px; }
.lesson-scroll::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

.lesson-image-wrap { margin-bottom: 20px; }
.lesson-image { width: 100%; border-radius: 14px; display: block; }

.lesson-description {
  background: var(--bg2); border-radius: 12px;
  padding: 18px 20px; border: 1px solid var(--border2);
}
.lesson-description p {
  font-size: 14px; line-height: 1.75; color: var(--txt2);
}

.lesson-nav-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; border-top: 1px solid var(--border); flex-shrink: 0;
}

.nav-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 8px;
  font-size: 13.5px; font-weight: 500;
  transition: background 0.15s, transform 0.1s;
}
.nav-prev { background: var(--bg2); color: var(--txt2); border: 1px solid var(--border2); }
.nav-prev:hover:not(.disabled) { background: var(--bg3); color: var(--txt); }
.nav-next { background: linear-gradient(135deg, var(--purple), var(--blue)); color: #fff; }
.nav-next:hover { opacity: .9; transform: translateX(2px); }
.nav-btn.disabled { opacity: .35; cursor: default; }
.nav-btn.complete { background: linear-gradient(135deg, var(--green), #059669); color: #fff; font-weight: 600; }

/* ─────────────────────────────────────────────────────────────
   RIGHT PANEL
───────────────────────────────────────────────────────────── */
.right-panel {
  background: var(--bg1); border-left: 1px solid var(--border);
  height: 100vh; display: flex; flex-direction: column; overflow: hidden;
  grid-column: 3;
}

/* Exercise panel */
.exercise-panel {
  padding: 18px; border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 14px;
}

.exercise-heading { display: flex; align-items: center; gap: 8px; }
.exercise-icon-wrap {
  width: 28px; height: 28px; border-radius: 7px;
  background: rgba(124,58,237,.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--purple-lt); flex-shrink: 0;
}
.exercise-id-label { font-size: 13px; font-weight: 700; }

.exercise-question {
  font-size: 14px; color: var(--txt); line-height: 1.6; font-weight: 500;
}

/* Options */
.options-list { display: flex; flex-direction: column; gap: 7px; }
.option-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  border: 1.5px solid var(--border2);
  cursor: pointer; font-size: 13px; color: var(--txt2);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.option-row input[type="radio"] { display: none; }
.option-row:hover { border-color: var(--purple); background: rgba(124,58,237,.07); color: var(--txt); }
.option-row.selected { border-color: var(--purple); background: rgba(124,58,237,.15); color: var(--txt); }
.option-row.correct   { border-color: var(--green); background: rgba(16,185,129,.12); color: var(--txt); }
.option-row.wrong     { border-color: var(--red);   background: rgba(239,68,68,.1);   color: var(--txt); }

.option-radio {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--border2); position: relative;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: border-color 0.15s;
}
.option-row.selected .option-radio { border-color: var(--purple); background: var(--purple); }
.option-row.selected .option-radio::after {
  content: ''; position: absolute;
  width: 6px; height: 6px; border-radius: 50%; background: #fff;
}

/* Feedback */
.exercise-feedback {
  padding: 10px 12px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.exercise-feedback.correct {
  background: rgba(16,185,129,.12); color: var(--green);
  border: 1px solid rgba(16,185,129,.3);
}
.exercise-feedback.wrong {
  background: rgba(239,68,68,.1); color: #f87171;
  border: 1px solid rgba(239,68,68,.3);
}

/* Action buttons */
.exercise-actions { display: flex; gap: 8px; }
.check-btn {
  flex: 1; padding: 11px 0;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff; border-radius: 8px;
  font-size: 13.5px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: opacity 0.15s;
}
.check-btn:hover { opacity: .88; }
.skip-btn {
  padding: 11px 14px; border-radius: 8px;
  background: var(--bg3); color: var(--txt2); border: 1px solid var(--border2);
  font-size: 13px;
  display: flex; align-items: center; gap: 6px;
  transition: background 0.12s, color 0.12s;
}
.skip-btn:hover { background: var(--bg4); color: var(--txt); }

.skip-note { font-size: 11px; color: var(--txt3); margin-top: -4px; }

/* Already done box */
.already-done-box {
  background: var(--bg2); border-radius: 12px;
  padding: 20px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  border: 1px solid var(--border2);
}
.done-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(16,185,129,.15);
  border: 2px solid rgba(16,185,129,.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--green); font-weight: 700;
}
.done-icon.skip {
  background: rgba(245,158,11,.12);
  border-color: rgba(245,158,11,.35);
  color: var(--orange);
}
.done-title { font-size: 15px; font-weight: 700; color: var(--txt); }
.done-desc { font-size: 12.5px; color: var(--txt2); }
.next-up-btn {
  margin-top: 4px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 8px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff; font-size: 13px; font-weight: 600;
  transition: opacity 0.15s;
}
.next-up-btn:hover { opacity: .88; }

/* Notes section */
.notes-section {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
  padding: 0;
}
.notes-header {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  font-size: 12.5px; font-weight: 600; color: var(--txt2);
  flex-shrink: 0;
}
.notes-area {
  flex: 1; resize: none; border: none; outline: none;
  background: var(--bg0); color: var(--txt);
  font-size: 13px; line-height: 1.7; padding: 14px 16px;
  scrollbar-width: thin; scrollbar-color: var(--border2) transparent;
}

/* ─────────────────────────────────────────────────────────────
   AUTH PAGES
───────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: var(--bg0);
  background-image: radial-gradient(ellipse at 50% 0%, rgba(124,58,237,.15) 0%, transparent 70%);
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--bg1); border: 1px solid var(--border2);
  border-radius: 16px; padding: 36px 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.auth-logo {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 28px;
}
.auth-logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.auth-logo-text { font-size: 20px; font-weight: 500; }
.auth-logo-text strong { font-weight: 800; }

.auth-title { font-size: 22px; font-weight: 700; text-align: center; margin-bottom: 6px; }
.auth-subtitle { font-size: 13.5px; color: var(--txt2); text-align: center; margin-bottom: 28px; }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; font-weight: 500; color: var(--txt2); display: flex; align-items: center; gap: 6px; }
.field-hint { font-size: 11px; color: var(--txt3); font-weight: 400; }
.field-input {
  padding: 10px 12px; background: var(--bg2);
  border: 1.5px solid var(--border2); border-radius: 8px;
  color: var(--txt); font-size: 13.5px; outline: none;
  transition: border-color 0.15s;
}
.field-input:focus { border-color: var(--purple); }
.field-input::placeholder { color: var(--txt3); }

.field-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: -4px;
}
.remember-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--txt2); cursor: pointer;
}
.remember-check { width: 14px; height: 14px; accent-color: var(--purple); }
.forgot-link { font-size: 12.5px; color: var(--purple-lt); transition: opacity 0.12s; }
.forgot-link:hover { opacity: .8; }

.auth-submit-btn {
  width: 100%; padding: 12px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff; border: none; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: opacity 0.15s; margin-top: 4px;
}
.auth-submit-btn:hover { opacity: .88; }

.auth-error {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px; border-radius: 8px;
  background: rgba(239,68,68,.1); color: #f87171;
  border: 1px solid rgba(239,68,68,.3); font-size: 12.5px;
}
.auth-switch { text-align: center; font-size: 13px; color: var(--txt2); margin-top: 20px; }
.auth-switch-link { color: var(--purple-lt); font-weight: 600; transition: opacity 0.12s; }
.auth-terms { margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: var(--txt3); text-align: center; }
.auth-terms a { color: var(--purple-lt); }
.auth-switch-link:hover { opacity: .8; }

.logout-link { display: flex; align-items: center; color: var(--txt3); transition: color 0.12s; }
.logout-link:hover { color: var(--red); }

.hidden { display: none !important; }

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — TABLET (max 1024px)
───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --panel-w: 320px; }
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — MOBILE (max 768px)
───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Only body scrolls (html stays visible), so the window scrolls and the sticky navbar stays on top. */
  html { height: auto; }
  body { height: auto; overflow: auto; }

  /* App shell becomes single column */
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    height: auto;
    overflow: visible;
  }

  /* Mobile top bar */
  .mobile-bar {
    display: flex; align-items: center;
    padding: 0 16px; height: 52px;
    background: var(--bg1); border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 50;
    grid-column: 1; grid-row: 1;
  }
  .hamburger {
    display: flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 32px; height: 32px; padding: 4px;
    flex-shrink: 0;
  }
  .hamburger span {
    display: block; height: 2px; background: var(--txt2); border-radius: 2px;
    transition: opacity 0.15s;
  }
  .mobile-logo { flex: 1; text-align: center; font-size: 16px; font-weight: 500; }
  .mobile-logo strong { font-weight: 800; }
  .mobile-user { flex-shrink: 0; }

  /* Sidebar becomes off-canvas drawer */
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: var(--sidebar-w); z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(.4,0,.2,1);
    grid-row: unset; grid-column: unset;
  }
  .sidebar.open { transform: translateX(0); }

  /* Overlay */
  .sidebar-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.55);
    z-index: 199; display: none;
  }
  .sidebar-overlay.visible { display: block; }

  /* Main content — full width, scrollable */
  .main-content {
    grid-column: 1; grid-row: 2;
    height: auto; overflow: visible;
  }
  .lesson-scroll { overflow: visible; }
  .lesson-nav-bar { position: sticky; bottom: 0; background: var(--bg0); }
  .breadcrumb { padding: 12px 16px 8px; }
  .lesson-scroll { padding: 0 16px 16px; }
  .lesson-nav-bar { padding: 12px 16px; }

  /* Right panel — below main on mobile */
  .right-panel {
    grid-column: 1; grid-row: 3;
    height: auto; border-left: none; border-top: 1px solid var(--border);
  }
  .notes-section { min-height: 140px; }
  .notes-area { min-height: 120px; }
}

@media (max-width: 480px) {
  :root { --sidebar-w: 260px; }
  .auth-card { padding: 28px 20px; }
  .hero-visual { display: none; }
  .dash-courses-grid { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────────────────────────
   HOME PAGE
───────────────────────────────────────────────────────────── */
.home-page { background: var(--bg0); min-height: 100vh; overflow-x: clip; }   /* clip, not auto: a scroll box here would stop the navbar sticking */
html.home-html, body.home-body { overflow: auto; height: auto; }

/* Site Navbar */
.site-nav {
  background: rgba(11,11,30,.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 60px;
}
.nav-left { display: flex; align-items: center; gap: 32px; }
.nav-logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 500;
}
.nav-logo-icon {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.nav-logo strong { font-weight: 800; }
.nav-links { display: flex; gap: 6px; }
.nav-link { font-size: 13.5px; color: var(--txt2); padding: 6px 10px; border-radius: 6px; transition: color 0.12s, background 0.12s; }
.nav-link:hover { color: var(--txt); background: var(--bg2); }
.nav-link-special { color: var(--purple-lt); }
.nav-link-admin { color: var(--orange); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-user { display: flex; align-items: center; gap: 10px; }
.nav-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 700;
}
.nav-signout { font-size: 13px; color: var(--txt3); transition: color 0.12s; }
.nav-signout:hover { color: var(--red); }
.nav-login { font-size: 13.5px; color: var(--txt2); padding: 7px 14px; border-radius: 7px; transition: color 0.12s; }
.nav-login:hover { color: var(--txt); }
.nav-signup {
  font-size: 13.5px; padding: 7px 16px; border-radius: 7px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff; font-weight: 600; transition: opacity 0.15s;
}
.nav-signup:hover { opacity: .88; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  padding: 80px 24px 72px;
  background: var(--bg0);
  background-image: radial-gradient(ellipse at 30% 50%, rgba(124,58,237,.18) 0%, transparent 60%),
                    radial-gradient(ellipse at 80% 20%, rgba(59,130,246,.1) 0%, transparent 50%);
}
.hero-bg-dots {
  position: absolute; inset: 0; opacity: .15;
  background-image: radial-gradient(circle, #7c3aed 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.hero-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 420px; gap: 48px; align-items: center;
}
.hero-eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--purple-lt); margin-bottom: 16px;
}
.hero-heading {
  font-size: 52px; font-weight: 800; line-height: 1.1;
  color: var(--txt); margin-bottom: 20px;
}
.hero-accent {
  background: linear-gradient(90deg, var(--purple-lt), var(--blue));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub { font-size: 17px; color: var(--txt2); line-height: 1.65; margin-bottom: 32px; max-width: 500px; }
.hero-ctas { display: flex; gap: 12px; margin-bottom: 36px; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; padding: 12px 24px; border-radius: 8px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff; font-size: 14.5px; font-weight: 600;
  transition: opacity .15s, transform .1s;
}
.btn-primary:hover { opacity: .88; transform: translateY(-1px); }
.btn-outline {
  display: inline-flex; align-items: center; padding: 12px 24px; border-radius: 8px;
  border: 1.5px solid var(--border2); color: var(--txt2);
  font-size: 14.5px; font-weight: 500; transition: border-color .15s, color .15s;
}
.btn-outline:hover { border-color: var(--purple); color: var(--txt); }
.hero-stats { display: flex; align-items: center; gap: 20px; }
.hero-stat { display: flex; flex-direction: column; }
.stat-num { font-size: 22px; font-weight: 800; color: var(--txt); }
.stat-label { font-size: 12px; color: var(--txt3); }
.hero-stat-div { width: 1px; height: 36px; background: var(--border2); }

/* Hero visual */
.hero-visual { display: flex; align-items: center; justify-content: center; }
.hero-card-stack { position: relative; width: 360px; height: 260px; }
.hero-card {
  position: absolute; background: var(--bg2); border: 1px solid var(--border2);
  border-radius: 12px; padding: 16px;
}
.hc-1 { top: 0; left: 0; width: 320px; }
.hc-2 { top: 120px; left: 40px; width: 300px; background: var(--bg3); }
.hc-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; }
.hc-dot-green { background: #10b981; }
.hc-dot-yellow { background: #eab308; }
.hc-dot-red { background: #ef4444; }
.hc-code { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.8; margin-top: 10px; color: var(--txt2); }
.hc-purple { color: var(--purple-lt); }
.hc-blue { color: var(--blue); }
.hc-green { color: var(--green); }
.hc-label { font-size: 12px; font-weight: 600; color: var(--txt2); margin-bottom: 10px; }
.hc-progress-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; color: var(--txt2); }
.hc-bar { flex: 1; height: 6px; background: var(--bg4); border-radius: 99px; overflow: hidden; }
.hc-fill { height: 100%; background: linear-gradient(90deg, var(--purple), var(--blue)); }

/* Sections */
.section-inner { max-width: 1200px; margin: 0 auto; padding: 72px 24px; }
.section-title { font-size: 34px; font-weight: 800; color: var(--txt); margin-bottom: 10px; }
.section-sub { font-size: 16px; color: var(--txt2); margin-bottom: 44px; }

/* Course cards (home) */
.courses-section { background: var(--bg1); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.courses-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.course-card-home {
  background: var(--bg2); border: 1px solid var(--border2); border-radius: 12px;
  padding: 20px; display: flex; flex-direction: column; gap: 12px;
  transition: border-color .15s, transform .15s;
  border-top: 3px solid var(--course-color, var(--purple));
}
.course-card-home:hover { border-color: var(--course-color, var(--purple)); transform: translateY(-2px); }
.course-card-home.course-card-featured { border-top-color: var(--course-color); background: linear-gradient(135deg, rgba(157,92,246,.08), var(--bg2)); }
.course-card-icon { font-size: 28px; }
.course-card-body { flex: 1; }
.course-card-title { font-size: 15px; font-weight: 700; color: var(--txt); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.course-card-desc { font-size: 12.5px; color: var(--txt2); line-height: 1.55; margin-bottom: 8px; }
.course-card-meta { font-size: 11.5px; color: var(--txt3); display: flex; gap: 8px; }
.meta-dot { color: var(--txt3); }
.featured-pill { font-size: 10px; padding: 2px 6px; background: rgba(157,92,246,.2); color: var(--purple-lt); border-radius: 4px; font-weight: 600; }
.course-card-link { font-size: 13px; font-weight: 600; color: var(--course-color, var(--purple-lt)); transition: opacity .12s; }
.course-card-link:hover { opacity: .75; }

/* Homepage hero slider */
.home-hero {
  position: relative;
  padding: 28px 24px 120px;
  overflow: hidden;
  background:
    radial-gradient(circle at top center, rgba(124, 58, 237, 0.14), transparent 42%),
    linear-gradient(180deg, #07070f 0%, #0b0b15 100%);
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.24;
  pointer-events: none;
}

.home-hero-shell {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
}

.home-hero-stage {
  position: relative;
  min-height: 720px;
}

.home-hero-slides {
  position: relative;
  min-height: 610px;
}

.home-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.01);
  transition: opacity 700ms ease, visibility 700ms ease, transform 700ms ease;
}

.home-hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.home-hero-image {
  position: relative;
  min-height: 610px;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #151522;
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

.home-hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.18) 34%, rgba(0, 0, 0, 0.02) 70%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.18));
  pointer-events: none;
}

.home-hero-photo {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 610px;
  object-fit: cover;
  object-position: center;
}

.home-hero-overlay {
  position: absolute;
  inset: 0;
  padding: 46px 44px 210px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}

.home-hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.home-hero-chip {
  display: inline-flex;
  align-items: center;
  min-height: 94px;
  padding: 14px 22px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  font-size: clamp(2.6rem, 6vw, 4.7rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.home-hero-chip-accent {
  color: var(--slide-accent, #a3ff2f);
  font-family: var(--font-mono);
  letter-spacing: -0.05em;
}

.home-hero-caption {
  margin-top: 22px;
  max-width: 470px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 17px;
  line-height: 1.65;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.24);
}

.home-hero-floating-card {
  position: absolute;
  left: 50%;
  bottom: -68px;
  transform: translateX(-50%);
  width: min(980px, calc(100% - 88px));
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 26px;
  padding: 26px 28px;
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.96);
  border: 2px solid rgba(163, 255, 47, 0.9);
  box-shadow: 0 28px 58px rgba(0, 0, 0, 0.44);
}

.home-hero-floating-kicker {
  margin: 0 0 10px;
  color: #9f9fb5;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.home-hero-floating-copy h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: clamp(1.8rem, 2.5vw, 2.35rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.home-hero-floating-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
  line-height: 1.65;
}

.home-hero-floating-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}

.home-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  transition: transform 160ms ease, opacity 160ms ease, border-color 160ms ease;
}

.home-hero-btn:hover {
  transform: translateY(-1px);
}

.home-hero-btn-primary {
  background: linear-gradient(135deg, #c6ff2e, #9df31d);
  color: #060606;
}

.home-hero-btn-primary:hover {
  opacity: 0.92;
}

.home-hero-btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.home-hero-btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

.home-hero-indicators {
  position: absolute;
  right: 24px;
  bottom: 18px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.home-hero-indicator {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: width 220ms ease, background 220ms ease;
}

.home-hero-indicator.is-active {
  width: 28px;
  background: #fff;
}

/* Features */
.features-section { background: var(--bg0); }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.feature-icon { font-size: 28px; margin-bottom: 12px; }
.feature-card h3 { font-size: 15px; font-weight: 700; color: var(--txt); margin-bottom: 8px; }
.feature-card p { font-size: 13px; color: var(--txt2); line-height: 1.6; }

/* CTA */
.cta-section { background: var(--bg1); border-top: 1px solid var(--border); }
.cta-inner { text-align: center; }
.cta-inner h2 { font-size: 30px; font-weight: 800; color: var(--txt); margin-bottom: 12px; }
.cta-inner p { font-size: 15px; color: var(--txt2); margin-bottom: 28px; }
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Footer */
.site-footer { background: var(--bg1); border-top: 1px solid var(--border); padding: 48px 24px 0; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 2fr; gap: 48px; padding-bottom: 40px; }
.footer-logo { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 16px; font-weight: 500; }
.footer-logo strong { font-weight: 800; }
.footer-logo-icon { width: 26px; height: 26px; background: linear-gradient(135deg, var(--purple), var(--blue)); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #fff; }
.footer-tagline { font-size: 13px; color: var(--txt2); }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-col-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--txt3); margin-bottom: 12px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { font-size: 13.5px; color: var(--txt2); transition: color .12s; }
.footer-col a:hover { color: var(--txt); }
.footer-bottom { border-top: 1px solid var(--border); padding: 18px 0; text-align: center; }
.footer-bottom p { font-size: 12.5px; color: var(--txt3); max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ─────────────────────────────────────────────────────────────
   DASHBOARD
───────────────────────────────────────────────────────────── */
.dash-page { background: var(--bg0); min-height: 100vh; display: flex; flex-direction: column; }
.dash-body { flex: 1; max-width: 1200px; margin: 0 auto; padding: 32px 24px; width: 100%; }

.dash-welcome {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px;
  margin-bottom: 36px;
}
.dash-greeting { font-size: 24px; font-weight: 700; color: var(--txt); margin-bottom: 6px; }
.dash-greeting span { color: var(--purple-lt); }
.dash-sub { font-size: 14px; color: var(--txt2); }

.score-card {
  background: var(--bg2); border: 1px solid var(--border2); border-radius: 12px;
  padding: 16px 24px; text-align: center; flex-shrink: 0;
}
.dash-score-card {
  background: linear-gradient(135deg, rgba(124,58,237,.15), rgba(59,130,246,.1));
  border: 1px solid rgba(124,58,237,.3); border-radius: 12px;
  padding: 16px 24px; text-align: center; flex-shrink: 0;
}
.score-num { font-size: 32px; font-weight: 800; color: var(--purple-lt); }
.score-label { font-size: 13px; font-weight: 600; color: var(--txt); }
.score-sub { font-size: 12px; color: var(--txt3); margin-top: 2px; }

.dash-section { margin-bottom: 40px; }
.dash-section-title { font-size: 18px; font-weight: 700; color: var(--txt); margin-bottom: 16px; }

/* Featured course card */
.featured-course-card {
  background: var(--bg1); border: 1px solid var(--border2); border-radius: 14px;
  padding: 24px; display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: start;
  border-left: 4px solid var(--purple);
}
.fc-icon { font-size: 40px; flex-shrink: 0; }
.fc-tag { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--purple-lt); margin-bottom: 4px; }
.fc-title { font-size: 18px; font-weight: 700; color: var(--txt); margin-bottom: 6px; }
.fc-desc { font-size: 13px; color: var(--txt2); line-height: 1.6; margin-bottom: 14px; }
.fc-stats { display: flex; align-items: center; gap: 16px; }
.fc-stat { display: flex; align-items: baseline; gap: 4px; }
.fc-stat-num { font-size: 20px; font-weight: 700; color: var(--txt); }
.fc-stat-label { font-size: 12px; color: var(--txt3); }
.fc-progress-wrap { display: flex; align-items: center; gap: 8px; }
.fc-progress-bar { width: 140px; height: 6px; background: var(--bg4); border-radius: 99px; overflow: hidden; }
.fc-progress-fill { height: 100%; background: linear-gradient(90deg, var(--purple), var(--blue)); transition: width .5s ease; }
.fc-pct { font-size: 12px; color: var(--txt2); }
.fc-action { flex-shrink: 0; }
.fc-btn {
  display: inline-block; padding: 10px 20px; border-radius: 8px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: opacity .15s;
}
.fc-btn:hover { opacity: .88; }

/* Dashboard course cards */
.dash-courses-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dash-course-card {
  background: var(--bg1); border: 1px solid var(--border2); border-radius: 14px;
  padding: 20px; display: flex; flex-direction: column; gap: 12px;
  transition: border-color .15s;
}
.dash-course-card:hover { border-color: var(--c, var(--purple)); }
.dcc-header { display: flex; align-items: center; gap: 12px; }
.dcc-icon { font-size: 24px; flex-shrink: 0; }
.dcc-title-wrap { flex: 1; }
.dcc-title { font-size: 14px; font-weight: 700; color: var(--txt); }
.dcc-count { font-size: 12px; color: var(--txt3); margin-top: 2px; }
.dcc-pct { font-size: 16px; font-weight: 700; flex-shrink: 0; }
.dcc-progress { }
.dcc-bar { height: 5px; background: var(--bg4); border-radius: 99px; overflow: hidden; }
.dcc-fill { height: 100%; border-radius: 99px; transition: width .5s ease; }
.dcc-desc { font-size: 12.5px; color: var(--txt2); line-height: 1.55; flex: 1; }
.dcc-actions { display: flex; gap: 8px; margin-top: auto; }
.dcc-btn-outline { padding: 7px 12px; border-radius: 7px; border: 1px solid var(--border2); color: var(--txt2); font-size: 12.5px; transition: border-color .12s, color .12s; }
.dcc-btn-outline:hover { border-color: var(--c, var(--purple)); color: var(--txt); }
.dcc-btn-primary { flex: 1; padding: 7px; border-radius: 7px; color: #fff; font-size: 12.5px; font-weight: 600; text-align: center; transition: opacity .15s; }
.dcc-btn-primary:hover { opacity: .88; }

/* ─────────────────────────────────────────────────────────────
   COURSE DETAIL PAGE
───────────────────────────────────────────────────────────── */
.course-detail-page { background: var(--bg0); min-height: 100vh; }

.course-hero {
  background: linear-gradient(135deg, var(--bg1), var(--bg0));
  border-bottom: 1px solid var(--border);
  padding: 48px 24px;
  border-top: 3px solid var(--course-color, var(--purple));
}
.course-hero-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: start;
}
.course-hero-icon { font-size: 48px; flex-shrink: 0; }
.course-hero-cat { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--txt3); margin-bottom: 8px; }
.course-hero-title { font-size: 28px; font-weight: 800; color: var(--txt); margin-bottom: 10px; }
.course-hero-desc { font-size: 14px; color: var(--txt2); line-height: 1.65; max-width: 560px; margin-bottom: 14px; }
.course-hero-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--txt2); }
.course-hero-action { display: flex; flex-direction: column; align-items: center; gap: 16px; flex-shrink: 0; }
.course-hero-ring { position: relative; width: 80px; height: 80px; }
.ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { stroke: var(--bg4); }
.ring-fill { stroke: var(--course-color, var(--purple)); stroke-linecap: round; transition: stroke-dashoffset .5s ease; }
.ring-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: var(--txt); }
.course-start-btn {
  padding: 10px 20px; border-radius: 8px; color: #fff;
  font-size: 14px; font-weight: 600; white-space: nowrap; transition: opacity .15s;
}
.course-start-btn:hover { opacity: .88; }

.course-lessons-section { padding: 40px 24px; }
.cls-inner { max-width: 900px; margin: 0 auto; }
.cls-title { font-size: 20px; font-weight: 700; color: var(--txt); margin-bottom: 4px; }
.cls-meta { font-size: 13px; color: var(--txt3); margin-bottom: 20px; }

.lessons-list { display: flex; flex-direction: column; gap: 8px; }
.lesson-row {
  display: grid; grid-template-columns: 40px 1fr auto auto;
  gap: 14px; align-items: center;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px;
  transition: border-color .15s;
}
.lesson-row:hover:not(.locked) { border-color: var(--border2); }
.lesson-row.locked { opacity: .55; }
.lesson-row.completed { border-left: 3px solid var(--green); }
.lesson-row.skipped { border-left: 3px solid var(--orange); }
.lesson-row.in_progress { border-left: 3px solid var(--blue); }
.lr-num { font-size: 14px; font-weight: 700; color: var(--txt3); text-align: center; }
.lr-title { font-size: 14px; font-weight: 600; color: var(--txt); margin-bottom: 2px; }
.lr-desc { font-size: 12px; color: var(--txt3); }
.lr-badge { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.badge-done   { background: rgba(16,185,129,.12); color: var(--green); }
.badge-skip   { background: rgba(245,158,11,.12); color: var(--orange); }
.badge-prog   { background: rgba(59,130,246,.12); color: var(--blue); }
.badge-new    { background: var(--bg4); color: var(--txt3); }
.badge-locked { background: var(--bg4); color: var(--txt3); }
.lr-btn { font-size: 12.5px; font-weight: 600; padding: 6px 14px; border-radius: 7px; background: var(--bg3); color: var(--txt2); border: 1px solid var(--border2); transition: background .12s, color .12s; }
.lr-btn:hover { background: var(--bg4); color: var(--txt); }
.lr-locked-btn { font-size: 12.5px; color: var(--txt3); padding: 6px 14px; }

/* Lesson text content (no image) */
.lesson-text-card {
  background: var(--bg2); border: 1px solid var(--border2); border-radius: 14px; padding: 28px 32px;
}
.lesson-text-title { font-size: 22px; font-weight: 800; color: var(--txt); margin-bottom: 16px; }
.lesson-text-body { font-size: 15px; color: var(--txt2); line-height: 1.8; }

.back-to-dash { display: block; text-align: center; font-size: 12.5px; color: var(--txt3); padding: 8px; border-radius: 7px; margin-top: 4px; transition: color .12s, background .12s; }
.back-to-dash:hover { color: var(--txt); background: var(--bg2); }
.breadcrumb-link { color: var(--txt2); transition: color .12s; }
.breadcrumb-link:hover { color: var(--txt); }

/* ─────────────────────────────────────────────────────────────
   ADMIN
───────────────────────────────────────────────────────────── */
.admin-body { background: var(--bg0); color: var(--txt); margin: 0; overflow: auto; height: auto; }
.admin-nav {
  background: var(--bg1); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.admin-nav-inner {
  max-width: 1400px; margin: 0 auto; padding: 0 24px; height: 54px;
  display: flex; align-items: center; justify-content: space-between;
}
.admin-nav-left, .admin-nav-right { display: flex; align-items: center; gap: 8px; }
.admin-logo { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--txt); margin-right: 16px; }
.admin-badge { font-size: 10px; font-weight: 700; padding: 2px 7px; background: rgba(245,158,11,.15); color: var(--orange); border-radius: 4px; }
.admin-nav-link { font-size: 13px; color: var(--txt2); padding: 6px 10px; border-radius: 6px; transition: color .12s, background .12s; }
.admin-nav-link:hover { color: var(--txt); background: var(--bg2); }

.admin-main { max-width: 1400px; margin: 0 auto; padding: 32px 24px; }
.admin-page { }
.admin-page-title { font-size: 22px; font-weight: 800; color: var(--txt); margin-bottom: 24px; }

.admin-stats-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 28px; }
.admin-stat-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px; text-align: center;
}
.admin-stat-card.asc-green { border-color: rgba(16,185,129,.3); }
.asc-icon { font-size: 20px; margin-bottom: 6px; }
.asc-num { font-size: 24px; font-weight: 800; color: var(--txt); }
.asc-label { font-size: 11.5px; color: var(--txt3); margin-top: 2px; }

.admin-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.admin-card { background: var(--bg1); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.admin-card-title { font-size: 15px; font-weight: 700; color: var(--txt); margin-bottom: 16px; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--txt3); padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.admin-table td { padding: 10px 10px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--txt2); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-link { color: var(--purple-lt); font-weight: 500; transition: opacity .12s; }
.admin-link:hover { opacity: .75; }

.badge-green  { background: rgba(16,185,129,.12); color: var(--green);   padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.badge-red    { background: rgba(239,68,68,.1);   color: #f87171;        padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.badge-yellow { background: rgba(245,158,11,.12); color: var(--orange);  padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.badge-blue   { background: rgba(59,130,246,.12); color: var(--blue);    padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.badge-purple { background: rgba(124,58,237,.15); color: var(--purple-lt); padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; }

/* Home/Dashboard responsive */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .hero-heading { font-size: 38px; }
  .home-hero { padding: 20px 18px 56px; }
  .home-hero-stage { min-height: auto; }
  .home-hero-slides,
  .home-hero-image,
  .home-hero-photo { min-height: 520px; }
  .home-hero-overlay { padding: 30px 26px 44px; }
  .home-hero-chip {
    min-height: 78px;
    padding: 12px 18px;
    font-size: clamp(2rem, 7vw, 3.7rem);
  }
  .home-hero-caption {
    max-width: 380px;
    font-size: 15px;
  }
  .home-hero-floating-card {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 18px;
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px 20px;
  }
  .home-hero-indicators {
    position: static;
    justify-content: center;
    margin-top: 16px;
  }
  .courses-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
  .dash-courses-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-course-card { grid-template-columns: auto 1fr; }
  .fc-action { grid-column: 1 / -1; }
  .admin-stats-grid { grid-template-columns: repeat(3, 1fr); }
  .admin-two-col { grid-template-columns: 1fr; }
  .course-hero-inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .home-hero { padding: 16px 12px 44px; }
  .home-hero-slides,
  .home-hero-image,
  .home-hero-photo { min-height: 440px; }
  .home-hero-overlay { padding: 22px 16px 34px; }
  .home-hero-copy { gap: 10px; }
  .home-hero-chip {
    min-height: 64px;
    border-radius: 10px;
    padding: 10px 14px 9px;
    font-size: clamp(1.5rem, 8.5vw, 2.7rem);
  }
  .home-hero-caption {
    margin-top: 16px;
    max-width: 290px;
    font-size: 13.5px;
    line-height: 1.55;
  }
  .home-hero-floating-card {
    border-radius: 18px;
    padding: 18px 16px;
  }
  .home-hero-floating-copy h2 { font-size: 1.52rem; }
  .home-hero-floating-copy p { font-size: 13.5px; }
  .home-hero-btn {
    min-height: 50px;
    font-size: 14px;
  }
  .courses-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .dash-courses-grid { grid-template-columns: 1fr; }
  .dash-welcome { flex-direction: column; }
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────────────────────────
   RICH LESSON CONTENT
───────────────────────────────────────────────────────────── */
.lesson-rich-body {
  background: var(--bg1);
  border: 1px solid var(--border2);
  border-radius: 14px;
  padding: 28px 32px;
  margin-bottom: 20px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--txt2);
}

.lesson-rich-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--txt);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

/* Sections inside rich body */
.lesson-rich-body .lc-intro {
  margin-bottom: 24px;
  font-size: 15px;
  color: var(--txt);
  line-height: 1.7;
}

.lesson-rich-body .lc-section {
  margin-bottom: 28px;
}

.lesson-rich-body .lc-section h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--txt);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lesson-rich-body .lc-section h2::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 16px;
  background: var(--purple);
  border-radius: 2px;
  flex-shrink: 0;
}

/* Code blocks */
.lc-code-block {
  background: #0d0d1f;
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 16px 18px;
  margin: 12px 0;
  overflow-x: auto;
}

.lc-code-block pre {
  margin: 0;
  font-family: var(--font-mono, 'Fira Code', monospace);
  font-size: 13px;
  line-height: 1.7;
  color: #a78bfa;
  white-space: pre;
}

.lc-code-block code {
  font-family: inherit;
  color: #a78bfa;
}

/* Inline code */
.lesson-rich-body code {
  background: rgba(124,58,237,.15);
  color: #c4b5fd;
  font-family: var(--font-mono, 'Fira Code', monospace);
  font-size: 12.5px;
  padding: 1px 5px;
  border-radius: 4px;
}

/* Lists */
.lc-list {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.lc-list li {
  padding-left: 20px;
  position: relative;
  color: var(--txt2);
}

.lc-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--purple);
  font-size: 12px;
}

.lc-list-check li::before {
  content: '✓';
  color: var(--green);
}

/* Tables */
.lc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 8px 0;
}

.lc-table th {
  background: rgba(124,58,237,.15);
  color: var(--purple-lt);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border2);
}

.lc-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(37,37,69,.6);
  color: var(--txt2);
  vertical-align: top;
}

.lc-table tr:last-child td { border-bottom: none; }
.lc-table tr:hover td { background: rgba(124,58,237,.04); }
.lc-table td code { background: rgba(124,58,237,.15); color: #c4b5fd; padding: 1px 5px; border-radius: 3px; font-size: 12px; }

/* Tip box */
.lc-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(124,58,237,.08);
  border: 1px solid rgba(124,58,237,.25);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--txt2);
  line-height: 1.55;
}

.lc-tip-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.lc-tip p { margin: 0; }
.lc-tip strong { color: var(--txt); }

/* Flow diagram */
.lc-flow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.lc-flow-step {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--txt);
  text-align: center;
}

.lc-flow-step small { display: block; font-size: 11px; color: var(--txt3); font-weight: 400; margin-top: 2px; }
.lc-flow-arrow { color: var(--purple-lt); font-size: 18px; flex-shrink: 0; }

/* Two columns */
.lc-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 8px 0; }
.lc-col-label { font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.lc-bad { color: var(--red); }
.lc-good { color: var(--green); }

/* Box model diagram */
.lc-box-model {
  display: flex; align-items: center; justify-content: center;
  padding: 12px; margin: 12px 0;
}
.lc-bm-margin { background: rgba(239,68,68,.1); border: 2px dashed rgba(239,68,68,.4); border-radius: 8px; padding: 16px; display: flex; align-items: center; justify-content: center; position: relative; }
.lc-bm-border { background: rgba(245,158,11,.1); border: 2px dashed rgba(245,158,11,.4); border-radius: 6px; padding: 14px; display: flex; align-items: center; justify-content: center; }
.lc-bm-padding { background: rgba(16,185,129,.1); border: 2px dashed rgba(16,185,129,.4); border-radius: 4px; padding: 12px; display: flex; align-items: center; justify-content: center; }
.lc-bm-content { background: rgba(124,58,237,.25); border-radius: 4px; padding: 10px 20px; font-size: 13px; font-weight: 700; color: var(--txt); }
.lc-bm-margin > span, .lc-bm-border > span, .lc-bm-padding > span { position: absolute; top: 4px; left: 8px; font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--txt3); }

/* Tag anatomy */
.lc-anatomy { background: var(--bg3); border-radius: 8px; padding: 16px; margin: 12px 0; text-align: center; }
.lc-anatomy-row { display: flex; align-items: center; justify-content: center; gap: 4px; font-family: var(--font-mono, monospace); font-size: 16px; margin-bottom: 6px; }
.lc-tag-open  { color: var(--blue); }
.lc-tag-close { color: var(--blue); }
.lc-tag-content { color: var(--green); padding: 0 4px; }
.lc-anatomy-labels { display: flex; justify-content: center; gap: 48px; font-size: 11px; color: var(--txt3); }

/* ─────────────────────────────────────────────────────────────
   LIVE CODE EDITOR
───────────────────────────────────────────────────────────── */
.live-editor {
  background: var(--bg1);
  border: 1px solid var(--border2);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 20px;
}

.le-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}

.le-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--txt2);
}

.le-badge {
  font-size: 10px;
  padding: 2px 7px;
  background: rgba(16,185,129,.12);
  color: var(--green);
  border-radius: 99px;
  font-weight: 600;
  letter-spacing: .03em;
}

.le-actions { display: flex; gap: 6px; }

.le-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity .15s;
}

.le-run   { background: var(--green); color: #fff; }
.le-run:hover { opacity: .85; }
.le-reset { background: var(--bg3); color: var(--txt2); border: 1px solid var(--border2); }
.le-reset:hover { background: var(--bg4); }

.le-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 420px;
}

.le-editor-pane {
  display: flex;
  border-right: 1px solid var(--border);
  background: #0a0a18;
  overflow: hidden;
}

.le-line-nums {
  padding: 14px 8px;
  background: var(--bg1);
  color: var(--txt3);
  font-family: var(--font-mono, 'Fira Code', monospace);
  font-size: 12.5px;
  line-height: 1.65;
  text-align: right;
  user-select: none;
  min-width: 36px;
  overflow: hidden;
  flex-shrink: 0;
  white-space: pre;
  border-right: 1px solid var(--border);
}

.le-textarea {
  flex: 1;
  resize: none;
  border: none;
  outline: none;
  background: #0a0a18;
  color: #a78bfa;
  font-family: var(--font-mono, 'Fira Code', monospace);
  font-size: 12.5px;
  line-height: 1.65;
  padding: 14px;
  white-space: pre;
  overflow: auto;
  caret-color: var(--purple-lt);
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}

.le-preview-pane {
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
}

.le-preview-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.le-preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.le-dot-r { background: #ef4444; }
.le-dot-y { background: #f59e0b; }
.le-dot-g { background: #10b981; }
.le-preview-label { font-size: 11px; color: #6b7280; margin-left: 4px; }

.le-iframe {
  flex: 1;
  border: none;
  width: 100%;
}

/* Mobile: stack editor above preview */
@media (max-width: 768px) {
  .le-body {
    grid-template-columns: 1fr;
    height: auto;
  }
  .le-editor-pane { height: 280px; border-right: none; border-bottom: 1px solid var(--border); }
  .le-preview-pane { height: 280px; }
  .lc-two-col { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────────────────────────
   CONSOLE PANE (JS & Python code editor output)
───────────────────────────────────────────────────────────── */
.le-console-pane {
  display: flex;
  flex-direction: column;
  background: #0a0a18;
  overflow: hidden;
  border-left: 1px solid var(--border);
}

.le-console-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: #111128;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.le-console-dots { display: flex; gap: 5px; }

.le-console-hint {
  margin-left: auto;
  font-size: 11px;
  color: var(--txt3);
  font-style: italic;
}

.le-console-iframe {
  flex: 1;
  border: none;
  width: 100%;
  background: #0a0a18;
}

/* Badge variants */
.le-badge-yellow {
  background: rgba(234,179,8,.12);
  color: #fbbf24;
}

.le-badge-blue {
  background: rgba(16,185,129,.12);
  color: var(--green);
}

/* Textarea color per language */
.le-textarea[data-mode="javascript"] { color: #fbbf24; }
.le-textarea[data-mode="python"]     { color: #60a5fa; }

/* Mobile: stack editor + console */
@media (max-width: 768px) {
  .le-console-pane {
    border-left: none;
    border-top: 1px solid var(--border);
    height: 240px;
  }
}

/* Ruby badge */
.le-badge-ruby { background: rgba(220,38,38,.15); color: #f87171; }
.le-badge-java { background: rgba(249,115,22,.15); color: #fb923c; }
.le-badge-php { background: rgba(168,85,247,.15); color: #c084fc; }
.le-badge-sql { background: rgba(14,165,233,.15); color: #38bdf8; }
.le-badge-mysql { background: rgba(251,146,60,.15); color: #fb923c; }

/* CoffeeBean AI full-screen Try-It editor */
.editor-body {
  min-height: 100dvh;
  overflow: auto;
  background:
    radial-gradient(circle at 12% 8%, rgba(139, 92, 246, 0.2), transparent 30%),
    radial-gradient(circle at 92% 14%, rgba(66, 200, 255, 0.16), transparent 34%),
    #060913;
}

.editor-page {
  min-height: 100dvh;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
}

.editor-shell-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 64px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(8, 11, 24, 0.92);
  backdrop-filter: blur(18px);
}

.editor-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
}

.editor-brand__icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #7c3aed, #3b82f6);
  box-shadow: 0 0 26px rgba(124, 58, 237, 0.35);
}

.editor-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-nav a {
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.editor-nav a:hover {
  color: #fff;
  border-color: rgba(139, 92, 246, 0.45);
  background: rgba(139, 92, 246, 0.12);
}

.try-editor {
  flex: 1;
  min-height: calc(100dvh - 64px);
  display: grid;
  grid-template-columns: minmax(440px, 0.92fr) minmax(520px, 1.08fr);
  gap: 16px;
  padding: 16px;
  width: 100%;
  max-width: none;
  margin: 0;
  overflow: visible;
}

.try-editor__left,
.try-editor__right {
  min-height: 0;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: rgba(13, 18, 34, 0.82);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.try-editor__left {
  max-height: calc(100dvh - 96px);
  overflow-y: auto;
  padding: 16px;
  overscroll-behavior: contain;
  scrollbar-color: rgba(139, 92, 246, 0.8) rgba(15, 23, 42, 0.8);
}

.try-editor__right {
  max-height: calc(100dvh - 96px);
  padding: 14px;
  display: flex;
  overflow: hidden;
}

.try-editor__left::-webkit-scrollbar,
.code-panel textarea::-webkit-scrollbar {
  width: 10px;
}

.try-editor__left::-webkit-scrollbar-track,
.code-panel textarea::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.86);
  border-radius: 999px;
}

.try-editor__left::-webkit-scrollbar-thumb,
.code-panel textarea::-webkit-scrollbar-thumb {
  border: 2px solid rgba(15, 23, 42, 0.86);
  border-radius: 999px;
  background: linear-gradient(180deg, #8b5cf6, #42c8ff);
}

.try-editor__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.editor-page-fields {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(160px, 0.8fr);
  gap: 12px;
  min-width: 0;
}

.editor-page-fields label {
  display: grid;
  gap: 6px;
  color: #dbeafe;
  font-size: 12px;
  font-weight: 900;
}

.editor-page-fields input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  padding: 11px 12px;
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.78);
  outline: none;
}

.editor-page-fields input:focus {
  border-color: rgba(66, 200, 255, 0.58);
  box-shadow: 0 0 0 3px rgba(66, 200, 255, 0.12);
}

.try-editor__actions {
  display: flex;
  gap: 10px;
}

.try-btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.try-btn--primary {
  color: #07110b;
  background: linear-gradient(135deg, #a3ff2f, #42c8ff);
}

.try-btn--ghost {
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.06);
}

.try-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.editor-upload-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  margin-bottom: 10px;
  border-radius: 18px;
  border: 1px solid rgba(66, 200, 255, 0.22);
  background: linear-gradient(135deg, rgba(66, 200, 255, 0.1), rgba(139, 92, 246, 0.1));
}

.editor-upload-card strong,
.editor-upload-card span {
  display: block;
}

.editor-upload-card span {
  margin-top: 3px;
  color: #94a3b8;
  font-size: 13px;
}

.editor-upload-button {
  flex: 0 0 auto;
  position: relative;
  overflow: hidden;
  padding: 11px 14px;
  border-radius: 12px;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, #7c3aed, #3b82f6);
}

.editor-upload-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.editor-upload-status {
  min-height: 22px;
  color: #a3ff2f;
  font-size: 13px;
  font-weight: 700;
  margin: 8px 0;
}

.editor-upload-status.is-error {
  color: #fb7185;
}

.editor-upload-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.editor-upload-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.72);
}

.editor-upload-row img {
  width: 52px;
  height: 42px;
  object-fit: cover;
  border-radius: 10px;
  background: #020617;
}

.editor-upload-row strong,
.editor-upload-row code {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-upload-row code {
  color: #7dd3fc;
  font-size: 12px;
}

.editor-upload-row button {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  padding: 8px 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
}

.editor-upload-row__delete {
  border-color: rgba(248, 113, 113, 0.35) !important;
  color: #fecaca !important;
  background: rgba(127, 29, 29, 0.2) !important;
}

.editor-upload-empty {
  padding: 12px 14px;
  border: 1px dashed rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.46);
  font-size: 13px;
  line-height: 1.45;
}

.editor-publish-meta {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.try-btn--publish {
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
}

.editor-publish-status {
  color: #a3ff2f;
  font-size: 13px;
  font-weight: 800;
}

.editor-publish-status:empty {
  display: none;
}

.editor-publish-status.is-error {
  color: #fb7185;
}

.editor-public-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(66, 200, 255, 0.24);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.62);
}

.editor-public-link a {
  overflow: hidden;
  color: #7dd3fc;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-public-link button {
  border: 0;
  border-radius: 10px;
  padding: 9px 12px;
  color: #07110b;
  background: #a3ff2f;
  font-weight: 900;
}

.code-panels {
  display: grid;
  gap: 12px;
}

.code-panel {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #050816;
}

.code-panel__header,
.preview-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 13px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.code-panel__header span,
.preview-panel__header span {
  font-weight: 900;
}

.code-panel__header small,
.preview-panel__header small {
  color: #94a3b8;
}

.code-panel--html .code-panel__header span { color: #fb7185; }
.code-panel--css .code-panel__header span { color: #42c8ff; }
.code-panel--js .code-panel__header span { color: #facc15; }

.code-panel textarea {
  width: 100%;
  height: clamp(170px, 22vh, 245px);
  min-height: 170px;
  resize: vertical;
  border: 0;
  outline: 0;
  padding: 14px;
  color: #dbeafe;
  background: #050816;
  font: 14px/1.6 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  tab-size: 2;
}

.preview-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #fff;
}

.preview-panel__header {
  color: #111827;
  background: #f8fafc;
  border-bottom-color: #e5e7eb;
}

.preview-panel iframe {
  flex: 1;
  width: 100%;
  min-height: 0;
  height: 100%;
  border: 0;
  background: #fff;
}

@media (max-width: 1080px) {
  .editor-body {
    overflow: auto;
  }

  .try-editor {
    grid-template-columns: 1fr;
    min-height: auto;
    overflow: visible;
  }

  .try-editor__left,
  .try-editor__right {
    max-height: none;
    overflow: visible;
  }

  .try-editor__right {
    min-height: 680px;
  }

  .preview-panel iframe {
    min-height: 560px;
    height: 560px;
  }
}

@media (max-width: 640px) {
  .editor-shell-header,
  .try-editor__toolbar,
  .editor-upload-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .editor-shell-header {
    height: auto;
    gap: 12px;
    padding: 14px;
  }

  .editor-nav {
    width: 100%;
    overflow-x: auto;
  }

  .try-editor {
    padding: 10px;
  }

  .editor-page-fields,
  .editor-public-link {
    grid-template-columns: 1fr;
  }

  .editor-public-link button {
    width: 100%;
  }

  .try-editor__left,
  .try-editor__right {
    border-radius: 18px;
  }

  .try-editor__right {
    min-height: 560px;
  }

  .preview-panel iframe {
    min-height: 520px;
    height: 520px;
  }

  .code-panel textarea {
    height: 220px;
  }

  .try-editor__actions,
  .editor-upload-button {
    width: 100%;
  }

  .try-btn {
    flex: 1;
  }

  .editor-upload-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .editor-upload-row button {
    grid-column: span 1;
  }
}
.le-badge-postgresql { background: rgba(51,103,145,.18); color: #5b9bd5; }
.le-badge-bootstrap  { background: rgba(121,82,179,.18); color: #a78bda; }
.le-badge-react      { background: rgba(97,218,251,.12); color: #61dafb; }
.le-badge-pandas     { background: rgba(21,4,88,.35);   color: #e879f9; }
.le-badge-numpy      { background: rgba(77,171,207,.15); color: #4dabcf; }
.le-badge-typescript { background: rgba(49,120,198,.18); color: #60a5fa; }
.le-badge-ai         { background: rgba(99,102,241,.18); color: #a5b4fc; }

.le-badge-django { background: rgba(22,163,74,.15); color: #4ade80; }
.le-badge-deep-learning { background: rgba(139,92,246,.18); color: #c4b5fd; }
.le-badge-nodejs { background: rgba(34,197,94,.18); color: #86efac; }
.le-badge-git { background: rgba(249,115,22,.18); color: #fdba74; }
.le-badge-github { background: rgba(99,102,241,.18); color: #c7d2fe; }

.lc-topic-image-wrap {
  margin: 18px 0 22px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.92), rgba(8, 12, 26, 0.98));
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.35);
}

.lc-topic-image {
  display: block;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  border-radius: 14px;
}

.lc-topic-caption {
  margin: 12px 0 0;
  color: var(--txt3);
  font-size: 13px;
  text-align: center;
}

.lc-lesson-section {
  margin: 8px 0 0;
  color: #c4b5fd;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.course-section-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 8px;
  color: #c4b5fd;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.course-section-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.4), rgba(59, 130, 246, 0.06));
}

.course-section-divider-wide {
  margin: 18px 0 12px;
  padding-top: 6px;
}

/* Homepage hero redesign */
.home-page {
  background:
    radial-gradient(circle at top center, rgba(124, 58, 237, 0.12), transparent 34%),
    linear-gradient(180deg, #07070f 0%, #0b0b15 100%);
}

.home-hero {
  padding: 24px 18px 120px;
}

.home-hero-shell {
  position: relative;
  z-index: 1;
  max-width: 1540px;
  margin: 0 auto;
}

.home-hero-stage {
  position: relative;
  min-height: 860px;
}

.home-nav-hero {
  width: min(1540px, calc(100% - 36px));
  margin: 16px auto 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(5, 10, 22, 0.9);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.home-nav__brand-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.home-nav__logo {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--blue));
  box-shadow: 0 0 28px rgba(124, 58, 237, 0.3);
}

.home-nav__pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.category-pill {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 17, 30, 0.96);
  color: #eef2ff;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 1.02rem;
  font-weight: 700;
  transition: border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.category-pill.active {
  color: #c6ff2e;
  border-color: rgba(163, 255, 47, 0.35);
  box-shadow: inset 0 0 0 1px rgba(163, 255, 47, 0.14), 0 0 18px rgba(163, 255, 47, 0.08);
}

.home-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: #f8fafc;
  font-size: 1.02rem;
  font-weight: 600;
  text-decoration: none;
}

.home-solid-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, #7c5cff, #5c66ff);
  color: #fff;
  font-size: 1.02rem;
  font-weight: 700;
  text-decoration: none;
}

.hero-layout {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 168px;
  gap: 18px;
  align-items: start;
}

.hero-center-stage {
  position: relative;
  padding-bottom: 0;
}

.hero-stats-sidebar,
.hero-tutor-widget {
  background: rgba(8, 12, 26, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 28px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.3);
}

.hero-stats-sidebar {
  display: grid;
  gap: 0;
  overflow: hidden;
  padding: 18px 0;
  min-height: 600px;
}

.hero-stat-card {
  padding: 20px 14px;
  display: grid;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  justify-items: center;
  text-align: center;
}

.hero-stat-card:last-child {
  border-bottom: 0;
}

.hero-stat-icon {
  color: #9b6eff;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}

.hero-stat-card strong {
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
}

.hero-stat-card span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
}

.hero-image-shell {
  position: relative;
  min-height: 760px;
  border-radius: 36px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 16, 29, 0.92);
  box-shadow: 0 32px 72px rgba(0, 0, 0, 0.35);
}

.hero-slide {
  opacity: 0;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide-image {
  min-height: 760px;
}

.home-hero-image::after {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.56) 0%, rgba(0, 0, 0, 0.16) 48%, rgba(0, 0, 0, 0.04) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.14));
}

.hero-slide-overlay {
  padding: 124px 36px 220px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-copy-line {
  display: inline-flex;
  align-items: center;
  min-height: 70px;
  padding: 4px 18px 7px;
  border-radius: 14px;




  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  font-size: clamp(1.4rem, 3.2vw, 3.2rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.05em;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.3);
}

.hero-copy-line.accent {
  font-family: var(--font-mono);
}

.hero-slide-dots {
  z-index: 4;
}

.signup-card {
  top: auto;
  left: 8px;
  bottom: 88px;
  transform: none;
  width: min(980px, calc(100% - 44px));
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 26px;
  padding: 28px 32px;
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.96);
  border: 2px solid rgba(163, 255, 47, 0.9);
  box-shadow: 0 28px 58px rgba(0, 0, 0, 0.44);
}

.signup-card__eyebrow {
  color: #c6ff2e;
}

.signup-card__actions {
  justify-content: center;
}

.hero-cta {
  min-height: 60px;
  border-radius: 14px;
  font-size: 1rem;
}

.hero-cta--primary {
  background: linear-gradient(135deg, #c6ff2e, #9df31d);
  color: #060606;
}

.hero-cta--secondary {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.hero-tutor-widget {
  min-height: 600px;
  padding: 22px 14px 18px;
  display: flex;
  flex-direction: column;
}

.hero-tutor-widget__orb {
  width: 92px;
  height: 92px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  font-size: 2.9rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.45), rgba(77, 161, 255, 0.18));
  box-shadow: 0 0 36px rgba(124, 58, 237, 0.22);
}

.hero-tutor-widget h3 {
  margin: 0;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
}

.hero-tutor-widget__status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  color: #9eff4d;
  font-size: 1rem;
  font-weight: 700;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #7dff49;
  box-shadow: 0 0 12px rgba(125, 255, 73, 0.55);
}

.hero-tutor-widget p {
  margin: 14px 0 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.96rem;
  line-height: 1.45;
  text-align: center;
}

.hero-tutor-widget__prompts {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.tutor-prompt {
  display: grid;
  gap: 6px;
  padding: 14px 14px;
  border-radius: 16px;
  background: rgba(18, 24, 41, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  color: white;
}

.tutor-prompt strong {
  font-size: 1rem;
}

.tutor-prompt span {
  color: #ebeff9;
  font-size: 0.9rem;
}

.tutor-prompt.violet strong { color: #cc8eff; }
.tutor-prompt.green strong { color: #31e7bf; }
.tutor-prompt.amber strong { color: #ffd54a; }

.hero-cta--tutor {
  width: 100%;
  margin-top: auto;
  background: linear-gradient(135deg, #7359ff, #915cff);
  color: #fff;
}

@media (max-width: 1380px) {
  .home-nav-hero {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }
}

@media (max-width: 900px) {
  .home-nav-hero {
    width: calc(100% - 24px);
    gap: 16px;
  }

  .home-nav__pills {
    display: none !important;
  }

  .hero-layout {
    grid-template-columns: 1fr;
  }

  .hero-stats-sidebar {
    display: none !important;
  }

  .hero-tutor-widget {
    display: flex !important;
    width: min(100%, 360px);
    margin: 18px auto 0;
    min-height: auto;
    padding: 22px;
  }

  .hero-center-stage {
    padding-bottom: 0;
  }

  .hero-image-shell,
  .hero-slide-image {
    min-height: 520px;
  }

  .hero-slide-overlay {
    padding: 56px 22px 44px;
  }

  .hero-copy-line {
    min-height: 82px;
    font-size: clamp(2.1rem, 8vw, 4rem);
    padding: 12px 18px;
  }

  .signup-card,
  .home-hero-floating-card {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .hero-image-shell,
  .hero-slide-image {
    min-height: 420px;
    border-radius: 24px;
  }

  .hero-slide-overlay {
    padding: 28px 16px 70px;
  }

  .hero-copy-line {
    min-height: 62px;
    border-radius: 12px;
    font-size: clamp(1.6rem, 10vw, 2.6rem);
    padding: 10px 14px;
  }

  .hero-slide-dots {
    right: 16px;
  }

}

/* ── Card-based lesson layout (lc-header / lc-lead / lc-card / lc-code) ── */
.lesson-rich-body .lc-header { margin-bottom: 14px; }
/* The page already renders the lesson title above the body */
.lesson-rich-body .lc-header .lc-title { display: none; }
.lesson-rich-body .lc-badge { display: inline-block; margin-bottom: 4px; }

.lesson-rich-body .lc-lead {
  font-size: 15px;
  line-height: 1.7;
  color: var(--txt);
  margin-bottom: 22px;
}

.lesson-rich-body .lc-card {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 18px;
  color: var(--txt2);
  line-height: 1.65;
}
.lesson-rich-body .lc-card h2,
.lesson-rich-body .lc-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--txt);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lesson-rich-body .lc-card h2::before,
.lesson-rich-body .lc-card h3::before {
  content: '';
  width: 3px;
  height: 16px;
  background: var(--purple);
  border-radius: 2px;
  flex-shrink: 0;
}
.lesson-rich-body .lc-card h4 { font-size: 14px; color: var(--txt); margin: 14px 0 8px; }
.lesson-rich-body .lc-card p { margin: 0 0 10px; }
.lesson-rich-body .lc-card p:last-child { margin-bottom: 0; }
.lesson-rich-body .lc-card strong { color: var(--txt); }

.lesson-rich-body .lc-card--tip {
  background: rgba(124,58,237,.08);
  border-color: rgba(124,58,237,.25);
  font-size: 13.5px;
}

.lesson-rich-body .lc-code {
  background: #0d0d1f;
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 12px 0;
  overflow-x: auto;
  font-family: var(--font-mono, 'Fira Code', monospace);
  font-size: 13px;
  line-height: 1.7;
  color: #a78bfa;
  white-space: pre;
}
.lesson-rich-body .lc-code code { background: none; padding: 0; color: inherit; font-size: inherit; }

/* ── Lesson diagrams (inline SVG) ─────────────────────────────── */
.lesson-rich-body .lc-diagram {
  margin: 0 0 18px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(17,24,39,.92), rgba(8,12,26,.98));
  border: 1px solid rgba(139,92,246,.2);
  border-radius: 14px;
}
.lesson-rich-body .lc-diagram svg { display: block; width: 100%; height: auto; max-width: 760px; margin: 0 auto; }
.lesson-rich-body .lc-diagram figcaption { margin-top: 10px; color: var(--txt3); font-size: 13px; text-align: center; }
.le-badge-aad { background: rgba(14,165,233,.18); color: #7dd3fc; }

/* ── Interactive lesson widgets (sequence, sorter, quiz, flashcards, stepper) ── */
.lesson-rich-body .lcw {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 12px 0 4px;
}
.lesson-rich-body .lcw-prompt { color: var(--txt); font-weight: 600; margin: 0 0 12px; }
.lesson-rich-body .lcw-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.lesson-rich-body .lcw-btn {
  padding: 7px 14px; border-radius: 7px; font-size: 13px; font-weight: 600;
  background: var(--bg4); color: var(--txt); border: 1px solid var(--border2);
}
.lesson-rich-body .lcw-btn:hover:not(:disabled) { border-color: var(--purple-lt); }
.lesson-rich-body .lcw-btn:disabled { opacity: .45; cursor: default; }
.lesson-rich-body .lcw-btn-primary { background: linear-gradient(135deg, var(--purple), var(--blue)); border-color: transparent; color: #fff; }
.lesson-rich-body .lcw-btn-ghost { background: transparent; color: var(--txt2); }
.lesson-rich-body .lcw-btn:focus-visible,
.lesson-rich-body .lcw-chip:focus-visible,
.lesson-rich-body .lcw-zone:focus-visible,
.lesson-rich-body .lcw-flash:focus-visible,
.lesson-rich-body .lcw-move:focus-visible { outline: 2px solid var(--purple-lt); outline-offset: 2px; }
.lesson-rich-body .lcw-feedback { margin-top: 10px; font-size: 13.5px; min-height: 1px; }
.lesson-rich-body .lcw-feedback-ok  { color: var(--green); }
.lesson-rich-body .lcw-feedback-bad { color: var(--orange); }

/* Sequence (drag to order) */
.lesson-rich-body .lcw ol.lcw-seq,
.lesson-rich-body .lcw [data-sequence-target="list"] { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: seq; }
.lesson-rich-body .lcw-seq-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg1); border: 1px solid var(--border2); border-radius: 8px;
  padding: 9px 10px; color: var(--txt); cursor: grab; user-select: none; counter-increment: seq;
}
.lesson-rich-body .lcw-seq-item::before { content: counter(seq); min-width: 20px; color: var(--txt3); font-size: 12px; font-weight: 700; text-align: center; }
.lesson-rich-body .lcw-seq-text { flex: 1; }
.lesson-rich-body .lcw-handle { color: var(--txt3); letter-spacing: -2px; touch-action: none; cursor: grab; padding: 4px; }
.lesson-rich-body .lcw-moves { display: flex; gap: 4px; }
.lesson-rich-body .lcw-move { width: 26px; height: 26px; border-radius: 6px; background: var(--bg3); color: var(--txt2); font-size: 13px; }
.lesson-rich-body .lcw-dragging { opacity: .6; border-style: dashed; cursor: grabbing; }
.lesson-rich-body .lcw-ok  { border-color: rgba(16,185,129,.7) !important; background: rgba(16,185,129,.08) !important; }
.lesson-rich-body .lcw-bad { border-color: rgba(239,68,68,.7) !important;  background: rgba(239,68,68,.08) !important; }

/* Sorter (drag into buckets) */
.lesson-rich-body .lcw-buckets { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 12px; }
.lesson-rich-body .lcw-zone {
  background: var(--bg1); border: 2px dashed var(--border2); border-radius: 10px;
  padding: 10px; min-height: 90px; cursor: pointer; transition: border-color .15s;
}
.lesson-rich-body .lcw-zone-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--txt2); margin-bottom: 8px; }
.lesson-rich-body .lcw-zone-body { display: flex; flex-direction: column; gap: 6px; }
.lesson-rich-body .lcw-has-selection .lcw-zone { border-color: rgba(157,92,246,.6); }
.lesson-rich-body .lcw-zone.lcw-hover, .lesson-rich-body .lcw-pool.lcw-hover { border-color: var(--blue); background: rgba(59,130,246,.08); }
.lesson-rich-body .lcw-pool { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; margin: 0; min-height: 48px; border: 1px solid var(--border); border-radius: 10px; }
.lesson-rich-body .lcw-pool:empty::after { content: "All cards placed. Press Check."; color: var(--txt3); font-size: 13px; }
.lesson-rich-body .lcw-chip {
  list-style: none; background: var(--bg3); border: 1px solid var(--border2); border-radius: 8px;
  padding: 7px 10px; color: var(--txt); font-size: 13px; cursor: grab; user-select: none;
}
.lesson-rich-body .lcw-chip.lcw-selected { border-color: var(--purple-lt); box-shadow: 0 0 0 2px rgba(157,92,246,.35); }
.lesson-rich-body .lcw-why { display: block; margin-top: 4px; font-size: 12px; color: #fca5a5; }
.lcw-ghost {
  position: fixed; z-index: 1000; pointer-events: none; opacity: .9;
  background: var(--bg3); border: 1px solid var(--purple-lt); border-radius: 8px; padding: 7px 10px;
  color: var(--txt); font-size: 13px; list-style: none; box-shadow: 0 10px 24px rgba(0,0,0,.4);
}

/* Quiz */
.lesson-rich-body .lcw-q { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; background: var(--bg1); }
.lesson-rich-body .lcw-q > p { color: var(--txt); margin: 0 0 8px; }
.lesson-rich-body .lcw-q-num { display: inline-block; margin-right: 8px; padding: 1px 7px; border-radius: 5px; background: var(--bg4); font-size: 11px; font-weight: 700; color: var(--txt2); }
.lesson-rich-body .lcw-q-ok  { border-color: rgba(16,185,129,.55); }
.lesson-rich-body .lcw-q-bad { border-color: rgba(239,68,68,.55); }
.lesson-rich-body .lcw-opts { display: flex; flex-direction: column; gap: 6px; }
.lesson-rich-body .lcw-opt { display: flex; gap: 9px; align-items: flex-start; padding: 7px 9px; border-radius: 7px; border: 1px solid transparent; cursor: pointer; color: var(--txt2); }
.lesson-rich-body .lcw-opt:hover { background: var(--bg3); }
.lesson-rich-body .lcw-opt input { margin-top: 3px; accent-color: var(--purple-lt); }
.lesson-rich-body .lcw-opt-right { border-color: rgba(16,185,129,.6); color: var(--txt); background: rgba(16,185,129,.08); }
.lesson-rich-body .lcw-opt-wrong { border-color: rgba(239,68,68,.6); background: rgba(239,68,68,.08); }
.lesson-rich-body .lcw-explain { margin: 8px 0 0; padding: 8px 10px; border-radius: 6px; background: rgba(59,130,246,.08); color: var(--txt2); font-size: 13px; }
.lesson-rich-body .lcw-quiz-progress, .lesson-rich-body .lcw-quiz-best { font-size: 12.5px; color: var(--txt3); }
.lesson-rich-body .lcw-quiz-best { margin-left: auto; color: var(--green); }

/* Flashcards */
.lesson-rich-body .lcw-flash { position: relative; min-height: 150px; perspective: 900px; cursor: pointer; border-radius: 12px; }
.lesson-rich-body .lcw-flash-face {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 18px 22px; border-radius: 12px; backface-visibility: hidden; transition: transform .45s ease;
  font-size: 15px; line-height: 1.55;
}
.lesson-rich-body .lcw-flash-front { background: linear-gradient(135deg, rgba(124,58,237,.22), rgba(59,130,246,.16)); border: 1px solid rgba(157,92,246,.4); color: var(--txt); font-weight: 600; }
.lesson-rich-body .lcw-flash-back  { background: var(--bg1); border: 1px solid var(--border2); color: var(--txt2); transform: rotateY(180deg); }
.lesson-rich-body .lcw-flash.lcw-flipped .lcw-flash-front { transform: rotateY(180deg); }
.lesson-rich-body .lcw-flash.lcw-flipped .lcw-flash-back  { transform: rotateY(360deg); }
.lesson-rich-body .lcw-flash-count { margin-top: 8px; font-size: 12.5px; color: var(--txt3); }
@media (prefers-reduced-motion: reduce) { .lesson-rich-body .lcw-flash-face { transition: none; } }

/* Stepper (step-through timeline) */
.lesson-rich-body .lcw-timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--border2); display: flex; flex-direction: column; gap: 10px; }
.lesson-rich-body .lcw-step { position: relative; background: var(--bg1); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; color: var(--txt2); white-space: pre-wrap; font-size: 13.5px; }
.lesson-rich-body .lcw-step::before { content: ""; position: absolute; left: -23px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--step-c, var(--purple-lt)); box-shadow: 0 0 0 3px var(--bg2); }
.lesson-rich-body .lcw-step-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--step-c, var(--purple-lt)); margin-bottom: 4px; white-space: normal; }
.lesson-rich-body .lcw-step code { white-space: pre-wrap; }
.lesson-rich-body .lcw-step-user    { --step-c: #7dd3fc; }
.lesson-rich-body .lcw-step-thought { --step-c: #c4b5fd; }
.lesson-rich-body .lcw-step-tool    { --step-c: #fbbf24; font-family: var(--font-mono, 'Fira Code', monospace); font-size: 12.5px; }
.lesson-rich-body .lcw-step-result  { --step-c: #94a3b8; font-family: var(--font-mono, 'Fira Code', monospace); font-size: 12.5px; }
.lesson-rich-body .lcw-step-answer  { --step-c: #34d399; color: var(--txt); }
.lesson-rich-body .lcw-step-check   { --step-c: #34d399; }
.lesson-rich-body .lcw-step-warn    { --step-c: #f87171; border-color: rgba(239,68,68,.4); }
.lesson-rich-body .lcw-step-new { animation: lcw-pop .45s ease; }
@keyframes lcw-pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lesson-rich-body .lcw-step-new { animation: none; } }

@media (max-width: 640px) {
  .lesson-rich-body .lcw { padding: 14px 12px; }
  .lesson-rich-body .lcw-quiz-best { margin-left: 0; }
}

/* ── Vector widgets (similarity, vector-plot, search-compare, vector-lab) ── */
.le-badge-vdb { background: rgba(236,72,153,.18); color: #f9a8d4; }
.lesson-rich-body .lcw-input {
  background: var(--bg1); border: 1px solid var(--border2); border-radius: 7px; color: var(--txt);
  padding: 7px 10px; font-size: 13.5px; min-width: 0;
}
.lesson-rich-body .lcw-input:focus { outline: 2px solid var(--purple-lt); outline-offset: 1px; }
.lesson-rich-body textarea.lcw-input { width: 100%; resize: vertical; }
.lesson-rich-body .lcw-check { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--txt2); margin: 8px 0; }
.lesson-rich-body .lcw-btn-danger { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.5); color: #fca5a5; }
.lesson-rich-body .lcw-model-status { font-size: 12.5px; color: var(--txt3); margin-top: 8px; }
.lesson-rich-body .lcw-model-ready { color: var(--green); }
.lesson-rich-body .lcw-model-error { color: var(--red); }
.lesson-rich-body .lcw-heat { display: block; width: 100%; height: 22px; border-radius: 4px; margin: 6px 0; background: var(--bg0); }
.lesson-rich-body .lcw-busy { opacity: .75; pointer-events: none; }

.lesson-rich-body .lcw-sim-inputs { display: grid; gap: 8px; }
.lesson-rich-body .lcw-sim-inputs label { display: grid; gap: 4px; font-size: 12px; color: var(--txt3); }
.lesson-rich-body .lcw-presets { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.lesson-rich-body .lcw-sim-top { display: grid; grid-template-columns: auto minmax(160px, 240px) 1fr; gap: 16px; align-items: center; margin-top: 12px; }
.lesson-rich-body .lcw-sim-score span { display: block; font-size: 34px; font-weight: 800; color: var(--txt); line-height: 1; }
.lesson-rich-body .lcw-sim-score small { color: var(--txt3); font-size: 12px; }
.lesson-rich-body .lcw-sim-angle { width: 100%; height: auto; }
.lesson-rich-body .lcw-sim-verdict { color: var(--txt); font-weight: 600; margin: 0; }
.lesson-rich-body .lcw-sim-vec { margin-top: 10px; font-size: 13px; }
.lesson-rich-body .lcw-sim-vec code, .lesson-rich-body .lcw-lab-embed code { display: block; margin-top: 4px; font-size: 11.5px; color: var(--txt3); word-break: break-all; }

.lesson-rich-body .lcw-vp { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 16px; align-items: start; }
.lesson-rich-body .lcw-vp-plot { width: 100%; height: auto; background: var(--bg0); border-radius: 8px; touch-action: none; cursor: crosshair; }
.lesson-rich-body .lcw-vp-handle { cursor: grab; }
.lesson-rich-body .lcw-vp-table { margin: 0; }

.lesson-rich-body .lcw-sc-query { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lesson-rich-body .lcw-sc-query .lcw-input[data-role="query"] { flex: 1 1 220px; }
.lesson-rich-body .lcw-sc { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.lesson-rich-body .lcw-sc-panel { background: var(--bg1); border: 1px solid var(--border); border-radius: 8px; padding: 10px; min-width: 0; }
.lesson-rich-body .lcw-sc-controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; font-size: 12.5px; color: var(--txt3); }
.lesson-rich-body .lcw-sc-results { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.lesson-rich-body .lcw-sc-results li { padding: 4px 6px; border-radius: 6px; }
.lesson-rich-body .lcw-sc-diff { background: rgba(245,158,11,.12); outline: 1px solid rgba(245,158,11,.4); }
.lesson-rich-body .lcw-sc-score { display: inline-block; min-width: 64px; margin-right: 6px; font-family: var(--font-mono, monospace); font-size: 11.5px; color: #c4b5fd; }
.lesson-rich-body .lcw-sc-note { font-size: 12.5px; color: var(--txt3); margin: 8px 0 0; }

.lesson-rich-body .lcw-lab { border-left-color: #ec4899; }
.lesson-rich-body .lcw-lab-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; color: var(--txt); }
.lesson-rich-body .lcw-lab-usage { font-size: 12px; color: var(--txt3); }
.lesson-rich-body .lcw-lab-h { font-size: 13px; color: var(--txt); margin: 16px 0 8px; }
.lesson-rich-body .lcw-lab-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lesson-rich-body .lcw-lab-col { background: var(--bg1); border: 1px dashed var(--border2); border-radius: 8px; padding: 10px; font-size: 12.5px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.lesson-rich-body .lcw-lab-col.on { border-style: solid; border-color: rgba(16,185,129,.5); }
.lesson-rich-body .lcw-lab-col small { display: block; color: var(--txt3); }
.lesson-rich-body .lcw-lab-col code { font-size: 11px; color: var(--txt3); word-break: break-all; }
.lesson-rich-body .lcw-lab-points { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.lesson-rich-body .lcw-lab-points li { display: flex; gap: 6px; align-items: center; background: var(--bg1); border-radius: 6px; padding: 4px 4px 4px 10px; font-size: 13px; }
.lesson-rich-body .lcw-lab-points li span { flex: 1; min-width: 0; }
.lesson-rich-body .lcw-lab-points .lcw-btn { padding: 3px 8px; font-size: 12px; }
.lesson-rich-body .lcw-lab-empty { color: var(--txt3); }
.lesson-rich-body .lcw-lab-embed { margin-top: 8px; font-size: 13px; }
.lesson-rich-body .lcw-lab-hint { font-size: 12px; color: var(--txt3); }
.lesson-rich-body .lcw-lab-foot { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 16px; }

@media (max-width: 640px) {
  .lesson-rich-body .lcw-sim-top, .lesson-rich-body .lcw-vp, .lesson-rich-body .lcw-sc, .lesson-rich-body .lcw-lab-cols { grid-template-columns: 1fr !important; }
}
.lesson-rich-body .lcw-lab .lcw-sc-score { display: block; min-width: 0; }

/* ── Chunking visualiser and RAG Lab ─────────────────────────── */
.le-badge-rag { background: rgba(20,184,166,.18); color: #5eead4; }
.lesson-rich-body .lcw-cv-text { width: 100%; resize: vertical; font-size: 13px; }
.lesson-rich-body .lcw-cv-controls { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin: 10px 0; font-size: 12.5px; color: var(--txt2); }
.lesson-rich-body .lcw-cv-controls label { display: inline-flex; align-items: center; gap: 6px; }
.lesson-rich-body .lcw-cv-controls input[type=range] { accent-color: var(--purple-lt); width: 140px; }
.lesson-rich-body .lcw-cv-controls output { min-width: 60px; color: var(--txt); font-variant-numeric: tabular-nums; }
.lesson-rich-body .lcw-cv-stats { font-size: 13px; color: var(--txt2); margin-bottom: 8px; }
.lesson-rich-body .lcw-cv-view { background: var(--bg1); border: 1px solid var(--border); border-radius: 8px; padding: 12px; font-size: 13px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow-y: auto; color: var(--txt); }
.lesson-rich-body .lcw-cv-view span { border-radius: 3px; }
.lesson-rich-body .lcw-cv-overlap { background: repeating-linear-gradient(135deg, rgba(239,68,68,.35) 0 4px, rgba(245,158,11,.3) 4px 8px); outline: 1px solid rgba(239,68,68,.5); }
.lesson-rich-body .lcw-cv-gap { color: var(--txt3); }
.lesson-rich-body .lcw-cv-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; font-size: 12.5px; }
.lesson-rich-body .lcw-cv-list li { background: var(--bg1); border-radius: 6px; padding: 6px 10px; color: var(--txt2); }
.lesson-rich-body .lcw-cv-list li div { color: var(--txt); margin-top: 2px; white-space: pre-wrap; }
.lesson-rich-body .lcw-cv-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }

.lesson-rich-body .lcw-rag-add { display: flex; flex-direction: column; gap: 8px; }
.lesson-rich-body .lcw-rag-add .lcw-toolbar { margin-top: 0; }
.lesson-rich-body .lcw-file { cursor: pointer; }
.lesson-rich-body .lcw-rag-answer { background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.4); border-radius: 8px; padding: 12px 14px; color: var(--txt); margin: 10px 0; line-height: 1.6; }
.lesson-rich-body .lcw-rag-notice { background: rgba(59,130,246,.08); border: 1px solid rgba(59,130,246,.35); border-radius: 8px; padding: 10px 12px; font-size: 13px; margin: 10px 0; color: var(--txt2); }
.lesson-rich-body .lcw-cite { display: inline-block; min-width: 18px; padding: 0 5px; margin: 0 1px; border-radius: 9px; background: rgba(157,92,246,.3); color: #e9d5ff; font-size: 11px; font-weight: 700; text-align: center; text-decoration: none; vertical-align: 1px; }
.lesson-rich-body .lcw-rag-chunks { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.lesson-rich-body .lcw-rag-chunks li { background: var(--bg1); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 13px; color: var(--txt); }
.lesson-rich-body .lcw-rag-unused { opacity: .55; }
.lesson-rich-body .lcw-rag-meta { font-size: 12px; color: var(--txt3); margin-bottom: 4px; }
.lesson-rich-body .lcw-rag-below { font-size: 11px; color: var(--orange); margin-right: 6px; }
.lesson-rich-body .lcw-rag-prompt summary { cursor: pointer; color: var(--txt2); font-size: 13px; }
.lesson-rich-body .lcw-rag-prompt pre { white-space: pre-wrap; word-break: break-word; background: #0d0d1f; border: 1px solid var(--border2); border-radius: 6px; padding: 10px; font-size: 12px; color: #c4b5fd; max-height: 300px; overflow-y: auto; }
.lesson-rich-body details { margin-top: 10px; }
.lesson-rich-body details summary { cursor: pointer; color: var(--txt2); }
.lesson-rich-body .lcw-sc-query .lcw-input[data-role="question"] { flex: 1 1 260px; }

/* ── Agent Lab ───────────────────────────────────────────────── */
.le-badge-agt { background: rgba(245,158,11,.18); color: #fcd34d; }
.lesson-rich-body .lcw-al-presets { margin-top: 0; margin-bottom: 8px; align-items: center; }
.lesson-rich-body .lcw-al-prompt, .lesson-rich-body .lcw-al-json { font-family: var(--font-mono, 'Fira Code', monospace); font-size: 12.5px; line-height: 1.5; }
.lesson-rich-body .lcw-al-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.lesson-rich-body .lcw-al-tool { display: flex; gap: 8px; align-items: flex-start; background: var(--bg1); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 13px; color: var(--txt); cursor: pointer; }
.lesson-rich-body .lcw-al-tool:has(input:checked) { border-color: rgba(245,158,11,.6); background: rgba(245,158,11,.06); }
.lesson-rich-body .lcw-al-tool input { margin-top: 3px; accent-color: #f59e0b; }
.lesson-rich-body .lcw-al-tool code { font-size: 11px; color: #fbbf24; }
.lesson-rich-body .lcw-al-tool small { display: block; color: var(--txt3); font-size: 11.5px; margin-top: 2px; line-height: 1.4; }
.lesson-rich-body .lcw-sc-query .lcw-input[data-role="task"] { flex: 1 1 280px; }
.lesson-rich-body .lcw-al-examples { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.lesson-rich-body .lcw-al-examples .lcw-chip { font-size: 12px; text-align: left; cursor: pointer; font-family: inherit; }
.lesson-rich-body .lcw-al-summary { margin: 12px 0 8px; }
.lesson-rich-body .lcw-al-manual { display: flex; flex-direction: column; gap: 8px; }
.lesson-rich-body .lcw-al-manual select { align-self: flex-start; }
.lesson-rich-body .lcw-al-out { white-space: pre-wrap; word-break: break-word; background: #0d0d1f; border: 1px solid var(--border2); border-radius: 6px; padding: 10px; font-size: 12px; color: #c4b5fd; max-height: 260px; overflow-y: auto; margin: 0; }
.lesson-rich-body .lcw-al-out.lcw-al-err { color: #fca5a5; border-color: rgba(239,68,68,.4); }
@media (max-width: 640px) { .lesson-rich-body .lcw-al-tools { grid-template-columns: 1fr; } }

/* ── Blog ────────────────────────────────────────────────────── */
.dash-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dash-section-head .dash-section-title { margin-bottom: 0; }
.dash-section-link { font-size: 13px; color: var(--purple-lt); }
.dash-section-link:hover { color: var(--txt); }

.blog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.blog-card { display: flex; flex-direction: column; background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: border-color .15s, transform .15s; }
.blog-card:hover { border-color: var(--c, var(--purple)); transform: translateY(-2px); }
.blog-card-cover { display: block; background: #fff; aspect-ratio: 16 / 8; overflow: hidden; border-bottom: 1px solid var(--border); }
.blog-card-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; display: block; }
.blog-card-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 20px; flex: 1; }
.blog-card-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--txt3); }
.blog-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; color: var(--c, var(--purple-lt)); background: color-mix(in srgb, var(--c, var(--purple)) 16%, transparent); }
.blog-card-title { font-size: 16px; font-weight: 700; line-height: 1.4; color: var(--txt); }
.blog-card-title a:hover { color: var(--c, var(--purple-lt)); }
.blog-card-desc { font-size: 13px; color: var(--txt2); line-height: 1.6; flex: 1; }
.blog-card-btn { align-self: flex-start; padding: 8px 18px; border-radius: 7px; background: var(--c, var(--purple)); color: #fff; font-size: 13px; font-weight: 600; transition: opacity .15s; }
.blog-card-btn:hover { opacity: .88; }

.blog-index-head { margin-bottom: 24px; }
.blog-article { max-width: 780px; margin: 0 auto; }
.blog-crumbs { font-size: 13px; color: var(--txt3); margin-bottom: 20px; }
.blog-crumbs a { color: var(--txt2); }
.blog-crumbs a:hover { color: var(--txt); }
.blog-article-head { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding-bottom: 24px; margin-bottom: 28px; border-bottom: 1px solid var(--border); }
.blog-article-title { font-size: clamp(26px, 4vw, 36px); line-height: 1.25; font-weight: 800; color: var(--txt); }
.blog-article-sub { font-size: 17px; line-height: 1.6; color: var(--txt2); }
.blog-article-meta { font-size: 13px; color: var(--txt3); }

.blog-prose { font-size: 16px; line-height: 1.75; color: #cfcde3; overflow-wrap: break-word; }
.blog-prose > * + * { margin-top: 1.1em; }
.blog-prose h2 { font-size: 24px; line-height: 1.35; color: var(--txt); margin-top: 2.2em; padding-top: .4em; }
.blog-prose h3 { font-size: 19px; line-height: 1.4; color: var(--txt); margin-top: 1.8em; }
.blog-prose h2 .anchor, .blog-prose h3 .anchor, .blog-prose h1 .anchor { display: none; }
.blog-prose a { color: var(--purple-lt); text-decoration: underline; text-underline-offset: 2px; }
.blog-prose strong { color: var(--txt); }
.blog-prose ul, .blog-prose ol { padding-left: 1.4em; }
.blog-prose li + li { margin-top: .4em; }
.blog-prose li > p { margin: 0; }
.blog-prose blockquote { border-left: 3px solid var(--c, var(--purple)); background: var(--bg2); padding: 12px 16px; border-radius: 0 8px 8px 0; color: var(--txt2); }
.blog-prose code { font-family: var(--font-mono, 'Fira Code', Menlo, monospace); font-size: .88em; background: var(--bg3); border: 1px solid var(--border2); border-radius: 5px; padding: 1px 6px; color: #e9d5ff; }
.blog-prose pre { background: #0d0d1f; border: 1px solid var(--border2); border-radius: 10px; padding: 16px 18px; overflow-x: auto; line-height: 1.55; }
.blog-prose pre code { background: none; border: 0; padding: 0; font-size: 13.5px; color: #d6d4ee; white-space: pre; }
.blog-prose img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 10px; background: #fff; border: 1px solid var(--border2); }
.blog-prose p:has(> img) + p:has(> em:only-child) { text-align: center; font-size: 13.5px; color: var(--txt3); margin-top: .6em; }
.blog-prose hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
.blog-more { max-width: 1000px; margin: 56px auto 0; }

@media (max-width: 760px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-prose { font-size: 15.5px; }
  .blog-prose h2 { font-size: 21px; }
}

/* "Continue with Google" (shared/_social_login) */
.oauth-login { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.oauth-form { margin: 0; }
.oauth-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 14px; border-radius: 10px;
  font: 600 14px/1.2 var(--font, inherit); cursor: pointer; transition: background .15s, border-color .15s, transform .1s; }
.oauth-btn:active { transform: translateY(1px); }
.oauth-btn-google { background: #fff; color: #1f1f1f; border: 1px solid #dadce0; }
.oauth-btn-google:hover { background: #f8f9fa; border-color: #c6c9cc; }
.oauth-or { display: flex; align-items: center; gap: 12px; margin-top: 6px; color: var(--txt3); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.oauth-or::before, .oauth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* Footer follow icons (COMPANY[:social]). Class names avoid "social": ad blockers hide those. */
.ft-follow { display: flex; gap: 10px; margin-top: 16px; }
.ft-follow-link { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border);
  color: var(--txt2); transition: color .15s, border-color .15s, background .15s; }
.ft-follow-link:hover { color: var(--txt); border-color: var(--purple-lt, #8b5cf6); background: rgba(139,92,246,.08); }
