/* Beekix Courses — Class Enrollment System */

.cls-page { max-width: 960px; margin: 0 auto; padding: 24px 16px 48px; }

.cls-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.cls-title { margin: 0; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 24px; font-weight: 800; color: var(--text, #0f172a); }
.cls-subtitle { margin: 4px 0 0; font-size: 14px; color: #64748b; }
.cls-header-actions { display: flex; gap: 10px; }

.cls-btn { display: flex; align-items: center; gap: 6px; padding: 10px 18px; border: none; border-radius: 9999px; font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer; transition: all 0.2s; }
.cls-btn .material-symbols-outlined { font-size: 20px; }
.cls-btn--primary { background: linear-gradient(135deg, #1e3a5f, #2b5ea7); color: #fff; }
.cls-btn--primary:hover { box-shadow: 0 4px 16px rgba(30, 58, 95, 0.3); transform: translateY(-1px); }
.cls-btn--secondary { background: rgba(0, 0, 0, 0.05); color: #334155; }
.cls-btn--secondary:hover { background: rgba(0, 0, 0, 0.08); }
.cls-btn--danger { background: rgba(239, 68, 68, 0.08); color: #ef4444; }
.cls-btn--danger:hover { background: rgba(239, 68, 68, 0.15); }

.cls-section { margin-top: 32px; }
.cls-section-title { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 17px; font-weight: 700; color: #1e293b; }
.cls-section-title .material-symbols-outlined { font-size: 22px; color: #2b5ea7; }

/* Cards grid */
.cls-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }

.cls-card { display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: var(--bg-white, #fff); border: 1px solid rgba(0,0,0,0.06); border-radius: 16px; cursor: pointer; transition: all 0.2s; }
.cls-card:hover { border-color: rgba(30,58,95,0.15); box-shadow: 0 4px 16px rgba(30,58,95,0.08); transform: translateY(-2px); }

.cls-card-icon { width: 44px; height: 44px; border-radius: 12px; background: rgba(43, 94, 167, 0.1); color: #2b5ea7; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cls-card-icon .material-symbols-outlined { font-size: 24px; }

.cls-card-info { flex: 1; min-width: 0; }
.cls-card-title { margin: 0; font-size: 15px; font-weight: 700; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cls-card-subject { font-size: 12px; font-weight: 600; color: #8b5cf6; background: rgba(139,92,246,0.08); padding: 2px 8px; border-radius: 9999px; display: inline-block; margin-top: 4px; }
.cls-card-meta { display: block; font-size: 12px; color: #94a3b8; margin-top: 4px; }
.cls-card-arrow { color: #cbd5e1; font-size: 20px !important; }

/* Detail page */
.cls-back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: #2b5ea7; text-decoration: none; margin-bottom: 16px; }
.cls-back:hover { color: #1e3a5f; }

.cls-detail-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; gap: 16px; }
.cls-subject-badge { font-size: 12px; font-weight: 600; color: #8b5cf6; background: rgba(139,92,246,0.08); padding: 3px 10px; border-radius: 9999px; margin-top: 6px; display: inline-block; }

.cls-info-bar { display: flex; gap: 20px; padding: 14px 20px; background: rgba(43,94,167,0.04); border-radius: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.cls-info-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #475569; }
.cls-info-item .material-symbols-outlined { font-size: 18px; color: #2b5ea7; }

/* Content cards */
.cls-content-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }

.cls-content-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--bg-white, #fff); border: 1px solid rgba(0,0,0,0.06); border-radius: 12px; cursor: pointer; transition: all 0.2s; }
.cls-content-card:hover { border-color: rgba(30,58,95,0.15); box-shadow: 0 2px 12px rgba(30,58,95,0.06); }

.cls-content-card-icon { width: 36px; height: 36px; border-radius: 10px; background: rgba(99,102,241,0.08); color: #6366f1; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cls-content-card-icon .material-symbols-outlined { font-size: 20px; }
.cls-content-card-info { flex: 1; min-width: 0; }
.cls-content-card-info h4 { margin: 0; font-size: 13px; font-weight: 600; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cls-content-card-meta { font-size: 11px; color: #94a3b8; }

.cls-save-btn, .cls-remove-content { border: none; background: rgba(0,0,0,0.04); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #64748b; transition: all 0.15s; flex-shrink: 0; padding: 0; }
.cls-save-btn:hover { background: rgba(16,185,129,0.1); color: #10b981; }
.cls-remove-content:hover { background: rgba(239,68,68,0.1); color: #ef4444; }
.cls-save-btn .material-symbols-outlined, .cls-remove-content .material-symbols-outlined { font-size: 18px; }

/* Students list */
.cls-students-list { display: flex; flex-direction: column; gap: 8px; }
.cls-student { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; transition: background 0.15s; }
.cls-student:hover { background: rgba(0,0,0,0.02); }
.cls-student-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.cls-student-avatar--placeholder { background: #2b5ea7; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.cls-student-info { flex: 1; }
.cls-student-name { font-size: 14px; font-weight: 600; color: #1e293b; display: block; }
.cls-student-date { font-size: 11px; color: #94a3b8; }
.cls-remove-student { border: none; background: none; cursor: pointer; color: #94a3b8; padding: 4px; transition: color 0.15s; }
.cls-remove-student:hover { color: #ef4444; }
.cls-remove-student .material-symbols-outlined { font-size: 20px; }

/* Empty state */
.cls-empty { text-align: center; padding: 60px 20px; color: #94a3b8; }
.cls-empty .material-symbols-outlined { font-size: 56px; margin-bottom: 12px; opacity: 0.4; }
.cls-empty p { margin: 0; font-size: 15px; }
.cls-empty-hint { font-size: 13px !important; margin-top: 6px !important; opacity: 0.7; }

/* Responsive */
@media (max-width: 768px) {
  .cls-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .cls-detail-header { flex-direction: column; }
  .cls-info-bar { flex-direction: column; gap: 8px; }
  .cls-grid, .cls-content-grid { grid-template-columns: 1fr; }
}

/* Dark mode */
[data-theme="dark"] .cls-card, [data-theme="dark"] .cls-content-card { background: var(--bg-white, #1e293b); border-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .cls-card:hover, [data-theme="dark"] .cls-content-card:hover { border-color: rgba(255,255,255,0.12); }
[data-theme="dark"] .cls-card-title, [data-theme="dark"] .cls-content-card-info h4 { color: #f1f5f9; }
[data-theme="dark"] .cls-title, [data-theme="dark"] .cls-section-title { color: #f1f5f9; }
[data-theme="dark"] .cls-student-name { color: #f1f5f9; }

[data-theme="dark"] .cls-info-bar { background: rgba(43,94,167,0.1); }
[data-theme="dark"] .cls-back { color: #93c5fd; }
[data-theme="dark"] .cls-back:hover { color: #bfdbfe; }
[data-theme="dark"] .cls-btn--secondary { background: rgba(255,255,255,0.06); color: #e2e8f0; }
[data-theme="dark"] .cls-student:hover { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .cls-empty { color: #64748b; }

/* ══════════════════════════════════════════
   Class Tab System
   ══════════════════════════════════════════ */

/* Tab Header */
.cls-tab-header {
  background: var(--bg-white, #fff);
  border-radius: 16px 16px 0 0;
  padding: 20px 24px 0;
  margin-bottom: 0;
  box-shadow: 0 1px 3px rgba(0,23,74,0.06);
  border: 1px solid rgba(0,0,0,0.06);
  border-bottom: none;
}
.cls-tab-header-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.cls-tab-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 24px; font-weight: 800; color: #0f172a; }
.cls-tab-tag {
  display: inline-block; padding: 2px 9px; border-radius: 6px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
  background: #dde1ff; color: #1e3a5f;
  margin-left: 10px; vertical-align: middle;
}
.cls-tab-subtitle { color: #64748b; font-size: 13px; margin-top: 2px; margin-bottom: 8px; }
.cls-tab-meta { display: flex; align-items: center; gap: 16px; color: #94a3b8; font-size: 12px; }
.cls-tab-meta-item { display: flex; align-items: center; gap: 4px; }
.cls-tab-meta-item .material-symbols-outlined { font-size: 15px; }
.cls-tab-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* Tab Bar */
.cls-tab-bar {
  display: flex; gap: 0; border-top: 1px solid rgba(0,0,0,0.06);
  margin: 0 -24px; padding: 0 24px; overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.cls-tab-bar::-webkit-scrollbar { height: 0; }
.cls-tab-item {
  padding: 11px 16px; font-size: 13px; font-weight: 600;
  color: #64748b; cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s; display: flex; align-items: center; gap: 5px;
  background: none; border-top: none; border-left: none; border-right: none;
  font-family: 'Be Vietnam Pro', sans-serif; white-space: nowrap; flex-shrink: 0;
}
.cls-tab-item:hover { color: #1e3a5f; }
.cls-tab-item--active { color: #1e3a5f; border-bottom-color: #1e3a5f; }
.cls-tab-item .material-symbols-outlined { font-size: 17px; }

/* Tab Content Area */
.cls-tab-content { padding: 20px 0; }

/* View as Student Banner */
.cls-tab-preview-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 20px; margin-bottom: 12px;
  background: #fef3c7; color: #92400e; border-radius: 10px;
  font-size: 13px; font-weight: 600;
}
.cls-tab-preview-banner a { color: #1e3a5f; }

/* ── Module Tree ── */
.cls-module-tree {
  background: var(--bg-white, #fff); border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.06); overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,23,74,0.06);
}
.cls-module { border-bottom: 1px solid rgba(0,0,0,0.04); }
.cls-module:last-child { border-bottom: none; }
.cls-module-header {
  display: flex; align-items: center; gap: 8px; padding: 12px 18px;
  cursor: pointer; transition: background 0.15s; user-select: none;
}
.cls-module-header:hover { background: #f8f9fd; }
.cls-module-header.expanded { background: #f8f9fd; }
.cls-module-expand { font-size: 18px; color: #94a3b8; transition: transform 0.25s; }
.cls-module-header.expanded .cls-module-expand { transform: rotate(90deg); }
.cls-module-drag { font-size: 16px; color: #94a3b8; cursor: grab; opacity: 0.3; }
.cls-module-header:hover .cls-module-drag { opacity: 1; }
.cls-module-name { font-weight: 600; font-size: 14px; flex: 1; }
.cls-module-count { font-size: 11px; color: #94a3b8; background: #f0f2f8; padding: 2px 8px; border-radius: 10px; }
.cls-module-actions { display: flex; gap: 2px; opacity: 0; transition: opacity 0.15s; }
.cls-module-header:hover .cls-module-actions { opacity: 1; }
.cls-module-items { padding: 0 18px 10px 48px; display: none; }
.cls-module-header.expanded + .cls-module-items { display: block; }

.cls-module-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  transition: background 0.15s; cursor: pointer; margin-bottom: 2px;
}
.cls-module-item:hover { background: #f0f2f8; }
.cls-item-icon {
  width: 32px; height: 32px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cls-item-icon .material-symbols-outlined { font-size: 18px; }
.cls-item-icon--pdf { background: #fee2e2; color: #ef4444; }
.cls-item-icon--video { background: #ede9fe; color: #8b5cf6; }
.cls-item-icon--link { background: #dbeafe; color: #3b82f6; }
.cls-item-icon--doc { background: #d1fae5; color: #10b981; }
.cls-item-icon--slides { background: #fef3c7; color: #f59e0b; }
.cls-item-icon--text { background: #e0e7ff; color: #6366f1; }
.cls-item-info { flex: 1; }
.cls-item-name { font-size: 13px; font-weight: 500; }
.cls-item-meta { font-size: 11px; color: #94a3b8; margin-top: 1px; }
.cls-item-actions { display: flex; gap: 2px; opacity: 0; }
.cls-module-item:hover .cls-item-actions { opacity: 1; }

/* Module overview (rich content header) */
.cls-module-overview {
  background: #f8fafc; border-radius: 10px; padding: 18px 20px; margin-bottom: 14px;
  border: 1px solid rgba(0,0,0,0.04);
}
.cls-module-overview-content {
  font-size: 14px; line-height: 1.7; color: #334155;
}
.cls-module-overview-content p { margin: 0 0 10px; }
.cls-module-overview-content ul, .cls-module-overview-content ol { margin: 8px 0; padding-left: 24px; }
.cls-module-overview-content li { margin-bottom: 4px; }
.cls-module-overview-content strong, .cls-module-overview-content b { font-weight: 700; }
.cls-module-overview-content u { text-decoration: underline; }
.cls-module-overview-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 8px 0; }

/* Topic/item list (D2L-inspired) */
.cls-topic-list { margin-top: 4px; }
.cls-topic-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; border-radius: 10px; margin-bottom: 2px;
  border: 1px solid transparent; transition: all 0.15s;
}
.cls-topic-item:hover {
  background: #f8fafc; border-color: rgba(0,0,0,0.06);
}
.cls-topic-item .cls-item-icon { margin-top: 2px; }
.cls-topic-item-content { flex: 1; min-width: 0; }
.cls-topic-link {
  font-size: 14px; font-weight: 600; color: #1e40af;
  text-decoration: none; display: inline-block;
}
.cls-topic-link:hover { text-decoration: underline; }
.cls-topic-title {
  font-size: 14px; font-weight: 600; color: #1e293b;
}
.cls-topic-badge {
  display: inline-block; font-size: 11px; color: #64748b;
  background: #f1f5f9; padding: 1px 8px; border-radius: 4px;
  margin-top: 3px; font-weight: 500;
}
.cls-topic-desc {
  font-size: 12px; color: #94a3b8; margin-top: 4px;
  line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.cls-topic-item:hover .cls-item-actions { opacity: 1; }

/* Add toolbar */
.cls-add-toolbar {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px;
  padding-top: 10px; border-top: 1px dashed rgba(0,0,0,0.06);
}

/* Sub-module nesting */
.cls-submodule-wrap { padding-left: 24px; border-left: 2px solid rgba(0,0,0,0.04); margin-left: 20px; }

/* Add module/item buttons */
.cls-add-module-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 12px; border: 2px dashed rgba(0,0,0,0.1);
  border-radius: 16px; background: none;
  color: #94a3b8; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.15s; font-family: 'Be Vietnam Pro', sans-serif; margin-top: 10px;
}
.cls-add-module-btn:hover { border-color: #1e3a5f; color: #1e3a5f; background: #f8f9fd; }

.cls-add-item-btn {
  display: inline-flex; align-items: center; gap: 3px; padding: 5px 10px; border-radius: 7px;
  border: 1px dashed rgba(0,0,0,0.1); background: none;
  color: #94a3b8; font-size: 11px; font-weight: 500; cursor: pointer; font-family: 'Be Vietnam Pro', sans-serif;
}
.cls-add-item-btn:hover { border-color: #6366f1; color: #6366f1; background: #eef0ff; }
.cls-add-item-btn .material-symbols-outlined { font-size: 14px; }

/* ── Two-Panel Content Browser (Student) ── */
.cls-two-panel {
  display: flex; background: var(--bg-white, #fff);
  border-radius: 16px; border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 1px 3px rgba(0,23,74,0.06); overflow: hidden; min-height: 460px;
}
.cls-panel-sidebar {
  width: 260px; min-width: 260px; border-right: 1px solid rgba(0,0,0,0.06);
  background: #f8f9fd; overflow-y: auto;
}
.cls-panel-sidebar-header {
  padding: 14px 16px; font-weight: 700; font-size: 12px;
  color: #64748b; text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.cls-tree-label {
  font-size: 10px; font-weight: 700; color: #94a3b8;
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 12px 16px 4px; user-select: none;
}
.cls-tree-sub-label {
  font-size: 10px; font-weight: 600; color: #6366f1;
  padding: 8px 16px 3px 28px;
}
.cls-tree-item {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 16px; font-size: 13px; cursor: pointer;
  color: #64748b; transition: all 0.15s;
  border-left: 3px solid transparent;
}
.cls-tree-item:hover { background: rgba(30,58,95,0.04); }
.cls-tree-item--active { background: #fff; color: #1e3a5f; font-weight: 600; border-left-color: #1e3a5f; }
.cls-tree-item .material-symbols-outlined { font-size: 16px; }
.cls-tree-item--sub { padding-left: 36px; font-size: 12px; }

.cls-panel-content { flex: 1; padding: 24px 28px; overflow-y: auto; }

/* ── Publish Toggle ── */
.cls-toggle {
  width: 36px; height: 20px; border-radius: 10px;
  background: #d1d5db; position: relative;
  cursor: pointer; transition: background 0.2s; flex-shrink: 0;
}
.cls-toggle--on { background: #10b981; }
.cls-toggle::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: left 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.cls-toggle--on::after { left: 18px; }

/* ── Discussion Thread ── */
.cls-discussion-thread {
  background: var(--bg-white, #fff); border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06); margin-bottom: 10px; overflow: hidden;
}
.cls-discussion-header {
  padding: 14px 18px; display: flex; align-items: center; gap: 12px;
  cursor: pointer; transition: background 0.15s;
}
.cls-discussion-header:hover { background: #f8f9fd; }
.cls-discussion-title { font-weight: 600; font-size: 14px; flex: 1; }
.cls-discussion-info { font-size: 11px; color: #94a3b8; display: flex; gap: 12px; }
.cls-discussion-body { padding: 0 18px 14px 60px; font-size: 13px; color: #64748b; line-height: 1.6; }
.cls-reply-card { display: flex; gap: 10px; padding: 12px 18px 12px 60px; border-top: 1px solid rgba(0,0,0,0.04); }
.cls-reply-input-wrap {
  display: flex; gap: 10px; padding: 14px 18px; border-top: 1px solid rgba(0,0,0,0.04); background: #f8f9fd;
}
.cls-reply-input {
  flex: 1; padding: 9px 14px; border: 1px solid rgba(0,0,0,0.1); border-radius: 8px;
  font-family: 'Be Vietnam Pro', sans-serif; font-size: 13px; outline: none;
}
.cls-reply-input:focus { border-color: #1e3a5f; }

/* ── Gradebook Table ── */
.cls-gradebook {
  width: 100%; border-collapse: collapse;
  background: var(--bg-white, #fff); border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.06); overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,23,74,0.06);
}
.cls-gradebook th {
  text-align: left; padding: 10px 16px; font-size: 11px;
  font-weight: 700; color: #94a3b8; text-transform: uppercase;
  letter-spacing: 0.5px; background: #f8f9fd; border-bottom: 1px solid rgba(0,0,0,0.06);
}
.cls-gradebook td { padding: 10px 16px; font-size: 13px; border-bottom: 1px solid rgba(0,0,0,0.04); }
.cls-gradebook tr:last-child td { border-bottom: none; }
.cls-gradebook-cat { background: #f8f9fd; font-weight: 700; font-size: 12px; }
.cls-grade-bar {
  height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden;
  width: 80px; display: inline-block; vertical-align: middle; margin-left: 8px;
}
.cls-grade-fill { height: 100%; border-radius: 3px; }

/* ── Calendar Grid ── */
.cls-cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px;
  background: rgba(0,0,0,0.06); border-radius: 16px; overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,23,74,0.06);
}
.cls-cal-header {
  background: #1e3a5f; color: #fff; padding: 8px; text-align: center;
  font-size: 11px; font-weight: 700;
}
.cls-cal-day {
  background: var(--bg-white, #fff); padding: 8px; min-height: 80px; font-size: 12px;
}
.cls-cal-day--today { background: #f8f9fd; }
.cls-cal-day--other { background: #f0f2f8; color: #94a3b8; }
.cls-cal-day-num { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.cls-cal-event {
  font-size: 10px; padding: 2px 5px; border-radius: 4px;
  margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.cls-cal-event--assignment { background: #eef0ff; color: #6366f1; }
.cls-cal-event--quiz { background: #fef3c7; color: #d97706; }
.cls-cal-event--discussion { background: #d1fae5; color: #059669; }
.cls-cal-event--event { background: #dbeafe; color: #2563eb; }

/* ── Attendance Table ── */
.cls-att-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
.cls-att-stat {
  background: var(--bg-white, #fff); border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06); padding: 16px; text-align: center;
}
.cls-att-num { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 28px; font-weight: 800; }
.cls-att-label { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.cls-att-dot {
  width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 6px;
}
.cls-att-dot--present { background: #10b981; }
.cls-att-dot--absent { background: #ef4444; }
.cls-att-dot--late { background: #f59e0b; }
.cls-att-dot--excused { background: #3b82f6; }

/* ── Announcement Card ── */
.cls-announcement {
  background: var(--bg-white, #fff); border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06); padding: 16px 20px;
  margin-bottom: 10px; transition: all 0.15s;
}
.cls-announcement:hover { box-shadow: 0 4px 12px rgba(0,23,74,0.08); }
.cls-announcement-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.cls-announcement-body { font-size: 13px; color: #64748b; line-height: 1.6; }
.cls-announcement-meta { font-size: 11px; color: #94a3b8; margin-top: 8px; display: flex; gap: 12px; }
.cls-announcement--pinned { border-left: 3px solid #f59e0b; }

/* ── Assignment Card ── */
.cls-assignment-card {
  background: var(--bg-white, #fff); border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06); padding: 16px 18px;
  margin-bottom: 10px; transition: all 0.15s;
}
.cls-assignment-card:hover { box-shadow: 0 4px 12px rgba(0,23,74,0.08); }

/* ── Stats Cards ── */
.cls-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.cls-stat-card {
  background: var(--bg-white, #fff); border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06); padding: 16px 18px; text-align: center;
}
.cls-stat-value { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 26px; font-weight: 800; }
.cls-stat-label { font-size: 11px; color: #94a3b8; margin-top: 2px; }

/* ── Tags ── */
.cls-tag-sm {
  padding: 1px 7px; border-radius: 5px; font-size: 9px; font-weight: 700; letter-spacing: 0.3px;
  display: inline-block;
}
.cls-tag-sm--active { background: #d1fae5; color: #059669; }
.cls-tag-sm--draft { background: #fef3c7; color: #d97706; }
.cls-tag-sm--closed { background: #e5e7eb; color: #64748b; }
.cls-tag-sm--overdue { background: #fee2e2; color: #dc2626; }
.cls-tag-sm--new { background: #dbeafe; color: #2563eb; }

/* ── AI Study Tools (Student Content) ── */
.cls-ai-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cls-ai-tools .cls-btn { justify-content: center; padding: 12px; }

/* ── Section Header ── */
.cls-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .cls-tab-header-top { flex-direction: column; gap: 12px; }
  .cls-tab-bar { margin: 0 -16px; padding: 0 16px; }
  .cls-two-panel { flex-direction: column; }
  .cls-panel-sidebar { width: 100%; min-width: 100%; border-right: none; border-bottom: 1px solid rgba(0,0,0,0.06); max-height: 200px; }
  .cls-att-grid { grid-template-columns: 1fr 1fr; }
  .cls-stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════════════════
   D2L-Style Content Pages (TOC + Module Page)
   ══════════════════════════════════════════ */

/* ── Breadcrumbs ── */
.cls-page-breadcrumbs {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  margin-bottom: 16px; font-size: 13px;
}
.cls-bc-link {
  color: var(--primary, #354996); text-decoration: none; font-weight: 500;
  transition: color 0.15s;
}
.cls-bc-link:hover { color: #1e3a5f; text-decoration: underline; }
.cls-bc-separator {
  color: #cbd5e1; display: flex; align-items: center;
}
.cls-bc-separator .material-symbols-outlined { font-size: 16px; }
.cls-bc-current {
  color: var(--text, #0f172a); font-weight: 600;
}

/* ── Module Page Layout ── */
.cls-page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 20px;
}
.cls-page-header-left { flex: 1; min-width: 0; }
.cls-page-header-right {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.cls-page-title {
  margin: 0; font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 24px; font-weight: 800; color: var(--text, #0f172a);
  line-height: 1.3;
}
.cls-page-meta {
  display: flex; align-items: center; gap: 10px; margin-top: 6px;
  font-size: 12px; color: var(--text-light, #64748b);
}
.cls-page-meta .cls-tag-sm { margin-left: 2px; }

.cls-page-overview {
  background: #f8fafc; border-radius: 12px; padding: 20px 24px;
  margin-bottom: 24px; border: 1px solid rgba(0,0,0,0.04);
}

.cls-page-section { margin-bottom: 24px; }
.cls-page-section-title {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 12px; font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px; font-weight: 700; color: #1e293b;
}
.cls-page-section-title .material-symbols-outlined { font-size: 20px; color: #2b5ea7; }

.cls-page-add-section {
  margin-top: 20px; padding-top: 16px;
  border-top: 1px dashed var(--border, #e2e8f0);
}

/* ── Sub-Module Accordion ── */
.cls-submod-section {
  background: var(--bg-white, #fff); border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06); margin-bottom: 8px;
  overflow: hidden; transition: box-shadow 0.2s;
}
.cls-submod-section:hover { box-shadow: 0 2px 8px rgba(0,23,74,0.06); }

.cls-submod-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; cursor: pointer; transition: background 0.15s;
  user-select: none;
}
.cls-submod-header:hover { background: #f8f9fd; }

.cls-submod-expand {
  background: none; border: none; cursor: pointer; padding: 2px;
  color: #94a3b8; display: flex; align-items: center; transition: transform 0.25s;
}
.cls-submod-expand .material-symbols-outlined { font-size: 18px; }
.cls-submod--expanded .cls-submod-expand { transform: rotate(90deg); }

.cls-submod-icon { color: #2b5ea7; display: flex; align-items: center; }
.cls-submod-icon .material-symbols-outlined { font-size: 20px; }

.cls-submod-title {
  flex: 1; font-weight: 600; font-size: 14px; color: var(--primary, #354996);
  text-decoration: none; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.cls-submod-title:hover { text-decoration: underline; }

.cls-submod-body {
  display: none; padding: 0 16px 14px 44px;
  border-top: 1px solid rgba(0,0,0,0.04);
}
.cls-submod--expanded .cls-submod-body { display: block; }

.cls-submod-overview {
  background: #f8fafc; border-radius: 8px; padding: 14px 16px;
  margin: 10px 0; border: 1px solid rgba(0,0,0,0.03);
}

/* ── Table of Contents Header ── */
.cls-content-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; gap: 12px;
}
.cls-content-header-left { flex: 1; }
.cls-content-header-right { flex-shrink: 0; }
.cls-content-title {
  display: flex; align-items: center; gap: 8px;
  margin: 0; font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px; font-weight: 700; color: #1e293b;
}
.cls-content-title .material-symbols-outlined { font-size: 22px; color: #2b5ea7; }

/* ── TOC Module Cards ── */
.cls-toc-list { display: flex; flex-direction: column; gap: 4px; }

.cls-toc-module {
  background: var(--bg-white, #fff); border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06); overflow: hidden;
  transition: box-shadow 0.2s;
}
.cls-toc-module:hover { box-shadow: 0 2px 10px rgba(0,23,74,0.06); }

.cls-toc-module--nested {
  background: transparent; border: none; border-radius: 0;
  border-left: 2px solid rgba(43,94,167,0.15); margin-left: 16px;
  padding-left: 12px;
}
.cls-toc-module--nested:hover { box-shadow: none; }

.cls-toc-module-header {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px; transition: background 0.15s;
}
.cls-toc-module:not(.cls-toc-module--nested) > .cls-toc-module-header:hover {
  background: #f8f9fd;
}

.cls-toc-expand-btn {
  background: none; border: none; cursor: pointer; padding: 2px;
  color: #94a3b8; display: flex; align-items: center; transition: transform 0.25s;
  flex-shrink: 0;
}
.cls-toc-expand-btn .material-symbols-outlined { font-size: 18px; }
.cls-toc-module--expanded > .cls-toc-module-header .cls-toc-expand-btn {
  transform: rotate(90deg);
}
.cls-toc-expand-spacer { width: 22px; flex-shrink: 0; }

.cls-toc-module-icon { color: #2b5ea7; display: flex; align-items: center; flex-shrink: 0; }
.cls-toc-module-icon .material-symbols-outlined { font-size: 22px; }

.cls-toc-module-name {
  flex: 1; font-weight: 600; font-size: 15px; color: var(--primary, #354996);
  text-decoration: none; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.cls-toc-module-name:hover { text-decoration: underline; color: #1e3a5f; }

.cls-toc-badge {
  font-size: 11px; color: #94a3b8; background: #f0f2f8;
  padding: 2px 8px; border-radius: 10px; flex-shrink: 0; white-space: nowrap;
}

.cls-toc-actions {
  display: flex; gap: 2px; opacity: 0; transition: opacity 0.15s; flex-shrink: 0;
}
.cls-toc-module-header:hover .cls-toc-actions { opacity: 1; }
.cls-submod-header:hover .cls-toc-actions { opacity: 1; }

/* TOC body (expandable section under each module) */
.cls-toc-module-body {
  display: none; padding: 0 16px 12px 52px;
}
.cls-toc-module--expanded > .cls-toc-module-body { display: block; }

.cls-toc-module-desc {
  font-size: 13px; color: var(--text-light, #64748b); line-height: 1.6;
  margin-bottom: 8px; padding: 8px 12px;
  background: #f8fafc; border-radius: 8px; border: 1px solid rgba(0,0,0,0.03);
}
.cls-toc-module-desc p { margin: 0 0 6px; }
.cls-toc-module-desc p:last-child { margin-bottom: 0; }

/* Compact item list in TOC */
.cls-toc-items {
  display: flex; flex-direction: column; gap: 2px; margin-top: 4px;
}
.cls-toc-item {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px; border-radius: 6px; transition: background 0.15s;
}
.cls-toc-item:hover { background: rgba(43,94,167,0.04); }
.cls-toc-item .cls-item-icon .material-symbols-outlined { font-size: 14px; }
.cls-toc-item-name {
  font-size: 13px; color: #475569; font-weight: 500;
  text-decoration: none; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; min-width: 0;
}
a.cls-toc-item-name { color: #1e40af; }
a.cls-toc-item-name:hover { text-decoration: underline; }

/* ── Empty State (Content) ── */
.cls-empty-content {
  text-align: center; padding: 60px 20px; color: #94a3b8;
}
.cls-empty-content .material-symbols-outlined {
  font-size: 56px; margin-bottom: 12px; opacity: 0.4; display: block;
}
.cls-empty-content p { margin: 0; font-size: 15px; }
.cls-empty-content-hint { font-size: 13px !important; margin-top: 6px !important; opacity: 0.7; }

/* ── Dark Mode — D2L Content Pages ── */
[data-theme="dark"] .cls-page-title { color: #f1f5f9; }
[data-theme="dark"] .cls-page-meta { color: #94a3b8; }
[data-theme="dark"] .cls-page-overview { background: rgba(30,58,95,0.1); border-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .cls-page-section-title { color: #f1f5f9; }
[data-theme="dark"] .cls-page-add-section { border-top-color: rgba(255,255,255,0.08); }

[data-theme="dark"] .cls-bc-link { color: #93c5fd; }
[data-theme="dark"] .cls-bc-link:hover { color: #bfdbfe; }
[data-theme="dark"] .cls-bc-current { color: #f1f5f9; }
[data-theme="dark"] .cls-bc-separator { color: #475569; }

[data-theme="dark"] .cls-submod-section { background: var(--bg-white, #1e293b); border-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .cls-submod-header:hover { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .cls-submod-title { color: #93c5fd; }
[data-theme="dark"] .cls-submod-body { border-top-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .cls-submod-overview { background: rgba(30,58,95,0.1); border-color: rgba(255,255,255,0.04); }

[data-theme="dark"] .cls-content-title { color: #f1f5f9; }
[data-theme="dark"] .cls-toc-module { background: var(--bg-white, #1e293b); border-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .cls-toc-module--nested { background: transparent; border-color: rgba(147,197,253,0.15); }
[data-theme="dark"] .cls-toc-module-header:hover { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .cls-toc-module-name { color: #93c5fd; }
[data-theme="dark"] .cls-toc-module-name:hover { color: #bfdbfe; }
[data-theme="dark"] .cls-toc-badge { background: rgba(255,255,255,0.08); color: #94a3b8; }
[data-theme="dark"] .cls-toc-module-desc { background: rgba(30,58,95,0.1); border-color: rgba(255,255,255,0.04); color: #94a3b8; }
[data-theme="dark"] .cls-toc-item:hover { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .cls-toc-item-name { color: #cbd5e1; }
[data-theme="dark"] a.cls-toc-item-name { color: #93c5fd; }
[data-theme="dark"] .cls-empty-content { color: #64748b; }

/* ── Responsive — D2L Content Pages ── */
@media (max-width: 768px) {
  .cls-page-header { flex-direction: column; }
  .cls-page-header-right { width: 100%; justify-content: flex-start; }
  .cls-content-header { flex-direction: column; align-items: flex-start; }
  .cls-toc-module-body { padding-left: 32px; }
  .cls-submod-body { padding-left: 24px; }
  .cls-page-breadcrumbs { font-size: 12px; }
}

/* ══════════════════════════════════════════════════
   MASTERY TAB (.mst-*)
   ══════════════════════════════════════════════════ */

/* ── Header ── */
.mst-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 12px; flex-wrap: wrap; }
.mst-header__left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mst-header__right { display: flex; gap: 10px; }
.mst-title { margin: 0; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 22px; font-weight: 800; color: var(--text, #0f172a); display: flex; align-items: center; gap: 8px; }
.mst-title .material-symbols-outlined { font-size: 26px; color: #354996; }
.mst-plan-name { font-size: 13px; color: #64748b; font-weight: 500; }

/* ── Loading ── */
.mst-loading { text-align: center; padding: 60px 20px; color: #94a3b8; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.mst-loading .material-symbols-outlined { font-size: 20px; animation: mst-spin 1.2s linear infinite; }
@keyframes mst-spin { to { transform: rotate(360deg); } }

/* ── Landing Grid ── */
.mst-landing { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }

/* ── Topic Card ── */
.mst-topic-card { display: flex; align-items: center; gap: 16px; padding: 20px; background: var(--bg-white, #fff); border: 1px solid rgba(0,0,0,0.06); border-radius: 16px; cursor: pointer; transition: all 0.25s ease; }
.mst-topic-card:hover { border-color: rgba(53,73,150,0.2); box-shadow: 0 8px 24px rgba(53,73,150,0.1); transform: translateY(-2px); }
.mst-topic-card__ring { flex-shrink: 0; }
.mst-topic-card__body { flex: 1; min-width: 0; }
.mst-topic-card__icon { margin-bottom: 4px; }
.mst-topic-card__icon .material-symbols-outlined { font-size: 22px; }
.mst-topic-card__title { margin: 0 0 4px; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 16px; font-weight: 700; color: var(--text, #1e293b); }
.mst-topic-card__meta { display: block; font-size: 12px; color: #94a3b8; margin-bottom: 6px; }
.mst-topic-card__arrow { color: #cbd5e1; font-size: 24px; flex-shrink: 0; }

/* ── Progress Ring ── */
.mst-progress-ring { display: block; }

/* ── Progress Bar ── */
.mst-progress-bar { width: 100%; height: 6px; background: rgba(0,0,0,0.06); border-radius: 3px; overflow: hidden; margin: 6px 0; }
.mst-progress-bar__fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; min-width: 0; }

/* ── Status Badge ── */
.mst-status-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 9999px; text-transform: uppercase; letter-spacing: 0.3px; }
.mst-status-badge .material-symbols-outlined { font-size: 14px; }

/* ── Back Button ── */
.mst-back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: #354996; background: none; border: none; cursor: pointer; padding: 6px 0; margin-bottom: 16px; font-family: 'Be Vietnam Pro', sans-serif; }
.mst-back:hover { color: #1e3a5f; }
.mst-back .material-symbols-outlined { font-size: 20px; }

/* ── Topic Header ── */
.mst-topic-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 16px; }
.mst-topic-header__info { flex: 1; }
.mst-topic-header__pct { font-size: 14px; font-weight: 700; margin-top: 4px; display: block; }
.mst-topic-header__ring { flex-shrink: 0; }

/* ── Summary Badges ── */
.mst-summary-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.mst-summary-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 9999px; }
.mst-summary-badge .material-symbols-outlined { font-size: 16px; }
.mst-summary-badge--mastered { background: rgba(16,185,129,0.1); color: #10b981; }
.mst-summary-badge--learning { background: rgba(245,158,11,0.1); color: #f59e0b; }
.mst-summary-badge--needs-work { background: rgba(239,68,68,0.1); color: #ef4444; }
.mst-summary-badge--not-started { background: rgba(0,0,0,0.04); color: #94a3b8; }

/* ── Section List ── */
.mst-section-list { display: flex; flex-direction: column; gap: 12px; }

/* ── Section Card ── */
.mst-section-card { background: var(--bg-white, #fff); border: 1px solid rgba(0,0,0,0.06); border-radius: 14px; padding: 18px 20px; transition: box-shadow 0.2s; }
.mst-section-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.04); }
.mst-section-card__top { display: flex; align-items: center; gap: 16px; }
.mst-section-card__info { flex: 1; min-width: 0; }
.mst-section-card__title { margin: 0 0 2px; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 15px; font-weight: 700; color: var(--text, #1e293b); }
.mst-section-card__status { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.mst-section-card__qcount { font-size: 12px; color: #94a3b8; }

/* ── Learning Objectives ── */
.mst-objectives { margin-top: 12px; border-top: 1px solid rgba(0,0,0,0.04); padding-top: 10px; }
.mst-objectives__toggle { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: #64748b; background: none; border: none; cursor: pointer; padding: 4px 0; font-family: 'Be Vietnam Pro', sans-serif; }
.mst-objectives__toggle:hover { color: #354996; }
.mst-objectives__toggle .material-symbols-outlined { font-size: 18px; }
.mst-objectives__list { margin: 8px 0 0 18px; padding: 0; list-style: disc; }
.mst-objectives__list li { font-size: 13px; color: #475569; line-height: 1.6; margin-bottom: 4px; }

/* ── Quiz Container ── */
.mst-quiz-container { max-width: 640px; margin: 0 auto; }

/* ── Quiz Top Bar ── */
.mst-quiz-topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.mst-quiz-topbar .mst-back { margin-bottom: 0; }
.mst-quiz-progress { flex: 1; }
.mst-quiz-counter { font-size: 13px; font-weight: 700; color: #64748b; white-space: nowrap; }

/* ── Difficulty Badge ── */
.mst-diff-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 9999px; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 12px; }

/* ── Question Card ── */
.mst-question-card { background: var(--bg-white, #fff); border: 1px solid rgba(0,0,0,0.06); border-radius: 16px; padding: 24px; margin-bottom: 16px; }
.mst-question-text { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 17px; font-weight: 700; color: var(--text, #1e293b); line-height: 1.5; margin: 0 0 20px; }

/* ── Multiple Choice ── */
.mst-choices { display: flex; flex-direction: column; gap: 10px; }
.mst-choice { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--bg-white, #fff); border: 2px solid rgba(0,0,0,0.08); border-radius: 12px; cursor: pointer; transition: all 0.15s; font-size: 14px; color: var(--text, #1e293b); }
.mst-choice:hover { border-color: rgba(53,73,150,0.3); background: rgba(53,73,150,0.02); }
.mst-choice__letter { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: rgba(0,0,0,0.04); font-size: 13px; font-weight: 800; color: #64748b; flex-shrink: 0; }
.mst-choice__text { flex: 1; font-family: 'Be Vietnam Pro', sans-serif; line-height: 1.4; }
.mst-ma-hint { font-size: 12px; color: #64748b; display: flex; align-items: center; gap: 4px; margin-bottom: 8px; font-weight: 600; }
.mst-ma-hint .material-symbols-outlined { font-size: 16px; color: #3b82f6; }
.mst-choice__check { display: flex; align-items: center; flex-shrink: 0; color: #94a3b8; }
.mst-choice__check .material-symbols-outlined { font-size: 22px; }
.mst-choice--selected .mst-choice__check { color: #354996; }
.mst-choice--correct .mst-choice__check { color: #10b981 !important; }
.mst-choice--wrong .mst-choice__check { color: #ef4444 !important; }
.mst-choice--selected { border-color: #354996; background: rgba(53,73,150,0.1); box-shadow: 0 0 0 3px rgba(53,73,150,0.15), 0 2px 8px rgba(53,73,150,0.12); transform: scale(1.01); }
.mst-choice--selected .mst-choice__letter { background: #354996; color: #fff; box-shadow: 0 2px 6px rgba(53,73,150,0.4); }
.mst-choice--selected .mst-choice__text { font-weight: 600; color: #1e3a5f; }
.mst-choice--correct { border-color: #10b981 !important; background: rgba(16,185,129,0.06) !important; }
.mst-choice--correct .mst-choice__letter { background: #10b981 !important; color: #fff !important; }
.mst-choice--wrong { border-color: #ef4444 !important; background: rgba(239,68,68,0.04) !important; }
.mst-choice--wrong .mst-choice__letter { background: #ef4444 !important; color: #fff !important; }

/* ── True / False ── */
.mst-tf-choices { display: flex; gap: 12px; }
.mst-tf-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 18px; border: 2px solid rgba(0,0,0,0.08); border-radius: 14px; background: var(--bg-white, #fff); cursor: pointer; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 16px; font-weight: 700; color: var(--text, #1e293b); transition: all 0.15s; }
.mst-tf-btn:hover { border-color: rgba(53,73,150,0.3); background: rgba(53,73,150,0.03); }
.mst-tf-btn .material-symbols-outlined { font-size: 22px; }
.mst-tf-btn.mst-choice--selected { border-color: #354996; background: rgba(53,73,150,0.1); box-shadow: 0 0 0 3px rgba(53,73,150,0.15), 0 2px 8px rgba(53,73,150,0.12); transform: scale(1.03); font-weight: 800; color: #1e3a5f; }
.mst-tf-btn.mst-choice--selected .material-symbols-outlined { color: #354996; }
.mst-tf-btn.mst-choice--correct { border-color: #10b981 !important; background: rgba(16,185,129,0.1) !important; box-shadow: 0 0 0 3px rgba(16,185,129,0.2) !important; color: #065f46 !important; }
.mst-tf-btn.mst-choice--wrong { border-color: #ef4444 !important; background: rgba(239,68,68,0.08) !important; box-shadow: 0 0 0 3px rgba(239,68,68,0.2) !important; color: #991b1b !important; }

/* ── Fill Blank ── */
.mst-fill { margin-top: 4px; }
.mst-fill-input { width: 100%; padding: 14px 16px; border: 2px solid rgba(0,0,0,0.08); border-radius: 12px; font-family: 'Be Vietnam Pro', sans-serif; font-size: 15px; color: var(--text, #1e293b); outline: none; transition: border-color 0.15s; box-sizing: border-box; background: var(--bg-white, #fff); }
.mst-fill-input:focus { border-color: #354996; }
.mst-input-error { border-color: #ef4444 !important; animation: mst-shake 0.35s ease-in-out; }
@keyframes mst-shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ── Matching: correct-answer graph (shown below user's attempt when wrong) ── */
.mst-match-correct-label { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 14px; color: #065f46; margin: 4px 0 10px; display: flex; align-items: center; gap: 6px; }
.mst-match-correct-label::before { content: ''; width: 14px; height: 14px; border-radius: 50%; background: #10b981; display: inline-block; }
.mst-match-correct-graph { display: flex; flex-direction: column; gap: 10px; background: #f0fdf4; border: 1px solid #10b98140; border-radius: 12px; padding: 14px; }
.mst-match-correct-row { display: flex; align-items: center; gap: 10px; }
.mst-match-correct-node { padding: 10px 14px; background: #fff; color: #065f46; border: 2px solid #10b981; border-radius: 8px; font-family: 'Be Vietnam Pro', sans-serif; font-weight: 600; font-size: 13px; line-height: 1.35; }
.mst-match-correct-node--left { flex: 0 0 auto; min-width: 100px; text-align: center; white-space: nowrap; }
.mst-match-correct-node--right { flex: 1; }
.mst-match-correct-line { flex: 0 0 50px; height: 3px; background: #10b981; border-radius: 2px; position: relative; display: flex; align-items: center; justify-content: center; }
.mst-match-correct-arrow { position: absolute; right: -2px; color: #10b981; font-size: 18px; font-weight: 700; line-height: 1; background: #f0fdf4; padding: 0 2px; }
@media (max-width: 560px) {
  .mst-match-correct-row { flex-direction: column; align-items: stretch; gap: 4px; }
  .mst-match-correct-line { width: 3px; height: 20px; align-self: center; flex: 0 0 20px; }
  .mst-match-correct-arrow { position: static; transform: rotate(90deg); background: transparent; }
  .mst-match-correct-node--left { white-space: normal; text-align: center; }
}
[data-theme="dark"] .mst-match-correct-label { color: #34d399; }
[data-theme="dark"] .mst-match-correct-graph { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.35); }
[data-theme="dark"] .mst-match-correct-node { background: #1e293b; color: #d1fae5; }

/* ── Matching ── */
.mst-match { display: flex; gap: 20px; }
.mst-match-col { flex: 1; display: flex; flex-direction: column; gap: 8px; }
/* Matching — node-and-line system */
.mst-match-wrap { position: relative; }
.mst-match-svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.mst-match-svg line { pointer-events: stroke; cursor: pointer; }
.mst-match-svg line:hover { stroke: #ef4444 !important; stroke-width: 4 !important; }
.mst-match { display: flex; gap: 60px; justify-content: center; position: relative; z-index: 1; }
.mst-match-col { display: flex; flex-direction: column; gap: 12px; flex: 1; max-width: 260px; }
.mst-match-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border: 2px solid rgba(0,0,0,0.08); border-radius: 12px;
  font-size: 13px; font-weight: 600; color: var(--text, #1e293b);
  background: var(--bg-white, #fff); transition: all 0.15s;
}
.mst-match-item--left { flex-direction: row; }
.mst-match-item--right { flex-direction: row; }
.mst-match-item__text { flex: 1; }
.mst-match-item--paired { border-color: #8b5cf6; background: rgba(139,92,246,0.06); }
.mst-match-item--correct { border-color: #10b981 !important; background: rgba(16,185,129,0.06) !important; }
.mst-match-item--wrong { border-color: #ef4444 !important; background: rgba(239,68,68,0.04) !important; }

/* Connection nodes (dots) */
.mst-match-node {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  background: #cbd5e1; border: 3px solid #fff;
  box-shadow: 0 0 0 2px #cbd5e1;
  cursor: grab; transition: all 0.2s;
  position: relative; z-index: 3;
}
.mst-match-node:hover {
  background: #354996; box-shadow: 0 0 0 2px #354996, 0 0 8px rgba(53,73,150,0.4);
  transform: scale(1.3);
}
.mst-match-node--active {
  background: #354996 !important; box-shadow: 0 0 0 2px #354996, 0 0 12px rgba(53,73,150,0.5) !important;
  transform: scale(1.4); animation: mst-node-pulse 1s infinite;
}
@keyframes mst-node-pulse {
  0%, 100% { box-shadow: 0 0 0 2px #354996, 0 0 8px rgba(53,73,150,0.4); }
  50% { box-shadow: 0 0 0 2px #354996, 0 0 16px rgba(53,73,150,0.6); }
}
.mst-match-node--paired { background: #8b5cf6; box-shadow: 0 0 0 2px #8b5cf6; }
.mst-match-node--correct { background: #10b981 !important; box-shadow: 0 0 0 2px #10b981 !important; }
.mst-match-node--wrong { background: #ef4444 !important; box-shadow: 0 0 0 2px #ef4444 !important; }
.mst-match-pairs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mst-match-pairs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.mst-match-pair-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 8px; background: rgba(139,92,246,0.08); color: #7c3aed; }
.mst-match-pair-remove { background: none; border: none; cursor: pointer; color: #94a3b8; font-size: 16px; font-weight: 700; padding: 0 2px; line-height: 1; }
.mst-match-pair-remove:hover { color: #ef4444; }

/* ── Ordering ── */
.mst-order { display: flex; flex-direction: column; gap: 8px; }
.mst-order-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 2px solid rgba(0,0,0,0.08); border-radius: 10px; background: var(--bg-white, #fff); transition: box-shadow 0.15s; }
.mst-order-item__num { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(53,73,150,0.1); color: #354996; font-size: 12px; font-weight: 800; flex-shrink: 0; }
.mst-order-item__text { flex: 1; font-size: 14px; font-weight: 600; color: var(--text, #1e293b); }
.mst-order-item__arrows { display: flex; flex-direction: column; gap: 2px; }
.mst-arrow-btn { display: flex; align-items: center; justify-content: center; width: 28px; height: 22px; border: 1px solid rgba(0,0,0,0.08); border-radius: 6px; background: var(--bg-white, #fff); cursor: pointer; color: #64748b; transition: all 0.15s; padding: 0; }
.mst-arrow-btn:hover { background: rgba(53,73,150,0.06); color: #354996; border-color: rgba(53,73,150,0.2); }
.mst-arrow-btn .material-symbols-outlined { font-size: 16px; }

/* ── Short Answer ── */
.mst-short-answer { margin-top: 4px; }
.mst-short-input { width: 100%; padding: 14px 16px; border: 2px solid rgba(0,0,0,0.08); border-radius: 12px; font-family: 'Be Vietnam Pro', sans-serif; font-size: 14px; color: var(--text, #1e293b); outline: none; resize: vertical; transition: border-color 0.15s; box-sizing: border-box; background: var(--bg-white, #fff); line-height: 1.5; }
.mst-short-input:focus { border-color: #354996; }

/* ── Hint ── */
.mst-hint-area { margin-bottom: 14px; animation: mst-slide-in 0.25s ease; }
.mst-hint-box {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 18px; border-radius: 12px;
  background: linear-gradient(135deg, #fef9c3, #fef3c7);
  border: 1px solid rgba(245,158,11,0.2);
}
.mst-hint-icon { color: #f59e0b; flex-shrink: 0; }
.mst-hint-icon .material-symbols-outlined { font-size: 22px; }
.mst-hint-text { font-size: 14px; color: #92400e; line-height: 1.55; font-weight: 500; }
.mst-hint-btn { display: inline-flex; align-items: center; gap: 5px; }
.mst-hint-btn--used { color: #f59e0b; border-color: #f59e0b; }
[data-theme="dark"] .mst-hint-box { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.25); }
[data-theme="dark"] .mst-hint-text { color: #fbbf24; }

/* ── Preview Banner ── */
.mst-preview-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px; margin-bottom: 14px;
  background: linear-gradient(135deg, #dbeafe, #e0e7ff);
  border: 1px solid rgba(59,130,246,0.2);
  font-size: 13px; color: #1e40af;
}
.mst-preview-banner .material-symbols-outlined { font-size: 18px; }
[data-theme="dark"] .mst-preview-banner { background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.25); color: #93c5fd; }

/* Section card actions */
.mst-section-card__actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* ══════════════════════════════════════════════ */
/*  MASTERY EDITOR                               */
/* ══════════════════════════════════════════════ */

.mst-editor-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap;
}
.mst-editor-header__right { margin-left: auto; display: flex; gap: 8px; }

.mst-editor-panels {
  display: flex; gap: 0; min-height: 600px;
  border: 1px solid var(--border, #e2e8f0); border-radius: 14px; overflow: hidden;
  background: var(--card-bg, #fff);
}

/* Left tree */
.mst-editor-tree {
  width: 320px; min-width: 280px; flex-shrink: 0;
  border-right: 1px solid var(--border, #e2e8f0);
  overflow-y: auto; max-height: 700px;
  background: #f8fafc;
}
.mst-editor-tree__empty { padding: 40px 20px; text-align: center; color: #94a3b8; font-size: 13px; }

.mst-editor-tree__topic-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; cursor: pointer; font-weight: 600; font-size: 14px; color: #1e293b;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: background 0.12s;
}
.mst-editor-tree__topic-header:hover { background: #f1f5f9; }

.mst-editor-tree__section {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px 8px 36px; cursor: pointer; font-size: 13px; color: #475569;
  border-bottom: 1px solid rgba(0,0,0,0.02);
  transition: background 0.12s;
}
.mst-editor-tree__section:hover { background: #f1f5f9; }

.mst-editor-tree__question {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 14px 5px 52px; cursor: pointer; font-size: 12px; color: #94a3b8;
  transition: background 0.12s;
}
.mst-editor-tree__question:hover { background: #f1f5f9; }
.mst-editor-tree__q-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mst-editor-tree__count {
  margin-left: auto; font-size: 11px; color: #94a3b8;
  background: #f0f2f8; padding: 1px 6px; border-radius: 8px; flex-shrink: 0;
}
.mst-editor-tree__topic-name, .mst-editor-tree__section-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mst-editor-tree--active { background: #dbeafe !important; }
.mst-editor-tree--active .mst-editor-tree__section-name,
.mst-editor-tree--active .mst-editor-tree__q-text { color: #1e40af; font-weight: 600; }

/* Right detail panel */
.mst-editor-detail {
  flex: 1; padding: 24px; overflow-y: auto; max-height: 700px;
}
.mst-editor-detail__empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; min-height: 300px; color: #94a3b8; text-align: center;
}
.mst-editor-detail__empty .material-symbols-outlined { font-size: 48px; margin-bottom: 12px; }

.mst-editor-form h3 {
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 16px; font-weight: 700;
  color: #1e293b; margin: 0 0 16px; display: flex; align-items: center; gap: 8px;
}
.mst-editor-label {
  display: block; font-size: 12px; font-weight: 600; color: #64748b;
  margin-top: 14px; margin-bottom: 2px; text-transform: uppercase; letter-spacing: 0.03em;
}
.mst-editor-form__actions {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px;
  padding-top: 14px; border-top: 1px solid var(--border, #e2e8f0);
}

/* Dark mode */
[data-theme="dark"] .mst-editor-tree { background: var(--bg, #1a1a2e); }
[data-theme="dark"] .mst-editor-tree__topic-header { color: #e0e0e0; border-color: rgba(255,255,255,0.04); }
[data-theme="dark"] .mst-editor-tree__topic-header:hover,
[data-theme="dark"] .mst-editor-tree__section:hover,
[data-theme="dark"] .mst-editor-tree__question:hover { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .mst-editor-tree--active { background: rgba(59,130,246,0.15) !important; }
[data-theme="dark"] .mst-editor-detail { background: var(--bg, #1a1a2e); }
[data-theme="dark"] .mst-editor-form h3 { color: #e0e0e0; }

/* Mobile */
@media (max-width: 768px) {
  .mst-editor-panels { flex-direction: column; }
  .mst-editor-tree { width: 100%; max-height: 250px; border-right: none; border-bottom: 1px solid var(--border, #e2e8f0); }
  .mst-editor-detail { max-height: none; }
}

/* ── Feedback Panel ── */
.mst-feedback-area { margin-bottom: 16px; }
.mst-feedback { padding: 16px 18px; border-radius: 14px; margin-bottom: 4px; animation: mst-slide-in 0.3s ease; }
@keyframes mst-slide-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.mst-feedback__header { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 8px; }
.mst-feedback__header .material-symbols-outlined { font-size: 22px; }
.mst-feedback--correct { background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.2); }
.mst-feedback--correct .mst-feedback__header { color: #10b981; }
.mst-feedback--wrong { background: rgba(239,68,68,0.06); border: 1px solid rgba(239,68,68,0.15); }
.mst-feedback--wrong .mst-feedback__header { color: #ef4444; }
.mst-correct-answer { font-size: 13px; color: #475569; margin: 6px 0; line-height: 1.5; }

/* ── Explanation ── */
.mst-explanation { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: #475569; line-height: 1.6; margin-top: 10px; padding: 10px 12px; background: rgba(245,158,11,0.06); border-radius: 10px; }
.mst-explanation .material-symbols-outlined { font-size: 18px; color: #f59e0b; flex-shrink: 0; margin-top: 1px; }

/* ── Memory Tip ── */
.mst-memory-tip { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: #475569; line-height: 1.6; margin-top: 8px; padding: 10px 12px; background: rgba(139,92,246,0.06); border-radius: 10px; border-left: 3px solid #8b5cf6; }
.mst-memory-tip .material-symbols-outlined { font-size: 18px; color: #8b5cf6; flex-shrink: 0; margin-top: 1px; }

/* ── Keywords (short answer) ── */
.mst-kw-found { font-weight: 700; color: #10b981; background: rgba(16,185,129,0.1); padding: 1px 6px; border-radius: 4px; }
.mst-kw-missed { font-weight: 600; color: #ef4444; text-decoration: line-through; opacity: 0.7; }

/* ── Quiz Actions ── */
.mst-quiz-actions { display: flex; justify-content: center; gap: 10px; margin-top: 8px; }
.mst-check-btn, .mst-continue-btn { min-width: 140px; justify-content: center; font-size: 15px; padding: 12px 24px; }

/* ── Results View ── */
.mst-results { max-width: 640px; margin: 0 auto; }
.mst-results-score { text-align: center; padding: 32px 0 20px; }
.mst-results-msg { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 26px; font-weight: 800; margin: 16px 0 4px; }
.mst-results-detail { font-size: 15px; color: #64748b; margin: 0; }
.mst-results-summary { text-align: center; margin-bottom: 24px; }
.mst-results-know { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: #10b981; }
.mst-results-know .material-symbols-outlined { font-size: 18px; }

/* ── Results Breakdown ── */
.mst-results-breakdown { margin-bottom: 24px; }
.mst-results-breakdown h3 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 16px; font-weight: 700; color: var(--text, #1e293b); margin: 0 0 12px; }
.mst-results-item { padding: 14px 16px; border-radius: 12px; margin-bottom: 8px; }
.mst-results-item--correct { background: rgba(16,185,129,0.04); border: 1px solid rgba(16,185,129,0.12); }
.mst-results-item--wrong { background: rgba(239,68,68,0.03); border: 1px solid rgba(239,68,68,0.1); }
.mst-results-item__header { display: flex; align-items: flex-start; gap: 8px; }
.mst-results-item__icon .material-symbols-outlined { font-size: 20px; }
.mst-results-item--correct .mst-results-item__icon { color: #10b981; }
.mst-results-item--wrong .mst-results-item__icon { color: #ef4444; }
.mst-results-item__q { font-size: 13px; font-weight: 600; color: var(--text, #1e293b); line-height: 1.5; flex: 1; }
.mst-results-item__correct { font-size: 13px; color: #354996; font-weight: 600; margin: 6px 0 0 28px; }

/* ── Results Actions ── */
.mst-results-actions { display: flex; justify-content: center; gap: 10px; padding-top: 8px; }

/* ── Professor Analytics ── */
.mst-analytics { margin-top: 36px; padding-top: 24px; border-top: 1px solid rgba(0,0,0,0.06); }
.mst-analytics__title { display: flex; align-items: center; gap: 8px; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 17px; font-weight: 700; color: var(--text, #1e293b); margin: 0 0 16px; }
.mst-analytics__title .material-symbols-outlined { font-size: 22px; color: #354996; }
.mst-analytics-empty { text-align: center; padding: 32px 20px; color: #94a3b8; }
.mst-analytics-empty .material-symbols-outlined { font-size: 36px; display: block; margin-bottom: 8px; }

.mst-analytics-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mst-analytics-table th { text-align: left; padding: 10px 12px; font-weight: 700; color: #64748b; border-bottom: 2px solid rgba(0,0,0,0.06); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.mst-analytics-table td { padding: 10px 12px; border-bottom: 1px solid rgba(0,0,0,0.04); vertical-align: top; }
.mst-analytics-email { font-size: 11px; color: #94a3b8; }
.mst-analytics-toggle { display: flex; align-items: center; background: none; border: 1px solid rgba(0,0,0,0.06); border-radius: 8px; cursor: pointer; padding: 4px; color: #64748b; transition: all 0.15s; }
.mst-analytics-toggle:hover { background: rgba(0,0,0,0.03); }
.mst-analytics-toggle .material-symbols-outlined { font-size: 20px; }
.mst-analytics-breakdown { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; }
.mst-analytics-item { display: flex; align-items: center; gap: 10px; font-size: 12px; padding: 4px 8px; border-radius: 6px; }
.mst-analytics-item--trouble { background: rgba(239,68,68,0.04); }
.mst-analytics-item__label { flex: 1; color: #475569; }
.mst-analytics-flag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: #ef4444; font-weight: 600; }
.mst-analytics-flag .material-symbols-outlined { font-size: 14px; }

/* ── Trouble Sections ── */
.mst-trouble-summary { margin-top: 20px; padding: 14px 16px; background: rgba(239,68,68,0.04); border: 1px solid rgba(239,68,68,0.1); border-radius: 12px; }
.mst-trouble-summary h4 { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: #ef4444; margin: 0 0 8px; }
.mst-trouble-summary h4 .material-symbols-outlined { font-size: 18px; }
.mst-trouble-item { font-size: 13px; color: #475569; padding: 3px 0; }
.mst-trouble-item span { color: #ef4444; font-weight: 600; }

/* ── Mastery Dark Mode ── */
[data-theme="dark"] .mst-title { color: #f1f5f9; }
[data-theme="dark"] .mst-plan-name { color: #94a3b8; }
[data-theme="dark"] .mst-topic-card { background: var(--bg-white, #1e293b); border-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .mst-topic-card:hover { border-color: rgba(147,197,253,0.2); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
[data-theme="dark"] .mst-topic-card__title { color: #f1f5f9; }
[data-theme="dark"] .mst-topic-card__meta { color: #64748b; }
[data-theme="dark"] .mst-topic-card__arrow { color: #475569; }
[data-theme="dark"] .mst-section-card { background: var(--bg-white, #1e293b); border-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .mst-section-card__title { color: #f1f5f9; }
[data-theme="dark"] .mst-progress-bar { background: rgba(255,255,255,0.08); }
[data-theme="dark"] .mst-question-card { background: var(--bg-white, #1e293b); border-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .mst-question-text { color: #f1f5f9; }
[data-theme="dark"] .mst-choice { background: var(--bg-white, #1e293b); border-color: rgba(255,255,255,0.1); color: #e2e8f0; }
[data-theme="dark"] .mst-choice:hover { border-color: rgba(147,197,253,0.3); background: rgba(147,197,253,0.04); }
[data-theme="dark"] .mst-choice__letter { background: rgba(255,255,255,0.08); color: #94a3b8; }
[data-theme="dark"] .mst-choice--selected { border-color: #60a5fa; background: rgba(96,165,250,0.15); box-shadow: 0 0 0 3px rgba(96,165,250,0.2), 0 2px 8px rgba(96,165,250,0.15); }
[data-theme="dark"] .mst-choice--selected .mst-choice__letter { background: #3b82f6; }
[data-theme="dark"] .mst-choice--selected .mst-choice__text { color: #bfdbfe; }
[data-theme="dark"] .mst-tf-btn { background: var(--bg-white, #1e293b); border-color: rgba(255,255,255,0.1); color: #e2e8f0; }
[data-theme="dark"] .mst-tf-btn.mst-choice--selected { border-color: #60a5fa; background: rgba(96,165,250,0.15); box-shadow: 0 0 0 3px rgba(96,165,250,0.2); color: #bfdbfe; }
[data-theme="dark"] .mst-fill-input { background: var(--bg-white, #1e293b); border-color: rgba(255,255,255,0.1); color: #e2e8f0; }
[data-theme="dark"] .mst-match-item { background: var(--bg-white, #1e293b); border-color: rgba(255,255,255,0.1); color: #e2e8f0; }
[data-theme="dark"] .mst-order-item { background: var(--bg-white, #1e293b); border-color: rgba(255,255,255,0.1); }
[data-theme="dark"] .mst-order-item__text { color: #e2e8f0; }
[data-theme="dark"] .mst-arrow-btn { background: var(--bg-white, #1e293b); border-color: rgba(255,255,255,0.1); color: #94a3b8; }
[data-theme="dark"] .mst-short-input { background: var(--bg-white, #1e293b); border-color: rgba(255,255,255,0.1); color: #e2e8f0; }
[data-theme="dark"] .mst-results-breakdown h3 { color: #f1f5f9; }
[data-theme="dark"] .mst-results-item__q { color: #e2e8f0; }
[data-theme="dark"] .mst-analytics__title { color: #f1f5f9; }
[data-theme="dark"] .mst-analytics-table th { color: #94a3b8; border-bottom-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .mst-analytics-table td { border-bottom-color: rgba(255,255,255,0.04); }
[data-theme="dark"] .mst-analytics { border-top-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .mst-objectives__list li { color: #94a3b8; }

/* ── Mastery Responsive ── */
@media (max-width: 768px) {
  .mst-landing { grid-template-columns: 1fr; }
  .mst-header { flex-direction: column; align-items: flex-start; }
  .mst-topic-header { flex-direction: column; }
  .mst-section-card__top { flex-direction: column; align-items: flex-start; }
  .mst-match { flex-direction: column; }
  .mst-tf-choices { flex-direction: column; }
  .mst-quiz-container { padding: 0 4px; }
  .mst-analytics-table { font-size: 12px; }
  .mst-analytics-table th, .mst-analytics-table td { padding: 8px 6px; }

  /* Keep Hint/Check/Continue reachable: sticky bar pinned to viewport bottom
     when the question content runs past the fold. env(safe-area-inset-bottom)
     accounts for iOS home-indicator area. */
  .mst-quiz-actions {
    position: sticky;
    bottom: 0;
    margin: 16px -4px 0;
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 10;
    flex-wrap: nowrap;
  }
  .mst-quiz-actions .cls-btn { flex: 1 1 auto; min-width: 0; padding: 12px 14px; font-size: 14px; }
  .mst-check-btn, .mst-continue-btn { min-width: 0; }
}

[data-theme="dark"] .mst-quiz-actions {
  background: rgba(15, 23, 42, 0.92);
  border-top-color: rgba(255, 255, 255, 0.08);
}

/* ════════════════════════════════════════════════════════════
   Hero-scale Courses page (student + educator redesign)
   Uses Beekix platform colors:
     primary #354996, on-surface #00174a, surface #faf8ff
   ════════════════════════════════════════════════════════════ */

.cls-page--hero { max-width: 1280px; margin: 0 auto; padding: 0 32px 80px; position: relative; }

/* Decorative background blobs (subtle, behind content) */
.cls-page--hero::before,
.cls-page--hero::after {
  content: ""; position: absolute; border-radius: 9999px; filter: blur(100px);
  opacity: 0.25; pointer-events: none; z-index: 0;
}
.cls-page--hero::before {
  width: 520px; height: 520px; background: #dde1ff;
  top: -200px; right: -150px;
}
.cls-page--hero::after {
  width: 440px; height: 440px; background: #f5e0ff;
  bottom: -140px; left: -140px;
}
.cls-page--hero > * { position: relative; z-index: 1; }

/* Hero header */
.cls-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; padding: 88px 0 56px; flex-wrap: wrap; }
.cls-hero-left { max-width: 640px; min-width: 0; }
.cls-hero-title {
  margin: 0 0 18px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: #00174a;
}
.cls-hero-subtitle {
  margin: 0;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: clamp(16px, 1.4vw, 20px);
  color: #404750;
  line-height: 1.6;
  max-width: 560px;
  opacity: 0.85;
}
.cls-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cls-hero-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 9999px; border: none; cursor: pointer;
  font-family: 'Be Vietnam Pro', sans-serif; font-weight: 600; font-size: 15px;
  transition: all 0.2s; white-space: nowrap;
}
.cls-hero-btn .material-symbols-outlined { font-size: 20px; }
.cls-hero-btn--primary {
  background: linear-gradient(135deg, #354996 0%, #4659a7 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(53, 73, 150, 0.25);
}
.cls-hero-btn--primary:hover { box-shadow: 0 12px 36px rgba(53, 73, 150, 0.35); transform: translateY(-2px); }
.cls-hero-btn--secondary {
  background: #fff; color: #354996; border: 1.5px solid #dde1ff;
  box-shadow: 0 4px 16px rgba(0, 23, 74, 0.04);
}
.cls-hero-btn--secondary:hover { border-color: #354996; background: #eef0ff; transform: translateY(-1px); }

/* Stats strip */
.cls-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 72px;
}
.cls-stat {
  background: #fff;
  border-radius: 2rem;
  padding: 28px 28px;
  box-shadow: 0 8px 32px rgba(0, 23, 74, 0.04);
  display: flex; flex-direction: column; gap: 14px;
  border: 1px solid rgba(53, 73, 150, 0.04);
  transition: box-shadow 0.2s;
}
.cls-stat:hover { box-shadow: 0 12px 40px rgba(0, 23, 74, 0.08); }
.cls-stat-icon {
  width: 44px; height: 44px; border-radius: 14px;
  background: #eef0ff; color: #354996;
  display: flex; align-items: center; justify-content: center;
}
.cls-stat-icon .material-symbols-outlined { font-size: 26px; }
.cls-stat-label {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: #717881; margin: 0 0 4px;
}
.cls-stat-value {
  margin: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 38px; font-weight: 800;
  color: #00174a; letter-spacing: -0.02em;
  line-height: 1;
}
.cls-stat-trend { font-size: 12px; color: #717881; margin-top: 4px; }

/* Section header for the grid below stats */
.cls-hero-section { margin-bottom: 48px; }
.cls-hero-section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.cls-hero-section-title {
  margin: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800; color: #00174a; letter-spacing: -0.02em;
}
.cls-hero-section-count {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 14px; color: #717881; font-weight: 500;
}

/* Big class card grid — 2 up on desktop */
.cls-hero-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }

/* Big class card — hero strip on top, details below */
.cls-hero-card {
  position: relative;
  display: flex; flex-direction: column;
  height: 400px;
  border-radius: 2rem;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(0, 23, 74, 0.06);
  transition: all 0.3s ease;
  background: #fff;
  border: 1px solid rgba(53, 73, 150, 0.04);
}
.cls-hero-card:hover { transform: translateY(-4px); box-shadow: 0 20px 56px rgba(0, 23, 74, 0.12); }

/* Hero strip — top region with accent color */
.cls-hero-card-strip {
  position: relative;
  padding: 28px 32px 24px;
  min-height: 160px;
  display: flex; justify-content: space-between; align-items: flex-start;
  overflow: hidden;
}
.cls-hero-card-strip::after {
  content: ""; position: absolute; inset-x: 0; bottom: 0; left: 0; right: 0; height: 60px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.4));
  pointer-events: none;
}

/* Accent tints — rotate through six organic colors */
.cls-hero-card[data-tint="peach"]    .cls-hero-card-strip { background: #ffe0cc; }
.cls-hero-card[data-tint="mint"]     .cls-hero-card-strip { background: #d4f5e9; }
.cls-hero-card[data-tint="lavender"] .cls-hero-card-strip { background: #f5e0ff; }
.cls-hero-card[data-tint="sky"]      .cls-hero-card-strip { background: #cfe7ff; }
.cls-hero-card[data-tint="coral"]    .cls-hero-card-strip { background: #ffd8d8; }
.cls-hero-card[data-tint="sage"]     .cls-hero-card-strip { background: #e0f0d8; }

.cls-hero-card-icon {
  width: 64px; height: 64px; border-radius: 20px;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  color: #00174a;
  transition: transform 0.3s ease;
}
.cls-hero-card:hover .cls-hero-card-icon { transform: scale(1.06); }
.cls-hero-card-icon .material-symbols-outlined { font-size: 30px; }

.cls-hero-card-prof {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 6px 14px 6px 6px;
  border-radius: 9999px;
  max-width: 240px;
}
.cls-hero-card-prof-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
  background: #eef0ff; color: #354996;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 13px;
  border: 2px solid rgba(255,255,255,0.6);
}
.cls-hero-card-prof-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cls-hero-card-prof-name {
  font-family: 'Be Vietnam Pro', sans-serif; font-weight: 600; font-size: 13px;
  color: #00174a;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Body of card */
.cls-hero-card-body { padding: 20px 32px 24px; flex: 1; display: flex; flex-direction: column; }
.cls-hero-card-code {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: #717881; margin: 0 0 8px;
}
.cls-hero-card-title {
  margin: 0 0 16px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 28px; font-weight: 800;
  line-height: 1.15; color: #00174a; letter-spacing: -0.02em;
  /* Truncate to 2 lines for layout stability */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Progress bar row */
.cls-hero-card-progress-row { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.cls-hero-card-progress-track {
  flex: 1; height: 8px; background: #eef0ff; border-radius: 9999px; overflow: hidden;
}
.cls-hero-card-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #354996, #4659a7);
  border-radius: 9999px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.cls-hero-card-progress-pct {
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 13px;
  color: #354996; min-width: 40px; text-align: right;
}

/* Action chips */
.cls-hero-card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.cls-hero-card-action {
  padding: 8px 16px; border-radius: 9999px;
  border: 1px solid rgba(53, 73, 150, 0.12);
  background: #faf8ff;
  color: #354996;
  font-family: 'Be Vietnam Pro', sans-serif; font-weight: 600; font-size: 12px;
  cursor: pointer; transition: all 0.15s;
}
.cls-hero-card-action:hover {
  background: #eef0ff; border-color: #354996; transform: translateY(-1px);
}

/* Empty state */
.cls-hero-empty {
  background: #fff; border-radius: 2rem; padding: 80px 40px; text-align: center;
  box-shadow: 0 8px 32px rgba(0, 23, 74, 0.04);
  border: 1px solid rgba(53, 73, 150, 0.04);
}
.cls-hero-empty-icon {
  width: 96px; height: 96px; border-radius: 9999px;
  background: linear-gradient(135deg, #dde1ff, #eef0ff);
  display: flex; align-items: center; justify-content: center;
  color: #354996; margin: 0 auto 24px;
}
.cls-hero-empty-icon .material-symbols-outlined { font-size: 48px; }
.cls-hero-empty-title {
  margin: 0 0 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 28px; font-weight: 800; color: #00174a; letter-spacing: -0.02em;
}
.cls-hero-empty-hint {
  margin: 0 auto 28px; max-width: 420px;
  font-size: 15px; color: #717881; line-height: 1.5;
}

/* Responsive */
@media (max-width: 1024px) {
  .cls-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .cls-page--hero { padding: 0 20px 60px; }
  .cls-hero { padding: 48px 0 32px; flex-direction: column; align-items: flex-start; }
  .cls-hero-actions { width: 100%; }
  .cls-hero-btn { flex: 1; justify-content: center; }
  .cls-stats { margin-bottom: 48px; gap: 14px; }
  .cls-stat { padding: 20px; }
  .cls-stat-value { font-size: 30px; }
  .cls-hero-grid { grid-template-columns: 1fr; gap: 20px; }
  .cls-hero-card { height: auto; min-height: 360px; }
  .cls-hero-card-body { padding: 20px 22px 22px; }
  .cls-hero-card-title { font-size: 24px; }
  .cls-hero-card-strip { padding: 22px 22px 18px; }
  .cls-hero-section { margin-bottom: 36px; }
}
@media (max-width: 480px) {
  .cls-stats { grid-template-columns: 1fr; }
  .cls-hero-card-actions { width: 100%; }
  .cls-hero-card-action { flex: 1; text-align: center; }
}
