/* ── Variables ───────────────────────────────────────────────────────────── */
:root {
  --primary-50:  #eff6ff; --primary-100: #dbeafe; --primary-600: #2563eb;
  --primary-700: #1d4ed8; --accent-500:  #f97316; --accent-600:  #ea580c;
  --gray-50: #f9fafb; --gray-100: #f3f4f6; --gray-200: #e5e7eb;
  --gray-300: #d1d5db; --gray-400: #9ca3af; --gray-500: #6b7280;
  --gray-600: #4b5563; --gray-700: #374151; --gray-800: #1f2937;
  --gray-900: #111827; --gray-950: #030712;
  --sidebar-w: 210px;
  --right-w: 300px;
}

/* ── Global ──────────────────────────────────────────────────────────────── */
body { font-family: 'Segoe UI', system-ui, sans-serif; background: #eef2f7; }

/* ── Navbar ──────────────────────────────────────────────────────────────── */
#main-navbar {
  border-bottom: 1px solid var(--gray-200);
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
  min-height: 56px;
  padding-top: .45rem;
  padding-bottom: .45rem;
}

/* Brand */
.brand-icon {
  width: 36px; height: 36px; background: var(--primary-600);
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem; flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(37,99,235,.35);
}
.brand-icon-sm { width: 28px; height: 28px; font-size: .85rem; border-radius: 6px; }
.brand-name {
  font-size: .86rem; font-weight: 700; color: #111827;
  line-height: 1.15; white-space: nowrap;
}
.brand-name-tests { color: var(--primary-600); }
.brand-sub  { font-size: .56rem; font-weight: 600; letter-spacing: .1em; color: #6b7280; text-transform: uppercase; }

/* Custom hamburger (3 bars) */
.nav-toggler-btn {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 40px; height: 40px; padding: 0;
  background: var(--gray-100); border: none; border-radius: .45rem; cursor: pointer;
  transition: background .14s; flex-shrink: 0;
}
.nav-toggler-btn:hover  { background: var(--gray-200); }
.nav-toggler-btn:focus  { outline: 2px solid var(--primary-600); outline-offset: 2px; }
.nav-toggler-btn[aria-expanded="true"] { background: var(--primary-50); }
.nav-toggler-btn[aria-expanded="true"] .tog-bar { background: var(--primary-600); }
.tog-bar {
  display: block; width: 20px; height: 2px;
  background: var(--gray-600); border-radius: 2px;
  transition: transform .2s, opacity .2s, background .14s;
}
/* Animate bars to X when open */
.nav-toggler-btn[aria-expanded="true"] .tog-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggler-btn[aria-expanded="true"] .tog-bar:nth-child(2) { opacity: 0; }
.nav-toggler-btn[aria-expanded="true"] .tog-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Nav links */
.navbar-light .navbar-nav .nav-link {
  color: var(--gray-700); font-size: .85rem; font-weight: 500;
  padding-left: .6rem; padding-right: .6rem; transition: color .12s;
  border-radius: .4rem;
}
.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link:focus { color: var(--primary-700); }
.nav-link-active { color: var(--primary-700) !important; font-weight: 600; }

/* Desktop dropdown */
.navbar-nav .dropdown-menu {
  border-radius: .6rem; border: 1px solid var(--gray-200); padding: .3rem 0;
  box-shadow: 0 8px 24px rgba(0,0,0,.1); min-width: 220px;
}
.navbar-nav .dropdown-item {
  font-size: .85rem; color: var(--gray-700); padding: .55rem 1.1rem;
  transition: background .1s; border-radius: 0;
}
.navbar-nav .dropdown-item:hover,
.navbar-nav .dropdown-item:focus { background: var(--primary-50); color: var(--primary-700); }
.text-teal { color: #0d9488; }

/* Mobile nav collapse panel */
@media (max-width: 991px) {
  #navMenu {
    background: #fff;
    border-top: 1px solid var(--gray-100);
    border-radius: 0 0 .85rem .85rem;
    box-shadow: 0 8px 20px rgba(0,0,0,.1);
    margin: .4rem -12px -1px;    /* bleed to container edges */
    padding: .4rem .75rem .9rem;
    max-height: 80vh;
    overflow-y: auto;
  }
  /* First-level nav items */
  .navbar-nav .nav-item { border-bottom: 1px solid var(--gray-100); }
  .navbar-nav .nav-item:last-child { border-bottom: none; }
  .navbar-light .navbar-nav .nav-link {
    padding: .72rem .5rem !important;
    font-size: .92rem !important;
    display: flex; align-items: center;
  }
  /* Dropdown inside collapsed nav — shown inline */
  .navbar-nav .dropdown-menu {
    border: none; box-shadow: none; border-radius: 0;
    background: var(--gray-50); padding: 0; margin: 0;
  }
  .navbar-nav .dropdown-item {
    padding: .62rem 1.5rem;
    font-size: .9rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex; align-items: center;
  }
  .navbar-nav .dropdown-item:last-child { border-bottom: none; }
  .navbar-nav .dropdown-item:hover { background: var(--primary-50); }
  .navbar-nav .dropdown-divider { margin: 0; border-color: var(--gray-200); }
  /* Hide the desktop toggler button (we have our own) */
  .d-lg-none.me-2 { display: inline-block !important; }
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero-section {
  position: relative; background-color: var(--gray-950); overflow: hidden; padding: 96px 0 80px;
}
.hero-grid-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(96,165,250,.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96,165,250,.18) 1px, transparent 1px);
  background-size: 40px 40px;
}
.hero-glow-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 60% at 50% 30%, rgba(29,78,216,.28) 0%, transparent 70%);
}
.hero-inner { max-width: 740px; margin: 0 auto; text-align: center; }
.hero-eyebrow {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: .68rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent-500); margin-bottom: 1.1rem;
}
.eyebrow-line { flex: 1; max-width: 56px; height: 1px; background: var(--accent-500); opacity: .6; }
.hero-heading {
  font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; line-height: 1.08;
  letter-spacing: -.02em; color: #fff; margin-bottom: 1.1rem;
}
.hero-sub { font-size: 1rem; line-height: 1.65; color: rgba(255,255,255,.72); max-width: 580px; margin: 0 auto 1.8rem; }
.btn-hero-primary {
  display: inline-flex; align-items: center; background: var(--accent-500); border: none; color: #fff;
  font-weight: 600; font-size: .95rem; padding: .65rem 1.75rem; border-radius: .5rem;
  transition: background .14s, transform .1s; box-shadow: 0 2px 8px rgba(249,115,22,.4);
}
.btn-hero-primary:hover { background: var(--accent-600); color: #fff; transform: translateY(-1px); }
.btn-hero-outline {
  display: inline-flex; align-items: center; background: transparent;
  border: 2px solid rgba(255,255,255,.42); color: #fff;
  font-weight: 600; font-size: .95rem; padding: .63rem 1.75rem; border-radius: .5rem;
  transition: border-color .14s, background .14s, transform .1s;
}
.btn-hero-outline:hover { border-color: #fff; background: rgba(255,255,255,.08); color: #fff; transform: translateY(-1px); }
.hero-trust { font-size: .8rem; color: rgba(255,255,255,.5); }
.hero-dot { opacity: .3; }
.stats-bar { background: #fff; }

/* ── Homepage category cards ─────────────────────────────────────────────── */
.cat-card {
  background: #fff; border: 1px solid var(--gray-200) !important; transition: border-color .15s, box-shadow .15s;
}
.cat-card.ring-primary:hover  { border-color: #93c5fd !important; box-shadow: 0 4px 16px rgba(37,99,235,.1) !important; }
.cat-card.ring-accent:hover   { border-color: #fdba74 !important; }
.cat-card.ring-indigo:hover   { border-color: #a5b4fc !important; }
.cat-card.ring-cyan:hover     { border-color: #67e8f9 !important; }
.cat-card.ring-emerald:hover  { border-color: #6ee7b7 !important; }
.cat-card.ring-amber:hover    { border-color: #fcd34d !important; }
.cat-icon { width: 46px; height: 46px; flex-shrink: 0; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.cat-primary { background:#dbeafe; color:var(--primary-700); } .cat-accent  { background:#ffedd5; color:#c2410c; }
.cat-indigo  { background:#e0e7ff; color:#4338ca; } .cat-cyan    { background:#cffafe; color:#0e7490; }
.cat-emerald { background:#d1fae5; color:#065f46; } .cat-amber   { background:#fef3c7; color:#92400e; }
.cat-pill { display: inline-block; padding: .15rem .55rem; border-radius: 99px; font-size: .68rem; font-weight: 600; }
.pill-primary { background:var(--primary-50); color:var(--primary-700); } .pill-accent  { background:#fff7ed; color:#c2410c; }
.pill-indigo  { background:#eef2ff; color:#4338ca; } .pill-cyan    { background:#ecfeff; color:#0e7490; }
.pill-emerald { background:#ecfdf5; color:#065f46; } .pill-amber   { background:#fffbeb; color:#92400e; }
.cat-topic-badge {
  display: inline-block;
  padding: .18rem .55rem;
  border-radius: 99px;
  font-size: .67rem;
  font-weight: 600;
  background: var(--gray-100);
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  white-space: nowrap;
  line-height: 1.5;
}
.cat-row { color:inherit; transition:background .1s; border-radius:6px; }
.cat-row:hover { background:var(--gray-50); }
.cat-row:hover .cat-row-title { color:var(--primary-700) !important; }
.cat-row:hover .cat-row-chevron { color:var(--primary-600) !important; transform:translateX(2px); }
.cat-row-chevron { transition:transform .1s; }
/* ── Visited quiz state (localStorage-driven) ── */
/* Listing cards: green "Retake Test" CTA */
.quiz-card-cta.cta-visited {
  background: #16a34a !important;
  color: #fff !important;
}
.quiz-card-cta.cta-visited:hover { background: #15803d !important; }
/* Home page cat-rows: small green tick before chevron */
.visited-badge {
  display:inline-flex;
  align-items:center;
  font-size:.65rem;
  font-weight:700;
  color:#166534;
  background:#dcfce7;
  border:1px solid #86efac;
  border-radius:999px;
  padding:1px 7px;
  margin-right:6px;
  white-space:nowrap;
  line-height:1.8;
}
.x-small { font-size:.72rem; }
.btn-accent { background:var(--accent-500); border:none; color:#fff; font-weight:600; transition:background .13s; }
.btn-accent:hover { background:var(--accent-600); color:#fff; }
.btn-slate { background:#334155; border:none; color:#fff; font-weight:600; transition:background .13s; }
.btn-slate:hover { background:#1e293b; color:#fff; }

/* ══════════════════════════════════════════════════════════════════════════
   SIDEBAR LAYOUT
   ══════════════════════════════════════════════════════════════════════════ */
.page-with-sidebar {
  display: flex; min-height: calc(100vh - 58px);
}

/* Left sidebar */
.page-sidebar {
  width: var(--sidebar-w); min-width: var(--sidebar-w); flex-shrink: 0;
  background: #fff; border-right: 1px solid var(--gray-200);
  padding: 1.25rem 0; position: sticky; top: 58px;
  height: calc(100vh - 58px); overflow-y: auto;
}
.sidebar-section { padding: 0 .75rem; }
.sidebar-heading {
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; color: var(--gray-400);
  padding: .5rem .5rem .35rem; margin-bottom: .2rem;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 1px; }
.sidebar-link {
  display: flex; align-items: center; gap: .65rem; padding: .45rem .65rem;
  border-radius: .45rem; font-size: .82rem; font-weight: 500; color: var(--gray-700);
  text-decoration: none; transition: background .1s, color .1s; position: relative;
}
.sidebar-link:hover { background: var(--gray-50); color: var(--gray-900); }
.sidebar-link.active { background: var(--primary-50); color: var(--primary-700); font-weight: 600; }
.si { font-size: 1rem; width: 18px; flex-shrink: 0; }
.si-dot {
  width: 6px; height: 6px; background: var(--accent-500); border-radius: 50%;
  margin-left: auto; flex-shrink: 0;
}

/* Main content */
.page-main {
  flex: 1; min-width: 0; padding: 1.5rem 1.25rem;
  max-width: calc(100% - var(--sidebar-w));
}
.page-main.has-right { flex: 3; max-width: none; }

/* Right panel */
.page-right-panel {
  flex: 2; min-width: 0;
  padding: 1.5rem 1rem 1.5rem 1rem;
  position: sticky; top: 58px; height: calc(100vh - 58px); overflow-y: auto;
}

/* ══════════════════════════════════════════════════════════════════════════
   CATEGORY LISTING PAGE
   ══════════════════════════════════════════════════════════════════════════ */

/* Category header card */
.cat-header-card {
  background: #fff; border-radius: .75rem; border: 1px solid var(--gray-200);
  display: flex; overflow: hidden;
}
.cat-header-accent { width: 5px; flex-shrink: 0; }
.cat-header-body   { padding: 1.1rem 1.25rem; }
.cat-header-title  { font-size: 1.3rem; font-weight: 700; color: var(--gray-900); margin: 0 0 .3rem; }
.cat-header-desc   { font-size: .85rem; color: var(--gray-500); margin: 0 0 .6rem; }
.cat-header-stats  { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .82rem; color: var(--gray-600); }
.cat-header-stats strong { color: var(--gray-900); }
.cat-header-stats .sep   { color: var(--gray-300); }

/* Category rich intro block */
.cat-rich-intro {
  background: #fff; border: 1px solid var(--gray-200); border-radius: .75rem;
  padding: 1.25rem 1.5rem;
}
.cat-rich-body p { font-size: .87rem; color: var(--gray-600); line-height: 1.75; margin-bottom: .75rem; }
.cat-rich-body p:last-child { margin-bottom: 0; }
.cat-rich-body strong { color: var(--gray-800); }

/* Filter bar */
.filter-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: .75rem;
  background: #fff; border: 1px solid var(--gray-200); border-radius: .6rem;
  padding: .65rem 1rem;
}
.diff-tabs { display: inline-flex; background: var(--gray-100); border-radius: .5rem; padding: 2px; }
.diff-tab {
  background: none; border: none; font-size: .78rem; font-weight: 500; color: var(--gray-600);
  padding: .25rem .75rem; border-radius: .4rem; cursor: pointer; transition: all .12s;
}
.diff-tab.active { background: #fff; color: var(--gray-900); box-shadow: 0 1px 3px rgba(0,0,0,.1); font-weight: 600; }

/* Quiz listing card */
.quiz-listing-card {
  background: #fff; border-radius: .75rem; border: 1px solid var(--gray-200);
  padding: 1.1rem 1.1rem .9rem; height: 100%;
  display: flex; flex-direction: column; gap: .35rem;
  transition: border-color .15s, box-shadow .15s; position: relative; overflow: hidden;
}
.quiz-listing-card:hover { border-color: var(--gray-300); box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.quiz-card-recommended { border-color: #fdba74 !important; }
.rec-badge {
  position: absolute; top: -1px; left: 1rem;
  background: var(--accent-500); color: #fff;
  font-size: .67rem; font-weight: 700; padding: .2rem .6rem;
  border-radius: 0 0 .4rem .4rem;
}

/* Topic mix bar */
.topic-bar-wrap { margin-top: .9rem; }
.topic-bar { display: flex; height: 5px; border-radius: 99px; overflow: hidden; gap: 2px; }
.topic-seg { height: 100%; border-radius: 99px; }
.topic-legend { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }
.topic-legend span { font-size: .68rem; color: var(--gray-400); display: flex; align-items: center; gap: .25rem; }
.topic-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* NEC chip */
.nec-chip {
  display: inline-block; font-size: .68rem; font-weight: 600; letter-spacing: .05em;
  padding: .15rem .5rem; border-radius: .3rem;
  background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe;
}

/* Difficulty pills */
.pill-easy   { display:inline-block; padding:.15rem .55rem; border-radius:99px; font-size:.7rem; font-weight:600; background:#d1fae5; color:#065f46; }
.pill-medium { display:inline-block; padding:.15rem .55rem; border-radius:99px; font-size:.7rem; font-weight:600; background:#fef3c7; color:#92400e; }
.pill-hard   { display:inline-block; padding:.15rem .55rem; border-radius:99px; font-size:.7rem; font-weight:600; background:#fee2e2; color:#991b1b; }

.quiz-card-title { font-size: .9rem; font-weight: 700; color: var(--gray-900); margin: 0; line-height: 1.35; }
.quiz-card-desc  { font-size: .78rem; color: var(--gray-500); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.quiz-card-stats { display: flex; align-items: center; gap: .35rem; font-size: .78rem; color: var(--gray-600); flex-wrap: wrap; margin-top: auto; padding-top: .4rem; }
.quiz-card-stats i { font-size: .75rem; color: var(--gray-400); }
.quiz-card-stats .sep { color: var(--gray-300); }
.quiz-card-cta {
  display: flex; align-items: center; justify-content: center;
  padding: .55rem; border-radius: .5rem; font-size: .85rem; font-weight: 600;
  margin-top: .6rem; transition: opacity .12s;
}
.quiz-card-cta:hover { opacity: .88; }
.cta-accent { background: var(--accent-500); color: #fff; }
.cta-slate  { background: #1e293b; color: #fff; }

/* ══════════════════════════════════════════════════════════════════════════
   QUIZ INTRO / SHOW PAGE
   ══════════════════════════════════════════════════════════════════════════ */

/* Breadcrumb */
.qbc { display: flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--gray-500); }
.qbc a { color: var(--gray-500); text-decoration: none; }
.qbc a:hover { color: var(--primary-700); }
.qbc i { font-size: .65rem; }
.qbc span { color: var(--gray-700); font-weight: 500; }

/* Quiz intro header */
.quiz-intro-header {
  background: #fff; border: 1px solid var(--gray-200); border-radius: .75rem;
  display: flex; overflow: hidden;
}
.quiz-intro-accent { width: 4px; background: #f59e0b; flex-shrink: 0; }
.quiz-intro-header-body { padding: 1.25rem 1.25rem 1.25rem 1.1rem; }
.quiz-intro-title { font-size: 1.45rem; font-weight: 800; color: var(--gray-900); margin: .3rem 0 .4rem; line-height: 1.2; }
.quiz-intro-desc  { font-size: .87rem; color: var(--gray-600); margin: 0; }

/* Type chip */
.type-chip { display: inline-block; padding: .18rem .6rem; border-radius: .3rem; font-size: .68rem; font-weight: 700; letter-spacing: .07em; }
.type-chip-primary { background: #dbeafe; color: var(--primary-700); }

/* Info card */
.info-card { background: #fff; border: 1px solid var(--gray-200); border-radius: .75rem; padding: 1.1rem 1.25rem; }
.info-card-heading { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gray-500); margin-bottom: .6rem; }

/* Topics covered chips */
.topic-chip {
  display: inline-block; padding: .2rem .65rem; background: var(--gray-100);
  color: var(--gray-600); border-radius: .35rem; font-size: .78rem; font-weight: 500;
}

/* How this test works */
.how-list { display: flex; flex-direction: column; gap: .85rem; }
.how-item { display: flex; gap: .85rem; align-items: flex-start; }
.how-icon {
  width: 36px; height: 36px; background: var(--primary-50); border-radius: .5rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  color: var(--primary-700); font-size: 1rem;
}
.how-title { font-size: .85rem; font-weight: 600; color: var(--gray-900); }
.how-sub   { font-size: .78rem; color: var(--gray-500); margin-top: .1rem; }

/* Exam card */
.exam-card {
  background: #fff; border: 1px solid var(--gray-200); border-radius: .85rem; padding: 1.25rem;
}
.exam-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.exam-heading { font-size: .72rem; font-weight: 700; letter-spacing: .1em; color: var(--gray-500); text-transform: uppercase; }
.exam-row {
  display: flex; align-items: center; gap: .6rem; padding: .55rem 0;
  border-bottom: 1px solid var(--gray-100); font-size: .85rem;
}
.exam-row:last-of-type { border-bottom: none; }
.exam-row i { color: var(--gray-400); width: 16px; flex-shrink: 0; }
.exam-row span { color: var(--gray-500); flex: 1; }
.exam-row strong { color: var(--gray-900); }
.btn-start-test {
  width: 100%; display: flex; align-items: center; justify-content: center;
  gap: .5rem; padding: .75rem; border-radius: .6rem; border: none;
  background: #f59e0b; color: #fff; font-weight: 700; font-size: .95rem;
  cursor: pointer; transition: background .13s;
}
.btn-start-test:hover { background: #d97706; }
.exam-note { font-size: .72rem; color: var(--gray-400); text-align: center; margin: .6rem 0 0; }

/* ══════════════════════════════════════════════════════════════════════════
   QUIZ PLAYER
   ══════════════════════════════════════════════════════════════════════════ */

/* Top bar */
.player-topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border: 1px solid var(--gray-200); border-radius: .75rem; padding: .85rem 1.1rem;
  gap: 1rem;
}
.player-topbar-left { min-width: 0; }
.player-meta { font-size: .68rem; font-weight: 700; letter-spacing: .1em; color: var(--gray-400); text-transform: uppercase; }
.player-quiz-title { font-size: .92rem; font-weight: 700; color: var(--gray-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-topbar-right { display: flex; align-items: center; gap: .85rem; flex-shrink: 0; }
.player-qcount { font-size: .9rem; font-weight: 600; color: var(--gray-600); white-space: nowrap; }

/* Circular timer */
.circular-timer-wrap { position: relative; width: 76px; height: 76px; flex-shrink: 0; }
.ctimer-svg { width: 76px; height: 76px; transform: rotate(-90deg); }
.ctimer-bg   { fill: none; stroke: var(--gray-200); stroke-width: 4; }
.ctimer-ring {
  fill: none; stroke: #22c55e; stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: 163.36; stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke .3s;
}
.ctimer-inner {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
}
.ctimer-time { font-size: .75rem; font-weight: 700; color: var(--gray-900); line-height: 1; }
.ctimer-pace { font-size: .52rem; font-weight: 700; color: #22c55e; letter-spacing: .05em; }

/* Question card */
.question-card {
  background: #fff; border: 1px solid var(--gray-200); border-radius: .75rem; overflow: hidden; margin-bottom: .75rem;
}
.question-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem 1.1rem; border-bottom: 1px solid var(--gray-100); background: var(--gray-50);
}
.q-num-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-600); color: #fff; font-size: .7rem; font-weight: 700;
  padding: .18rem .55rem; border-radius: .3rem;
}
.q-cat-label { font-size: .7rem; font-weight: 700; letter-spacing: .08em; color: var(--gray-500); text-transform: uppercase; }
.btn-flag {
  display: flex; align-items: center; gap: .3rem; background: none; border: 1px solid var(--gray-200);
  border-radius: .4rem; padding: .25rem .6rem; font-size: .75rem; color: var(--gray-500);
  cursor: pointer; transition: all .12s;
}
.btn-flag:hover  { border-color: #fbbf24; color: #d97706; }
.btn-flag.flagged { border-color: #fbbf24; color: #d97706; background: #fffbeb; }

.question-card-body { padding: 1.25rem 1.1rem 1rem; }
.q-text { font-size: .95rem; font-weight: 600; color: var(--gray-900); line-height: 1.6; margin-bottom: 1rem; }

/* Options */
.q-options { display: flex; flex-direction: column; gap: .5rem; }
.q-option {
  display: flex; align-items: flex-start; gap: .85rem; padding: .75rem 1rem;
  border: 1.5px solid var(--gray-200); border-radius: .55rem; cursor: pointer;
  transition: border-color .12s, background .12s; background: #fff;
}
.q-option:hover { border-color: var(--primary-600); background: var(--primary-50); }
.q-option-selected { border-color: var(--primary-600); background: #eff6ff; }
.q-option-letter {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; flex-shrink: 0;
  border: 1.5px solid var(--gray-300); border-radius: 50%;
  font-size: .78rem; font-weight: 700; color: var(--gray-600);
  transition: border-color .12s, color .12s, background .12s;
}
.q-option-selected .q-option-letter { border-color: var(--primary-600); color: var(--primary-700); background: #dbeafe; }
.q-option:hover .q-option-letter    { border-color: var(--primary-600); color: var(--primary-700); }
.q-option-text { font-size: .88rem; color: var(--gray-700); line-height: 1.5; padding-top: .05rem; }
.q-nec-hint { font-size: .72rem; color: var(--gray-400); margin: .85rem 0 0; }

/* Question with diagram: options left, image right */
.q-body-with-image {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
.q-body-left {
  flex: 1 1 0;
  min-width: 0;
}
.q-body-right {
  flex: 0 0 38%;
  max-width: 340px;
  position: sticky;
  top: 80px;            /* stays visible while scrolling options */
}
.q-diagram-img {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  border-radius: .55rem;
  border: 1px solid var(--gray-200);
  background: #f8fafc;
  padding: 4px;
}
@media (max-width: 640px) {
  .q-body-with-image { flex-direction: column-reverse; }
  .q-body-right { flex: none; width: 100%; max-width: 100%; position: static; }
  .q-diagram-img { max-height: 220px; }
}

/* Bottom nav bar */
.player-bottombar {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--gray-200); border-radius: .75rem;
  padding: .75rem 1rem; margin-top: .5rem;
}
.btn-nav-prev, .btn-nav-next {
  display: flex; align-items: center; gap: .3rem;
  padding: .45rem .9rem; border-radius: .5rem; font-size: .83rem; font-weight: 600;
  border: 1.5px solid var(--gray-200); background: #fff; color: var(--gray-700); cursor: pointer;
  transition: border-color .12s, background .12s;
}
.btn-nav-prev:hover, .btn-nav-next:hover { border-color: var(--primary-600); color: var(--primary-700); background: var(--primary-50); }
.btn-nav-prev:disabled { opacity: .4; cursor: not-allowed; }
.btn-nav-next {
  background: var(--primary-600); border-color: var(--primary-600); color: #fff;
}
.btn-nav-next:hover { background: var(--primary-700); border-color: var(--primary-700); color: #fff; }
.autosave-indicator { display: flex; align-items: center; gap: .35rem; font-size: .75rem; color: var(--gray-400); margin-left: auto; }
.btn-nav-submit {
  display: flex; align-items: center; gap: .3rem; padding: .45rem .9rem;
  border-radius: .5rem; font-size: .83rem; font-weight: 600;
  background: var(--gray-800); border: none; color: #fff; cursor: pointer; transition: background .12s;
}
.btn-nav-submit:hover { background: var(--gray-900); }

/* ── Navigator panel ─────────────────────────────────────────────────────── */
.nav-panel-card {
  background: #fff; border: 1px solid var(--gray-200); border-radius: .85rem; padding: 1rem;
}
.nav-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.nav-panel-title { font-size: .8rem; font-weight: 700; color: var(--gray-700); }
.nav-pct-pill {
  display: inline-block; padding: .12rem .55rem; background: var(--gray-100);
  border-radius: 99px; font-size: .7rem; font-weight: 700; color: var(--gray-600);
}
.nav-filter-tabs { display: flex; gap: 2px; }
.nav-filter-btn {
  flex: 1; background: none; border: none; padding: .3rem .5rem;
  font-size: .72rem; font-weight: 500; color: var(--gray-500); cursor: pointer;
  border-bottom: 2px solid transparent; transition: all .12s;
}
.nav-filter-btn.active { color: var(--primary-700); border-bottom-color: var(--primary-600); font-weight: 700; }

/* Navigator grid */
.q-nav-grid { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: .5rem; }
.q-nav-btn {
  width: 32px; height: 32px; border-radius: .4rem; border: 1.5px solid var(--gray-200);
  background: #fff; font-size: .72rem; font-weight: 600; color: var(--gray-600);
  cursor: pointer; transition: all .1s; position: relative; display: flex; align-items: center; justify-content: center;
}
.q-nav-btn .q-nav-dot {
  position: absolute; bottom: 2px; right: 2px; width: 5px; height: 5px;
  border-radius: 50%; background: var(--gray-300);
}
.q-nav-btn:hover { border-color: var(--primary-600); color: var(--primary-700); }
.q-nav-btn.nav-current  { background: var(--primary-600); border-color: var(--primary-600); color: #fff; }
.q-nav-btn.nav-current .q-nav-dot { background: #93c5fd; }
.q-nav-btn.nav-answered { background: #f0fdf4; border-color: #86efac; color: #166534; }
.q-nav-btn.nav-answered .q-nav-dot { background: #22c55e; }
.q-nav-btn.nav-flagged  { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.q-nav-btn.nav-flagged .q-nav-dot  { background: #f59e0b; }
.q-nav-btn.nav-visited  { background: #eff6ff; border-color: #93c5fd; color: #1e40af; }
.q-nav-btn.nav-visited .q-nav-dot  { background: #60a5fa; }

/* Legend */
.nav-legend { display: flex; flex-wrap: wrap; gap: .6rem; }
.nav-legend span { font-size: .7rem; color: var(--gray-500); display: flex; align-items: center; gap: .3rem; }
.nav-dot { width: 10px; height: 10px; border-radius: .2rem; display: inline-block; }
.nd-current   { background: var(--primary-600); }
.nd-answered  { background: #86efac; border: 1.5px solid #86efac; }
.nd-flagged   { background: #fcd34d; }
.nd-unanswered { background: #fff; border: 1.5px solid var(--gray-300); }

.btn-nav-submit-panel {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .65rem; border-radius: .55rem; background: var(--gray-800); border: none;
  color: #fff; font-weight: 600; font-size: .85rem; cursor: pointer; transition: background .12s;
}
.btn-nav-submit-panel:hover { background: var(--gray-900); }
.nav-submit-note { font-size: .7rem; color: var(--gray-400); text-align: center; margin: .4rem 0 0; }

/* ── Result card ─────────────────────────────────────────────────────────── */
.result-card { background: #fff; border: 1px solid var(--gray-200); border-radius: .85rem; padding: 1.5rem; }
.result-emoji   { font-size: 3rem; }
.result-heading { font-size: 1.3rem; font-weight: 700; margin: .3rem 0; }
.result-score   { font-size: 2.5rem; font-weight: 800; color: var(--primary-700); }
.stat-box { border: 1px solid var(--gray-200); border-radius: .6rem; padding: .75rem; }
.stat-val { font-size: 1.3rem; font-weight: 700; }

/* ── Answer review ───────────────────────────────────────────────────────── */
#answer-review .list-group-item-success { background-color: #d1fae5; }
#answer-review .list-group-item-danger  { background-color: #fee2e2; }

/* ── General card hover ──────────────────────────────────────────────────── */
.hover-card { transition: transform .15s ease, box-shadow .15s ease; }
.hover-card:hover { transform: translateY(-3px); box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.1) !important; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Timer pulse ─────────────────────────────────────────────────────────── */
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.5; } }

/* ── Admin sidebar ───────────────────────────────────────────────────────── */
.admin-sidebar { min-height: calc(100vh - 56px); background: #212529; }
.admin-sidebar .nav-link { color: #adb5bd; padding: .5rem 1rem; border-radius: .375rem; }
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active { color: #fff; background: #0d6efd; }
.admin-sidebar .nav-link i { width: 20px; }

/* ── AdSense units ─────────────────────────────────────────────────────────── */
.ad-unit { min-height: 0; overflow: hidden; }
.ad-unit:empty { display: none; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer { background: var(--gray-900); color: var(--gray-300); padding: 3.5rem 0 0; }
.footer-heading { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: #fff; margin-bottom: .9rem; }
.footer-link-list { list-style: none; padding: 0; margin: 0; }
.footer-link-list li { margin-bottom: .45rem; }
.footer-link-list a { font-size: .85rem; color: var(--gray-400); text-decoration: none; transition: color .12s; }
.footer-link-list a:hover { color: #fff; }
/* ── Footer newsletter subscribe bar ── */
.footer-subscribe-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: .75rem;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px; padding: .9rem 1.25rem;
}
.footer-subscribe-text { font-size: .85rem; color: #d1d5db; white-space: nowrap; }
.footer-subscribe-form { display: flex; flex: 1; gap: .5rem; flex-wrap: wrap; min-width: 0; }
.footer-sub-input {
  flex: 1; min-width: 140px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  border-radius: 6px; padding: .4rem .75rem; color: #f1f5f9; font-size: .83rem; outline: none;
  transition: border-color .12s;
}
.footer-sub-input::placeholder { color: #6b7280; }
.footer-sub-input:focus { border-color: #3b82f6; }
.footer-sub-btn {
  background: #2563eb; color: #fff; border: none; border-radius: 6px;
  padding: .4rem 1rem; font-size: .83rem; font-weight: 600; cursor: pointer;
  white-space: nowrap; transition: background .12s;
}
.footer-sub-btn:hover { background: #1d4ed8; }
.footer-sub-msg { font-size: .85rem; }
.footer-bottom { border-top: 1px solid var(--gray-800); margin-top: 2.5rem; padding: 1.25rem 0; font-size: .78rem; color: var(--gray-500); }

/* ── Related tests section ───────────────────────────────────────────────── */
.related-tests-section { border-top: 1px solid var(--gray-200); padding-top: 1.5rem; }
.related-tests-heading {
  font-size: 1rem; font-weight: 700; color: var(--gray-800); margin-bottom: 1rem;
}
.related-tests-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem;
}
.related-test-card {
  display: flex; flex-direction: column; background: var(--gray-50);
  border: 1px solid var(--gray-200); border-radius: 10px; padding: .9rem 1rem;
  text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s;
}
.related-test-card:hover { border-color: var(--primary-600); box-shadow: 0 2px 8px rgba(37,99,235,.1); color: inherit; }
.rtc-title { font-size: .85rem; font-weight: 600; color: var(--gray-800); line-height: 1.4; margin-bottom: .5rem; flex: 1; }
.rtc-meta { display: flex; gap: .75rem; font-size: .75rem; color: var(--gray-500); margin-bottom: .6rem; }
.rtc-meta i { margin-right: 2px; }
.rtc-cta { font-size: .75rem; font-weight: 600; color: var(--primary-600); }
@media (max-width: 500px) { .related-tests-grid { grid-template-columns: 1fr; } }

/* ── Scroll progress bar ─────────────────────────────────────────────────── */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; z-index: 10000;
  background: linear-gradient(90deg, #2563eb 0%, #f97316 60%, #a855f7 100%);
  width: 0%; transition: width .1s linear; pointer-events: none;
}

/* ── Prev / Next quiz navigation ─────────────────────────────────────────── */
.quiz-page-nav {
  display: flex; align-items: stretch; justify-content: space-between; gap: .5rem;
}
.qpn-btn {
  display: flex; align-items: center; gap: .5rem; padding: .55rem .85rem;
  background: #fff; border: 1px solid var(--gray-200); border-radius: 10px;
  text-decoration: none; color: var(--gray-700); font-size: .8rem;
  transition: border-color .14s, box-shadow .14s, background .14s;
  max-width: 48%; overflow: hidden;
}
.qpn-btn:hover { border-color: var(--primary-600); background: var(--primary-50); color: var(--primary-700); box-shadow: 0 1px 6px rgba(37,99,235,.12); }
.qpn-btn i { font-size: 1rem; flex-shrink: 0; color: var(--primary-600); }
.qpn-label { display: flex; flex-direction: column; overflow: hidden; }
.qpn-label small { font-size: .65rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: .06em; line-height: 1.2; }
.qpn-label strong { font-size: .78rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.qpn-next { margin-left: auto; text-align: right; flex-direction: row-reverse; }
.qpn-next .qpn-label { align-items: flex-end; }

/* ── Pulse animation on Start Test button ────────────────────────────────── */
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(37,99,235,.45); }
  70%  { box-shadow: 0 0 0 10px rgba(37,99,235,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,99,235,0); }
}
.btn-start-test { animation: pulse-ring 2.2s ease-out infinite; }
.btn-start-test:hover { animation: none; }

/* ── Result score ring ───────────────────────────────────────────────────── */
.result-score-ring {
  width: 110px; height: 110px; border-radius: 50%; margin: 0 auto 1rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; font-weight: 800;
  background: conic-gradient(var(--score-color, #22c55e) var(--score-deg, 0deg), #e5e7eb 0deg);
}

/* ── Toast tweak (already Bootstrap, just size) ──────────────────────────── */
.toast { min-width: 280px; }

/* ══════════════════════════════════════════════════════════════════════════
   HOME PAGE — FEATURED REVIEWS SECTION
══════════════════════════════════════════════════════════════════════════ */
.home-reviews-section {
  background: #fff; border-bottom: 1px solid var(--gray-200);
  padding: 3rem 0 2.75rem;
}
.home-reviews-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: .75rem; margin-bottom: 1.75rem;
}
.home-reviews-title {
  font-size: 1.2rem; font-weight: 800; color: var(--gray-900); margin: 0 0 .2rem;
}
.home-reviews-sub { font-size: .84rem; color: var(--gray-500); margin: 0; }

.home-reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.home-review-card {
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: 12px; padding: 1.15rem 1.2rem 1rem;
  display: flex; flex-direction: column; gap: .6rem;
  transition: box-shadow .15s, border-color .15s;
}
.home-review-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 4px 14px rgba(37,99,235,.08);
}
.home-review-stars { font-size: .85rem; color: #f59e0b; }
.home-review-body {
  font-size: .88rem; color: var(--gray-700); line-height: 1.6;
  flex: 1; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-review-foot {
  display: flex; align-items: center; gap: .65rem;
  border-top: 1px solid var(--gray-200); padding-top: .65rem; margin-top: auto;
}
.home-review-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: #dbeafe; color: #1e40af; font-size: .8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.home-review-name  { font-size: .82rem; font-weight: 600; color: var(--gray-800); line-height: 1.2; }
.home-review-quiz  {
  font-size: .72rem; color: var(--primary-600); text-decoration: none;
  display: block; margin-top: .1rem; transition: color .1s;
}
.home-review-quiz:hover { color: var(--primary-700); }

/* ══════════════════════════════════════════════════════════════════════════
   COMMENTS & RATINGS
══════════════════════════════════════════════════════════════════════════ */
.comments-section {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: 14px; padding: 1.5rem 1.5rem 1.75rem;
}
.comments-header {
  display: flex; align-items: center; flex-wrap: wrap; gap: 1rem;
  margin-bottom: 1.25rem;
}
.comments-heading {
  font-size: 1.05rem; font-weight: 700; color: var(--gray-900); margin: 0;
}
.comments-aggregate { display: flex; align-items: center; gap: .4rem; }
.star-icon { font-size: .95rem; color: #f59e0b; }
.comments-avg { font-size: 1rem; font-weight: 700; color: var(--gray-800); }
.comments-count { font-size: .8rem; color: var(--gray-500); }
.comments-empty { font-size: .9rem; color: var(--gray-400); font-style: italic; margin-bottom: 1.25rem; }

/* Comment cards */
.comment-list { display: flex; flex-direction: column; gap: .85rem; margin-bottom: 1.5rem; }
.comment-card {
  border: 1px solid var(--gray-100); border-radius: 10px;
  padding: .9rem 1rem; background: var(--gray-50);
}
.comment-card-head { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: .5rem; }
.comment-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: #dbeafe; color: #1e40af; font-size: .85rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.comment-name { font-size: .85rem; font-weight: 600; color: var(--gray-800); line-height: 1.2; }
.comment-meta { display: flex; align-items: center; gap: .5rem; margin-top: .15rem; }
.star-sm { font-size: .7rem; color: #f59e0b; }
.comment-date { font-size: .72rem; color: var(--gray-400); }
.comment-body { font-size: .85rem; color: var(--gray-700); line-height: 1.55; margin: 0; }

/* Review form */
.comment-form-wrap {
  border-top: 1px solid var(--gray-200); padding-top: 1.25rem; margin-top: .25rem;
}
.comment-form-title { font-size: .95rem; font-weight: 700; color: var(--gray-800); margin-bottom: .25rem; }
.comment-form-sub   { font-size: .8rem; color: var(--gray-400); margin-bottom: 1rem; }

/* Star picker */
.star-picker {
  display: flex; flex-direction: row-reverse; align-items: center;
  gap: .1rem; width: fit-content;
}
.star-pick-label {
  cursor: pointer; font-size: 1.5rem; color: var(--gray-300);
  transition: color .1s; padding: 0 .05rem;
}
.star-pick-label.active { color: #f59e0b; }
.star-picker:hover .star-pick-label          { color: #f59e0b; }
.star-picker .star-pick-label:hover ~ .star-pick-label { color: var(--gray-300); }
.star-pick-text { font-size: .8rem; color: var(--gray-500); margin-left: .5rem; white-space: nowrap; }

/* Honeypot field — hidden from real users, bots fill it */
.hp-field { position:absolute; left:-9999px; top:-9999px; visibility:hidden; pointer-events:none; }

/* Comment alerts */
.comment-alert {
  padding: .6rem .85rem; border-radius: 7px; font-size: .85rem;
  margin-bottom: .75rem;
}
.comment-alert-ok  { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.comment-alert-err { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* ══════════════════════════════════════════════════════════════════════════
   MOBILE EXAM CARD (visible only when right panel is hidden)
   ══════════════════════════════════════════════════════════════════════════ */
.mob-exam-card {
  background: #fff; border: 2px solid var(--gray-200);
  border-radius: .85rem; padding: 1.1rem 1.1rem .9rem;
}
.mob-stat-val { font-size: 1.4rem; font-weight: 800; color: var(--primary-600); line-height: 1.1; }
.mob-stat-lbl { font-size: .7rem; color: var(--gray-400); margin-top: .1rem; }

/* ── Responsive ──────────────────────────────────────────────────────────── */

/* ─── Tablet / large phone (≤ 991px) ─────────────────────────────────────── */
@media (max-width: 991px) {
  /* Layout */
  .page-sidebar     { display: none; }
  .page-main        { max-width: 100% !important; padding: 1rem; }
  .page-right-panel { display: none; }
  /* Navbar styles handled in the Navbar section above */
}

/* ─── Phone (≤ 767px) ────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  /* Hero */
  .hero-section   { padding: 52px 0 44px; }
  .hero-heading   { font-size: 1.85rem; }
  .hero-sub       { font-size: .88rem; }
  .btn-hero-primary,
  .btn-hero-outline { font-size: .88rem; padding: .6rem 1.4rem; }

  /* Player topbar */
  .player-topbar        { flex-direction: column; gap: .5rem; align-items: stretch; }
  .player-topbar-left   { order: 1; }
  .player-topbar-right  { order: 2; display: flex; align-items: center; gap: .65rem; }
  .circular-timer-wrap  { width: 52px; height: 52px; }
  .ctimer-svg           { width: 52px; height: 52px; }
  .ctimer-time          { font-size: .65rem; }
  .ctimer-pace          { font-size: .48rem; }
  .player-qcount        { font-size: .82rem; }

  /* Player bottom bar — stack nicely */
  .player-bottombar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "prev  next"
      "save  save"
      "sub   sub";
    gap: .45rem;
    padding: .65rem .75rem;
  }
  .btn-nav-prev         { grid-area: prev; justify-content: center; min-height: 44px; }
  .btn-nav-next         { grid-area: next; justify-content: center; min-height: 44px; }
  .autosave-indicator   { grid-area: save; margin-left: 0; justify-content: center; }
  .btn-nav-submit       { grid-area: sub;  justify-content: center; min-height: 44px; }

  /* Question card */
  .question-card-body { padding: .95rem .9rem .85rem; }
  .q-text             { font-size: .9rem; }
  .q-option           { padding: .65rem .85rem; gap: .65rem; }
  .q-option-letter    { width: 24px; height: 24px; font-size: .72rem; }
  .q-option-text      { font-size: .85rem; }

  /* Result card */
  .result-card    { padding: 1.1rem; }
  .result-score   { font-size: 2rem; }
  .result-heading { font-size: 1.1rem; }

  /* Quiz prev/next nav — smaller text on phone */
  .qpn-label strong { font-size: .72rem; }
  .qpn-btn          { padding: .45rem .6rem; }

  /* Category listing header */
  .cat-header-title { font-size: 1.1rem; }
  .cat-rich-intro   { padding: 1rem 1.1rem; }

  /* Comments */
  .comments-section { padding: 1.1rem; }

  /* Footer subscribe bar — stack vertically */
  .footer-subscribe-row { flex-direction: column; align-items: stretch; gap: .6rem; }
  .footer-subscribe-text { white-space: normal; }
  .footer-subscribe-form { flex-direction: column; gap: .4rem; }
  .footer-sub-input  { width: 100%; min-width: 0; }
  .footer-sub-btn    { width: 100%; padding: .55rem 1rem; }
  .footer-sub-msg    { text-align: center; }

  /* Home reviews */
  .home-reviews-section { padding: 2rem 0; }
  .home-reviews-grid    { gap: .75rem; }
}

/* ─── Small phone (≤ 480px) ──────────────────────────────────────────────── */
@media (max-width: 480px) {
  /* Hero trust badges: hide dots, centre each item */
  .hero-trust { gap: .4rem; }
  .hero-dot   { display: none; }
  .hero-trust li { font-size: .75rem; }

  /* Hero buttons full width */
  .d-flex.flex-wrap.justify-content-center.gap-3.mb-4 {
    flex-direction: column; align-items: center;
  }
  .btn-hero-primary,
  .btn-hero-outline { width: 100%; max-width: 280px; justify-content: center; }

  /* Stats bar: 2×2 grid already via Bootstrap col-6 */

  /* Navbar brand — trim subtitle on very small screens */
  .brand-sub { display: none; }

  /* Listing page: ensure quiz cards are full width at narrowest */
  .quiz-card-wrap { min-width: 100%; }

  /* Cat header: compact */
  .cat-header-body  { padding: .9rem 1rem; }
  .cat-header-stats { font-size: .76rem; }

  /* Player flag button — icon only on narrow */
  .btn-flag span { display: none; }

  /* Result stats row */
  .stat-box { padding: .5rem .4rem; }
  .stat-val { font-size: 1.1rem; }

  /* Exam card rows */
  .exam-row { font-size: .8rem; padding: .45rem 0; }

  /* Mob exam card compact */
  .mob-exam-card { padding: .9rem; }
  .mob-stat-val  { font-size: 1.2rem; }
}

/* ─── Very small (≤ 375px) ───────────────────────────────────────────────── */
@media (max-width: 375px) {
  .hero-heading { font-size: 1.6rem; }
  .player-quiz-title { font-size: .82rem; }
  .q-nav-btn { width: 28px; height: 28px; font-size: .65rem; }
}
