/* ===================================================
   ML Learning — Claude-style Design System
   Warm terracotta + cream palette, clean modern aesthetic
   =================================================== */

:root {
  /* Core palette — inspired by claude.ai */
  --primary: #C96442;
  --primary-hover: #B5573A;
  --primary-light: #F5DDD3;
  --primary-soft: rgba(201, 100, 66, 0.08);
  --accent: #D4845C;

  /* Neutrals — warm gray family */
  --bg: #FAF8F5;
  --bg-elevated: #FFFFFF;
  --bg-inset: #F3F0EB;
  --text: #1C1917;
  --text-secondary: #57534E;
  --text-muted: #A8A29E;
  --border: #E7E5E4;
  --border-hover: #D6D3D1;

  /* Semantic */
  --success: #16A34A;
  --success-bg: #F0FDF4;
  --success-text: #15803D;
  --warning: #D97706;
  --warning-bg: #FFFBEB;
  --info: #C96442;
  --info-bg: #FFF7ED;

  /* Code */
  --code-bg: #F5F3F0;
  --code-text: #7C2D12;

  /* Layout */
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --max-width: 960px;
  --nav-height: 60px;
  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow: 0 2px 8px rgba(28, 25, 23, 0.06), 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow-md: 0 4px 16px rgba(28, 25, 23, 0.08), 0 2px 4px rgba(28, 25, 23, 0.04);
  --shadow-lg: 0 8px 32px rgba(28, 25, 23, 0.10), 0 4px 8px rgba(28, 25, 23, 0.04);

  /* Transitions */
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--primary-hover); }

/* === Navigation — Claude frosted glass style === */
nav {
  background: rgba(250, 248, 245, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}
nav .nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}
nav .nav-brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
nav .nav-brand:hover { color: var(--primary); }
nav .nav-links { display: flex; gap: 4px; }
nav .nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  font-weight: 500;
}
nav .nav-links a:hover {
  color: var(--text);
  background: var(--primary-soft);
}
nav .nav-links a.active {
  color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
}

/* === Container === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* === Hero — warm, spacious, Claude-like === */
.hero {
  text-align: center;
  padding: 72px 0 48px;
}
.hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.2;
}
.hero p {
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 480px;
  margin: 0 auto;
}

/* === Page Header (subpages) === */
.page-header {
  text-align: center;
  padding: 64px 0 40px;
}
.page-header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}
.page-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* === Section === */
.section {
  margin: 48px 0;
}
.section h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* === Card — warm shadow, clean edges === */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  display: block;
  text-decoration: none;
  color: inherit;
}
.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}
.card .tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 500;
  margin-top: 12px;
  margin-right: 4px;
}

/* === Phase cards (roadmap) === */
.roadmap-phase {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.roadmap-phase:hover {
  box-shadow: var(--shadow);
}
.roadmap-phase.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light), var(--shadow);
}
.roadmap-phase.completed {
  border-left: 4px solid var(--success);
}
.roadmap-phase h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}
.phase-badge {
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 99px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.phase-badge.done {
  background: var(--success-bg);
  color: var(--success-text);
}
.phase-badge.current {
  background: var(--primary-light);
  color: var(--primary);
}
.phase-badge.pending {
  background: var(--bg-inset);
  color: var(--text-muted);
}
.roadmap-phase ul {
  margin-top: 16px;
  padding-left: 20px;
  color: var(--text-secondary);
}
.roadmap-phase li {
  margin-bottom: 6px;
  font-size: 0.92rem;
  line-height: 1.6;
}

/* === Timeline — clean, warm dots === */
.timeline {
  position: relative;
  padding-left: 36px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
  border-radius: 1px;
}
.timeline-item {
  position: relative;
  margin-bottom: 28px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -31px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 3px solid var(--primary);
}
.timeline-item h4 {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.timeline-item h3 {
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.timeline-item p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}
.timeline-item .date {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 4px;
}
.timeline-item .tags {
  margin-top: 10px;
}
.timeline-item .content {
  margin-top: 2px;
}

/* === List items — clean rows === */
.item-list {
  list-style: none;
}
.item-list li {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.item-list li:last-child { border-bottom: none; }
.item-list .date {
  color: var(--text-muted);
  font-size: 0.85rem;
  white-space: nowrap;
  font-weight: 500;
}

/* === Stats row === */
.progress-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.stat {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat .stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}
.stat .stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 500;
}

/* === Progress bar === */
.progress-overview {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.progress-overview p {
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-size: 0.92rem;
}
.progress-overview strong {
  color: var(--primary);
}
.progress-bar {
  height: 8px;
  background: var(--bg-inset);
  border-radius: 99px;
  overflow: hidden;
  margin: 12px 0;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 99px;
  transition: width 0.5s ease;
}

/* === Empty State === */
.empty {
  text-align: center;
  padding: 64px 24px;
}
.empty .icon { font-size: 2.5rem; margin-bottom: 16px; }
.empty p { color: var(--text-secondary); font-size: 0.95rem; }

/* === Hero badge (for stage indicator) === */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

/* === Stage card (homepage current stage) === */
.stage-card {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  color: white;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.stage-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}
.stage-card::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: 30px;
  width: 100px;
  height: 100px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}
.stage-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.stage-card p {
  font-size: 0.95rem;
  opacity: 0.9;
  line-height: 1.6;
}
.stage-card .badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 16px;
}

/* === Cards grid (notes page) === */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

/* === Footer — subtle === */
footer {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 64px;
}
footer a {
  color: var(--primary);
  font-weight: 500;
}
footer a:hover { text-decoration: underline; }

/* === Three-column Lab Layout === */
.lab-layout {
  display: grid;
  grid-template-columns: 220px 1fr 380px;
  gap: 0;
  min-height: calc(100vh - var(--nav-height));
  margin-top: var(--nav-height);
}

/* Left sidebar */
.lab-sidebar {
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  padding: 0;
  overflow-y: auto;
  height: calc(100vh - var(--nav-height));
  position: sticky;
  top: var(--nav-height);
}
.sidebar-header {
  padding: 20px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.sidebar-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.sidebar-tree {
  padding: 8px 0;
}
.tree-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}
.tree-section-title:hover {
  background: var(--bg-inset);
}
.tree-arrow {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.tree-items {
  /* open by default */
}
.tree-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px 8px 28px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}
.tree-item:hover {
  background: var(--primary-soft);
  color: var(--text);
}
.tree-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  border-left-color: var(--primary);
}
.tree-icon {
  font-size: 0.9rem;
}

/* Center content — now shows Notebook */
.lab-content {
  overflow-y: auto;
  height: calc(100vh - var(--nav-height));
  position: sticky;
  top: var(--nav-height);
  background: var(--bg);
}
.lab-notebook-main {
  background: var(--bg);
}
.lab-content-header {
  padding: 20px 28px 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.lab-content-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 16px;
  margin: 0;
  border: none;
}
.nb-container-main {
  padding: 20px 28px 48px;
  overflow-y: auto;
}
.lab-content .note-content {
  border: none;
  box-shadow: none;
  border-radius: 0;
  max-width: none;
  margin: 0;
  padding: 24px 28px 48px;
}

/* Right panel — knowledge points */
.lab-notebook {
  background: var(--bg-elevated);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  height: calc(100vh - var(--nav-height));
  position: sticky;
  top: var(--nav-height);
}
.lab-knowledge-panel {
  background: var(--bg);
}
.lab-nb-header {
  padding: 20px 20px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lab-nb-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.note-panel-content {
  padding: 16px 20px;
}
.note-panel-content h1 { font-size: 1.2rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.note-panel-content h2 { font-size: 1rem; font-weight: 600; color: var(--primary); margin: 16px 0 8px; padding-left: 0; border: none; }
.note-panel-content h3 { font-size: 0.92rem; font-weight: 600; color: var(--text); margin: 12px 0 6px; }
.note-panel-content p { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 8px; line-height: 1.6; }
.note-panel-content ul, .note-panel-content ol { padding-left: 18px; color: var(--text-secondary); font-size: 0.85rem; margin: 6px 0; }
.note-panel-content li { margin: 4px 0; }
.note-panel-content code { background: var(--code-bg); color: var(--code-text); padding: 1px 5px; border-radius: 3px; font-size: 0.82em; }
.note-panel-content strong { color: var(--primary-hover); }
.nb-container {
  padding: 16px 20px;
}

/* Notebook cell styles */
.nb-cell {
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.nb-markdown {
  padding: 12px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
}
.nb-markdown h1, .nb-markdown h2, .nb-markdown h3 {
  font-size: 0.95rem;
  color: var(--text);
  margin: 8px 0 4px;
}
.nb-markdown p { margin: 4px 0; }
.nb-code {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.nb-code .nb-label {
  padding: 6px 12px;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: monospace;
  border-bottom: 1px solid var(--border);
}
.nb-code pre {
  margin: 0;
  padding: 12px;
  overflow-x: auto;
}
.nb-code code {
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--code-text);
}
.nb-output {
  padding: 8px 12px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
}
.nb-output pre {
  margin: 0;
  font-size: 0.78rem;
  color: var(--success-text);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* Responsive: stack on mobile */
@media (max-width: 1024px) {
  .lab-layout {
    grid-template-columns: 1fr;
  }
  .lab-sidebar, .lab-notebook {
    position: static;
    height: auto;
    max-height: none;
  }
  .lab-content {
    position: static;
    height: auto;
  }
}

/* === Concept Cards (homepage quick access) === */
.concept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.concept-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.concept-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.concept-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}
.concept-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}
.concept-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* === Note page content (rendered markdown) === */
.note-content {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 48px;
  box-shadow: var(--shadow-sm);
  max-width: 820px;
  margin: 0 auto 48px;
}
.note-content h1 { font-size: 1.8rem; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.note-content h2 { font-size: 1.3rem; font-weight: 700; color: var(--primary); border-left: 4px solid var(--primary); padding-left: 12px; margin: 32px 0 16px; }
.note-content h3 { font-size: 1.05rem; font-weight: 600; color: var(--text); margin: 24px 0 10px; }
.note-content p { font-size: 0.92rem; color: var(--text-secondary); margin-bottom: 12px; line-height: 1.7; }
.note-content ul, .note-content ol { padding-left: 22px; margin: 10px 0; color: var(--text-secondary); font-size: 0.92rem; }
.note-content li { margin: 6px 0; }
.note-content code { background: var(--code-bg); color: var(--code-text); padding: 2px 6px; border-radius: 4px; font-size: 0.85em; }
.note-content pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; margin: 14px 0; overflow-x: auto; }
.note-content pre code { background: none; padding: 0; }
.note-content table { border-collapse: collapse; width: 100%; margin: 14px 0; }
.note-content th { background: var(--primary); color: white; padding: 10px 14px; text-align: left; font-size: 0.85rem; font-weight: 600; }
.note-content td { border: 1px solid var(--border); padding: 10px 14px; font-size: 0.88rem; }
.note-content tr:nth-child(even) td { background: var(--bg); }
.note-content blockquote { background: var(--primary-light); border-left: 4px solid var(--primary); padding: 14px 18px; margin: 14px 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.note-content strong { color: var(--primary-hover); }

/* === Era card (history page) === */
.era-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.era-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
}
.era-card .era-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.era-card .era-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 500;
}
.era-tag.tech { background: var(--primary-light); color: var(--primary); }
.era-tag.company { background: var(--success-bg); color: var(--success-text); }
.era-tag.hardware { background: var(--info-bg); color: var(--info); }
.era-tag.framework { background: #EDE9FE; color: #6D28D9; }
.era-tag.tool { background: var(--warning-bg); color: var(--warning); }

/* === Responsive === */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.8rem; }
  .page-header h1 { font-size: 1.5rem; }
  .progress-stats { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  nav .nav-links { gap: 2px; }
  nav .nav-links a { padding: 6px 8px; font-size: 0.8rem; }
  .hero { padding: 48px 0 32px; }
  .hero h1 { font-size: 1.5rem; }
  .cards { grid-template-columns: 1fr; }
  .stage-card { padding: 24px 20px; }
}

/* === Stage Blocks (homepage course list) === */
.stage-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.stage-block.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light), var(--shadow); }
.stage-block.future { opacity: 0.6; }
.stage-label { padding: 14px 20px; font-weight: 700; font-size: 0.92rem; background: var(--bg-inset); border-bottom: 1px solid var(--border); }
.stage-label.done { color: var(--success-text); }
.stage-label.current { color: var(--primary); }
.lesson-list { padding: 4px 0; }
.lesson-row {
  display: flex; align-items: center; gap: 16px; padding: 14px 20px;
  border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; transition: background 0.15s;
}
.lesson-row:last-child { border-bottom: none; }
.lesson-row:hover { background: var(--primary-soft); }
.lesson-row.upcoming { opacity: 0.5; cursor: default; }
.lesson-row.upcoming:hover { background: transparent; }
.lesson-num {
  font-size: 0.8rem; font-weight: 800; color: var(--primary); background: var(--primary-light);
  width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.lesson-info { flex: 1; min-width: 0; }
.lesson-title { font-weight: 600; font-size: 0.92rem; color: var(--text); }
.lesson-tags { margin-top: 4px; display: flex; gap: 4px; flex-wrap: wrap; }
.lesson-links { display: flex; gap: 8px; flex-shrink: 0; }
.link-badge {
  display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 99px;
  font-size: 0.75rem; font-weight: 500; background: var(--bg-inset); color: var(--text-secondary);
  border: 1px solid var(--border); cursor: pointer; transition: all 0.15s;
}
.link-badge:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.link-badge.nb { background: #EDE9FE; color: #6D28D9; border-color: #DDD6FE; }
.link-badge.nb:hover { background: #6D28D9; color: white; }
