/* === Modern adaptive style === */
.cm-course-toc {
  margin-top: 3rem;
  background: var(--cm-bg-card, #ffffff);
  border-radius: 16px;
  box-shadow: 0 10px 30px var(--cm-shadow, rgba(0, 0, 0, 0.05));
  padding: 2.5rem;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Helvetica, Arial, sans-serif;
  color: var(--cm-text, #1e293b);
}
.cm-course-toc h2 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 2rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--cm-accent, #6366f1);
  display: inline-block;
  color: var(--cm-heading, var(--cm-text));
  letter-spacing: -0.5px;
}
.cm-module {
  background: var(--cm-module-bg, #f8fafc);
  border-radius: 12px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid var(--cm-border, rgba(226, 232, 240, 0.6));
}
.cm-module:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--cm-shadow-strong, rgba(0, 0, 0, 0.08));
}
.cm-module h3 {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--cm-module-heading, #334155);
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cm-module h3::before {
  content: '📘';
  font-size: 1.5rem;
  flex-shrink: 0;
  opacity: 0.9;
}
.cm-lessons {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}
.cm-lessons a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.25rem;
  background: var(--cm-lesson-bg, #ffffff);
  border-radius: 8px;
  border: 1px solid var(--cm-lesson-border, #e2e8f0);
  font-size: 1rem;
  font-weight: 500;
  color: var(--cm-lesson-text, #475569);
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.cm-lessons a::before {
  content: '▶';
  font-size: 0.8rem;
  color: var(--cm-accent, #6366f1);
  transition: transform 0.2s ease;
}
.cm-lessons a:hover {
  color: var(--cm-lesson-hover-text, #1e293b);
  background: var(--cm-lesson-hover-bg, #f1f5f9);
  border-color: var(--cm-accent, #6366f1);
  box-shadow: 0 2px 8px var(--cm-accent-shadow, rgba(99, 102, 241, 0.15));
}
.cm-lessons a:hover::before {
  transform: translateX(3px);
  color: var(--cm-accent-hover, #4f46e5);
}
.cm-module p em {
  color: var(--cm-muted, #94a3b8);
  font-style: normal;
  font-size: 0.95rem;
  padding-left: 0.5rem;
}
.cm-lesson-navigation {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--cm-border, #e2e8f0);
}
.cm-lesson-navigation a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--cm-lesson-nav-bg, #f1f5f9);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  color: var(--cm-lesson-nav-text, #475569);
  text-decoration: none;
  transition: all 0.2s ease;
}
.cm-lesson-navigation a:hover {
  background: var(--cm-lesson-nav-hover-bg, #e2e8f0);
  color: var(--cm-lesson-nav-hover-text, #1e293b);
}
/* Course list widget */
.cm-course-list-widget {
  list-style: none;
  padding: 0;
  margin: 0;
}
.cm-course-list-widget li {
  margin-bottom: 0.5rem;
}
.cm-course-list-widget a {
  display: block;
  padding: 0.5rem 0.8rem;
  background: var(--cm-module-bg, #f8fafc);
  border-radius: 8px;
  color: var(--cm-text, #1e293b);
  text-decoration: none;
  transition: 0.2s;
}
.cm-course-list-widget a:hover {
  background: var(--cm-accent, #6366f1);
  color: #fff;
}
@media (max-width: 600px) {
  .cm-course-toc {
    padding: 1.5rem;
  }
  .cm-course-toc h2 {
    font-size: 1.6rem;
  }
  .cm-module {
    padding: 1.25rem;
  }
  .cm-lessons a {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }
}
