/* ICFESSK - Page-Specific Layouts (Residual after V7 cleanup) */
/* Only Quiz, Profile, and Upgrade remain here */

/* Quiz */
/* ── Quiz V3 — Viewport-Locked, Zero-Scroll, Mobile-First ─────────── */

/* ── Quiz Loading Splash ──────────────────────────────── */
.quiz-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1035 0%, #0f0a1e 40%, #1e0a2e 100%);
  will-change: transform, opacity, filter;
  transition: opacity 250ms cubic-bezier(0.23, 1, 0.32, 1),
              transform 250ms cubic-bezier(0.23, 1, 0.32, 1),
              filter 250ms cubic-bezier(0.23, 1, 0.32, 1),
              visibility 250ms cubic-bezier(0.23, 1, 0.32, 1);
}

.quiz-splash--hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  filter: blur(4px);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .quiz-splash {
    transition: opacity 250ms ease, visibility 250ms ease;
  }
  .quiz-splash--hidden {
    transform: scale(1);
    filter: blur(0);
  }
}

.quiz-splash-content {
  text-align: center;
  animation: quizSplashPulse 2s ease-in-out infinite;
}

.quiz-splash-logo {
  width: 120px;
  margin-bottom: 24px;
  filter: drop-shadow(0 0 30px rgba(108, 43, 255, 0.3));
}

.quiz-splash-text {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.quiz-splash-bar {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  margin: 0 auto;
  overflow: hidden;
}

.quiz-splash-bar-fill {
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--violet), #F028D8);
  border-radius: 99px;
  animation: quizSplashProgress 1.8s ease-in-out infinite;
}

@keyframes quizSplashProgress {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(350%);
  }
}

@keyframes quizSplashPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.85;
  }
}

/* ── V3 Layout: Viewport-Locked ───────────────────────── */
.quiz-layout {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  background: var(--bg-primary);
  overflow: hidden;
  position: relative;
}

/* ── Header (48px fixed) ──────────────────────────────── */
.quiz-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  height: 48px;
  min-height: 48px;
  padding: 0 12px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  gap: 8px;
}

.quiz-header-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--bg-primary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
  flex-shrink: 0;
}
.quiz-header-close:hover { background: var(--border); color: var(--text-primary); }
.quiz-header-close:active { transform: scale(0.95); }

.quiz-header-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.quiz-header-title {
  font-size: 0.85rem;
  font-weight: var(--fw-bold);
  margin: 0;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: clamp(120px, 35vw, 200px);
}

.quiz-header-counter {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: var(--fw-bold);
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.quiz-header-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Generic header icon button (review grid, etc.) */
.quiz-header-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
  flex-shrink: 0;
}
.quiz-header-icon-btn .material-symbols-outlined { font-size: 20px; }
.quiz-header-icon-btn:hover { background: var(--border); color: var(--text-primary); }
.quiz-header-icon-btn:active { transform: scale(0.95); }

/* Timer toggle button */
.quiz-timer-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: var(--fw-semi);
  cursor: pointer;
  transition: opacity 160ms ease;
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
}
.quiz-timer-toggle .material-symbols-outlined { font-size: 16px; }
.quiz-timer-toggle:hover { opacity: 0.8; }
.quiz-timer-toggle.timer-hidden .quiz-timer-value { display: none; }

/* Progress bar (integrated in header bottom) */
.quiz-header-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: color-mix(in srgb, var(--subject-color, var(--violet)) 12%, transparent);
}

.quiz-header-progress-fill {
  height: 100%;
  background: var(--subject-color, var(--violet));
  border-radius: 0 99px 99px 0;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Quiz Body (viewport-locked main area) ────────────── */
.quiz-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 16px;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  min-height: 0; /* critical for flex shrink */
}

/* ── Stimulus zone (inline split, correction #2) ──────── */
.quiz-stimulus {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 8px;
  max-height: min(35%, 220px); /* C1 fix: cap at 220px on small screens */
  display: flex;
  flex-direction: column;
  flex-shrink: 1; /* C1 fix: yield space if question area needs it */
}

.quiz-stimulus-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  flex-shrink: 0;
}
.quiz-stimulus-label .material-symbols-outlined { font-size: 14px; }

.quiz-stimulus-content {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-primary);
  overflow-y: auto; /* correction #2: scroll contained inside stimulus */
  flex: 1;
  min-height: 0;
}

/* ── Question area (fills remaining space) ────────────── */
.quiz-question-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  gap: 4px;
}

/* Stem (question text) */
.quiz-stem {
  font-size: 1rem;
  line-height: 1.5;
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  margin: 0 0 12px;
  overflow-y: auto;
  flex-shrink: 1;
  min-height: 0;
}

/* Options container */
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Option cards (compact, 48px mobile) ──────────────── */
.quiz-opt-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px; /* M1 fix: comfortable ~52px touch target */
  border-radius: 12px;
  border: 2px solid var(--border-subtle, var(--border));
  background: var(--bg-primary);
  cursor: pointer;
  transition: border-color 160ms cubic-bezier(0.4, 0, 0.2, 1),
              background 160ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 160ms cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 160ms cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.quiz-opt-card input[type="radio"] { display: none; }

.quiz-opt-badge {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
  background: var(--bg-tertiary, var(--bg-secondary));
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: background 160ms ease, color 160ms ease;
}

.quiz-opt-text {
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--text-primary);
  font-weight: 500;
  flex: 1;
  min-width: 0;
}

/* Hover (desktop only) */
@media (hover: hover) {
  .quiz-opt-card:hover:not(.quiz-opt-card--locked) {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.08);
    border-color: var(--text-muted, var(--text-secondary));
  }
}

/* Active press */
.quiz-opt-card:active:not(.quiz-opt-card--locked) {
  transform: scale(0.98);
}

/* Selected state */
.quiz-opt-card--selected,
.quiz-opt-card.selected {
  border-color: var(--subject-color);
  background-color: color-mix(in srgb, var(--subject-color) 8%, transparent);
}
.quiz-opt-card--selected .quiz-opt-badge,
.quiz-opt-card.selected .quiz-opt-badge {
  background: var(--subject-color);
  color: white;
}

/* ── Feedback states (immediate mode) ─────────────────── */
.quiz-opt-card--correct {
  border-color: #22C55E !important;
  background: color-mix(in srgb, #22C55E 8%, transparent) !important;
}
.quiz-opt-card--correct .quiz-opt-badge {
  background: #22C55E !important;
  color: white !important;
}

.quiz-opt-card--incorrect {
  border-color: #EF4444 !important;
  background: color-mix(in srgb, #EF4444 8%, transparent) !important;
}
.quiz-opt-card--incorrect .quiz-opt-badge {
  background: #EF4444 !important;
  color: white !important;
}

/* Locked (after feedback shown — no more clicks) */
.quiz-opt-card--locked {
  pointer-events: none;
  opacity: 0.6;
}
.quiz-opt-card--locked.quiz-opt-card--correct,
.quiz-opt-card--locked.quiz-opt-card--incorrect,
.quiz-opt-card--locked.quiz-opt-card--selected {
  opacity: 1;
}

/* Micro-animations for feedback */
@keyframes quizCorrectBounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.03); }
  100% { transform: scale(1); }
}
@keyframes quizIncorrectShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}
.quiz-opt-card--correct.quiz-opt-card--animate {
  animation: quizCorrectBounce 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.quiz-opt-card--incorrect.quiz-opt-card--animate {
  animation: quizIncorrectShake 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Question transition animations ──────────────────── */
@keyframes quizSlideInRight {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes quizSlideInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}
.quiz-body--slide-right { animation: quizSlideInRight 0.22s cubic-bezier(0.16, 1, 0.3, 1) both; }
.quiz-body--slide-left  { animation: quizSlideInLeft  0.22s cubic-bezier(0.16, 1, 0.3, 1) both; }
.quiz-body--slide-up    { animation: quizSlideInUp    0.25s ease-out both; }

@keyframes quizSlideInUp {
  from { opacity: 0; transform: translateY(12px); filter: blur(2px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0px); }
}

@media (prefers-reduced-motion: reduce) {
  @keyframes quizSlideInUp {
    from { opacity: 0; transform: none; filter: none; }
    to   { opacity: 1; transform: none; filter: none; }
  }
}

/* ── Footer (52px fixed) ──────────────────────────────── */
.quiz-footer {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 52px;
  min-height: 52px;
  padding: 0 16px;
  padding-bottom: env(safe-area-inset-bottom, 0px); /* M4 fix: iPhone home bar */
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.quiz-nav-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: var(--fw-semi);
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  border: none;
  transition: background 160ms ease, color 160ms ease, opacity 160ms ease, transform 100ms ease;
}
.quiz-nav-btn:active { transform: scale(0.97); }

.quiz-nav-prev {
  background: var(--bg-primary);
  border: 1.5px solid var(--border);
  color: var(--text-primary);
}
.quiz-nav-prev:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--subject-color, var(--violet)) 50%, transparent);
  color: var(--subject-color, var(--violet));
}
.quiz-nav-prev:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.quiz-nav-next {
  margin-left: auto;
  background: var(--subject-color, var(--violet));
  color: #fff;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--subject-color, var(--violet)) 25%, transparent);
}
.quiz-nav-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.quiz-nav-next:hover:not(:disabled) {
  box-shadow: 0 4px 16px color-mix(in srgb, var(--subject-color, var(--violet)) 35%, transparent);
}

/* ── Pre-start screen ────────────────────────────────── */
.quiz-prestart {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.quiz-prestart-card {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid color-mix(in srgb, var(--subject-color, #7c3aed) 12%, var(--border));
  border-radius: 24px;
  padding: 0;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 4px 16px rgba(0, 0, 0, 0.06),
    0 12px 40px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  overflow: hidden;
  margin: auto 0;
  animation: prestartEnter 350ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes prestartEnter {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .quiz-prestart-card {
    animation: prestartEnterReduced 200ms ease both;
  }
  @keyframes prestartEnterReduced {
    0% { opacity: 0; }
    100% { opacity: 1; }
  }
}

/* Exit animation triggered by JS when starting quiz */
.pq-exiting {
  transition: opacity 150ms cubic-bezier(0.23, 1, 0.32, 1),
              transform 150ms cubic-bezier(0.23, 1, 0.32, 1),
              filter 150ms cubic-bezier(0.23, 1, 0.32, 1) !important;
  opacity: 0 !important;
  transform: scale(0.97) translateY(-8px) !important;
  filter: blur(2px) !important;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .pq-exiting {
    transition: opacity 150ms ease !important;
    transform: none !important;
    filter: none !important;
  }
}

.quiz-prestart-inner {
  position: relative;
  z-index: 2;
  padding: 20px 20px 14px;
}

/* ── Area Icon (uses --subject-color) ───────────────── */
.quiz-prestart-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--subject-color, #7c3aed) 15%, transparent),
    color-mix(in srgb, var(--subject-color, #7c3aed) 8%, transparent)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  box-shadow:
    0 2px 8px color-mix(in srgb, var(--subject-color, #7c3aed) 12%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.quiz-prestart-icon .material-symbols-outlined {
  font-size: 26px;
  color: var(--subject-color, var(--violet));
}

/* ── Title + Subtitle ──────────────────────────────── */
.quiz-prestart-title {
  font-size: 1.2rem;
  font-weight: var(--fw-extra);
  margin: 0 0 2px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.quiz-prestart-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin: 0 0 12px;
}

/* ── Mini Score Ring (best score) ───────────────────── */
.quiz-prestart-ring {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 12px;
}

.pq-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.pq-ring-track {
  fill: none;
  stroke: var(--border);
  stroke-width: 7;
}

.pq-ring-fill {
  fill: none;
  stroke: var(--subject-color, var(--violet));
  stroke-width: 7;
  stroke-linecap: round;
  /* circumference = 2 * PI * 42 ≈ 263.89 */
  stroke-dasharray: 263.89;
  stroke-dashoffset: 263.89;
  transition: stroke-dashoffset 1s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--subject-color, var(--violet)) 35%, transparent));
}

.pq-ring-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  padding-top: 38%;
}

.pq-ring-number {
  font-size: 1.75rem;
  font-weight: var(--fw-extra);
  line-height: 1;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.pq-ring-unit {
  font-size: 0.85rem;
  font-weight: var(--fw-semi);
  color: var(--text-secondary);
  margin-left: 1px;
}

.pq-ring-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-top: -4px;
  text-align: center;
}

/* ── Dominio Chip ──────────────────────────────────── */
.quiz-prestart-dominio {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 14px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.quiz-prestart-dominio .material-symbols-outlined {
  font-size: 16px;
}

/* Semantic dominio states — set by JS via data-level */
.quiz-prestart-dominio[data-level="needs-practice"] {
  background: rgba(239, 68, 68, 0.08);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.quiz-prestart-dominio[data-level="in-progress"] {
  background: rgba(245, 158, 11, 0.08);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.quiz-prestart-dominio[data-level="mastered"] {
  background: rgba(34, 197, 94, 0.08);
  color: #22C55E;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

/* ── Stats Row ─────────────────────────────────────── */
.quiz-prestart-stats {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin-bottom: 12px;
}

.quiz-prestart-stat {
  display: flex;
  align-items: center;
  gap: 7px;
  text-align: left;
  padding: 8px 16px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--subject-color, #7c3aed) 4%, transparent);
  border: 1px solid color-mix(in srgb, var(--subject-color, #7c3aed) 8%, transparent);
}

.quiz-prestart-stat .material-symbols-outlined {
  font-size: 20px;
  color: var(--subject-color, var(--violet));
  opacity: 0.8;
}

.quiz-prestart-stat strong {
  display: block;
  font-size: 0.95rem;
  font-weight: var(--fw-extra);
  color: var(--text-primary);
  line-height: 1.1;
}

.quiz-prestart-stat small {
  font-size: 0.65rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.quiz-prestart-stat--quota .material-symbols-outlined {
  color: #F59E0B;
}

.quiz-prestart-stat--last .material-symbols-outlined {
  color: var(--text-secondary);
}

/* ── Resume Banner + Progress Bar ──────────────────── */
.quiz-prestart-resume {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  background: color-mix(in srgb, var(--subject-color, #7c3aed) 4%, transparent);
  border: 1px solid color-mix(in srgb, var(--subject-color, #7c3aed) 15%, transparent);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.quiz-prestart-resume > .material-symbols-outlined {
  font-size: 20px;
  color: var(--subject-color, var(--violet));
  flex-shrink: 0;
  margin-top: 2px;
}

.quiz-prestart-resume-body {
  flex: 1;
  min-width: 0;
}

.quiz-prestart-resume strong {
  font-size: 0.85rem;
  color: var(--text-primary);
  display: block;
  margin-bottom: 6px;
}

.pq-resume-bar-container {
  width: 100%;
}

.pq-resume-bar {
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: var(--border);
  overflow: hidden;
}

.pq-resume-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--subject-color, var(--violet));
  transition: width 600ms cubic-bezier(0.23, 1, 0.32, 1);
}

/* ── Action Buttons ────────────────────────────────── */
.quiz-prestart-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

/* (quiz-btn-start defined below with gradient CTA styles) */

.quiz-btn-restart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 200px;
  padding: 10px 20px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: var(--fw-semi);
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
  transition: transform 160ms cubic-bezier(0.34, 1.56, 0.64, 1),
              background 200ms ease,
              border-color 200ms ease;
}

.quiz-btn-restart:hover {
  background: var(--bg-hover);
  border-color: var(--text-secondary);
}

.quiz-btn-restart:active {
  transform: scale(0.97);
}

/* ── Auto-save Note ────────────────────────────────── */
.quiz-prestart-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-muted, var(--text-secondary));
  margin: 0;
  opacity: 0.7;
}

.quiz-prestart-note .material-symbols-outlined {
  font-size: 14px;
}

/* ── ICFES Scale Bar (Pre-start, kept for examen-skora) ── */
.quiz-prestart-scale {
  background: color-mix(in srgb, var(--subject-color, #7c3aed) 3%, transparent);
  border: 1px solid color-mix(in srgb, var(--subject-color, #7c3aed) 8%, transparent);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.quiz-prestart-scale-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: var(--sp-md);
}

.quiz-prestart-scale-bar {
  display: flex;
  height: 10px;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 6px;
}

.scale-segment {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}

.scale-segment span {
  position: absolute;
  bottom: -16px;
  left: 0;
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: 600;
}

.scale-segment--insuf { flex: 3; background: #EF4444; }
.scale-segment--min   { flex: 2; background: #F97316; }
.scale-segment--sat   { flex: 2; background: #EAB308; }
.scale-segment--adv   { flex: 2; background: #22C55E; }
.scale-segment--sup   { flex: 1; background: #8B5CF6; }

.quiz-prestart-scale-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  padding: 0 2px;
}

.quiz-prestart-scale-labels span {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.quiz-prestart-scale-note {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin: var(--sp-md) 0 0;
}

.quiz-prestart-scale-note strong {
  color: #22C55E;
}

/* ── Stagger Entrance Animation ────────────────────── */
.pq-stagger {
  opacity: 0;
  transform: translateY(8px);
  filter: blur(2px);
  animation: pqFadeIn 350ms cubic-bezier(0.23, 1, 0.32, 1) forwards;
  animation-delay: calc(var(--stagger, 0) * 40ms);
}

@keyframes pqFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pq-stagger {
    transform: none;
    filter: none;
    animation: pqFadeInReduced 200ms ease forwards;
    animation-delay: calc(var(--stagger, 0) * 30ms);
  }

  @keyframes pqFadeInReduced {
    to { opacity: 1; }
  }

  .pq-ring-fill {
    transition-duration: 0.01ms;
  }
}

/* ── Feedback Mode Notice ──────────────────────────── */
.quiz-feedback-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.quiz-feedback-notice .material-symbols-outlined {
  font-size: 20px;
  color: #F59E0B;
  flex-shrink: 0;
  margin-top: 1px;
}

.quiz-feedback-notice p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.45;
}

/* ── Student Agency Panel ──────────────────────────── */
.quiz-agency-panel {
  text-align: left;
  border: 1px solid color-mix(in srgb, var(--subject-color, #7c3aed) 10%, var(--border));
  background: color-mix(in srgb, var(--subject-color, #7c3aed) 2%, var(--bg-primary));
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 10px;
  animation: agencySlideIn 0.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;
  will-change: transform, opacity;
}

@keyframes agencySlideIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.quiz-agency-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--subject-color, #7c3aed) 8%, transparent);
}

.quiz-agency-icon {
  font-size: 18px !important;
  color: var(--subject-color, var(--violet));
  opacity: 0.7;
}

.quiz-agency-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1px;
}

.quiz-agency-desc {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.3;
}

.quiz-agency-field {
  margin-bottom: 10px;
}
.quiz-agency-field:last-child {
  margin-bottom: 0;
}

.quiz-agency-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.quiz-agency-label .material-symbols-outlined {
  font-size: 16px;
}

.quiz-agency-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quiz-agency-range {
  flex: 1;
  height: 5px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(
    90deg,
    var(--subject-color, #7c3aed) 0%,
    var(--subject-color, #7c3aed) var(--quiz-slider-pct, 100%),
    color-mix(in srgb, var(--subject-color, #7c3aed) 12%, var(--bg-secondary)) var(--quiz-slider-pct, 100%),
    color-mix(in srgb, var(--subject-color, #7c3aed) 12%, var(--bg-secondary)) 100%
  );
  border-radius: 99px;
  outline: none;
  cursor: pointer;
}
.quiz-agency-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--subject-color, #7c3aed);
  border: 2.5px solid var(--bg-primary);
  box-shadow: 0 1px 4px color-mix(in srgb, var(--subject-color, #7c3aed) 35%, transparent);
  cursor: grab;
  transition: transform 160ms cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 160ms ease;
}
.quiz-agency-range::-webkit-slider-thumb:hover {
  transform: scale(1.18);
  box-shadow: 0 2px 10px color-mix(in srgb, var(--subject-color, #7c3aed) 45%, transparent);
}
.quiz-agency-range::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.08);
}
.quiz-agency-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--subject-color, #7c3aed);
  border: 2.5px solid var(--bg-primary);
  box-shadow: 0 1px 4px color-mix(in srgb, var(--subject-color, #7c3aed) 35%, transparent);
  cursor: grab;
}

.quiz-agency-value {
  min-width: 34px;
  text-align: center;
  font-weight: var(--fw-extra);
  font-size: 1rem;
  color: var(--subject-color, #7c3aed);
  background: color-mix(in srgb, var(--subject-color, #7c3aed) 8%, transparent);
  border-radius: 10px;
  padding: 3px 8px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.quiz-agency-slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 0.65rem;
  color: var(--text-muted, var(--text-secondary));
  font-weight: 500;
}

/* Difficulty chips */
.quiz-agency-chips {
  display: flex;
  gap: 6px;
}

.quiz-agency-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 0;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 160ms cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 160ms ease,
              background 160ms ease,
              color 160ms ease,
              box-shadow 200ms ease;
  flex: 1;
  justify-content: center;
  white-space: nowrap;
  will-change: transform;
}

.quiz-agency-chip .material-symbols-outlined {
  font-size: 16px;
}

.quiz-agency-chip:hover {
  border-color: color-mix(in srgb, var(--subject-color, #7c3aed) 35%, transparent);
  color: var(--text-primary);
  background: color-mix(in srgb, var(--subject-color, #7c3aed) 4%, var(--bg-secondary));
}

.quiz-agency-chip:active {
  transform: scale(0.96);
}

.quiz-agency-chip.active {
  border-color: var(--subject-color, #7c3aed);
  background: color-mix(in srgb, var(--subject-color, #7c3aed) 10%, var(--bg-secondary));
  color: var(--subject-color, #7c3aed);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--subject-color, #7c3aed) 12%, transparent),
              inset 0 1px 0 rgba(255, 255, 255, 0.4);
  font-weight: 700;
}

.quiz-agency-chip.active .material-symbols-outlined {
  color: var(--subject-color, #7c3aed);
}

@media (max-width: 380px) {
  .quiz-agency-chips {
    flex-direction: column;
  }
  .quiz-agency-chip {
    flex: unset;
  }
}

/* Start button styles — gradient CTA with glow */
.quiz-btn-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  max-width: 320px;
  font-size: 0.95rem;
  font-weight: var(--fw-bold);
  padding: 13px 24px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(
    135deg,
    var(--subject-color, var(--violet)),
    color-mix(in srgb, var(--subject-color, var(--violet)) 80%, #ff6b9d)
  );
  color: #fff;
  cursor: pointer;
  box-shadow:
    0 2px 8px color-mix(in srgb, var(--subject-color, var(--violet)) 25%, transparent),
    0 8px 24px color-mix(in srgb, var(--subject-color, var(--violet)) 15%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 200ms ease;
  letter-spacing: 0.01em;
}
.quiz-btn-start:hover {
  box-shadow:
    0 4px 12px color-mix(in srgb, var(--subject-color, var(--violet)) 35%, transparent),
    0 12px 32px color-mix(in srgb, var(--subject-color, var(--violet)) 20%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}
.quiz-btn-start:active { transform: scale(0.97) translateY(0); }
.quiz-btn-start:disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(0.3); }

/* (quiz-btn-restart defined above) */

/* ── Modals (V3) ──────────────────────────────────────── */
.quiz-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.quiz-modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 24px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  animation: quizModalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes quizModalIn {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.quiz-modal-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
}
.quiz-modal-icon--confirm { color: var(--subject-color, var(--violet)); }
.quiz-modal-icon--warn { color: #F59E0B; }

.quiz-modal-title {
  font-size: 1.15rem;
  font-weight: var(--fw-bold);
  margin: 0 0 6px;
  color: var(--text-primary);
}

.quiz-modal-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 20px;
}

.quiz-modal-actions {
  display: flex;
  gap: 8px;
}

.quiz-modal-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: var(--fw-semi);
  cursor: pointer;
  border: none;
  transition: transform 100ms ease, opacity 160ms ease;
}
.quiz-modal-btn:active { transform: scale(0.97); }

.quiz-modal-btn--outline {
  background: var(--bg-primary);
  border: 1.5px solid var(--border);
  color: var(--text-primary);
}

.quiz-modal-btn--primary {
  background: var(--subject-color, var(--violet));
  color: #fff;
}

.quiz-modal-btn--danger {
  background: #EF4444;
  color: #fff;
}

/* ── Review Drawer ────────────────────────────────────── */
.quiz-review-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
}

.quiz-review-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  max-width: 80vw;
  height: 100%;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  padding: 16px;
  display: flex;
  flex-direction: column;
  animation: quizDrawerSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes quizDrawerSlide {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

.quiz-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.quiz-review-header h3 {
  font-size: 0.95rem;
  font-weight: var(--fw-bold);
  margin: 0;
  color: var(--text-primary);
}

.quiz-review-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  overflow-y: auto;
  flex: 1;
}

.quiz-review-dot {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: var(--fw-bold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 160ms ease, background 160ms ease;
}
.quiz-review-dot:hover { border-color: var(--subject-color, var(--violet)); }
.quiz-review-dot--current {
  border-color: var(--subject-color, var(--violet));
  background: var(--subject-color, var(--violet));
  color: white;
}
.quiz-review-dot--answered {
  border-color: var(--subject-color, var(--violet));
  background: color-mix(in srgb, var(--subject-color, var(--violet)) 10%, transparent);
  color: var(--subject-color, var(--violet));
}

/* Gate screens */
.quiz-gate-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4xl) var(--sp-md);
  text-align: center;
}

/* ── V3 Responsive Breakpoints ────────────────────────── */

/* Tablet (600px+) */
@media (min-width: 600px) {
  .quiz-header-title { max-width: 280px; font-size: 0.9rem; }
  .quiz-stem { font-size: 1.1rem; }
  .quiz-opt-card { padding: 12px 18px; }
  .quiz-opt-badge { width: 32px; height: 32px; font-size: 0.9rem; }
  .quiz-opt-text { font-size: 1rem; }
  .quiz-body { padding: 12px 24px; }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  .quiz-header-title { max-width: 360px; font-size: 0.95rem; }
  .quiz-stem { font-size: 1.2rem; line-height: 1.55; }
  .quiz-opt-card { padding: 14px 20px; gap: 14px; }
  .quiz-opt-badge { width: 36px; height: 36px; font-size: 1rem; border-radius: 10px; }
  .quiz-opt-text { font-size: 1.05rem; }
  .quiz-body { padding: 16px 32px; max-width: 760px; }
  .quiz-options { gap: 10px; }
}


/* ── Profile / Settings (V2) ─────────────────────────────────────────────────────────── */

.profile-v2-container {
  display: flex;
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px;
  align-items: flex-start;
  min-height: 100vh;
}

.profile-v2-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.profile-v2-sidebar {
  width: 340px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (max-width: 900px) {
  .profile-v2-container {
    flex-direction: column;
  }
  .profile-v2-sidebar {
    width: 100%;
  }
}

/* SECTION 1: Hero */
.profile-hero-card {
  position: relative;
  background: linear-gradient(135deg, #1A0A2E, #2D1B69);
  border-radius: 20px;
  padding: 24px;
  color: white;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  animation: fadeInUp 0.4s ease-out forwards;
}

.profile-settings-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  transition: background 150ms ease, color 150ms ease;
  text-decoration: none;
}

.profile-settings-btn:hover {
  background: rgba(255,255,255,0.20);
  color: #FFFFFF;
}

.hero-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.hero-avatar-wrapper {
  position: relative;
}

.hero-avatar-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF8C00, #FF3CAC, #7B2FBE);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.hero-edit-avatar {
  position: absolute;
  top: 0;
  right: -8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: white;
  color: #7B2FBE;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.2s;
}

.hero-edit-avatar:hover {
  transform: scale(1.1);
}

.hero-edit-avatar .material-symbols-outlined {
  font-size: 16px;
  font-weight: 700;
}

.hero-plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(255,255,255,0.1);
  color: white;
  width: max-content;
  margin-bottom: 12px;
}

.hero-plan-badge.premium {
  background: linear-gradient(135deg, #FF8C00, #FF3CAC, #7B2FBE);
}

.hero-plan-badge.free {
  background: #4B5563;
  cursor: pointer;
}
.hero-plan-badge.free:hover {
  background: #374151;
}

#profile-name {
  color: #FFFFFF !important;
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0 0 4px 0;
  letter-spacing: -0.02em;
}

.hero-user-details p#profile-username {
  color: #D1D5DB;
  font-size: 0.95rem;
  margin: 0 0 12px 0;
}

.hero-joined-date {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #9CA3AF;
  font-size: 0.85rem;
  margin: 0 0 24px 0;
}

.hero-joined-date .material-symbols-outlined {
  font-size: 16px;
}

.hero-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 16px 24px;
  backdrop-filter: blur(8px);
}

.h-stat {
  display: flex;
  flex-direction: column;
  position: relative;
}

.h-stat-val {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.1;
}

.h-stat-lbl {
  font-size: 0.75rem;
  color: #D1D5DB;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.h-stat-icon {
  position: absolute;
  top: -8px;
  right: -36px;
  width: 34px;
  height: 34px;
  opacity: 1;
}

.h-stat-divider {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.15);
}

/* SECTION 2: Statistics */
.profile-section {
  animation: fadeInUp 0.5s ease-out forwards;
  opacity: 0;
  animation-delay: 0.1s;
}

.profile-section-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #111827;
  margin: 0 0 16px 0;
}

.profile-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.profile-section-header .profile-section-title {
  margin: 0;
}

.profile-see-all {
  color: #7B2FBE;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.profile-see-all:hover {
  text-decoration: underline;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.p-stat-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.p-stat-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.p-stat-icon {
  width: 40px;
  height: 40px;
}

.p-stat-info {
  display: flex;
  flex-direction: column;
}

.p-stat-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.1;
}

.p-stat-lbl {
  font-size: 0.8rem;
  color: #6B7280;
  font-weight: 500;
}

.p-stat-bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.p-stat-bar-track {
  width: 100%;
  height: 4px;
  background: #F3F4F6;
  border-radius: 4px;
  overflow: hidden;
}

.p-stat-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #FF8C00, #7B2FBE);
  border-radius: 4px;
  transition: width 1s ease-out;
}

.p-stat-meta {
  font-size: 0.75rem;
  color: #7B2FBE;
  font-weight: 600;
}

.p-stat-badge {
  display: inline-block;
  padding: 4px 8px;
  background: #FEF3C7;
  color: #D97706;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 6px;
  width: max-content;
}

/* SECTION 3: Logros */
.achievements-list {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  overflow: hidden;
}

.achievement-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  transition: background 150ms ease;
  border-bottom: 1px solid #F3F4F6;
  opacity: 0;
  animation: fadeInUp 0.5s ease-out forwards;
}

.achievement-row:last-child {
  border-bottom: none;
}

.achievement-row:hover {
  background: #FAFAFA;
}

.achievement-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  background: #F3F4F6;
}

.achievement-icon-box i {
  color: #D1D5DB;
  width: 24px;
  height: 24px;
}

.achievement-level-badge {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 999px;
  white-space: nowrap;
  border: 2px solid white;
}

.achievement-content {
  flex-grow: 1;
}

.achievement-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.achievement-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #111827;
}

.achievement-progress-text {
  font-size: 0.85rem;
  color: #6B7280;
  font-weight: 500;
}

.achievement-bar-track {
  height: 8px;
  background: #F3F4F6;
  border-radius: 999px;
  margin: 6px 0;
  overflow: hidden;
}

.achievement-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #FF8C00, #7B2FBE);
  transition: width 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.achievement-row.locked .achievement-bar-fill {
  background: #E5E7EB;
}

.achievement-description {
  font-size: 0.8rem;
  color: #6B7280;
}

/* SECTION 4: Preferencias */
.profile-prefs-form {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation-delay: 0.2s;
}

.pref-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pref-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4B5563;
}

.pref-select {
  border: 1.5px solid #E5E7EB;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #111827;
  background: white;
  outline: none;
  transition: border-color 0.2s;
  cursor: pointer;
}

.pref-select:focus {
  border-color: #7B2FBE;
}

.btn-save-prefs {
  border: 1.5px solid #7B2FBE;
  background: transparent;
  color: #7B2FBE;
  padding: 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}

.btn-save-prefs:hover {
  background: #7B2FBE;
  color: white;
}

.btn-save-prefs.saved {
  background: #10B981;
  border-color: #10B981;
  color: white;
}

/* SIDEBAR */
.super-banner {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.6s ease-out forwards;
}

.super-banner-logo {
  max-width: 110px;
  margin-bottom: 12px;
}

.super-banner-title {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 4px 0;
  padding-right: 72px;
}

.super-banner-subtitle {
  font-size: 0.82rem;
  color: #6B7280;
  margin: 0 0 16px 0;
  padding-right: 72px;
  line-height: 1.4;
}

.btn-super-get {
  background: #7B2FBE;
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  border-radius: 999px;
  padding: 12px 20px;
  width: 100%;
  border: none;
  cursor: pointer;
  transition: all 200ms ease;
}

.btn-super-get:hover {
  background: #6D28D9;
  transform: translateY(-1px);
}

.super-banner-zorro {
  position: absolute;
  right: -8px;
  top: 12px;
  height: 80px;
  width: auto;
  pointer-events: none;
  z-index: 1;
}

.empty-activity {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px 0;
  color: #6B7280;
}

.empty-activity i {
  color: #9CA3AF;
  width: 32px;
  height: 32px;
}

.empty-activity span {
  font-size: 0.9rem;
  font-weight: 500;
}

.super-active-card {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.super-active-icon {
  color: #10B981;
  font-size: 32px;
}

.super-active-texts h4 {
  color: #065F46;
  font-weight: 800;
  margin: 0 0 2px 0;
  font-size: 0.95rem;
}

.super-active-texts p {
  color: #047857;
  font-size: 0.8rem;
  margin: 0;
}

.sidebar-widget {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  animation: fadeInUp 0.7s ease-out forwards;
}

.widget-tabs {
  display: flex;
  border-bottom: 1px solid #E5E7EB;
  margin-bottom: 16px;
}

.w-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px 0;
  font-size: 0.8rem;
  color: #6B7280;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.w-tab.active {
  color: #111827;
  font-weight: 800;
  border-bottom-color: #7B2FBE;
}

.empty-social {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 0;
}

.social-image-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-height: 90px;
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.social-image-wrapper::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background: linear-gradient(to bottom, transparent, #FFFFFF);
}

.social-hero-img {
  width: 80px;
  opacity: 0.8;
  object-fit: cover;
  object-position: top;
}

.empty-social p {
  color: #6B7280;
  font-size: 0.85rem;
  margin: 0 0 16px 0;
  line-height: 1.4;
}

.btn-find-friends {
  background: #7B2FBE;
  border: none;
  color: #FFFFFF;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-find-friends:hover {
  background: #7B2FBE;
  opacity: 0.9;
}

.widget-header {
  font-size: 1.1rem;
  font-weight: 800;
  color: #111827;
  margin: 0 0 16px 0;
}

.weak-topics-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.weak-topic-pill {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #991B1B;
  font-size: 0.85rem;
  font-weight: 600;
}

.weak-topic-pill .material-symbols-outlined {
  font-size: 18px;
  color: #EF4444;
}

.no-weak-topics {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #047857;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px;
}
.no-weak-topics .material-symbols-outlined {
  color: #10B981;
}


/* â”€â”€ Upgrade / Premium â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.upgrade-layout {
  min-height: 100vh;
  background: var(--bg-primary);
}

.upgrade-hero {
  text-align: center;
  padding: var(--sp-3xl) var(--sp-xl);
  background: linear-gradient(135deg, var(--violet) 0%, #581BE5 60%, var(--magenta) 100%);
  color: var(--text-inverse);
  position: relative;
  overflow: hidden;
}

.upgrade-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 80%, rgba(240, 40, 216, 0.2), transparent 60%);
}

.upgrade-hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.upgrade-hero h1 {
  font-size: 2.5rem;
  font-weight: var(--fw-extra);
  color: white;
  margin-bottom: var(--sp-md);
}

.upgrade-hero p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 500px;
  margin: 0 auto;
}

.upgrade-plans-wrapper {
  max-width: 900px;
  margin: calc(-1 * var(--sp-2xl)) auto var(--sp-2xl);
  padding: 0 var(--sp-xl);
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.upgrade-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-xl);
  width: 100%;
}

@media (max-width: 768px) {
  .upgrade-plans {
    grid-template-columns: 1fr;
  }
}

.plan-card {
  background: var(--bg-white);
  border: 2px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-2xl);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.plan-card--featured {
  border-color: var(--violet);
  box-shadow: 0 20px 40px -8px rgba(108, 43, 255, 0.2);
}

.plan-card-header {
  margin-bottom: var(--sp-xl);
}

.plan-card-name {
  font-size: 1.2rem;
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-xs);
}

.plan-card-price {
  font-size: 2.5rem;
  font-weight: var(--fw-extra);
  color: var(--violet);
  line-height: 1;
  margin-bottom: var(--sp-xs);
}

.plan-card-price small {
  font-size: 0.85rem;
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
}

.plan-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.plan-feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-xl);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.plan-feature-list li {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  font-size: 0.9rem;
  color: var(--text-primary);
}

.plan-feature-list li .material-symbols-outlined {
  font-size: 18px;
  color: var(--green);
}

.plan-feature-list li.disabled {
  color: var(--text-secondary);
}

.plan-feature-list li.disabled .material-symbols-outlined {
  color: var(--text-secondary);
}

.plan-current-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: var(--fw-bold);
  font-size: 0.9rem;
  text-align: center;
}

.upgrade-faq {
  max-width: 700px;
  margin: 0 auto var(--sp-2xl);
  padding: 0 var(--sp-xl);
}

.upgrade-faq h2 {
  text-align: center;
  margin-bottom: var(--sp-xl);
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: var(--sp-lg) 0;
}

.faq-item summary {
  font-weight: var(--fw-bold);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--violet);
}

.faq-item[open] summary::after {
  content: 'âˆ’';
}

.faq-item p {
  margin-top: var(--sp-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.9rem;
}


/* Moved from admin.css - upgrade-related styles */
/* Upgrade honest CTA */
.upgrade-note {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: var(--sp-sm);
  line-height: 1.5;
}

.upgrade-disclosure {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-sm);
  max-width: 700px;
  margin: var(--sp-xl) auto;
  padding: var(--sp-lg);
  background: var(--bg-secondary);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
}

.upgrade-disclosure .material-symbols-outlined {
  color: var(--violet);
  flex-shrink: 0;
  margin-top: 2px;
}

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

.plan-current-badge--inactive {
  opacity: 0.5;
}

/* -- Centro de Progreso (Fase 2.5) ----------------------------------- */

.progress-header {
  margin-bottom: var(--sp-xl);
}

.progress-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
  flex-wrap: wrap;
}

.progress-title {
  font-size: 1.5rem;
  font-weight: var(--fw-bold);
  margin: 0;
}

.progress-subtitle {
  font-size: 0.9rem;
  margin-top: var(--sp-xs);
}

.progress-section {
  margin-bottom: var(--sp-2xl);
}

.progress-section-title {
  font-size: 1.1rem;
  font-weight: var(--fw-semi);
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  margin-bottom: var(--sp-md);
  color: var(--text-primary);
}

.progress-section-subtitle {
  font-size: 0.85rem;
  margin-top: calc(-1 * var(--sp-sm));
  margin-bottom: var(--sp-md);
}

/* Bloque 1: Stats grid */
.progress-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-md);
}

@media (min-width: 768px) {
  .progress-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .progress-stats-grid:has(.progress-stat-card--hero) {
    grid-template-columns: repeat(5, 1fr);
  }
}

.progress-stat-card--hero {
  border-color: var(--violet-light, rgba(108, 43, 255, 0.2));
  background: linear-gradient(135deg, rgba(108, 43, 255, 0.04), rgba(108, 43, 255, 0.01));
}

.progress-stat-card {
  background: var(--bg-white);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  text-align: center;
  border: 1px solid var(--border);
}

.progress-stat-value {
  font-size: 1.8rem;
  font-weight: var(--fw-bold);
  line-height: 1.2;
}

.progress-stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: var(--sp-xs);
}

/* Strong / Weak */
.progress-strong-weak {
  margin-top: var(--sp-md);
}

.progress-strong-weak-row {
  display: flex;
  gap: var(--sp-md);
  flex-wrap: wrap;
}

.progress-sw-item {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  font-size: 0.9rem;
  padding: var(--sp-sm) var(--sp-md);
  border-radius: var(--r-md);
  background: var(--bg-white);
  border: 1px solid var(--border);
  flex: 1;
  min-width: 180px;
}

.progress-sw-strong .material-symbols-outlined {
  color: var(--green, #22C55E);
}

.progress-sw-weak .material-symbols-outlined {
  color: var(--red, #EF4444);
}

/* Bloque 2: Area cards */
.progress-areas-grid {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

@media (min-width: 768px) {
  .progress-areas-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .progress-areas-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.progress-area-card {
  background: var(--bg-white);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  border: 1px solid var(--border);
}

.progress-area-header {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-md);
}

.progress-area-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.progress-area-name {
  font-weight: var(--fw-semi);
  font-size: 0.95rem;
}

.progress-area-bar-container {
  width: 100%;
  height: 8px;
  background: var(--bg-subtle, #F1F5F9);
  border-radius: 4px;
  overflow: hidden;
}

.progress-area-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.progress-area-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--sp-sm);
  font-size: 0.8rem;
}

.progress-area-pct {
  font-weight: var(--fw-semi);
}

/* Bloque 3: Route progress */
.progress-route-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.progress-route-item {
  background: var(--bg-white);
  border-radius: var(--r-lg);
  padding: var(--sp-md) var(--sp-lg);
  border: 1px solid var(--border);
}

.progress-route-header {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-sm);
}

.progress-route-name {
  font-weight: var(--fw-semi);
  font-size: 0.9rem;
  flex: 1;
}

/* Bloque 4: Errors */
.progress-error-group {
  margin-bottom: var(--sp-lg);
}

.progress-error-area {
  font-size: 0.9rem;
  font-weight: var(--fw-semi);
  margin-bottom: var(--sp-sm);
  color: var(--text-primary);
}

.progress-error-item {
  background: var(--bg-white);
  border-radius: var(--r-md);
  padding: var(--sp-md);
  border: 1px solid var(--border);
  margin-bottom: var(--sp-sm);
}

.progress-error-stem {
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: var(--sp-sm);
}

.progress-error-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.progress-error-cta {
  color: var(--violet);
  font-weight: var(--fw-semi);
  text-decoration: none;
}

.progress-error-cta:hover {
  text-decoration: underline;
}

/* Bloque 5: Recommendation */
.progress-recommendation-card {
  display: flex;
  gap: var(--sp-lg);
  align-items: flex-start;
  background: var(--bg-white);
  border-radius: var(--r-xl);
  padding: var(--sp-xl);
  border: 1px solid var(--border);
}

.progress-rec-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
}

.progress-rec-icon .material-symbols-outlined {
  font-size: 24px;
}

.progress-rec-title {
  font-size: 1rem;
  font-weight: var(--fw-semi);
  margin-bottom: var(--sp-xs);
}

.progress-rec-desc {
  font-size: 0.85rem;
  margin-bottom: var(--sp-md);
}

/* Shared: empty state + upgrade gate */
.progress-empty-state {
  text-align: center;
  padding: var(--sp-2xl) var(--sp-lg);
  color: var(--text-secondary);
}

.progress-empty-state p {
  margin: var(--sp-md) 0;
}

.progress-upgrade-card {
  text-align: center;
  padding: var(--sp-2xl) var(--sp-lg);
  background: var(--bg-white);
  border-radius: var(--r-xl);
  border: 2px dashed var(--violet-light, var(--violet));
}

.progress-upgrade-card .material-symbols-outlined {
  margin-bottom: var(--sp-sm);
}

.progress-upgrade-card p {
  margin: var(--sp-xs) 0;
}

/* ════════════════════════════════════════════════════════════
   LEGAL PAGES — Terms, Privacy, Habeas Data
   ════════════════════════════════════════════════════════════ */
.legal-page {
  min-height: 100vh;
  background: var(--bg-primary, #FAFBFD);
  display: flex;
  justify-content: center;
  padding: 40px 20px 60px;
}

.legal-container {
  max-width: 720px;
  width: 100%;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--violet, #6C2BFF);
  text-decoration: none;
  margin-bottom: 24px;
  transition: opacity 0.15s;
}

.legal-back:hover {
  opacity: 0.75;
}

.legal-back .material-symbols-outlined {
  font-size: 20px;
}

.legal-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 4px;
  line-height: 1.2;
}

.legal-subtitle {
  font-size: 1rem;
  font-weight: 600;
  color: var(--violet, #6C2BFF);
  margin: 0 0 4px;
}

.legal-updated {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 0 0 32px;
}

.legal-section {
  margin-bottom: 28px;
}

.legal-section h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.legal-section p {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-primary);
  margin: 0 0 10px;
}

.legal-section ul,
.legal-section ol {
  padding-left: 22px;
  margin: 0 0 12px;
}

.legal-section li {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 6px;
}

/* Legal Table */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.85rem;
}

.legal-table th {
  background: var(--bg-primary, #F3F0FF);
  font-weight: 700;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 2px solid var(--border-subtle);
  color: var(--text-primary);
}

.legal-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  line-height: 1.5;
}

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

/* Info Card */
.legal-info-card {
  background: var(--bg-white, #fff);
  border: 1.5px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 12px 0;
}

.legal-info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
}

.legal-info-row:not(:last-child) {
  border-bottom: 1px solid var(--border-subtle);
}

.legal-info-row .material-symbols-outlined {
  font-size: 22px;
  color: var(--violet, #6C2BFF);
  margin-top: 2px;
  flex-shrink: 0;
}

.legal-info-row div {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-primary);
}

/* Principles Grid */
.legal-principles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.legal-principle {
  background: var(--bg-white, #fff);
  border: 1.5px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: box-shadow 0.15s;
}

.legal-principle:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.legal-principle .material-symbols-outlined {
  font-size: 28px;
  color: var(--violet, #6C2BFF);
  margin-bottom: 8px;
}

.legal-principle h3 {
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--text-primary);
}

.legal-principle p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

/* Steps */
.legal-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 16px 0;
}

.legal-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.legal-step-number {
  width: 32px;
  height: 32px;
  background: var(--violet, #6C2BFF);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.legal-step h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 2px;
  color: var(--text-primary);
}

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

/* Legal Page Footer */
.legal-page-footer {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-top: 32px;
  margin-top: 40px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.legal-page-footer a {
  color: var(--text-secondary);
  text-decoration: none;
}

.legal-page-footer a:hover {
  color: var(--violet, #6C2BFF);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .legal-page {
    padding: 24px 16px 40px;
  }

  .legal-title {
    font-size: 1.4rem;
  }

  .legal-principles-grid {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════════════════════════
   QUIZ SPLASH SCREEN (PREMIUM PREMIUM)
   ══════════════════════════════════════════════════════════════ */
.quiz-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  will-change: transform, opacity, filter;
  /* Light mode default */
  transition: opacity 250ms cubic-bezier(0.23, 1, 0.32, 1),
              transform 250ms cubic-bezier(0.23, 1, 0.32, 1),
              filter 250ms cubic-bezier(0.23, 1, 0.32, 1),
              visibility 250ms cubic-bezier(0.23, 1, 0.32, 1);
}

.quiz-splash.splash-exit {
  opacity: 0;
  transform: scale(1.02);
  filter: blur(4px);
  pointer-events: none;
}

.quiz-splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* Base logo settings */
.quiz-splash-logo {
  width: 220px;
  height: auto;
  position: relative;
  z-index: 1;
  animation: quizSplashPulse 2s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(0, 223, 255, 0.2));
}

.quiz-splash-logo--light {
  display: block;
}

.quiz-splash-logo--dark {
  display: none;
}

.quiz-splash-text {
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: 0.5px;
  margin: 0;
}

.quiz-splash-bar {
  width: 200px;
  height: 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.05);
  overflow: hidden;
  margin-top: 4px;
}

.quiz-splash-bar-fill {
  height: 100%;
  border-radius: 4px;
  /* Premium Palette: Naranja Cálido, Rosa Neón, Violeta Eléctrico, Cian Brillante */
  background: linear-gradient(90deg, #FF9D6C, #FF3F92, #B936EE, #00DFFF);
  background-size: 300% 100%;
  animation: quizSplashGradient 2.5s ease infinite;
}

@keyframes quizSplashPulse {

  0%,
  100% {
    opacity: 1;
    transform: translateY(0);
  }

  50% {
    opacity: 0.8;
    transform: translateY(-4px);
  }
}

@keyframes quizSplashGradient {
  0% {
    background-position: 0% 50%;
    transform: translateX(-100%);
  }

  50% {
    background-position: 100% 50%;
    transform: translateX(50%);
  }

  100% {
    background-position: 0% 50%;
    transform: translateX(350%);
  }
}

/* ══════════════════════════════════════════════════════════════
   DARK MODE — Pages Overrides
   ══════════════════════════════════════════════════════════════ */

/* Quiz */
[data-theme="dark"] .quiz-splash {
  background: var(--bg-primary);
  /* Dark mode background */
}

[data-theme="dark"] .quiz-splash-logo--light {
  display: none;
}

[data-theme="dark"] .quiz-splash-logo--dark {
  display: block;
}

[data-theme="dark"] .quiz-splash-text {
  color: rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] .quiz-splash-bar {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .quiz-header {
  background: var(--bg-secondary);
  border-bottom-color: var(--border);
}

[data-theme="dark"] .quiz-footer {
  background: var(--bg-secondary);
  border-top-color: var(--border);
}

[data-theme="dark"] .quiz-stimulus {
  background: var(--bg-secondary);
  border-color: var(--border);
}

[data-theme="dark"] .quiz-opt-card {
  background: var(--bg-secondary);
  border-color: var(--border);
}

[data-theme="dark"] .quiz-opt-card:hover {
  background: rgba(108, 43, 255, 0.06);
}

[data-theme="dark"] .quiz-review-dot {
  background: var(--bg-secondary);
  border-color: var(--border);
}

[data-theme="dark"] .quiz-modal-card {
  background: var(--bg-white);
  border-color: var(--border);
}

[data-theme="dark"] .quiz-prestart-card {
  background: var(--bg-white);
  border-color: var(--border);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .quiz-prestart-orb--top {
  background: rgba(108, 43, 255, 0.15);
}

[data-theme="dark"] .quiz-prestart-orb--bot {
  background: rgba(240, 40, 216, 0.12);
}

[data-theme="dark"] .quiz-prestart-scale {
  background: color-mix(in srgb, var(--subject-color, #7c3aed) 6%, transparent);
  border-color: color-mix(in srgb, var(--subject-color, #7c3aed) 12%, transparent);
}


/* Profile */
[data-theme="dark"] .settings-section {
  background: var(--bg-white);
  border-color: var(--border);
}

/* Upgrade */
[data-theme="dark"] .plan-card {
  background: var(--bg-white);
  border-color: var(--border);
}

[data-theme="dark"] .plan-current-badge {
  background: var(--bg-secondary);
}

/* Legal */
[data-theme="dark"] .legal-page {
  background: var(--bg-primary);
}

/* SETTINGS PAGE */
.settings-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  padding: 28px;
}

.settings-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #6B7280;
  margin-bottom: 12px;
  letter-spacing: 0.03em;
}

.settings-divider {
  border: none;
  border-top: 1px solid #F3F4F6;
  margin-bottom: 20px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid #F9FAFB;
}

.settings-row-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
  display: block;
}

.settings-row-description {
  font-size: 0.82rem;
  color: #6B7280;
  display: block;
  margin-top: 2px;
}

.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #D1D5DB;
  border-radius: 999px;
  cursor: pointer;
  transition: background 200ms ease;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 200ms ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background: #7B2FBE;
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

.settings-widget {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  padding: 20px;
}

.settings-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.settings-nav-link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease;
}

.settings-nav-link:hover {
  background: #F3F4F6;
  color: #111827;
}

.settings-nav-link.active {
  background: #F3F4F6;
  color: #7B2FBE;
  font-weight: 700;
}


/* ══════════════════════════════════════════════════════════════
   Mobile Hardening — Extra-narrow & Landscape
   ══════════════════════════════════════════════════════════════ */

/* C2 fix: extra-narrow devices (older Redmi, Galaxy A01) */
@media (max-width: 380px) {
  .quiz-body {
    padding: 8px 12px;
  }

  .quiz-stimulus {
    padding: 8px 12px;
  }

  .quiz-opt-text {
    font-size: 0.88rem;
  }
}

/* X4 fix: landscape phones — compress layout to fit 4 options */
@media (max-height: 500px) and (orientation: landscape) {
  .quiz-header {
    height: 40px;
    min-height: 40px;
  }

  .quiz-stimulus {
    max-height: min(30%, 140px);
  }

  .quiz-opt-card {
    padding: 8px 12px;
    gap: 8px;
  }

  .quiz-opt-badge {
    width: 24px;
    height: 24px;
    border-radius: 6px;
  }

  .quiz-footer {
    height: 44px;
    min-height: 44px;
  }

  .quiz-stem {
    font-size: 0.9rem;
    margin-bottom: 8px;
  }
}

/* Pre-quiz premium staging: Examen Skora */
.quiz-prestart.quiz-prestart--exam {
  position: relative;
  isolation: isolate;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden auto;
}

.quiz-prestart.quiz-prestart--exam::before,
.quiz-prestart.quiz-prestart--exam::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.quiz-prestart.quiz-prestart--exam::before {
  background: none;
}

.quiz-prestart.quiz-prestart--exam::after {
  background: none;
}

.quiz-prestart--exam .quiz-prestart-card {
  z-index: 1;
  max-width: 620px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 28px;
  color: var(--text-primary);
  box-shadow:
    0 16px 44px rgba(15, 23, 42, 0.08),
    0 0 0 1px color-mix(in srgb, var(--subject-color, var(--violet)) 8%, transparent);
  animation: prestartEnter 260ms var(--super-ease-out) both;
}

.quiz-prestart--exam .quiz-prestart-inner {
  padding: 32px 28px 24px;
}

.quiz-prestart--exam .quiz-prestart-icon {
  width: 76px;
  height: 76px;
  margin-bottom: 16px;
  border: 1px solid color-mix(in srgb, var(--subject-color, var(--violet)) 22%, var(--border));
  background: color-mix(in srgb, var(--subject-color, var(--violet)) 12%, var(--bg-secondary));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 12px 28px color-mix(in srgb, var(--subject-color, var(--violet)) 18%, transparent);
}

.quiz-prestart--exam .quiz-prestart-icon .material-symbols-outlined {
  font-size: 40px;
  color: var(--subject-color, var(--violet));
}

.quiz-prestart--exam .quiz-prestart-icon.pq-stagger {
  animation-name: pqIconIn;
}

@keyframes pqIconIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.quiz-prestart--exam .quiz-prestart-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 0.98;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.quiz-prestart--exam .quiz-prestart-subtitle {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.45;
  margin-bottom: 20px;
}

.quiz-prestart--exam .quiz-prestart-stats {
  gap: 10px;
  margin-bottom: 16px;
}

.quiz-prestart--exam .quiz-prestart-stat {
  min-width: 138px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-primary);
}

.quiz-prestart--exam .quiz-prestart-stat strong,
.quiz-prestart--exam .quiz-agency-title,
.quiz-prestart--exam .quiz-prestart-resume strong {
  color: var(--text-primary);
}

.quiz-prestart--exam .quiz-prestart-stat small,
.quiz-prestart--exam .quiz-agency-desc,
.quiz-prestart--exam .quiz-agency-label,
.quiz-prestart--exam .quiz-agency-slider-labels,
.quiz-prestart--exam .quiz-prestart-note,
.quiz-prestart--exam .quiz-feedback-notice p,
.quiz-prestart--exam .quiz-prestart-resume-body {
  color: var(--text-secondary);
}

.quiz-prestart--exam .quiz-agency-panel {
  background: var(--bg-primary);
  border-color: color-mix(in srgb, var(--subject-color, var(--violet)) 18%, var(--border));
  border-radius: 20px;
  padding: 16px;
  animation: agencySlideIn 260ms var(--super-ease-out) forwards;
}

.quiz-prestart--exam .quiz-agency-header {
  border-bottom-color: var(--border);
}

.quiz-prestart--exam .quiz-agency-range {
  background:
    linear-gradient(
      90deg,
      var(--subject-color, var(--violet)) 0 var(--quiz-slider-pct, 100%),
      color-mix(in srgb, var(--border) 86%, transparent) var(--quiz-slider-pct, 100%) 100%
    );
}

.quiz-prestart--exam .quiz-agency-range::-webkit-slider-thumb {
  border-color: var(--bg-secondary);
}

.quiz-prestart--exam .quiz-agency-range::-moz-range-thumb {
  border-color: var(--bg-secondary);
}

.quiz-prestart--exam .quiz-agency-value {
  color: var(--subject-color, var(--violet));
  background: color-mix(in srgb, var(--subject-color, var(--violet)) 10%, var(--bg-secondary));
  border: 1px solid color-mix(in srgb, var(--subject-color, var(--violet)) 25%, transparent);
}

.quiz-prestart--exam .quiz-agency-chip {
  border-color: var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.quiz-prestart--exam .quiz-agency-chip:hover:not(:disabled) {
  border-color: var(--subject-color, var(--violet));
  color: var(--text-primary);
  background: color-mix(in srgb, var(--subject-color, var(--violet)) 6%, var(--bg-secondary));
}

.quiz-prestart--exam .quiz-agency-chip.active {
  background: var(--subject-color, var(--violet));
  border-color: var(--subject-color, var(--violet));
  color: #fff;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--subject-color, var(--violet)) 24%, transparent);
}

.quiz-prestart--exam .quiz-agency-chip.active .material-symbols-outlined {
  color: #fff;
}

.quiz-prestart--exam .quiz-agency-chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.quiz-prestart--exam .quiz-agency-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  line-height: 1.45;
}

.quiz-prestart--exam .quiz-prestart-resume,
.quiz-prestart--exam .quiz-feedback-notice {
  background: var(--bg-primary);
  border-color: var(--border);
  border-radius: 16px;
}

.quiz-prestart--exam .quiz-btn-start {
  min-width: min(100%, 320px);
  min-height: 54px;
  padding: 16px 36px;
  border-radius: 100px;
  background: var(--super-gradient);
  color: #fff;
  letter-spacing: 0.3px;
  box-shadow: 0 8px 24px rgba(255, 60, 172, 0.3);
  transition:
    transform 160ms var(--super-ease-out),
    box-shadow 160ms var(--super-ease-out),
    opacity 160ms var(--super-ease-out);
  animation: quizStartGlow 2.4s ease-in-out infinite;
}

.quiz-prestart--exam .quiz-btn-start:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255, 60, 172, 0.4);
}

.quiz-prestart--exam .quiz-btn-start:active:not(:disabled) {
  transform: scale(0.97);
  box-shadow: 0 4px 16px rgba(255, 60, 172, 0.2);
}

.quiz-prestart--exam .quiz-btn-start:disabled {
  background: var(--border);
  color: var(--text-secondary);
  box-shadow: none;
  animation: none;
}

@keyframes quizStartGlow {
  0%, 100% {
    box-shadow: 0 8px 24px rgba(255, 60, 172, 0.28);
  }
  50% {
    box-shadow: 0 10px 32px rgba(255, 60, 172, 0.42);
  }
}

.quiz-prestart--exam .pq-stagger {
  transform: translateY(20px);
  filter: none;
  animation: pqFadeIn 260ms var(--super-ease-out) forwards;
  animation-delay: calc(var(--stagger, 0) * 55ms);
}

.quiz-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-primary);
  color: var(--text-primary);
  will-change: transform, opacity, filter;
  transition:
    opacity 250ms var(--super-ease-out),
    transform 250ms var(--super-ease-out),
    filter 250ms var(--super-ease-out),
    visibility 250ms var(--super-ease-out);
}

.quiz-splash::before,
.quiz-splash::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.quiz-splash::before {
  background: none;
}

.quiz-splash::after {
  background: none;
}

.quiz-splash--hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  filter: blur(4px);
  pointer-events: none;
}

.quiz-splash-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  animation: none;
}

.quiz-splash-ring {
  position: relative;
  isolation: isolate;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 16px 34px rgba(15, 23, 42, 0.1),
    0 0 28px color-mix(in srgb, var(--subject-color, var(--violet)) 14%, transparent);
}

.quiz-splash-ring::before {
  content: '';
  position: absolute;
  inset: -9px;
  z-index: -1;
  border-radius: inherit;
  background: conic-gradient(
    from 0deg,
    var(--subject-color, var(--violet)),
    transparent 34%,
    transparent 68%,
    var(--subject-color, var(--violet))
  );
  animation: quizLoadingRing 900ms linear infinite;
}

.quiz-splash-ring .material-symbols-outlined {
  font-size: 52px;
  color: var(--subject-color, var(--violet));
}

.quiz-splash-kicker {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.quiz-splash-text {
  min-height: 1.5em;
  margin: 0;
  color: var(--text-primary);
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: 0;
}

.quiz-splash-bar {
  width: min(260px, 66vw);
  height: 5px;
  margin-top: 8px;
  border-radius: 100px;
  background: var(--border);
}

.quiz-splash-bar-fill {
  background: var(--super-gradient);
}

@keyframes quizLoadingRing {
  to {
    transform: rotate(360deg);
  }
}

[data-theme="dark"] .quiz-prestart.quiz-prestart--exam {
  background: var(--super-bg);
  color: var(--super-text-primary);
}

[data-theme="dark"] .quiz-prestart.quiz-prestart--exam::before {
  background: radial-gradient(ellipse at 0% 50%, rgba(255, 60, 172, 0.18) 0%, transparent 60%);
}

[data-theme="dark"] .quiz-prestart.quiz-prestart--exam::after {
  background: radial-gradient(ellipse at 100% 50%, rgba(0, 180, 216, 0.15) 0%, transparent 60%);
}

[data-theme="dark"] .quiz-prestart--exam .quiz-prestart-card {
  background: color-mix(in srgb, var(--super-card-bg) 88%, var(--super-bg));
  border-color: var(--super-card-border);
  color: var(--super-text-primary);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.42),
    0 0 0 1px var(--super-card-border),
    0 0 46px color-mix(in srgb, var(--subject-color, var(--violet)) 14%, transparent);
}

[data-theme="dark"] .quiz-prestart--exam .quiz-prestart-icon {
  border-color: color-mix(in srgb, var(--subject-color, var(--violet)) 35%, var(--super-card-border));
  background: color-mix(in srgb, var(--subject-color, var(--violet)) 18%, var(--super-card-bg));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 16px 34px color-mix(in srgb, var(--subject-color, var(--violet)) 22%, transparent);
}

[data-theme="dark"] .quiz-prestart--exam .quiz-prestart-icon .material-symbols-outlined,
[data-theme="dark"] .quiz-prestart--exam .quiz-prestart-title,
[data-theme="dark"] .quiz-prestart--exam .quiz-prestart-stat strong,
[data-theme="dark"] .quiz-prestart--exam .quiz-agency-title,
[data-theme="dark"] .quiz-prestart--exam .quiz-prestart-resume strong {
  color: var(--super-text-primary);
}

[data-theme="dark"] .quiz-prestart--exam .quiz-prestart-subtitle,
[data-theme="dark"] .quiz-prestart--exam .quiz-prestart-stat small,
[data-theme="dark"] .quiz-prestart--exam .quiz-agency-desc,
[data-theme="dark"] .quiz-prestart--exam .quiz-agency-label,
[data-theme="dark"] .quiz-prestart--exam .quiz-agency-slider-labels,
[data-theme="dark"] .quiz-prestart--exam .quiz-prestart-note,
[data-theme="dark"] .quiz-prestart--exam .quiz-feedback-notice p,
[data-theme="dark"] .quiz-prestart--exam .quiz-prestart-resume-body,
[data-theme="dark"] .quiz-prestart--exam .quiz-agency-note {
  color: var(--super-text-secondary);
}

[data-theme="dark"] .quiz-prestart--exam .quiz-prestart-stat,
[data-theme="dark"] .quiz-prestart--exam .quiz-agency-panel,
[data-theme="dark"] .quiz-prestart--exam .quiz-agency-note,
[data-theme="dark"] .quiz-prestart--exam .quiz-prestart-resume,
[data-theme="dark"] .quiz-prestart--exam .quiz-feedback-notice {
  background: var(--super-card-bg);
  border-color: var(--super-card-border);
}

[data-theme="dark"] .quiz-prestart--exam .quiz-agency-header {
  border-bottom-color: var(--super-card-border);
}

[data-theme="dark"] .quiz-prestart--exam .quiz-agency-range {
  background:
    linear-gradient(
      90deg,
      var(--subject-color, var(--violet)) 0 var(--quiz-slider-pct, 100%),
      color-mix(in srgb, var(--super-card-border) 72%, transparent) var(--quiz-slider-pct, 100%) 100%
    );
}

[data-theme="dark"] .quiz-prestart--exam .quiz-agency-range::-webkit-slider-thumb,
[data-theme="dark"] .quiz-prestart--exam .quiz-agency-range::-moz-range-thumb {
  border-color: var(--super-bg);
}

[data-theme="dark"] .quiz-prestart--exam .quiz-agency-value {
  color: var(--super-text-primary);
  background: color-mix(in srgb, var(--subject-color, var(--violet)) 18%, var(--super-card-bg));
}

[data-theme="dark"] .quiz-prestart--exam .quiz-agency-chip {
  border-color: var(--super-card-border);
  background: var(--super-card-bg);
  color: var(--super-text-secondary);
}

[data-theme="dark"] .quiz-prestart--exam .quiz-agency-chip:hover:not(:disabled) {
  color: var(--super-text-primary);
  background: color-mix(in srgb, var(--subject-color, var(--violet)) 8%, var(--super-card-bg));
}

[data-theme="dark"] .quiz-prestart--exam .quiz-btn-start:disabled {
  background: var(--super-card-border);
  color: var(--super-text-secondary);
}

[data-theme="dark"] .quiz-splash {
  background: var(--super-bg);
  color: var(--super-text-primary);
}

[data-theme="dark"] .quiz-splash::before {
  background: radial-gradient(ellipse at 0% 50%, rgba(255, 60, 172, 0.18) 0%, transparent 60%);
}

[data-theme="dark"] .quiz-splash::after {
  background: radial-gradient(ellipse at 100% 50%, rgba(0, 180, 216, 0.15) 0%, transparent 60%);
}

[data-theme="dark"] .quiz-splash-ring {
  background: color-mix(in srgb, var(--super-card-bg) 82%, var(--super-bg));
  border-color: var(--super-card-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 24px 50px rgba(0, 0, 0, 0.34),
    0 0 34px color-mix(in srgb, var(--subject-color, var(--violet)) 18%, transparent);
}

[data-theme="dark"] .quiz-splash-ring .material-symbols-outlined,
[data-theme="dark"] .quiz-splash-text {
  color: var(--super-text-primary);
}

[data-theme="dark"] .quiz-splash-kicker {
  color: var(--super-text-secondary);
}

[data-theme="dark"] .quiz-splash-bar {
  background: var(--super-card-bg);
}

@media (prefers-reduced-motion: reduce) {
  .quiz-prestart--exam .quiz-prestart-card,
  .quiz-prestart--exam .pq-stagger,
  .quiz-prestart--exam .quiz-prestart-icon.pq-stagger,
  .quiz-prestart--exam .quiz-agency-panel {
    animation-duration: 1ms;
    animation-delay: 0ms;
  }

  .quiz-prestart--exam .quiz-btn-start,
  .quiz-splash-ring::before,
  .quiz-splash-bar-fill {
    animation: none;
  }
}
