/* ============================================================
   quiz.css — DataVix Quizzes module
   Matches the live landing page design system (https://www.datavix.in/landingpage/):
   warm off-white background, Inter body / Bricolage Grotesque display font,
   slate-900 pill buttons, white cards with slate-200 borders and soft large
   shadows, violet -> pink -> amber gradient accents. This file is
   self-contained (no dependency on the older style.css/landing.css used by
   /blog and /dashboard) so quiz pages render this exact design on their own.
   ============================================================ */

/* Since this file is self-contained (no style.css reset loaded on quiz
   pages), it must supply its own box-sizing reset — every width:100%
   input/card here assumes border-box, or padding pushes it past its
   container. */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --ink: #1a1a2e;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --bg: #fbfaf8;
  --white: #ffffff;
  --violet: #6d28d9;
  --pink: #db2777;
  --amber: #f59e0b;
  --emerald: #059669;
  --gradient-brand: linear-gradient(90deg, var(--violet), var(--pink) 50%, var(--amber));
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow-soft: 0 15px 40px rgba(0, 0, 0, 0.10);
  --shadow-hero: 0 30px 80px rgba(15, 23, 42, 0.14);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* Visible keyboard focus across every interactive element this module
   introduces — the base site has no explicit focus styling to inherit. */
a:focus-visible, button:focus-visible, input:focus-visible,
.quiz-cat-card:focus-visible, .quiz-collection-card:focus-visible,
.quiz-option:focus-visible, .roadmap-node:focus-visible,
.quiz-palette-item:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

.font-display, h1, h2, h3, .quiz-hero h1, .quiz-cat-hero h1, .quiz-detail-hero h1, .quiz-runner-title {
  font-family: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--slate-900);
}

.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-label {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet);
}

/* ── Navbar (reused classes: .navbar .logo .menu-toggle .nav-buttons) ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(251, 250, 248, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-100);
}
.navbar .logo {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--slate-900);
  text-decoration: none;
}
.navbar .nav-buttons { display: flex; align-items: center; gap: 22px; }
.navbar .menu-toggle { display: none; cursor: pointer; font-size: 22px; color: var(--slate-900); }

/* ── Buttons (reused classes: .btn-gradient .btn-outline) ─────────────── */
.btn-gradient, .btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.btn-gradient {
  background: var(--slate-900);
  color: #fff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.20);
}
.btn-gradient:hover { transform: translateY(-2px); box-shadow: 0 16px 30px rgba(15, 23, 42, 0.26); }
.btn-gradient[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-outline {
  background: var(--white);
  color: var(--slate-800);
  border: 1px solid var(--slate-300);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.btn-outline:hover { border-color: var(--slate-500); transform: translateY(-2px); }

/* ── Footer ─────────────────────────────────────────────────────────── */
.footer {
  background: var(--white);
  border-top: 1px solid var(--slate-100);
  padding: 56px 32px 28px;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-brand h3 { font-size: 18px; margin-bottom: 10px; }
.footer-brand p { color: var(--slate-500); font-size: 13px; line-height: 1.6; }
.footer-links h4 { color: var(--slate-900); margin-bottom: 14px; font-size: 13px; }
.footer-links a, .footer-enroll {
  display: block;
  color: var(--slate-500);
  text-decoration: none;
  font-size: 13.5px;
  margin-bottom: 10px;
  transition: color 0.2s ease;
}
.footer-links a:hover, .footer-enroll:hover { color: var(--violet); }
.footer-bottom {
  max-width: 1180px;
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--slate-100);
  color: var(--slate-500);
  font-size: 12.5px;
}
@media (max-width: 760px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  .navbar .nav-buttons.active ~ * {}
}

/* ── Page wrap ──────────────────────────────────────────────────────── */
.quiz-wrap { max-width: 1180px; margin: 0 auto; padding: 140px 24px 100px; }

.quiz-breadcrumb { font-size: 13px; color: var(--slate-500); margin-bottom: 28px; }
.quiz-breadcrumb a { color: var(--slate-600); text-decoration: none; }
.quiz-breadcrumb a:hover { color: var(--violet); }
.quiz-breadcrumb span { margin: 0 6px; }

/* ── Hub hero ───────────────────────────────────────────────────────── */
.quiz-hero { text-align: center; max-width: 760px; margin: 0 auto 56px; }
.quiz-hero h1 { font-size: 44px; margin: 16px 0 16px; line-height: 1.15; }
.quiz-hero p { color: var(--slate-500); font-size: 16px; line-height: 1.7; }

.quiz-search-bar { position: relative; max-width: 520px; margin: 32px auto 0; }
.quiz-search-bar input {
  width: 100%;
  padding: 15px 22px;
  border-radius: 999px;
  border: 1px solid var(--slate-300);
  background: var(--white);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.quiz-search-bar input:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(109,40,217,0.12); }
.quiz-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  z-index: 30;
  display: none;
  box-shadow: var(--shadow-soft);
  text-align: left;
}
.quiz-search-results.active { display: block; }
.quiz-search-results a {
  display: flex;
  justify-content: space-between;
  padding: 12px 18px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13.5px;
  border-bottom: 1px solid var(--slate-100);
}
.quiz-search-results a:last-child { border-bottom: none; }
.quiz-search-results a:hover { background: var(--slate-50); color: var(--violet); }
.quiz-search-empty { padding: 14px 18px; color: var(--slate-500); font-size: 13px; }

/* ── Category cards (hub) ──────────────────────────────────────────── */
.quiz-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
}
.quiz-cat-card {
  --cat-accent: #6d28d9;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 26px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--slate-200);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  animation: quizCardIn 0.5s ease both;
}
.quiz-cat-card:hover { transform: translateY(-6px); border-color: var(--cat-accent); box-shadow: var(--shadow-hero); }
.quiz-cat-icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 16px;
  background: var(--slate-50);
  margin-bottom: 16px;
}
.quiz-cat-icon img { width: 32px; height: 32px; object-fit: contain; }
.quiz-cat-card h2 { font-size: 20px; margin-bottom: 8px; }
.quiz-cat-card p { color: var(--slate-500); font-size: 13.5px; line-height: 1.6; flex: 1; }
.quiz-cat-stats { display: flex; gap: 8px; color: var(--slate-500); font-size: 12.5px; margin: 16px 0 18px; }
.quiz-cat-cta {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--cat-accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
}
.quiz-cat-card:hover .quiz-cat-cta { gap: 10px; }

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

/* ── Category page ──────────────────────────────────────────────────── */
.quiz-cat-hero { display: flex; align-items: center; gap: 20px; margin-bottom: 32px; }
.quiz-cat-hero-icon {
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 18px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-soft);
  flex-shrink: 0;
}
.quiz-cat-hero-icon img { width: 36px; height: 36px; object-fit: contain; }
.quiz-cat-hero h1 { font-size: 30px; margin-bottom: 6px; }
.quiz-cat-hero p { color: var(--slate-500); font-size: 14.5px; max-width: 620px; }

.quiz-progress-panel {
  border: 1px solid var(--slate-200);
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 36px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.quiz-progress-panel-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.quiz-progress-hint { color: var(--slate-500); font-size: 13.5px; }
.quiz-progress-login-link {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--violet);
  text-decoration: none;
  white-space: nowrap;
  transition: gap 0.2s ease;
}
.quiz-progress-login-link:hover { text-decoration: underline; }
.quiz-progress-bar-track { height: 8px; border-radius: 8px; background: var(--slate-100); overflow: hidden; margin-top: 10px; }
.quiz-progress-bar-fill { height: 100%; background: var(--gradient-brand); border-radius: 8px; transition: width 0.4s ease; }

/* ── Roadmap ────────────────────────────────────────────────────────────
   A horizontal stepper on desktop/tablet (→ connectors); collapses to a
   vertical stack on narrow screens where the connector rotates to ↓ so it
   always matches the actual reading direction. ────────────────────────── */
.quiz-roadmap { margin-bottom: 40px; }
.quiz-roadmap h2 { font-size: 20px; margin-bottom: 18px; }
.roadmap-track { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.roadmap-node {
  border: 1px solid var(--slate-200);
  background: var(--white);
  border-radius: 14px;
  padding: 14px 18px;
  min-width: 130px;
  flex: 1 1 130px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.roadmap-node:hover { border-color: var(--violet); transform: translateY(-2px); }
.roadmap-dot { display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--gradient-brand); margin: 0 auto 8px; }
.roadmap-node h4 { font-size: 13.5px; margin-bottom: 2px; font-family: 'Inter', sans-serif; font-weight: 700; color: var(--slate-900); }
.roadmap-node p { color: var(--slate-500); font-size: 12px; }
.roadmap-arrow { color: var(--slate-300); font-size: 16px; flex-shrink: 0; }

@media (max-width: 640px) {
  .roadmap-track { flex-direction: column; flex-wrap: nowrap; overflow-x: visible; align-items: stretch; }
  .roadmap-node { width: 100%; }
  .roadmap-arrow { transform: rotate(90deg); align-self: center; }
}

/* ── Toolbar / filters ──────────────────────────────────────────────── */
.quiz-toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 26px; }
.quiz-toolbar input[type="search"] {
  flex: 1;
  min-width: 220px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-300);
  background: var(--white);
  color: var(--ink);
  font-family: inherit;
  outline: none;
}
.quiz-toolbar input[type="search"]:focus { border-color: var(--violet); }
.quiz-filter-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-pill {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--slate-300);
  background: var(--white);
  color: var(--slate-600);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-pill:hover { border-color: var(--violet); color: var(--slate-900); }
.filter-pill.active { background: var(--slate-900); color: #fff; border-color: transparent; }

/* ── Collection cards (grid) ───────────────────────────────────────── */
.quiz-collection-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; }
.quiz-collection-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  border-radius: var(--radius-md);
  background: var(--white);
  border: 1px solid var(--slate-200);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  animation: quizCardIn 0.4s ease both;
}
.quiz-collection-card:hover { transform: translateY(-4px); border-color: var(--violet); box-shadow: var(--shadow-soft); }
.quiz-collection-card.is-coming-soon { opacity: 0.75; }
/* Gentle stagger so the grid feels composed rather than dumped on screen. */
.quiz-collection-grid .quiz-collection-card:nth-child(n+1) { animation-delay: 0ms; }
.quiz-collection-grid .quiz-collection-card:nth-child(n+2) { animation-delay: 30ms; }
.quiz-collection-grid .quiz-collection-card:nth-child(n+3) { animation-delay: 60ms; }
.quiz-collection-grid .quiz-collection-card:nth-child(n+4) { animation-delay: 90ms; }
.quiz-collection-grid .quiz-collection-card:nth-child(n+5) { animation-delay: 120ms; }
.quiz-collection-grid .quiz-collection-card:nth-child(n+6) { animation-delay: 150ms; }
.qc-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.qc-card-questions { color: var(--slate-500); font-size: 12px; }
.quiz-collection-card h3 { font-size: 16.5px; margin-bottom: 6px; font-family: 'Inter', sans-serif; font-weight: 700; }
.quiz-collection-card p { color: var(--slate-500); font-size: 13px; line-height: 1.55; flex: 1; }
.qc-card-footer { display: flex; justify-content: space-between; color: var(--slate-500); font-size: 12px; margin-top: 16px; }

.diff-badge { font-size: 11px; padding: 5px 12px; border-radius: 999px; font-weight: 700; }
.diff-beginner { background: rgba(5,150,105,0.10); color: var(--emerald); }
.diff-intermediate { background: rgba(245,158,11,0.12); color: #b45309; }
.diff-advanced { background: rgba(219,39,119,0.10); color: var(--pink); }
.diff-interview { background: rgba(109,40,217,0.10); color: var(--violet); }
.diff-certification { background: rgba(37,99,235,0.10); color: #2563eb; }
.soon-badge { font-size: 11px; padding: 5px 12px; border-radius: 999px; background: var(--slate-100); color: var(--slate-500); font-weight: 600; }

/* ── Collection detail page ───────────────────────────────────────── */
.quiz-detail-wrap { max-width: 780px; }
.quiz-detail-hero {
  border: 1px solid var(--slate-200);
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-soft);
}
.quiz-detail-hero h1 { font-size: 28px; margin: 14px 0 12px; }
.quiz-detail-hero p { color: var(--slate-500); font-size: 14.5px; line-height: 1.7; max-width: 560px; }
.quiz-detail-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 16px; margin: 28px 0; }
.quiz-detail-stats .stat { text-align: center; padding: 16px 10px; border-radius: var(--radius-sm); background: var(--slate-50); border: 1px solid var(--slate-100); }
.quiz-detail-stats .stat strong { display: block; font-size: 20px; font-family: 'Bricolage Grotesque', sans-serif; background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.quiz-detail-stats .stat span { color: var(--slate-500); font-size: 12px; }
.quiz-detail-actions { display: flex; flex-wrap: wrap; gap: 12px; }
#bookmarkBtn.is-active { color: #b45309; border-color: #f59e0b; }

/* ── Quiz runner ───────────────────────────────────────────────────── */
.quiz-runner-root { max-width: 900px; margin: 0 auto; padding: 100px 20px 60px; min-height: 100vh; }
.quiz-runner-loading { text-align: center; color: var(--slate-500); padding: 120px 0; }

.quiz-guest-banner {
  margin-bottom: 20px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #92400e;
  font-size: 13px;
}
.quiz-guest-banner a { color: var(--violet); font-weight: 600; text-decoration: none; }
.quiz-guest-banner a:hover { text-decoration: underline; }

.quiz-guest-results-note {
  text-align: center;
  margin-top: 20px;
  color: var(--slate-500);
  font-size: 13px;
}
.quiz-guest-results-note a { color: var(--violet); font-weight: 600; text-decoration: none; }
.quiz-guest-results-note a:hover { text-decoration: underline; }

.quiz-runner-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.quiz-runner-title { font-size: 18px; }
.quiz-runner-timer {
  font-variant-numeric: tabular-nums;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  color: var(--violet);
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.quiz-runner-timer.is-low { color: var(--pink); border-color: var(--pink); }

.quiz-progress-track { height: 8px; border-radius: 8px; background: var(--slate-100); overflow: hidden; margin-bottom: 28px; }
.quiz-progress-fill { height: 100%; background: var(--gradient-brand); transition: width 0.3s ease; }

.quiz-runner-layout { display: grid; grid-template-columns: 1fr 220px; gap: 24px; align-items: start; }
@media (max-width: 760px) { .quiz-runner-layout { grid-template-columns: 1fr; } }

.quiz-question-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-soft);
  animation: quizCardIn 0.35s ease both;
}
.quiz-question-meta { display: flex; justify-content: space-between; color: var(--slate-500); font-size: 12.5px; margin-bottom: 14px; }
.quiz-question-prompt { font-size: 17px; line-height: 1.6; margin-bottom: 20px; color: var(--slate-900); font-weight: 500; }
.quiz-question-prompt code, .quiz-code-snippet {
  display: block;
  background: var(--slate-900);
  border-radius: 10px;
  padding: 16px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 13.5px;
  color: #a5f3fc;
  overflow-x: auto;
  white-space: pre;
  margin: 12px 0;
}
.quiz-scenario-context { color: var(--slate-600); font-size: 13.5px; border-left: 3px solid var(--violet); padding-left: 14px; margin-bottom: 16px; }

.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  font-size: 14px;
  color: var(--ink);
}
.quiz-option:hover { border-color: var(--violet); }
.quiz-option.is-selected { border-color: var(--violet); background: rgba(109,40,217,0.06); }
.quiz-option .opt-key {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--slate-300);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; flex-shrink: 0;
  color: var(--slate-500);
  background: var(--white);
}
.quiz-option.is-selected .opt-key { background: var(--gradient-brand); border-color: transparent; color: #fff; }

.quiz-fill-blank input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-300);
  background: var(--white);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  outline: none;
}
.quiz-fill-blank input:focus { border-color: var(--violet); }

.quiz-nav-controls { display: flex; justify-content: space-between; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.quiz-nav-controls button {
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border-radius: 999px;
  padding: 11px 22px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid var(--slate-300);
  background: var(--white);
  color: var(--slate-800);
  transition: border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}
.quiz-nav-controls button:hover { border-color: var(--violet); transform: translateY(-1px); }
.quiz-nav-controls button:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.quiz-nav-controls .btn-primary { background: var(--slate-900); border-color: transparent; color: #fff; }
.quiz-nav-controls .btn-submit { background: var(--gradient-brand); border-color: transparent; color: #fff; }

/* Question palette */
.quiz-palette { background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius-md); padding: 20px; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
.quiz-palette h4 { font-size: 12.5px; color: var(--slate-500); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.05em; font-family: 'Inter', sans-serif; font-weight: 700; }
.quiz-palette-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.quiz-palette-item {
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
  color: var(--slate-500);
  font-size: 12px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.quiz-palette-item.is-current { border-color: var(--violet); color: var(--violet); background: var(--white); }
.quiz-palette-item.is-answered { background: rgba(5,150,105,0.10); color: var(--emerald); border-color: transparent; }
.quiz-palette-item.is-skipped { background: rgba(245,158,11,0.10); color: #b45309; }
.quiz-palette-legend { margin-top: 16px; font-size: 11.5px; color: var(--slate-500); display: flex; flex-direction: column; gap: 6px; }
.quiz-palette-legend span { display: flex; align-items: center; gap: 8px; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ── Results page ─────────────────────────────────────────────────── */
.quiz-results { max-width: 720px; margin: 0 auto; animation: quizCardIn 0.4s ease both; }
.quiz-results-score {
  text-align: center;
  padding: 48px 30px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-soft);
  margin-bottom: 24px;
}
.quiz-results-ring { font-size: 52px; font-weight: 800; font-family: 'Bricolage Grotesque', sans-serif; background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.quiz-results-level { display: inline-block; margin-top: 10px; padding: 6px 18px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.level-excellent { background: rgba(5,150,105,0.10); color: var(--emerald); }
.level-proficient { background: rgba(37,99,235,0.10); color: #2563eb; }
.level-developing { background: rgba(245,158,11,0.12); color: #b45309; }
.level-needs-work { background: rgba(219,39,119,0.10); color: var(--pink); }

.quiz-results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 14px; margin-bottom: 24px; }
.quiz-results-grid .stat { text-align: center; padding: 18px 10px; border-radius: var(--radius-md); background: var(--white); border: 1px solid var(--slate-200); box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
.quiz-results-grid .stat strong { display: block; font-size: 22px; margin-bottom: 4px; font-family: 'Bricolage Grotesque', sans-serif; }
.quiz-results-grid .stat span { color: var(--slate-500); font-size: 12px; }

.quiz-results-tags { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 28px; }
.quiz-tag-block { flex: 1; min-width: 220px; }
.quiz-tag-block h4 { font-size: 13px; margin-bottom: 10px; font-family: 'Inter', sans-serif; font-weight: 700; color: var(--slate-900); }
.quiz-tag-pill { display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 12px; margin: 0 6px 6px 0; font-weight: 600; }
.tag-weak { background: rgba(219,39,119,0.10); color: var(--pink); }
.tag-strong { background: rgba(5,150,105,0.10); color: var(--emerald); }

.quiz-results-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .navbar .nav-buttons { display: none; }
  .navbar .nav-buttons.active {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: var(--white);
    padding: 16px 24px;
    border-bottom: 1px solid var(--slate-100);
    gap: 14px;
  }
  .navbar .menu-toggle { display: block; }
}
@media (max-width: 640px) {
  .quiz-wrap { padding: 120px 18px 70px; }
  .quiz-hero h1 { font-size: 30px; }
  .quiz-detail-hero { padding: 26px; }
  .quiz-question-card { padding: 22px; }
}
