/* ============================================================
   CharlHE Quiz Prep — Design System v1.1.0
   Extracted from junior-accountant-quiz-syllabus.html
   & Quiz_Syllabus_search_as_per_role.html
============================================================ */

/* ── Tokens (exact match from your HTML files) ─────────── */
:root {
  --ink:        #1a1a2e;
  --ink-mid:    #3d3d5c;
  --ink-soft:   #6b6b8a;
  --ink-ghost:  #a8a8c0;
  --bg:         #f7f6f2;
  --bg-card:    #ffffff;
  --bg-subtle:  #f0eff9;
  --rule:       #e4e3ef;
  --accent:     #c1272d;
  --accent-soft:#fdf0f0;
  --accent-mid: #e8797c;
  --navy:       #1b3a5c;
  --navy-soft:  #eef3f8;
  --gold:       #b8860b;
  --gold-soft:  #fdf8ec;
  --teal:       #0f7062;
  --teal-soft:  #edf7f5;
  --purple:     #5046a0;
  --purple-soft:#f0effb;
  --serif:      'DM Serif Display', Georgia, serif;
  --sans:       'DM Sans', system-ui, sans-serif;
  --mono:       'DM Mono', monospace;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); background: var(--bg); color: var(--ink); line-height: 1.65; font-size: 15px; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--accent); }

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(26,26,46,0.15); border-radius: 2px; }

/* ── App layout (sidebar + main) ─────────────────────────── */
.cqp-layout { display: flex; min-height: 100vh; }

/* ── Sidebar ─────────────────────────────────────────────── */
.cqp-sidebar {
  width: 260px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--navy);
  color: white;
  padding: 32px 0;
  display: flex;
  flex-direction: column;
}
.cqp-sidebar-logo {
  padding: 0 24px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 20px;
}
.cqp-sidebar-logo-top {
  font-family: var(--serif);
  font-size: 20px;
  color: white;
  line-height: 1.2;
}
.cqp-sidebar-logo-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.cqp-sidebar-section { padding: 0 16px; margin-bottom: 8px; }
.cqp-sidebar-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35);
  padding: 0 8px;
  margin-bottom: 6px;
  font-weight: 500;
}
.cqp-sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  color: rgba(255,255,255,0.65);
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  margin-bottom: 2px;
}
.cqp-sidebar-link:hover { background: rgba(255,255,255,0.08); color: white; }
.cqp-sidebar-link.active { background: rgba(255,255,255,0.12); color: white; }
.cqp-sidebar-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.cqp-sidebar-count { margin-left: auto; font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,0.35); }
.cqp-sidebar-footer {
  margin-top: auto;
  padding: 20px 24px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  line-height: 1.6;
}

/* ── Main ────────────────────────────────────────────────── */
.cqp-main { flex: 1; overflow-x: hidden; padding: 0 0 80px; }

/* ── Hero ────────────────────────────────────────────────── */
.cqp-hero {
  background: var(--ink);
  color: white;
  padding: 56px 56px 48px;
  position: relative;
  overflow: hidden;
}
.cqp-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: rgba(193,39,45,0.12);
}
.cqp-hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: 40%;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(27,58,92,0.4);
}
.cqp-hero-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 12px;
  font-weight: 500;
}
.cqp-hero h1 {
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1.15;
  color: white;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}
.cqp-hero h1 em { font-style: italic; color: #e8797c; }
.cqp-hero-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  max-width: 520px;
  margin-bottom: 28px;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}
.cqp-hero-btns { display: flex; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; margin-bottom: 32px; }
.cqp-hero-stats { display: flex; gap: 24px; flex-wrap: wrap; position: relative; z-index: 1; }
.cqp-stat { display: flex; flex-direction: column; }
.cqp-stat-num { font-family: var(--serif); font-size: 30px; color: white; line-height: 1; }
.cqp-stat-lbl { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.06em; }
.cqp-stat-divider { width: 1px; background: rgba(255,255,255,0.1); align-self: stretch; }

/* ── Search / filter bar ────────────────────────────────── */
.cqp-search-bar {
  background: var(--bg-card);
  padding: 16px 24px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.cqp-search-input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--rule);
  border-radius: 40px;
  font-size: 14px;
  font-family: var(--sans);
  outline: none;
  background: var(--bg);
}
.cqp-search-input:focus { border-color: var(--navy); background: white; }
.cqp-role-count {
  font-size: 13px;
  color: var(--ink-soft);
  background: var(--bg-subtle);
  padding: 4px 12px;
  border-radius: 20px;
  font-family: var(--mono);
}

/* ── Role grid ───────────────────────────────────────────── */
.cqp-role-grid {
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.cqp-role-card {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: block;
  color: var(--ink);
}
.cqp-role-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  border-color: var(--navy);
  color: var(--ink);
}
.cqp-role-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.cqp-role-name { font-weight: 600; font-size: 15px; color: var(--ink); }
.cqp-role-level {
  font-size: 11px;
  background: #e2eafc;
  padding: 2px 9px;
  border-radius: 20px;
  color: #1e4a76;
  font-family: var(--mono);
  flex-shrink: 0;
}
.cqp-role-industry { font-size: 12px; color: var(--ink-ghost); margin-top: 4px; }
.cqp-role-desc { font-size: 12px; color: var(--ink-soft); margin-top: 10px; line-height: 1.5; }

/* ── Distribution bar ────────────────────────────────────── */
.cqp-distrib {
  background: var(--bg-card);
  border-bottom: 1px solid var(--rule);
  padding: 24px 56px;
}
.cqp-distrib-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-ghost);
  font-weight: 500;
  margin-bottom: 10px;
}
.cqp-distrib-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  gap: 2px;
  margin-bottom: 14px;
}
.cqp-bar-seg { border-radius: 4px; }
.cqp-distrib-legend { display: flex; gap: 20px; flex-wrap: wrap; }
.cqp-legend-item { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-soft); }
.cqp-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ── Category tabs ───────────────────────────────────────── */
.cqp-cat-tabs {
  display: flex;
  gap: 4px;
  padding: 20px 56px 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--rule);
  overflow-x: auto;
}
.cqp-cat-tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
}
.cqp-cat-tab:hover { color: var(--ink); }
.cqp-cat-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Panel ───────────────────────────────────────────────── */
.cqp-panel { display: none; }
.cqp-panel.active { display: block; }
.cqp-content { padding: 40px 56px 0; }
.cqp-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}
.cqp-panel-title {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--ink);
  line-height: 1.2;
}
.cqp-panel-meta { text-align: right; flex-shrink: 0; }
.cqp-panel-q-count { font-family: var(--mono); font-size: 28px; font-weight: 500; line-height: 1; }
.cqp-panel-q-sub { font-size: 11px; color: var(--ink-ghost); text-transform: uppercase; letter-spacing: 0.07em; margin-top: 3px; }

/* ── Topic block ─────────────────────────────────────────── */
.cqp-topic-block {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  margin-bottom: 14px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.cqp-topic-block:hover { box-shadow: 0 2px 12px rgba(26,26,46,0.06); }

.cqp-topic-hdr {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  gap: 12px;
}
.cqp-topic-hdr:hover { background: var(--bg); }
.cqp-topic-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.cqp-topic-num { font-family: var(--mono); font-size: 11px; color: var(--ink-ghost); flex-shrink: 0; }
.cqp-topic-name { font-size: 14px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cqp-topic-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.cqp-badge { font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 20px; letter-spacing: 0.03em; white-space: nowrap; }
.cqp-badge-easy { background: #edf7f5; color: #0f7062; }
.cqp-badge-med  { background: #fdf8ec; color: #b8860b; }
.cqp-badge-hard { background: #fdf0f0; color: #c1272d; }
.cqp-badge-q    { font-family: var(--mono); font-size: 11px; color: var(--ink-ghost); }

.cqp-chevron { width: 18px; height: 18px; color: var(--ink-ghost); transition: transform 0.25s; flex-shrink: 0; }
.cqp-chevron.open { transform: rotate(180deg); }

.cqp-topic-body { display: none; border-top: 1px solid var(--rule); padding: 20px; }
.cqp-topic-body.open { display: block; }

/* ── Concept list ────────────────────────────────────────── */
.cqp-concepts-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 500;
  color: var(--ink-ghost);
  margin-bottom: 12px;
}
.cqp-concept-list { margin-bottom: 20px; }
.cqp-concept-row {
  display: flex;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
  align-items: flex-start;
}
.cqp-concept-row:last-child { border-bottom: none; }
.c-num { font-family: var(--mono); font-size: 10px; color: var(--ink-ghost); min-width: 18px; padding-top: 2px; }
.c-text { font-size: 13px; color: var(--ink-mid); line-height: 1.6; flex: 1; }
.c-text strong { font-weight: 500; color: var(--ink); }

/* ── Q-box ───────────────────────────────────────────────── */
.cqp-q-box { background: var(--bg-subtle); border-radius: 8px; padding: 14px 16px; margin-bottom: 12px; }
.cqp-q-box-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 600;
  color: var(--purple);
  margin-bottom: 10px;
}
.cqp-q-item {
  font-size: 12px;
  color: var(--ink-mid);
  padding: 5px 0 5px 14px;
  position: relative;
  line-height: 1.5;
  border-bottom: 1px dashed rgba(80,70,160,0.1);
}
.cqp-q-item:last-child { border-bottom: none; }
.cqp-q-item::before { content: '›'; position: absolute; left: 0; color: var(--purple); font-weight: 600; }

/* ── Tip-box ─────────────────────────────────────────────── */
.cqp-tip-box {
  border-left: 3px solid var(--teal);
  background: var(--teal-soft);
  border-radius: 0 8px 8px 0;
  padding: 12px 14px;
  margin-top: 4px;
}
.cqp-tip-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.09em; font-weight: 600; color: var(--teal); margin-bottom: 5px; }
.cqp-tip-text  { font-size: 12px; color: #1a4a44; line-height: 1.65; }

/* ── Star / gold box ─────────────────────────────────────── */
.cqp-star-box { background: var(--gold-soft); border: 1px solid #e8d49a; border-radius: 8px; padding: 14px 16px; margin-bottom: 20px; }
.cqp-star-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em; color: var(--gold); margin-bottom: 6px; }
.cqp-star-text  { font-size: 13px; color: #5a4000; line-height: 1.6; }

/* ── Section divider ─────────────────────────────────────── */
.cqp-section-divider {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-ghost);
  font-weight: 500;
  margin: 28px 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cqp-section-divider::after { content: ''; flex: 1; height: 1px; background: var(--rule); }

/* ── Auth pages ──────────────────────────────────────────── */
.cqp-auth-wrap { min-height: 100vh; display: flex; background: var(--bg); }
.cqp-auth-left {
  width: 360px;
  flex-shrink: 0;
  background: var(--navy);
  padding: 56px 40px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.cqp-auth-left::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: rgba(193,39,45,0.15);
}
.cqp-auth-left::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.cqp-auth-left-logo { font-family: var(--serif); font-size: 22px; color: white; line-height: 1.2; margin-bottom: 8px; position: relative; z-index: 1; }
.cqp-auth-left-sub  { font-size: 11px; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.08em; }
.cqp-auth-left-body { margin-top: 40px; position: relative; z-index: 1; }
.cqp-auth-left-body h3 { font-family: var(--serif); font-size: 18px; color: rgba(255,255,255,0.85); margin-bottom: 10px; }
.cqp-auth-left-body p  { font-size: 13px; color: rgba(255,255,255,0.45); line-height: 1.7; }
.cqp-auth-left-footer { margin-top: auto; font-size: 11px; color: rgba(255,255,255,0.25); position: relative; z-index: 1; }

.cqp-auth-right { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px 32px; }
.cqp-auth-card { width: 100%; max-width: 400px; }
.cqp-auth-card h2 { font-family: var(--serif); font-size: 28px; color: var(--ink); margin-bottom: 6px; }
.cqp-auth-card p  { font-size: 14px; color: var(--ink-soft); margin-bottom: 28px; }

/* ── Form components ─────────────────────────────────────── */
.cqp-field { margin-bottom: 18px; }
.cqp-label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-ghost); margin-bottom: 7px; }
.cqp-input, .cqp-select, .cqp-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg-card);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.cqp-input:focus, .cqp-select:focus, .cqp-textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27,58,92,0.08);
}
.cqp-input::placeholder { color: var(--ink-ghost); }
.cqp-textarea { resize: vertical; min-height: 80px; }
.cqp-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cqp-form-error { background: var(--accent-soft); border: 1px solid #fca5a5; border-radius: 8px; padding: 11px 14px; font-size: 13px; color: var(--accent); margin-bottom: 16px; }
.cqp-form-success { background: var(--teal-soft); border: 1px solid #6ee7b7; border-radius: 8px; padding: 11px 14px; font-size: 13px; color: var(--teal); margin-bottom: 16px; }
.cqp-auth-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--ink-soft); }
.cqp-auth-footer a { color: var(--accent); font-weight: 600; }

/* ── Buttons ─────────────────────────────────────────────── */
.cqp-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  line-height: 1.4;
  transition: all 0.15s;
  white-space: nowrap;
}
.cqp-btn:disabled { opacity: .45; cursor: default; }
.cqp-btn-primary { background: var(--accent); color: white; border-color: var(--accent); }
.cqp-btn-primary:hover { background: #a31f24; color: white; }
.cqp-btn-navy { background: var(--navy); color: white; border-color: var(--navy); }
.cqp-btn-navy:hover { background: #122841; color: white; }
.cqp-btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.cqp-btn-outline:hover { border-color: var(--navy); color: var(--navy); }
.cqp-btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: transparent;
}
.cqp-btn-ghost:hover { background: var(--bg); color: var(--ink); }
.cqp-btn-white { background: white; color: var(--navy); border-color: white; }
.cqp-btn-white:hover { background: rgba(255,255,255,.88); }
.cqp-btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 6px; }
.cqp-btn-lg { padding: 13px 28px; font-size: 15px; border-radius: 10px; }
.cqp-btn-full { width: 100%; justify-content: center; }

/* ── Dashboard ───────────────────────────────────────────── */
.cqp-dash-content { padding: 40px 48px; }
.cqp-dash-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 36px; flex-wrap: wrap; gap: 14px; }
.cqp-dash-header h2 { font-family: var(--serif); font-size: 32px; color: var(--ink); }
.cqp-dash-header p  { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }

.cqp-role-panel {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 24px;
}
.cqp-role-panel-head {
  background: var(--ink);
  padding: 24px 28px;
  position: relative;
  overflow: hidden;
}
.cqp-role-panel-head::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(193,39,45,0.15);
}
.cqp-role-panel-head-top { display: flex; align-items: flex-start; justify-content: space-between; position: relative; z-index: 1; }
.cqp-role-title { font-family: var(--serif); font-size: 22px; color: white; margin-bottom: 4px; }
.cqp-role-subtitle { font-size: 12px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.06em; }
.cqp-role-actions { display: flex; gap: 8px; }

.cqp-prog-section { padding: 16px 28px; border-bottom: 1px solid var(--rule); }
.cqp-prog-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-ghost); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.06em; }
.cqp-prog-bar { height: 6px; background: var(--rule); border-radius: 3px; overflow: hidden; }
.cqp-prog-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--navy), var(--accent)); transition: width .6s ease; }

.cqp-cats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0; }
.cqp-cat-panel { border-right: 1px solid var(--rule); }
.cqp-cat-panel:last-child { border-right: none; }
.cqp-cat-panel-head { padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.cqp-cat-panel-name { font-size: 12px; font-weight: 600; }
.cqp-cat-panel-count { font-size: 11px; font-family: var(--mono); color: var(--ink-ghost); margin-top: 2px; }
.cqp-topic-row-dash { display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-bottom: 1px solid var(--rule); }
.cqp-topic-row-dash:last-child { border-bottom: none; }
.cqp-topic-row-dash:hover { background: var(--bg); }
.cqp-topic-link-dash { font-size: 12px; font-weight: 400; color: var(--ink-mid); text-decoration: none; flex: 1; }
.cqp-topic-link-dash:hover { color: var(--navy); }
.cqp-topic-done-dash  { font-size: 11px; color: var(--teal); }
.cqp-topic-score-dash { font-size: 10px; font-family: var(--mono); color: var(--gold); }
.cqp-topic-reset-dash { background: none; border: none; font-size: 11px; color: var(--rule); cursor: pointer; padding: 0; line-height: 1; transition: color 0.15s; }
.cqp-topic-reset-dash:hover { color: var(--accent); }

/* ── Onboarding ──────────────────────────────────────────── */
.cqp-onboarding-content { padding: 40px 48px; max-width: 680px; }
.cqp-onboarding-content h2 { font-family: var(--serif); font-size: 28px; margin-bottom: 8px; }
.cqp-onboarding-content p  { color: var(--ink-soft); font-size: 14px; margin-bottom: 28px; }
.cqp-ind-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 24px; }
.cqp-ind-btn {
  padding: 14px 12px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  color: var(--ink);
  line-height: 1.3;
}
.cqp-ind-btn:hover, .cqp-ind-btn.active { border-color: var(--navy); background: var(--navy-soft); color: var(--navy); }
.cqp-ind-icon { font-size: 1.5rem; display: block; margin-bottom: 7px; }
.cqp-roles-panel { display: none; }
.cqp-roles-panel.open { display: block; }
.cqp-role-opt { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border: 1px solid var(--rule); border-radius: 10px; background: var(--bg-card); margin-bottom: 10px; transition: border-color 0.15s; }
.cqp-role-opt:hover { border-color: var(--navy); }
.cqp-role-opt-info h4 { font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.cqp-role-opt-info p  { font-size: 12px; color: var(--ink-soft); margin: 0; }

/* ── Quiz ────────────────────────────────────────────────── */
.cqp-quiz-content { padding: 32px 48px; max-width: 820px; }

.cqp-quiz-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; flex-wrap: wrap; gap: 10px; }
.cqp-quiz-back   { font-size: 12px; color: var(--ink-ghost); text-decoration: none; }
.cqp-quiz-back:hover { color: var(--navy); }
.cqp-quiz-title  { font-family: var(--serif); font-size: 22px; color: var(--ink); margin: 4px 0 16px; }
.cqp-quiz-counter { font-family: var(--mono); font-size: 12px; color: var(--ink-ghost); }

.cqp-quiz-prog { height: 5px; background: var(--rule); border-radius: 3px; overflow: hidden; margin-bottom: 20px; }
.cqp-quiz-prog-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--navy), var(--accent)); transition: width .4s ease; }

/* Palette */
.cqp-palette { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 20px; }
.cqp-dot {
  width: 28px; height: 28px;
  border-radius: 6px;
  border: 1px solid var(--rule);
  background: var(--bg-card);
  font-size: 10px; font-family: var(--mono); font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .15s; color: var(--ink-ghost);
}
.cqp-dot.current  { background: var(--navy); color: white; border-color: var(--navy); }
.cqp-dot.correct  { background: #edf7f5; color: var(--teal); border-color: #b2dfd7; }
.cqp-dot.wrong    { background: var(--accent-soft); color: var(--accent); border-color: #fca5a5; }
.cqp-dot.flagged  { background: var(--gold-soft); color: var(--gold); border-color: #e8d49a; }

/* Question card */
.cqp-q-card {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(26,26,46,0.04);
}
.cqp-q-header { padding: 16px 20px 0; }
.cqp-q-num {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-ghost);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 10px;
}
.cqp-q-text { font-size: 16px; font-weight: 500; color: var(--ink); line-height: 1.6; padding: 0 20px 16px; }

.cqp-options { border-top: 1px solid var(--rule); }
.cqp-option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  transition: background .13s;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--sans);
}
.cqp-option:last-child { border-bottom: none; }
.cqp-option:hover:not(.locked) { background: var(--bg); }
.cqp-option.selected { background: var(--navy-soft); }
.cqp-option.correct  { background: var(--teal-soft); }
.cqp-option.wrong    { background: var(--accent-soft); }
.cqp-option.locked   { cursor: default; }

.cqp-opt-letter {
  width: 24px; height: 24px;
  border-radius: 6px;
  border: 1px solid var(--rule);
  background: var(--bg);
  font-size: 11px; font-family: var(--mono); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px; transition: all .13s;
  color: var(--ink-ghost);
}
.cqp-option.selected .cqp-opt-letter { background: var(--navy); color: white; border-color: var(--navy); }
.cqp-option.correct .cqp-opt-letter  { background: var(--teal); color: white; border-color: var(--teal); }
.cqp-option.wrong .cqp-opt-letter    { background: var(--accent); color: white; border-color: var(--accent); }
.cqp-opt-text { font-size: 13.5px; color: var(--ink-mid); line-height: 1.5; flex: 1; padding-top: 3px; }

/* Feedback */
.cqp-feedback { display: none; border-top: 1px solid var(--rule); padding: 16px 20px; animation: fbFade .22s ease; }
.cqp-feedback.correct { background: var(--teal-soft); }
.cqp-feedback.wrong   { background: var(--accent-soft); }
.cqp-fb-head { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.cqp-feedback.correct .cqp-fb-head { color: var(--teal); }
.cqp-feedback.wrong   .cqp-fb-head { color: var(--accent); }
.cqp-fb-answer  { font-size: 13px; font-weight: 600; color: var(--teal); margin-bottom: 4px; }
.cqp-feedback.wrong .cqp-fb-answer { color: var(--ink-mid); }
.cqp-fb-explain { font-size: 12.5px; color: var(--ink-mid); line-height: 1.6; }

/* Quiz nav */
.cqp-quiz-nav { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.cqp-flag-btn { background: none; border: none; cursor: pointer; font-size: 12px; color: var(--ink-ghost); display: flex; align-items: center; gap: 5px; padding: 6px; transition: color .15s; font-family: var(--sans); }
.cqp-flag-btn:hover, .cqp-flag-btn.on { color: var(--gold); }

/* Score screen */
.cqp-score-wrap { padding: 40px 20px; text-align: center; }
.cqp-score-card { background: var(--bg-card); border: 1px solid var(--rule); border-radius: 16px; padding: 48px 32px; max-width: 480px; margin: 0 auto; }
.cqp-score-ring {
  width: 140px; height: 140px; border-radius: 50%;
  margin: 0 auto 24px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  border: 4px solid;
}
.cqp-score-ring.pass { border-color: var(--teal); background: var(--teal-soft); }
.cqp-score-ring.fail { border-color: var(--accent); background: var(--accent-soft); }
.cqp-score-pct { font-family: var(--serif); font-size: 2.8rem; line-height: 1; }
.cqp-score-ring.pass .cqp-score-pct { color: var(--teal); }
.cqp-score-ring.fail .cqp-score-pct { color: var(--accent); }
.cqp-score-lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 3px; }
.cqp-score-title { font-family: var(--serif); font-size: 22px; margin-bottom: 6px; }
.cqp-score-sub   { font-size: 13px; color: var(--ink-soft); margin-bottom: 28px; }
.cqp-score-acts  { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── Toast ───────────────────────────────────────────────── */
.cqp-toasts { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.cqp-toast {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 500;
  max-width: 340px; animation: toastIn .2s ease;
  background: var(--ink); color: white;
  box-shadow: 0 8px 24px rgba(26,26,46,0.2);
}
.cqp-toast.success { background: var(--teal); }
.cqp-toast.error   { background: var(--accent); }
.cqp-toast.warning { background: var(--gold); color: #3a2800; }
.cqp-toast-close { margin-left: auto; background: none; border: none; color: inherit; cursor: pointer; opacity: .6; font-size: 14px; }

/* ── Loader ──────────────────────────────────────────────── */
.cqp-loader { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 72px 0; gap: 14px; color: var(--ink-ghost); }
.cqp-spinner { width: 36px; height: 36px; border: 2px solid var(--rule); border-top-color: var(--navy); border-radius: 50%; animation: spin .7s linear infinite; }

/* ── Empty state ─────────────────────────────────────────── */
.cqp-empty { text-align: center; padding: 72px 24px; }
.cqp-empty-icon { font-size: 2.5rem; display: block; margin-bottom: 14px; opacity: .4; }
.cqp-empty h3 { font-family: var(--serif); font-size: 20px; color: var(--ink-mid); margin-bottom: 8px; }
.cqp-empty p  { font-size: 13px; color: var(--ink-ghost); margin-bottom: 20px; }

/* ── Colors by category ──────────────────────────────────── */
.c-core   { color: #1b3a5c; }
.c-tech   { color: #0f7062; }
.c-anal   { color: #b8860b; }
.c-soft   { color: #5046a0; }

/* ── Animations ──────────────────────────────────────────── */
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes fbFade  { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .cqp-sidebar { display: none; }
  .cqp-auth-left { display: none; }
  .cqp-hero { padding: 36px 24px 30px; }
  .cqp-hero h1 { font-size: 28px; }
  .cqp-distrib { padding: 20px 24px; }
  .cqp-cat-tabs { padding: 16px 24px 0; }
  .cqp-content, .cqp-dash-content, .cqp-onboarding-content, .cqp-quiz-content { padding: 24px; }
  .cqp-cats-grid { grid-template-columns: 1fr 1fr; }
  .cqp-field-row { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .cqp-cats-grid { grid-template-columns: 1fr; }
  .cqp-role-grid { grid-template-columns: 1fr; }
  .cqp-quiz-nav { flex-direction: column-reverse; }
}
