/* Course/lesson shell: sidebar + lecture + code blocks pt.1 — extracted from the original style.css (lines 780-1059) */
.course-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100dvh - var(--nav-h));
}
.sidebar {
  position: sticky;
  top: var(--nav-h);
  height: calc(100dvh - var(--nav-h));
  overflow-y: auto;
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 0 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.sidebar-head {
  padding: 0 16px 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.sidebar-course-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.sb-progress-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 5px;
  font-weight: 500;
}
.sb-progress-row span:last-child { color: var(--primary); font-weight: 700; }
.sb-track {
  height: 5px;
  background: var(--border);
  border-radius: var(--r-full);
  overflow: hidden;
}
.sb-fill {
  height: 100%;
  background: var(--primary);
  border-radius: var(--r-full);
  width: 24%;
  transition: width .4s ease;
}
.sb-search {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 12px 4px;
  padding: 6px 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.sb-search svg.lucide { font-size: 13px; color: var(--text-light); flex-shrink: 0; }
.sb-search input {
  border: none; outline: none; background: transparent;
  font-family: var(--font); font-size: 0.77rem; color: var(--text); width: 100%;
}
.sb-search input::placeholder { color: var(--text-light); }
.sb-group { margin-bottom: 2px; }
.sb-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 16px 7px 12px;
  cursor: pointer;
  user-select: none;
  transition: background .15s;
  border-radius: 0;
}
.sb-group-header:hover { background: var(--bg-2); }
.sb-group-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--text);
}
.sb-num {
  width: 18px; height: 18px; border-radius: 4px;
  background: var(--primary); color: #fff;
  font-size: 0.6rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sb-chevron { font-size: 13px; color: var(--text-light); transition: transform .2s; }
.sb-group.open .sb-chevron { transform: rotate(180deg); }
.sb-items { display: none; }
.sb-group.open .sb-items { display: block; }
.sb-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 16px 6px 30px;
  font-size: 0.775rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color .15s, background .15s;
  border: none; background: none;
  text-align: left; width: 100%;
  font-family: var(--font);
  position: relative;
}
.sb-item:hover { color: var(--text); background: var(--bg-2); }
.sb-item.active {
  color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
}
.sb-item-check {
  margin-left: auto;
  font-size: 14px;
  color: var(--green, #10B981);
  display: none;
}
.sb-item.done .sb-item-check { display: flex; }
.sb-item.active .sb-item-dot { background: var(--primary); }
.sb-item-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}
.sb-item.active .sb-item-dot { background: var(--primary); }
.sb-item.current::after {
  content: '';
  position: absolute;
  right: 14px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
}
.lecture-area {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.lecture {
  display: none;
  flex-direction: column;
  padding: 36px 48px 60px;
  flex: 1;
}
.lecture.active { display: flex; }
.ch-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: var(--r-full);
  width: max-content;
  margin-bottom: 18px;
  letter-spacing: .02em;
}
.lec-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 8px;
}
.lec-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.025em;
  line-height: 1.15;
}
.lec-hero-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 8px 24px rgba(108,99,255,.25));
}
.lec-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 32px;
}
.lec-divider {
  height: 1px;
  background: var(--border);
  margin: 28px 0;
}
.lec-section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.lec-section-label .label-icon {
  width: 30px; height: 30px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.label-icon.code-icon  { background: var(--primary-light); color: var(--primary); }
.label-icon.exp-icon   { background: #EBF3FF; color: #3B82F6; }
.label-icon.usage-icon { background: #EDFBF5; color: #10B981; }
.label-icon.ex-icon    { background: #FFF8EC; color: #F59E0B; }
[data-theme="dark"] .label-icon.exp-icon  { background: #0C1F3F; }
[data-theme="dark"] .label-icon.usage-icon { background: #062016; }
[data-theme="dark"] .label-icon.ex-icon   { background: #2D1F07; }
.lec-section-label h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.code-wrap {
  background: #14151f;
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 4px;
}
.code-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  background: #0e0f1a;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.code-lang-tag {
  font-size: 0.7rem;
  color: #6b7280;
  font-family: 'Fira Code', monospace;
}
.copy-btn {
  display: flex; align-items: center; gap: 5px;
  background: none; border: none;
  color: #6b7280; font-size: 0.72rem;
  font-family: var(--font); cursor: pointer;
  padding: 3px 7px; border-radius: 4px;
  transition: color .2s, background .2s;
}
.copy-btn:hover { color: #c9d1e0; background: rgba(255,255,255,.06); }
.copy-btn svg.lucide { font-size: 13px; }
.code-body {
  display: grid;
  grid-template-columns: 36px 1fr;
  padding: 14px 0;
  overflow-x: auto;
  font-family: 'Fira Code', monospace;
  font-size: 0.83rem;
  line-height: 1.75;
}
.ln {
  text-align: right;
  padding-right: 14px;
  color: #3d4155;
  user-select: none;
  border-right: 1px solid #1e2030;
}
.lc {
  padding-left: 16px;
  color: #c9d1e0;
  white-space: pre;
}
.kw  { color: #c792ea; }
.fn  { color: #82aaff; }
.str { color: #c3e88d; }
.cm  { color: #4a5568; font-style: italic; }
.num { color: #f78c6c; }
.bi  { color: #ffcb6b; }
.hl  { background: rgba(108,99,255,.12); display: block; margin: 0 -16px; padding: 0 16px; }


/* Course/lesson shell pt.2 — extracted from the original style.css (lines 1060-1164) */
.exp-body {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.75;
}
.exp-body p { margin-bottom: 10px; }
.exp-body p:last-child { margin-bottom: 0; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-family: 'Fira Code', monospace;
  font-size: 0.8em;
  color: var(--text);
  white-space: nowrap;
}
.usage-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.usage-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.usage-row:last-child { border-bottom: none; }
.usage-icon-wrap {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: 1px;
}
.usage-text { font-size: 0.855rem; color: var(--text); line-height: 1.6; }
.usage-text strong { font-weight: 700; }
.example-desc {
  font-size: 0.855rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-top: 12px;
}
.example-desc .chip { color: var(--text); }
.lec-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  background: var(--card);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s, transform .2s, box-shadow .2s;
  text-decoration: none;
}
.nav-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-1px);
}
.nav-btn .nav-label { font-size: 0.7rem; font-weight: 400; color: var(--text-muted); display: block; margin-bottom: 1px; }
.nav-btn.prev svg.lucide { color: var(--text-muted); }
.nav-btn.next {
  background: var(--primary-grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(124,92,255,0.3);
}
.nav-btn.next:hover {
  filter: brightness(1.05);
  box-shadow: 0 6px 20px rgba(124,92,255,0.45);
}
.nav-btn.next .nav-label { color: rgba(255,255,255,.65); }
.nav-btn:disabled, .nav-btn[disabled] {
  opacity: .38;
  pointer-events: none;
}
[data-theme="dark"] .code-wrap { background: #0d0e18; }
[data-theme="dark"] .code-topbar { background: #07080f; }
[data-theme="dark"] .usage-row { background: var(--bg-2); }


/* Responsive — extracted from the original style.css (lines 1165-1180) */
@media (max-width: 860px) {
  .course-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .lecture { padding: 24px 20px 48px; }
}
@media (max-width: 520px) {
  .lec-title-row { flex-direction: column-reverse; }
  .lec-hero-img  { width: 64px; height: 64px; }
  .lec-nav { flex-direction: column; gap: 10px; }
  .nav-btn { width: 100%; justify-content: center; }
}


/* Alt hero subtitle / cta-text variant — extracted from the original style.css (lines 1190-1195) */
.hero-sub {
  font-size: 1rem; color: var(--text-muted);
  margin-top: -8px; margin-bottom: 12px; font-style: italic;
}
.cta-text h2 { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.cta-text p  { font-size: 0.85rem; color: var(--text-muted); }


/* Dark-mode overrides — extracted from the original style.css (lines 1196-1212) */
[data-theme="dark"] .lang-card {
  background: var(--card);
  border-color: var(--border);
}
[data-theme="dark"] .lang-card:hover {
  background: var(--card);
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(124,92,255,0.25);
}
[data-theme="dark"] .why-card-dsa {
  background: var(--card);
  border-color: var(--border);
}
[data-theme="dark"] .cta-inner {
  background: var(--card);
  border-color: var(--border);
}


/* Hero button (earlier variant, superseded on homepage by pages/home.css but still used elsewhere) — extracted from the original style.css (lines 1213-1224) */
.hero-btn-primary {
  background: var(--primary-grad);
  box-shadow: 0 4px 14px rgba(124,92,255,0.35);
  border: none;
  border-radius: var(--r-btn);
}
.hero-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124,92,255,0.5);
  filter: brightness(1.05);
}
.hero-btn-primary:active { transform: translateY(0) scale(0.98); }

