/* === Exam Redesign === */

/* Start screen */
.exam-start-hero {
  max-width: 640px;
  margin: 2rem auto;
  padding: 2.5rem 2rem;
  background: var(--card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  text-align: center;
  border: 1px solid var(--border);
}
.exam-start-icon {
  width: 96px; height: 96px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--kc-navy), var(--kc-navy-light));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(27,42,73,0.25);
}
.exam-start-icon [data-lucide] { width: 48px; height: 48px; }
.exam-start-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--kc-navy);
  margin-bottom: 0.5rem;
}
.exam-start-desc { color: var(--muted-fg); margin-bottom: 2rem; }
.exam-start-info {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  padding: 1rem;
  background: var(--muted);
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
}
@media (max-width: 560px) { .exam-start-info { grid-template-columns: repeat(2, 1fr); } }
.exam-info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
}
.exam-info-item [data-lucide] {
  width: 18px; height: 18px;
  color: var(--kc-orange);
  flex-shrink: 0;
}
.exam-info-label { font-size: 0.7rem; color: var(--muted-fg); }
.exam-info-value { font-size: 0.95rem; font-weight: 700; color: var(--kc-navy); }
.exam-start-callout {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--kc-orange-lighter);
  border-left: 4px solid var(--kc-orange);
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  text-align: left;
  font-size: 0.875rem;
  color: var(--foreground);
}
.exam-start-callout [data-lucide] {
  width: 20px; height: 20px;
  color: var(--kc-orange);
  flex-shrink: 0;
  margin-top: 2px;
}
.exam-start-btn {
  padding: 0.75rem 2.5rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

/* Sticky header during exam */
.exam-sticky-header {
  position: sticky;
  top: 60px;
  z-index: 10;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
}
.exam-sticky-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.exam-sticky-progress { flex-grow: 1; }
.exam-progress-text {
  font-size: 0.8rem;
  color: var(--muted-fg);
  font-weight: 600;
  margin-bottom: 3px;
}
.exam-progress-text span { color: var(--kc-navy); }
.exam-progress-bar {
  height: 8px;
  background: var(--muted);
  border-radius: 4px;
  overflow: hidden;
}
.exam-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--kc-navy), var(--kc-orange));
  transition: width 0.25s ease-out;
}
.exam-sticky-timer {
  font-weight: 700;
  font-size: 1rem;
  color: var(--kc-navy);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  background: var(--kc-navy-lighter);
  border-radius: var(--radius-sm);
  font-variant-numeric: tabular-nums;
}
.exam-sticky-timer [data-lucide] { width: 16px; height: 16px; }
.exam-sticky-timer.low { background: #fee2e2; color: var(--destructive); animation: pulse-warn 1s infinite; }
@keyframes pulse-warn { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
.exam-sticky-submit { flex-shrink: 0; }

/* Question cards */
.exam-q-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 160px;
}
.exam-q-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.exam-q-card .exam-q-num {
  width: 32px;
  height: 32px;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.exam-q-points {
  display: inline-block;
  padding: 2px 10px;
  background: var(--kc-orange-lighter);
  color: var(--kc-orange);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: auto;
}
.exam-q-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--kc-navy);
  line-height: 1.5;
  margin-bottom: 1rem;
}
.exam-q-options { display: flex; flex-direction: column; gap: 0.5rem; }

/* Question Navigator (right sidebar) */
.exam-navigator {
  position: sticky;
  top: 160px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}
.exam-navigator-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--kc-navy);
  margin-bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.exam-navigator-title [data-lucide] { width: 14px; height: 14px; color: var(--kc-orange); }
.exam-navigator-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.exam-nav-btn {
  aspect-ratio: 1;
  border: 2px solid var(--border);
  background: var(--card);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--muted-fg);
  cursor: pointer;
  transition: all 0.15s;
}
.exam-nav-btn:hover { border-color: var(--kc-navy-light); color: var(--kc-navy); }
.exam-nav-btn.answered {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.exam-navigator-legend {
  font-size: 0.75rem;
  color: var(--muted-fg);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.exam-navigator-legend .legend-dot {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: -2px;
}
.legend-default { background: var(--muted); border: 2px solid var(--border); }
.legend-answered { background: var(--success); }

/* Result screen */
.exam-result-hero {
  max-width: 720px;
  margin: 1.5rem auto;
  padding: 2rem;
  background: var(--card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  text-align: center;
  border: 1px solid var(--border);
}
.exam-result-hero.pass { border-top: 6px solid var(--success); }
.exam-result-hero.fail { border-top: 6px solid var(--destructive); }
.exam-result-ring-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto 1.5rem;
}
.exam-result-ring-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  line-height: 1.2;
  pointer-events: none;
}
.exam-result-pct {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}
.exam-result-pct-label {
  font-size: 0.75rem;
  color: var(--muted-fg, #888);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.exam-result-ring {
  width: 100%; height: 100%;
  transform: rotate(-90deg);
}
.exam-result-ring .ring-track {
  fill: none;
  stroke: var(--muted);
  stroke-width: 12;
}
.exam-result-ring .ring-fill {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease-out;
}
.exam-result-ring .ring-text {
  text-anchor: middle;
  font-size: 36px;
  font-weight: 700;
  transform: rotate(90deg);
  transform-origin: 80px 80px;
}
.exam-result-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--kc-navy);
  margin-bottom: 0.5rem;
}
.exam-result-subtitle {
  color: var(--muted-fg);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}
.exam-result-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.exam-stat-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem;
  background: var(--muted);
  border-radius: var(--radius-lg);
  text-align: left;
}
.exam-stat-icon-sm {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.exam-stat-icon-sm [data-lucide] { width: 20px; height: 20px; }
.exam-stat-icon-sm.success { background: rgba(22,163,74,0.15); color: var(--success); }
.exam-stat-icon-sm.danger { background: rgba(197,48,48,0.15); color: var(--destructive); }
.exam-stat-icon-sm.navy { background: var(--kc-navy-lighter); color: var(--kc-navy); }
.exam-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--kc-navy);
  line-height: 1.1;
}
.exam-stat-label { font-size: 0.75rem; color: var(--muted-fg); }

.exam-result-dots-wrap {
  padding: 1rem;
  background: var(--muted);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
}
.exam-result-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-top: 0.5rem;
}
.exam-result-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
}
.exam-result-dot.correct { background: var(--success); }
.exam-result-dot.wrong { background: var(--destructive); opacity: 0.7; }

.exam-result-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

