/* ============================================
   MOGG.SHOP COURSE FRAMEWORK
   Frontier-level multi-page course system
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* Brand palette */
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #16161f;
  --bg-code: #1a1a25;
  --bg-hover: #1e1e2a;
  --bg-accent: #252535;
  
  --text-primary: #e8e8f0;
  --text-secondary: #9898b0;
  --text-muted: #606078;
  --text-heading: #ffffff;
  
  --accent-primary: #7c5cfc;
  --accent-primary-light: #9b80ff;
  --accent-primary-dim: #5a3dcc;
  --accent-glow: rgba(124, 92, 252, 0.15);
  --accent-glow-strong: rgba(124, 92, 252, 0.3);
  
  --accent-green: #4ade80;
  --accent-green-dim: #22c55e;
  --accent-amber: #fbbf24;
  --accent-red: #f87171;
  --accent-cyan: #22d3ee;
  --accent-pink: #f472b6;
  
  --border-primary: #2a2a3a;
  --border-secondary: #1e1e2e;
  --border-accent: rgba(124, 92, 252, 0.3);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 30px var(--accent-glow);
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  --nav-height: 64px;
  --sidebar-width: 280px;
  --max-content: 820px;
  
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle gradient background */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: 
    radial-gradient(ellipse at 20% 0%, rgba(124, 92, 252, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(34, 211, 238, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ============ TOP NAV ============ */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-primary);
  display: flex;
  align-items: center;
  padding: 0 24px;
  z-index: 1000;
}

.topnav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-heading);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.topnav-brand .brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
}

.topnav-course {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.topnav-course .course-badge {
  background: var(--accent-glow);
  color: var(--accent-primary-light);
  padding: 4px 12px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.topnav-progress {
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-bar-mini {
  width: 100px;
  height: 4px;
  background: var(--bg-accent);
  border-radius: 100px;
  overflow: hidden;
}

.progress-bar-mini .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-cyan));
  border-radius: 100px;
  transition: width var(--transition-slow);
}

/* ============ LAYOUT ============ */
.course-layout {
  display: flex;
  margin-top: var(--nav-height);
  min-height: calc(100vh - var(--nav-height));
  position: relative;
  z-index: 1;
}

/* ============ SIDEBAR ============ */
.sidebar {
  width: var(--sidebar-width);
  position: fixed;
  top: var(--nav-height);
  left: 0;
  bottom: 0;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-primary);
  overflow-y: auto;
  padding: 24px 0;
  z-index: 100;
  transition: transform var(--transition-normal);
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-primary); border-radius: 4px; }

.sidebar-section {
  margin-bottom: 8px;
}

.sidebar-section-title {
  padding: 8px 24px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 400;
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
  position: relative;
}

.sidebar-link:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.sidebar-link.active {
  color: var(--accent-primary-light);
  background: var(--accent-glow);
  border-left-color: var(--accent-primary);
  font-weight: 500;
}

.sidebar-link.completed .link-icon {
  color: var(--accent-green);
}

.sidebar-link .link-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  color: var(--text-muted);
}

.sidebar-link .link-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-link .link-duration {
  font-size: 0.7rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ============ MAIN CONTENT ============ */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 48px 64px 120px;
  max-width: calc(var(--sidebar-width) + var(--max-content) + 128px);
}

.content-wrapper {
  max-width: var(--max-content);
  margin: 0 auto;
}

/* ============ PAGE HEADER ============ */
.page-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-secondary);
}

.page-header .breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.page-header .breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.page-header .breadcrumb a:hover { color: var(--accent-primary-light); }

.page-header .breadcrumb .separator { opacity: 0.4; }

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-heading);
  margin-bottom: 12px;
}

.page-header .subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 600px;
}

.page-header .meta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.page-header .meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-header .meta-item .icon { font-size: 0.9rem; }

/* ============ TYPOGRAPHY ============ */
h2 {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-heading);
  margin: 48px 0 20px;
  padding-top: 16px;
}

h2:first-child { margin-top: 0; }

h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-heading);
  margin: 32px 0 14px;
}

p {
  margin-bottom: 18px;
  color: var(--text-primary);
  line-height: 1.8;
}

strong { color: var(--text-heading); font-weight: 600; }
em { color: var(--accent-primary-light); font-style: italic; }

a {
  color: var(--accent-primary-light);
  text-decoration: none;
  transition: color var(--transition-fast);
  border-bottom: 1px solid transparent;
}

a:hover {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
}

/* ============ CODE ============ */
code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-code);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--accent-cyan);
  border: 1px solid var(--border-secondary);
}

pre {
  background: var(--bg-code);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 20px 0 28px;
  overflow-x: auto;
  position: relative;
}

pre code {
  background: none;
  padding: 0;
  border: none;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-primary);
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--bg-accent);
  border: 1px solid var(--border-primary);
  border-bottom: none;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.code-block-header + pre {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  margin-top: 0;
}

.copy-btn {
  background: var(--bg-hover);
  border: 1px solid var(--border-primary);
  color: var(--text-secondary);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  cursor: pointer;
  font-family: var(--font-mono);
  transition: all var(--transition-fast);
}

.copy-btn:hover {
  background: var(--accent-glow);
  color: var(--accent-primary-light);
  border-color: var(--border-accent);
}

/* ============ CALLOUTS ============ */
.callout {
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 24px 0;
  border-left: 4px solid;
  display: flex;
  gap: 14px;
}

.callout-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.callout-content { flex: 1; }
.callout-content p:last-child { margin-bottom: 0; }

.callout.info {
  background: rgba(34, 211, 238, 0.06);
  border-color: var(--accent-cyan);
}
.callout.info .callout-icon { color: var(--accent-cyan); }
.callout.info strong { color: var(--accent-cyan); }

.callout.warning {
  background: rgba(251, 191, 36, 0.06);
  border-color: var(--accent-amber);
}
.callout.warning .callout-icon { color: var(--accent-amber); }
.callout.warning strong { color: var(--accent-amber); }

.callout.tip {
  background: rgba(74, 222, 128, 0.06);
  border-color: var(--accent-green);
}
.callout.tip .callout-icon { color: var(--accent-green); }
.callout.tip strong { color: var(--accent-green); }

.callout.danger {
  background: rgba(248, 113, 113, 0.06);
  border-color: var(--accent-red);
}
.callout.danger .callout-icon { color: var(--accent-red); }
.callout.danger strong { color: var(--accent-red); }

.callout.advanced {
  background: rgba(244, 114, 182, 0.06);
  border-color: var(--accent-pink);
}
.callout.advanced .callout-icon { color: var(--accent-pink); }
.callout.advanced strong { color: var(--accent-pink); }

/* ============ CARDS ============ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all var(--transition-normal);
  text-decoration: none;
  color: inherit;
  display: block;
}

.card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.card-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--text-heading);
}

.card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* ============ TABLES ============ */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 20px 0 28px;
  font-size: 0.88rem;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
}

th {
  background: var(--bg-accent);
  color: var(--text-heading);
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-primary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-secondary);
  color: var(--text-primary);
}

tr:last-child td { border-bottom: none; }

tr:hover td { background: var(--bg-hover); }

/* ============ LISTS ============ */
ul, ol {
  margin: 12px 0 20px 24px;
  color: var(--text-primary);
}

li {
  margin-bottom: 8px;
  line-height: 1.7;
}

li::marker { color: var(--accent-primary); }

/* ============ QUIZ SYSTEM ============ */
.quiz-container {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 36px 0;
}

.quiz-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 24px;
}

.quiz-title .quiz-icon { font-size: 1.3rem; }

.quiz-question {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-secondary);
}

.quiz-question:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.quiz-question-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 16px;
}

.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.9rem;
  color: var(--text-primary);
}

.quiz-option:hover {
  border-color: var(--accent-primary);
  background: var(--accent-glow);
}

.quiz-option.selected {
  border-color: var(--accent-primary);
  background: var(--accent-glow-strong);
}

.quiz-option.correct {
  border-color: var(--accent-green);
  background: rgba(74, 222, 128, 0.1);
  color: var(--accent-green);
}

.quiz-option.incorrect {
  border-color: var(--accent-red);
  background: rgba(248, 113, 113, 0.1);
  color: var(--accent-red);
}

.quiz-option .option-marker {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all var(--transition-fast);
}

.quiz-option.selected .option-marker {
  border-color: var(--accent-primary);
  background: var(--accent-primary);
  color: #fff;
}

.quiz-option.correct .option-marker {
  border-color: var(--accent-green);
  background: var(--accent-green);
  color: #fff;
}

.quiz-option.incorrect .option-marker {
  border-color: var(--accent-red);
  background: var(--accent-red);
  color: #fff;
}

.quiz-feedback {
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  display: none;
}

.quiz-feedback.show { display: block; }

.quiz-feedback.correct {
  background: rgba(74, 222, 128, 0.08);
  color: var(--accent-green);
  border-left: 3px solid var(--accent-green);
}

.quiz-feedback.incorrect {
  background: rgba(248, 113, 113, 0.08);
  color: var(--accent-red);
  border-left: 3px solid var(--accent-red);
}

.quiz-submit {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.quiz-score {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-heading);
  display: none;
}

.quiz-score.show { display: block; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-light));
  color: #fff;
  box-shadow: 0 2px 12px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow-strong);
  color: #fff;
  border-bottom: none;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-primary);
}

.btn-secondary:hover {
  border-color: var(--border-accent);
  background: var(--bg-hover);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 14px;
}

.btn-ghost:hover {
  color: var(--accent-primary-light);
  background: var(--accent-glow);
}

.btn-sm { padding: 7px 14px; font-size: 0.8rem; }

/* ============ PAGE NAVIGATION (prev/next) ============ */
.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border-primary);
  gap: 16px;
}

.page-nav a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-normal);
  flex: 1;
  max-width: 50%;
}

.page-nav a:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
  color: inherit;
}

.page-nav a.next { text-align: right; align-items: flex-end; }

.page-nav .nav-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.page-nav .nav-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-heading);
}

.page-nav a:hover .nav-title { color: var(--accent-primary-light); }

/* ============ INTERACTIVE ELEMENTS ============ */
.tabs {
  margin: 24px 0;
}

.tab-buttons {
  display: flex;
  gap: 4px;
  background: var(--bg-code);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 16px;
}

.tab-btn {
  padding: 8px 18px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.tab-btn.active {
  background: var(--accent-primary);
  color: #fff;
}

.tab-btn:hover:not(.active) { color: var(--text-primary); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Expandable sections */
.details {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  margin: 16px 0;
  overflow: hidden;
}

.details summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-heading);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  transition: background var(--transition-fast);
}

.details summary:hover { background: var(--bg-hover); }

.details summary::before {
  content: '▸';
  color: var(--accent-primary);
  transition: transform var(--transition-fast);
  font-size: 0.8rem;
}

.details[open] summary::before { transform: rotate(90deg); }

.details .details-content {
  padding: 0 20px 20px;
  border-top: 1px solid var(--border-secondary);
}

/* ============ STEP LISTS ============ */
.steps {
  margin: 24px 0;
  position: relative;
  padding-left: 36px;
}

.steps::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border-primary);
}

.step {
  position: relative;
  margin-bottom: 28px;
}

.step::before {
  content: attr(data-step);
  position: absolute;
  left: -36px;
  top: 2px;
  width: 28px;
  height: 28px;
  background: var(--accent-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.step h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 6px;
}

.step p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ============ COMPARISON / FEATURE GRID ============ */
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}

.comparison-col {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  padding: 24px;
}

.comparison-col h4 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comparison-col ul {
  margin: 0;
  padding-left: 18px;
}

.comparison-col li {
  font-size: 0.88rem;
  margin-bottom: 6px;
}

/* ============ KBD SHORTCUTS ============ */
kbd {
  background: var(--bg-accent);
  border: 1px solid var(--border-primary);
  border-radius: 4px;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-heading);
  box-shadow: 0 2px 0 var(--border-primary);
}

/* ============ PROGRESS CHECKLIST ============ */
.checklist {
  margin: 24px 0;
  list-style: none;
  padding: 0;
}

.checklist li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.checklist li:hover { border-color: var(--border-accent); }

.checklist li .check-box {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-primary);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  font-size: 0.7rem;
  color: transparent;
}

.checklist li.checked .check-box {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: #fff;
}

.checklist li.checked { color: var(--text-muted); text-decoration: line-through; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 32px 24px 100px; }
  .page-header h1 { font-size: 1.8rem; }
  .comparison { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .main-content { padding: 24px 16px 80px; }
  .page-header h1 { font-size: 1.5rem; }
  .card-grid { grid-template-columns: 1fr; }
  .page-nav { flex-direction: column; }
  .page-nav a { max-width: 100%; }
  .topnav-course { display: none; }
}

/* ============ MOBILE TOGGLE ============ */
.sidebar-toggle {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  margin-right: 12px;
}

@media (max-width: 1024px) {
  .sidebar-toggle { display: flex; }
}

/* ============ ANIMATIONS ============ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.content-wrapper > * {
  animation: fadeInUp 0.4s ease-out;
  animation-fill-mode: both;
}

.content-wrapper > *:nth-child(1) { animation-delay: 0.05s; }
.content-wrapper > *:nth-child(2) { animation-delay: 0.1s; }
.content-wrapper > *:nth-child(3) { animation-delay: 0.15s; }
.content-wrapper > *:nth-child(4) { animation-delay: 0.2s; }
.content-wrapper > *:nth-child(5) { animation-delay: 0.25s; }

/* ============ PRINT ============ */
@media print {
  .sidebar, .topnav, .page-nav, .quiz-submit { display: none; }
  .main-content { margin-left: 0; padding: 20px; }
  body { background: #fff; color: #000; }
  pre { border: 1px solid #ccc; }
}
