/**
 * DP-600 Mastery Portal — Components Stylesheet
 * Cards, launchers, quiz engines, badges, modals, and cheatsheets.
 */

/* ==========================================================================
   Adaptive Recommendation Panel
   ========================================================================== */

.recommendations-panel {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.1), rgba(139, 92, 246, 0.1));
  border: 1px solid var(--accent-primary);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.recommendations-card.clean-slate {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.rec-icon {
  font-size: 2rem;
}

.rec-body h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.rec-body p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-title h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.panel-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.recommendations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.recommendation-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.recommendation-item.priority-high {
  border-left: 4px solid var(--danger-border);
}

.recommendation-item.priority-medium {
  border-left: 4px solid var(--warning-border);
}

.rec-item-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

.rec-code {
  color: var(--accent-text);
  font-weight: 600;
}

.rec-trigger {
  color: var(--warning-text);
  font-weight: 600;
}

.rec-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.rec-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.rec-action-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color-light);
  color: var(--text-primary);
  padding: 0.4rem 0.65rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.rec-action-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  color: var(--accent-text);
}

/* ==========================================================================
   Phase Cards & Roadmap
   ========================================================================== */

.phase-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  margin-bottom: 1.5rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: border-color 0.2s;
}

.phase-card.phase-completed {
  border-left: 6px solid var(--success-border);
}

.phase-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  user-select: none;
  flex-wrap: wrap;
  gap: 1rem;
}

.phase-header:hover {
  background: var(--bg-card-hover);
}

.phase-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.phase-number-badge {
  background: var(--accent-light);
  color: var(--accent-text);
  border: 1px solid var(--accent-border);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.phase-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.phase-summary {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

.phase-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.phase-hours-badge {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.phase-progress-pill {
  width: 140px;
  height: 22px;
  background: var(--bg-card);
  border-radius: 11px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.progress-pill-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #10b981);
  opacity: 0.5;
  transition: width 0.3s;
}

.collapse-icon {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.phase-card.is-collapsed .collapse-icon {
  transform: rotate(-90deg);
}

.phase-body {
  padding: 1.5rem;
}

.phase-body.collapsed {
  display: none;
}

/* Video Companion Bar */
.video-companions-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.vc-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-text);
}

.vc-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.vc-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color-light);
  color: var(--text-primary);
  padding: 0.3rem 0.65rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
  text-decoration: none;
  transition: all 0.2s;
}

.vc-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
}

/* ==========================================================================
   Milestones List & Cards
   ========================================================================== */

.milestones-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.milestone-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.25rem;
  transition: all 0.2s;
}

.milestone-card.milestone-done {
  border-left: 4px solid var(--success-border);
  background: rgba(16, 185, 129, 0.03);
}

.milestone-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.milestone-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.milestone-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.milestone-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--success-border);
  cursor: pointer;
}

.milestone-code {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--accent-text);
  font-family: var(--font-code);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--border-radius-sm);
}

.milestone-heading {
  font-size: 1rem;
  font-weight: 700;
}

.milestone-time-badge {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Confidence Selector */
.confidence-selector {
  display: flex;
  gap: 2px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 2px;
}

.conf-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.conf-btn:hover {
  color: var(--text-primary);
}

.conf-btn.conf-low.active {
  background: var(--danger-bg);
  color: var(--danger-text);
  font-weight: 700;
}

.conf-btn.conf-med.active {
  background: var(--warning-bg);
  color: var(--warning-text);
  font-weight: 700;
}

.conf-btn.conf-high.active {
  background: var(--success-bg);
  color: var(--success-text);
  font-weight: 700;
}

/* Milestone Theory & Launchers */
.milestone-theory {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.milestone-launchers {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.launcher-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color-light);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s;
}

.launcher-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
}

.launcher-quiz {
  background: var(--accent-light);
  border-color: var(--accent-border);
  color: var(--accent-text);
}

.launcher-quiz:hover {
  background: rgba(2, 132, 199, 0.25);
}

/* Inline Notes */
.inline-notes-wrapper {
  margin-top: 0.75rem;
  border-top: 1px dashed var(--border-color);
  padding-top: 0.5rem;
}

.notes-summary {
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.notes-summary:hover {
  color: var(--text-primary);
}

.notes-textarea {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--border-radius-sm);
  padding: 0.6rem;
  font-family: var(--font-main);
  font-size: 0.85rem;
  min-height: 70px;
  resize: vertical;
  margin-top: 0.4rem;
  outline: none;
}

.notes-textarea:focus {
  border-color: var(--accent-primary);
}

/* ==========================================================================
   Active Recall Quiz Component
   ========================================================================== */

.quiz-container {
  background: var(--bg-secondary);
  border: 1px solid var(--accent-border);
  border-radius: var(--border-radius);
  padding: 1.25rem;
  margin: 1rem 0;
  box-shadow: var(--shadow);
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.quiz-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quiz-title h4 {
  font-size: 1rem;
  font-weight: 700;
}

.quiz-questions-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.quiz-question-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 1rem;
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.question-number {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-text);
}

.question-tools {
  display: flex;
  gap: 0.4rem;
}

.btn-tool {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color-light);
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
}

.btn-tool:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.question-text {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.85rem;
}

.hint-box {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: var(--border-radius-sm);
  padding: 0.6rem 0.85rem;
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--warning-text);
  margin-bottom: 0.75rem;
}

.options-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.option-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 0.6rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 0.85rem;
  transition: all 0.15s;
}

.option-item:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
}

.option-prefix {
  background: var(--bg-card);
  border: 1px solid var(--border-color-light);
  color: var(--accent-text);
  font-weight: 700;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.option-item.correct {
  background: var(--success-bg) !important;
  border-color: var(--success-border) !important;
  color: var(--success-text) !important;
}

.option-item.incorrect {
  background: var(--danger-bg) !important;
  border-color: var(--danger-border) !important;
  color: var(--danger-text) !important;
}

.option-item.option-eliminated {
  opacity: 0.35;
  text-decoration: line-through;
  cursor: not-allowed;
}

.explanation-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 0.85rem;
  margin-top: 0.85rem;
}

.explanation-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.explanation-title {
  font-size: 0.85rem;
  font-weight: 700;
}

.explanation-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.trap-alert {
  background: var(--warning-bg);
  border-left: 3px solid var(--warning-border);
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  color: var(--warning-text);
  margin-top: 0.4rem;
}

.reference-link {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.quiz-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.btn-action {
  background: var(--bg-card);
  border: 1px solid var(--border-color-light);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-action:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
}

/* ==========================================================================
   Labs View Grid
   ========================================================================== */

.labs-header-card, .practice-header-card, .glossary-header-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.labs-grid, .practice-banks-grid, .glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.lab-card, .bank-card, .glossary-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow);
}

.lab-card.lab-completed {
  border-left: 4px solid var(--success-border);
  background: rgba(16, 185, 129, 0.03);
}

.lab-card-header, .bank-header, .glossary-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.lab-num {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent-text);
  margin-left: 0.4rem;
}

.lab-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.lab-title, .bank-card h4, .glossary-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.lab-summary, .bank-card p, .glossary-summary {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.lab-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
}

.lab-domain {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-lab-launch, .btn-launch-bank {
  text-decoration: none;
  background: var(--accent-light);
  border-color: var(--accent-border);
  color: var(--accent-text);
}

/* ==========================================================================
   Cheatsheets Layout & Tables
   ========================================================================== */

.cheatsheet-tabs-nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}

@media (max-width: 991px) {
  .cheatsheet-tabs-nav {
    justify-content: flex-start;
  }
}

.cs-nav-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.6rem 1rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.cs-nav-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
}

.cheatsheet-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.cs-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.cs-icon {
  font-size: 1.5rem;
}

.cs-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.cs-content h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.25rem 0 0.5rem;
  color: var(--accent-text);
}

.cs-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.cs-table th, .cs-table td {
  border: 1px solid var(--border-color);
  padding: 0.65rem 0.85rem;
  text-align: left;
}

.cs-table th {
  background: var(--bg-card);
  font-weight: 700;
}

.cs-table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.code-block {
  background: #000000;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 1rem;
  font-family: var(--font-code);
  font-size: 0.85rem;
  overflow-x: auto;
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* ==========================================================================
   Glossary Tooltips & Directory
   ========================================================================== */

.glossary-term {
  border-bottom: 1px dotted var(--accent-text);
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s;
}

.glossary-term:hover, .glossary-term:focus {
  color: var(--accent-text);
  background: var(--accent-light);
  border-radius: 2px;
  outline: none;
}

.glossary-search-field {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem 0.85rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.9rem;
  outline: none;
  min-width: 250px;
}

.glossary-cat-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-color-light);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.glossary-deepdive {
  background: var(--bg-card);
  border-radius: var(--border-radius-sm);
  padding: 0.6rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  border-left: 3px solid var(--accent-primary);
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--accent-border);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  box-shadow: var(--shadow);
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   Readiness Gate Audit Component
   ========================================================================== */

.readiness-gate-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.readiness-gate-card.gate-ready {
  border-color: var(--success-border);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.rg-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  flex-wrap: wrap;
}

.rg-icon {
  font-size: 2.5rem;
}

.rg-title {
  flex: 1;
}

.rg-title h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.rg-title p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.gate-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.gate-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.gate-item.gate-passed {
  border-left: 4px solid var(--success-border);
}

.gate-item.gate-pending {
  border-left: 4px solid var(--warning-border);
  opacity: 0.85;
}

.gate-item-title {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 600;
}

.gate-item-status {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.rg-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.rg-verdict {
  font-size: 1rem;
}

.btn-esl {
  text-decoration: none;
  background: var(--accent-light);
  border-color: var(--accent-border);
  color: var(--accent-text);
}

/* ==========================================================================
   🎯 Next Up For Aliki Hero Component
   ========================================================================== */

.next-up-hero {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.18), rgba(139, 92, 246, 0.15));
  border: 2px solid var(--accent-border);
  border-radius: var(--border-radius-lg);
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(2, 132, 199, 0.25);
  position: relative;
  overflow: hidden;
}

.next-up-hero.hero-all-done {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(2, 132, 199, 0.15));
  border-color: var(--success-border);
  text-align: center;
  padding: 2.5rem 1.75rem;
}

.hero-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.hero-tag-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.hero-tag-pill {
  background: #0284c7;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}

.hero-step-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--accent-text);
  font-family: var(--font-code);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.3rem 0.65rem;
  border-radius: 9999px;
}

.hero-phase-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 9999px;
}

.hero-action-pill {
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: var(--shadow);
}

.hero-action-pill.action-watch {
  background: rgba(2, 132, 199, 0.25);
  border: 1px solid #38bdf8;
  color: #38bdf8;
}

.hero-action-pill.action-build {
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid #34d399;
  color: #34d399;
}

.hero-action-pill.action-read {
  background: rgba(139, 92, 246, 0.25);
  border: 1px solid #c084fc;
  color: #c084fc;
}

.hero-action-pill.action-drill {
  background: rgba(245, 158, 11, 0.25);
  border: 1px solid #fbbf24;
  color: #fbbf24;
}

.hero-title {
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
  line-height: 1.3;
  color: var(--text-primary);
}

.hero-criteria-card {
  background: var(--bg-secondary);
  border-left: 4px solid var(--accent-border);
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius-sm);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.criteria-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-text);
}

.criteria-text {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 600;
}

.hero-takeaways-preview {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.85rem 1.15rem;
  margin-bottom: 1rem;
}

.takeaways-header {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.4rem;
}

.takeaways-list {
  padding-left: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.takeaways-list li {
  margin-bottom: 0.25rem;
}

.hero-exam-trap {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-text);
  border-radius: var(--border-radius-sm);
  padding: 0.6rem 0.9rem;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.hero-actions-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.btn-hero-primary {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: white;
  border: none;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.65rem 1.4rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
  transition: all 0.2s;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-hero-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.6);
}

.btn-hero-quiz {
  background: var(--bg-secondary);
  border: 1px solid #8b5cf6;
  color: #c084fc;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.6rem 1.2rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-hero-quiz:hover {
  background: rgba(139, 92, 246, 0.15);
}

.btn-hero-complete {
  background: var(--bg-secondary);
  border: 1px solid var(--success-border);
  color: var(--success-text);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.6rem 1.2rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-hero-complete:hover {
  background: var(--success-bg);
}

.hero-progress-bar-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-progress-track {
  flex: 1;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 9999px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.hero-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #10b981);
  transition: width 0.3s ease;
}

.hero-progress-stats {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Step badges & action badges in Roadmap Milestones */
.step-num-badge {
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  color: var(--accent-text);
  font-family: var(--font-code);
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.action-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.action-pill.action-watch {
  background: rgba(2, 132, 199, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.action-pill.action-build {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.4);
}

.action-pill.action-read {
  background: rgba(139, 92, 246, 0.15);
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, 0.4);
}

.action-pill.action-drill {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.duration-pill {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  background: var(--bg-secondary);
  padding: 0.15rem 0.45rem;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
}

.milestone-takeaways {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 0.65rem 0.9rem;
  margin-top: 0.6rem;
  margin-bottom: 0.75rem;
}

.milestone-takeaways summary {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-text);
  cursor: pointer;
}

.milestone-takeaways ul {
  padding-left: 1.25rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.4rem;
  line-height: 1.4;
}

.milestone-trap-callout {
  background: var(--danger-bg);
  border-left: 3px solid var(--danger-border);
  color: var(--danger-text);
  padding: 0.4rem 0.65rem;
  font-size: 0.8rem;
  border-radius: 2px;
  margin-bottom: 0.6rem;
}

.milestone-criteria-badge {
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--border-color);
  padding: 0.35rem 0.65rem;
  border-radius: var(--border-radius-sm);
  margin-bottom: 0.6rem;
  display: block;
}

/* ==========================================================================
   LMS Sidebar Accordion & Milestone Rows (Coursera Style)
   ========================================================================== */

.sidebar-phase-item {
  border-bottom: 1px solid var(--border-color);
}

.sidebar-phase-item:last-child {
  border-bottom: none;
}

.sidebar-phase-header {
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: var(--bg-secondary);
  user-select: none;
  transition: background 0.2s;
  gap: 0.5rem;
}

.sidebar-phase-header:hover {
  background: var(--bg-card);
}

.sidebar-phase-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
}

.sidebar-phase-title-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sidebar-phase-num {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-text);
  letter-spacing: 0.03em;
}

.sidebar-phase-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.sidebar-phase-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.sidebar-phase-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 9999px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.sidebar-phase-pill.completed {
  background: var(--success-bg);
  color: var(--success-text);
  border-color: var(--success-border);
}

.sidebar-phase-chevron {
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.sidebar-phase-item.collapsed .sidebar-phase-chevron {
  transform: rotate(-90deg);
}

.sidebar-phase-item.collapsed .sidebar-phase-content {
  display: none;
}

.sidebar-phase-content {
  background: var(--bg-primary);
}

.sidebar-milestones-list {
  display: flex;
  flex-direction: column;
}

.sidebar-milestone-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem 0.6rem 1rem;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
  user-select: none;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.sidebar-milestone-row:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.sidebar-milestone-row.active-lesson {
  border-left: 3px solid var(--coursera-blue);
  background: var(--accent-light);
  color: var(--text-primary);
  font-weight: 700;
}

.sidebar-milestone-row.is-completed .sidebar-ms-title {
  text-decoration: line-through;
  opacity: 0.8;
}

.sidebar-ms-check {
  width: 15px;
  height: 15px;
  accent-color: var(--success-border);
  cursor: pointer;
  flex-shrink: 0;
}

.sidebar-ms-step {
  font-size: 0.68rem;
  font-family: var(--font-code);
  font-weight: 700;
  color: var(--accent-text);
  background: var(--bg-card);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.sidebar-ms-action-icon {
  font-size: 0.75rem;
  flex-shrink: 0;
}

.sidebar-ms-title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.78rem;
}

.sidebar-ms-dur {
  font-size: 0.68rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.conf-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.conf-dot-low { background-color: var(--danger-border); }
.conf-dot-medium { background-color: var(--warning-border); }
.conf-dot-high { background-color: var(--success-border); }

/* ==========================================================================
   Focused Active Lesson Stage (Coursera Style)
   ========================================================================== */

.active-lesson-stage {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.lesson-player-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow);
}

/* Breadcrumbs */
.lesson-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.lesson-crumb-link {
  color: var(--accent-text);
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
}

.lesson-crumb-link:hover {
  text-decoration: underline;
}

.lesson-crumb-sep {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.lesson-crumb-current {
  color: var(--text-primary);
  font-weight: 600;
}

/* Header Box */
.lesson-header-box {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.25rem;
}

.lesson-tag-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.lesson-step-pill {
  background: var(--accent-light);
  color: var(--accent-text);
  border: 1px solid var(--accent-border);
  font-family: var(--font-code);
  font-weight: 800;
  font-size: 0.78rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
}

.lesson-domain-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
}

.lesson-title {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.lesson-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.lesson-confidence-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lesson-conf-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-complete-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.45rem 1rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.btn-complete-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--success-border);
}

.btn-complete-toggle.is-completed {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-text);
}

/* One-Click Action Launchers */
.lesson-launchers-section {
  margin-bottom: 1.5rem;
}

.launchers-heading {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
  display: block;
}

.launchers-grid {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.launcher-btn-large {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
  text-decoration: none;
  min-height: 42px;
}

.launcher-btn-large:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

.launcher-btn-large.launcher-primary {
  background: var(--coursera-blue);
  color: white;
  border-color: var(--coursera-blue);
  box-shadow: 0 4px 12px rgba(0, 86, 210, 0.3);
}

.launcher-btn-large.launcher-primary:hover {
  background: var(--coursera-blue-hover);
  box-shadow: 0 6px 16px rgba(0, 86, 210, 0.4);
}

.launcher-btn-large.launcher-quiz-btn {
  background: rgba(139, 92, 246, 0.15);
  border-color: #8b5cf6;
  color: #c084fc;
}

.launcher-btn-large.launcher-quiz-btn:hover {
  background: rgba(139, 92, 246, 0.25);
}

/* Theory & Concept Box */
.lesson-concept-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.lesson-concept-box h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.lesson-concept-box p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Completion Criteria */
.lesson-criteria-card {
  background: var(--bg-card);
  border-left: 4px solid var(--accent-border);
  border: 1px solid var(--border-color);
  border-left-width: 4px;
  border-left-color: var(--accent-border);
  border-radius: var(--border-radius-sm);
  padding: 0.85rem 1.15rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.criteria-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-text);
}

.criteria-body {
  font-size: 0.88rem;
  color: var(--text-primary);
  font-weight: 600;
}

/* Takeaways & Traps Card */
.lesson-takeaways-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.takeaways-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  display: block;
}

.takeaways-bullets {
  padding-left: 1.25rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.takeaways-bullets li {
  margin-bottom: 0.35rem;
}

.lesson-exam-trap-box {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-left: 4px solid var(--danger-border);
  color: var(--danger-text);
  border-radius: var(--border-radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  line-height: 1.5;
}

.lesson-exam-trap-box strong {
  color: var(--danger-text);
}

/* Candidate Scratchpad Notes */
.lesson-notes-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.notes-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.notes-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.notes-autosave-badge {
  font-size: 0.72rem;
  color: var(--success-text);
  font-weight: 600;
}

.lesson-notes-textarea {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--border-radius-sm);
  padding: 0.75rem 1rem;
  font-family: var(--font-main);
  font-size: 0.88rem;
  min-height: 90px;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}

.lesson-notes-textarea:focus {
  border-color: var(--accent-primary);
}

/* Sticky Bottom Navigation Bar */
.lesson-bottom-nav-bar {
  position: sticky;
  bottom: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 1rem 0 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  z-index: 40;
}

.btn-nav-step {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.65rem 1.25rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
  min-height: 48px;
}

.btn-nav-step:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

.btn-nav-step:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-nav-step.btn-nav-next {
  background: var(--coursera-blue);
  color: white;
  border-color: var(--coursera-blue);
  box-shadow: 0 4px 12px rgba(0, 86, 210, 0.35);
}

.btn-nav-step.btn-nav-next:hover:not(:disabled) {
  background: var(--coursera-blue-hover);
  box-shadow: 0 6px 16px rgba(0, 86, 210, 0.5);
}

.btn-nav-step.btn-nav-complete {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-text);
}

.btn-nav-step.btn-nav-complete:hover {
  background: rgba(16, 185, 129, 0.25);
}

/* ==========================================================================
   Light Mode Specific Component Refinements (WCAG 2.1 AA Compliance)
   ========================================================================== */

body.theme-light .lesson-concept-box {
  background: #FFFFFF;
  border-color: #E2E8F0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

body.theme-light .lesson-concept-box h3 {
  color: #1F2937;
}

body.theme-light .lesson-concept-box p {
  color: #374151;
}

body.theme-light .lesson-takeaways-card {
  background: #FFFFFF;
  border-color: #E2E8F0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

body.theme-light .takeaways-title {
  color: #1F2937;
}

body.theme-light .takeaways-bullets {
  color: #374151;
}

body.theme-light .takeaways-bullets li {
  color: #374151;
}

body.theme-light .lesson-notes-card {
  background: #FFFFFF;
  border-color: #E2E8F0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

body.theme-light .notes-title {
  color: #1F2937;
}

body.theme-light .lesson-notes-textarea {
  background: #FFFFFF;
  border-color: #CBD5E1;
  color: #1F2937;
}

body.theme-light .lesson-notes-textarea::placeholder {
  color: #6B7280;
}

body.theme-light .sidebar-phase-title {
  color: #1F2937;
}

body.theme-light .sidebar-ms-title {
  color: #1F2937;
}

body.theme-light .sidebar-milestone-row:hover {
  background: #F0F4F8;
  color: #1F2937;
}

body.theme-light .sidebar-milestone-row.is-completed .sidebar-ms-title {
  color: #4B5563;
  text-decoration: line-through;
  opacity: 0.9;
}

body.theme-light .criteria-body {
  color: #1F2937;
  font-weight: 600;
}

body.theme-light .bank-card {
  background: #FFFFFF;
  border-color: #E2E8F0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

body.theme-light .bank-card h4 {
  color: #1F2937;
}

body.theme-light .bank-card p {
  color: #374151;
}

body.theme-light .option-item {
  background: #FFFFFF;
  border-color: #CBD5E1;
  color: #1F2937;
}

body.theme-light .option-item:hover:not(:disabled) {
  background: #F0F4F8;
  border-color: #0056D2;
}

body.theme-light .option-prefix {
  background: #F0F4F8;
  border-color: #CBD5E1;
  color: #0056D2;
}

body.theme-light .option-item.correct {
  background: #E6F4EA !important;
  border-color: #1E8E3E !important;
  color: #0E6228 !important;
}

body.theme-light .option-item.incorrect {
  background: #FEE2E2 !important;
  border-color: #DC2626 !important;
  color: #B91C1C !important;
}

body.theme-light .option-item.option-eliminated {
  opacity: 0.45;
  color: #6B7280;
}

body.theme-light .explanation-box {
  background: #F8FAFC;
  border-color: #CBD5E1;
}

body.theme-light .explanation-title {
  color: #1F2937;
}

body.theme-light .explanation-text {
  color: #374151;
}

body.theme-light .launcher-btn-large.launcher-quiz-btn {
  background: #EDE9FE;
  border-color: #7C3AED;
  color: #5B21B6;
}

body.theme-light .launcher-btn-large.launcher-quiz-btn:hover {
  background: #DDD6FE;
  color: #4C1D95;
}

body.theme-light .code-block {
  background: #0F172A;
  border-color: #334155;
  color: #F8FAFC;
}

body.theme-light .cs-table th {
  background: #F1F5F9;
  color: #1F2937;
}

body.theme-light .cs-table td {
  color: #374151;
}

body.theme-light .cs-table tr:nth-child(even) {
  background: #F8FAFC;
}

/* ==========================================================================
   Pearson VUE ESL Accommodation Guide Modal
   ========================================================================== */

.modal-card.modal-large {
  max-width: 850px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.modal-scrollable-body {
  overflow-y: auto;
  padding: 0.5rem 0.25rem 1rem;
  margin-top: 0.75rem;
  line-height: 1.6;
}

.esl-info-banner {
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: var(--border-radius-sm);
  padding: 0.85rem 1.15rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.esl-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
}

.esl-table th, .esl-table td {
  border: 1px solid var(--border-color);
  padding: 0.65rem 0.85rem;
  text-align: left;
}

.esl-table th {
  background: var(--bg-card);
  font-weight: 700;
  color: var(--text-primary);
}

.esl-table td {
  color: var(--text-secondary);
}

.esl-letter-template-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.esl-letter-template-box pre {
  font-family: var(--font-code);
  font-size: 0.8rem;
  white-space: pre-wrap;
  color: var(--text-primary);
  line-height: 1.5;
}

.esl-steps-list {
  padding-left: 1.25rem;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.esl-steps-list li {
  margin-bottom: 0.5rem;
}

.esl-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
}

/* ==========================================================================
   Practice Exam Simulator: Hub & KPI Cockpit
   ========================================================================== */

.practice-hub-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.practice-header-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}

.ph-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ph-title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ph-icon {
  font-size: 2.2rem;
}

.ph-title-row h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.ph-title-row p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.ph-stat-pill {
  padding: 0.6rem 1.1rem;
  border-radius: 9999px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.ph-stat-pill.stat-ready {
  background: rgba(16, 185, 129, 0.12);
  border-color: var(--success-border);
  color: var(--success-text);
}

.ph-stat-pill.stat-studying {
  background: rgba(245, 158, 11, 0.12);
  border-color: var(--warning-border);
  color: var(--warning-text);
}

.practice-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.pkpi-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  box-shadow: var(--shadow);
}

.pkpi-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.pkpi-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
}

.pkpi-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* 4-Domain Cumulative Mastery Card */
.practice-domain-mastery-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}

.pdm-header {
  margin-bottom: 1rem;
}

.pdm-header h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.pdm-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.pdm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.pdm-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 0.9rem 1rem;
}

.pdm-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.pdm-name {
  font-weight: 600;
  color: var(--text-primary);
}

.pdm-bar-track {
  width: 100%;
  height: 8px;
  background: var(--bg-primary);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}

.pdm-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.4s ease;
}

.pdm-weight-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: right;
}

/* Practice Banks Section */
.practice-banks-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.section-title-row h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.practice-banks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.bank-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.bank-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
}

.bank-card.bank-ready {
  border-left: 4px solid var(--success-border);
}

.bank-card.bank-passed {
  border-left: 4px solid var(--accent-primary);
}

.bank-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.bank-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bank-icon {
  font-size: 1.8rem;
}

.bank-header h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.bank-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.bank-description {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.bank-meta-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.meta-chip {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  color: var(--text-muted);
  font-weight: 500;
}

.bank-score-chip {
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 0.6rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.bank-score-chip.chip-ready {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid var(--success-border);
  color: var(--success-text);
}

.bank-score-chip.chip-passed {
  background: rgba(0, 86, 210, 0.08);
  border: 1px solid var(--accent-border);
  color: var(--accent-text);
}

.bank-action-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn-bank-mode {
  flex: 1;
  min-width: 140px;
  padding: 0.65rem 0.85rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-mode-timed {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.btn-mode-timed:hover {
  background: var(--accent-hover);
}

.btn-mode-study {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-mode-study:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  color: var(--accent-text);
}

.esl-callout-banner {
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: var(--border-radius);
  padding: 0.9rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.esl-callout-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.esl-callout-icon {
  font-size: 1.5rem;
}

/* ==========================================================================
   State B: Active Exam Stage (Pearson VUE Test Runner)
   ========================================================================== */

.active-exam-stage {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: calc(100vh - 180px);
}

.exam-top-bar {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.85rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}

.etb-left, .etb-center, .etb-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.exam-title-badge {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.exam-mode-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

.exam-mode-pill.mode-timed {
  background: rgba(239, 68, 68, 0.12);
  border-color: var(--danger-border);
  color: var(--danger-text);
}

.exam-mode-pill.mode-study {
  background: rgba(16, 185, 129, 0.12);
  border-color: var(--success-border);
  color: var(--success-text);
}

.exam-q-counter {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.exam-domain-tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-muted);
}

.exam-timer-badge {
  font-family: var(--font-code);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: var(--border-radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.exam-timer-badge.timer-warning {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--warning-border);
  color: var(--warning-text);
}

.exam-timer-badge.timer-critical {
  background: rgba(239, 68, 68, 0.18);
  border-color: var(--danger-border);
  color: var(--danger-text);
  animation: pulse 1s infinite;
}

.btn-exam-flag {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 0.4rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.btn-exam-flag.flagged-active {
  background: rgba(245, 158, 11, 0.18);
  border-color: var(--warning-border);
  color: var(--warning-text);
}

.btn-exam-exit {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-exam-exit:hover {
  background: var(--bg-card-hover);
  color: var(--danger-text);
}

/* Exam Stage 2-Column Body */
.exam-stage-body {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 992px) {
  .exam-stage-body {
    grid-template-columns: 1fr;
  }
}

.exam-question-pane {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.case-study-drawer {
  background: var(--bg-secondary);
  border: 1px solid var(--accent-border);
  border-radius: var(--border-radius);
  padding: 0.85rem 1.15rem;
}

.case-study-summary {
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-text);
}

.cs-icon {
  font-size: 1.1rem;
}

.cs-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
}

.case-study-content {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-color);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.question-stem-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.qs-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.qs-num-badge {
  background: var(--accent-primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.qs-instruction {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.qs-stem-text {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-primary);
  font-weight: 500;
}

.study-tools-bar {
  display: flex;
  gap: 0.6rem;
}

.btn-study-tool {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-study-tool:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  color: var(--accent-text);
}

.concept-clue-card {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid var(--warning-border);
  border-radius: var(--border-radius-sm);
  padding: 0.75rem 1rem;
  display: flex;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.options-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  width: 100%;
}

.option-btn:hover:not([disabled]) {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
}

.option-btn.option-selected {
  background: var(--accent-light);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 1px var(--accent-primary);
}

.option-btn.option-eliminated {
  opacity: 0.4;
  text-decoration: line-through;
  cursor: not-allowed;
  background: var(--bg-primary);
}

.option-btn.option-correct-highlight {
  background: var(--success-bg) !important;
  border-color: var(--success-border) !important;
  color: var(--success-text) !important;
}

.option-btn.option-incorrect-highlight {
  background: var(--danger-bg) !important;
  border-color: var(--danger-border) !important;
  color: var(--danger-text) !important;
}

.opt-prefix {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-text);
  min-width: 22px;
}

.opt-text {
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text-primary);
}

.opt-hotkey-chip {
  font-family: var(--font-code);
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 0.15rem 0.4rem;
  background: var(--bg-primary);
  border-radius: 4px;
}

.study-explanation-card {
  border-radius: var(--border-radius);
  padding: 1.25rem;
  border: 1px solid var(--border-color);
  margin-top: 0.5rem;
}

.study-explanation-card.result-pass {
  background: rgba(16, 185, 129, 0.08);
  border-color: var(--success-border);
}

.study-explanation-card.result-fail {
  background: rgba(239, 68, 68, 0.08);
  border-color: var(--danger-border);
}

.sec-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.sec-status-icon {
  font-weight: 700;
  font-size: 0.9rem;
}

.sec-text {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.trap-alert-box {
  background: rgba(245, 158, 11, 0.12);
  border-left: 3px solid var(--warning-border);
  padding: 0.6rem 0.85rem;
  font-size: 0.82rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

.reference-box {
  font-size: 0.78rem;
  color: var(--text-muted);
  word-break: break-all;
}

/* Interactive Question Matrix / Palette Grid */
.exam-palette-pane {
  display: flex;
  flex-direction: column;
}

.palette-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.15rem;
  box-shadow: var(--shadow);
  position: sticky;
  top: 80px;
}

.palette-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.palette-header h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.palette-answered-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-text);
}

.palette-legend {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.leg-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.leg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-answered { background: var(--accent-primary); }
.dot-unanswered { background: var(--border-color); }
.dot-flagged { background: var(--warning-border); }

.palette-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.palette-cell {
  aspect-ratio: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.15s ease;
}

.palette-cell:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
}

.palette-cell.cell-answered {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

.palette-cell.cell-current {
  outline: 2px solid var(--accent-text);
  outline-offset: 1px;
  font-weight: 800;
}

.palette-cell.cell-flagged {
  border-color: var(--warning-border);
}

.cell-flag-icon {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 0.65rem;
}

.palette-summary-box {
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* Sticky Bottom Navigation Bar */
.exam-bottom-bar {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.85rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
  position: sticky;
  bottom: 10px;
  z-index: 50;
}

.ebb-left, .ebb-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-exam-nav {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-exam-nav:hover:not([disabled]) {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
}

.btn-nav-next {
  background: var(--accent-light);
  border-color: var(--accent-border);
  color: var(--accent-text);
}

.btn-flag-active {
  background: rgba(245, 158, 11, 0.18);
  border-color: var(--warning-border);
  color: var(--warning-text);
}

.btn-exam-submit {
  background: var(--success-border);
  color: #ffffff;
  border: 1px solid var(--success-border);
  border-radius: var(--border-radius-sm);
  padding: 0.55rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-exam-submit:hover {
  background: #0d9668;
}

.nav-hint-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .nav-hint-text { display: none; }
}

.submission-summary-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sub-stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.warning-alert-box {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid var(--warning-border);
  border-radius: var(--border-radius-sm);
  padding: 0.6rem 0.85rem;
  font-size: 0.82rem;
  color: var(--warning-text);
}

.btn-submit-final {
  background: var(--success-border);
  color: #ffffff;
  font-weight: 700;
}

/* ==========================================================================
   State C: Diagnostic Scorecard & Review View
   ========================================================================== */

.scorecard-view-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.scorecard-hero {
  border-radius: var(--border-radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--shadow);
}

.scorecard-hero.hero-ready {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(0, 86, 210, 0.1) 100%);
  border: 2px solid var(--success-border);
}

.scorecard-hero.hero-pass {
  background: linear-gradient(135deg, rgba(0, 86, 210, 0.12) 0%, rgba(30, 41, 59, 0.6) 100%);
  border: 2px solid var(--accent-primary);
}

.scorecard-hero.hero-fail {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(30, 41, 59, 0.6) 100%);
  border: 2px solid var(--danger-border);
}

.hero-header-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-icon {
  font-size: 2.5rem;
}

.hero-titles {
  flex: 1;
}

.hero-titles h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 0.15rem;
}

.hero-sub {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.score-cockpit-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 1rem;
  align-items: center;
}

@media (max-width: 900px) {
  .score-cockpit-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .score-cockpit-grid {
    grid-template-columns: 1fr;
  }
}

.sc-score-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.15rem 1.4rem;
}

.sc-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.sc-huge-score {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.1;
  margin: 0.2rem 0;
}

.sc-denom {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-muted);
}

.sc-sub-pct {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.sc-stat-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sc-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.scorecard-domains-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.scorecard-domains-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.sc-domains-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.sc-domains-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.sc-domain-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sc-dc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.sc-dc-bar-track {
  width: 100%;
  height: 8px;
  background: var(--bg-primary);
  border-radius: 9999px;
  overflow: hidden;
}

.sc-dc-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.4s ease;
}

.sc-dc-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Filterable Question Review Section */
.scorecard-review-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.review-header-bar {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow);
}

.rh-left h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.rh-left p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.review-filter-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-chip:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.filter-chip.chip-active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

.review-questions-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.review-empty-state {
  background: var(--bg-secondary);
  border: 1px dashed var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.review-q-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow);
}

.review-q-card.rq-correct {
  border-left: 4px solid var(--success-border);
}

.review-q-card.rq-incorrect {
  border-left: 4px solid var(--danger-border);
}

.rq-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.rq-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rq-num {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.rq-domain-tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-muted);
}

.rq-flag-badge {
  font-size: 0.75rem;
  color: var(--warning-text);
  font-weight: 600;
}

.rq-case-study {
  background: var(--bg-card);
  border: 1px solid var(--accent-border);
  border-radius: var(--border-radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.rq-stem {
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--text-primary);
  font-weight: 500;
}

.rq-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rq-option-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
}

.rq-option-item.rq-opt-correct {
  background: rgba(16, 185, 129, 0.12);
  border-color: var(--success-border);
}

.rq-option-item.rq-opt-wrong {
  background: rgba(239, 68, 68, 0.12);
  border-color: var(--danger-border);
}

.rq-opt-letter {
  font-weight: 700;
  min-width: 20px;
  color: var(--accent-text);
}

.rq-opt-text {
  flex: 1;
  color: var(--text-primary);
}

.rq-opt-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.rq-opt-tag.tag-correct {
  background: var(--success-bg);
  color: var(--success-text);
}

.rq-opt-tag.tag-user-wrong {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.rq-opt-tag.tag-user-correct {
  background: var(--success-bg);
  color: var(--success-text);
}

.rq-rationale-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 1rem 1.15rem;
}

.rq-rationale-title {
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.rq-rationale-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

.rq-reference {
  font-size: 0.78rem;
  color: var(--text-muted);
  word-break: break-all;
}

.scorecard-actions-bar {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.25rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-retake-exam {
  background: var(--accent-primary);
  color: #ffffff;
  font-weight: 700;
}

.btn-retake-exam:hover {
  background: var(--accent-hover);
}

/* ==========================================================================
   Light Mode & High Contrast Accessibility Rules
   ========================================================================== */

body.theme-light .practice-header-card,
body.theme-light .pkpi-card,
body.theme-light .practice-domain-mastery-card,
body.theme-light .bank-card,
body.theme-light .exam-top-bar,
body.theme-light .question-stem-card,
body.theme-light .palette-card,
body.theme-light .exam-bottom-bar,
body.theme-light .scorecard-domains-card,
body.theme-light .review-header-bar,
body.theme-light .review-q-card,
body.theme-light .scorecard-actions-bar {
  background: #FFFFFF;
  border-color: #E2E8F0;
}

body.theme-light .pdm-item,
body.theme-light .option-btn,
body.theme-light .palette-cell,
body.theme-light .sc-score-box,
body.theme-light .sc-stat-pill,
body.theme-light .sc-domain-card,
body.theme-light .rq-case-study,
body.theme-light .rq-option-item,
body.theme-light .rq-rationale-box {
  background: #F8FAFC;
  border-color: #CBD5E1;
}

body.theme-light .option-btn:hover:not([disabled]) {
  background: #EFF6FF;
  border-color: #0056D2;
}

body.theme-light .option-btn.option-selected {
  background: #EBF3FF;
  border-color: #0056D2;
}

body.theme-light .pdm-name,
body.theme-light .bank-header h4,
body.theme-light .qs-stem-text,
body.theme-light .opt-text,
body.theme-light .rq-stem,
body.theme-light .rq-opt-text {
  color: #1F2937;
}

body.theme-light .bank-description,
body.theme-light .sec-text,
body.theme-light .rq-rationale-text {
  color: #374151;
}

body.theme-high-contrast .option-btn.option-selected {
  border-color: #FFFF00;
  outline: 2px solid #FFFF00;
}

body.theme-high-contrast .palette-cell.cell-answered {
  background: #FFFF00;
  color: #000000;
}

body.theme-high-contrast .palette-cell.cell-current {
  outline: 3px solid #FFFFFF;
}




