/* ── 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: 1.1rem; line-height: 1.65; color: rgba(255,255,255,.72); max-width: 580px; margin: 0 auto 1.8rem; }
.hero-type-chips {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: 0 auto 1.6rem; max-width: 560px;
}
.hero-type-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.85); border-radius: 999px; padding: .38rem .9rem;
  font-size: .78rem; font-weight: 600; text-decoration: none;
  transition: background .14s, border-color .14s, color .14s, transform .1s;
}
.hero-type-chip i { color: var(--accent-500); font-size: .82rem; }
.hero-type-chip:hover {
  background: rgba(249,115,22,.16); border-color: rgba(249,115,22,.5);
  color: #fff; transform: translateY(-1px);
}
.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: .88rem; color: rgba(255,255,255,.5); }
.hero-dot { opacity: .3; }
.stats-bar { background: #fff; }

/* ── Hero desktop quick-access rail ──────────────────────────────────────── */
@media (min-width: 992px) {
  .hero-flex-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3.25rem;
  }
  .hero-flex-row .hero-inner { margin: 0; flex: 0 1 560px; }
}
.hero-side {
  flex: 0 0 320px;
  max-width: 320px;
  gap: .55rem;
}
.hero-side-stats {
  display: flex; gap: .5rem; margin-bottom: .3rem;
}
.hero-side-stat {
  flex: 1; text-align: center; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12); border-radius: .6rem; padding: .6rem .3rem;
}
.hero-side-stat-num { font-weight: 800; font-size: 1.05rem; color: #fff; line-height: 1.1; }
.hero-side-stat-label { font-size: .68rem; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: .04em; margin-top: .15rem; }
.hero-side-label {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: rgba(255,255,255,.5); margin: .35rem 0 .1rem;
}
.hero-ql-card {
  display: flex; align-items: center; gap: .65rem;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: .6rem; padding: .55rem .7rem; text-decoration: none !important;
  transition: background .14s, border-color .14s, transform .1s;
}
.hero-ql-card:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.22); transform: translateX(2px); }
.hero-ql-icon {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: .5rem;
  background: rgba(96,165,250,.16); color: var(--accent-500);
  display: flex; align-items: center; justify-content: center; font-size: .95rem;
}
.hero-ql-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hero-ql-title { color: #fff; font-size: .84rem; font-weight: 600; line-height: 1.25; }
.hero-ql-count { color: rgba(255,255,255,.5); font-size: .7rem; }
.hero-ql-chevron { color: rgba(255,255,255,.35); font-size: .8rem; flex-shrink: 0; }
.hero-ql-nec-note {
  display: flex; align-items: center; gap: .45rem; margin-top: .35rem;
  font-size: .78rem; font-weight: 600; color: rgba(255,255,255,.75);
  text-decoration: none !important;
}
.hero-ql-nec-note:hover { color: #fff; }
.hero-ql-nec-badge {
  background: var(--accent-500); color: #fff; font-size: .62rem; font-weight: 800;
  letter-spacing: .04em; padding: .12rem .4rem; border-radius: 99px; flex-shrink: 0;
}

/* ── 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: .74rem;
  font-weight: 600;
  background: var(--gray-100);
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  white-space: nowrap;
  line-height: 1.5;
}
/* Home category card — "View by edition" NEC 2020/2023/2026 nav */
.cat-card-nec-nav {
  display: flex; flex-direction: column; gap: .4rem;
  background: var(--gray-50); border: 1px dashed var(--gray-300);
  border-radius: .55rem; padding: .55rem .65rem;
}
.cat-card-nec-nav-label {
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  color: var(--gray-500);
}
.cat-card-nec-btns { display: flex; gap: .4rem; }
.cat-card-nec-btn {
  flex: 1 1 0; text-align: center; padding: .32rem .4rem; border-radius: .4rem;
  font-size: .8rem; font-weight: 700; line-height: 1.2;
  color: var(--nec-c) !important; background: var(--nec-bg);
  border: 1.5px solid var(--nec-c);
  text-decoration: none !important; transition: transform .12s, box-shadow .12s, color .12s, background .12s;
}
.cat-card-nec-btn:hover {
  background: var(--nec-c); color: #fff !important;
  transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0,0,0,.12);
}

.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; }
.cat-card h2.h6 { font-size: 1.02rem; }
.cat-card p.small { font-size: .92rem; }
.cat-row-title { font-size: .92rem; }
.hiw-step h3.h5 { font-size: 1.15rem; }
.hiw-step p.small { font-size: .92rem; }
/* ── 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 page two-column split: intro/content left, quiz grid right.
   Used on category pages without their own segmented left-panel/right-grid
   layout (epa608_core, epa608_type1, epa608_type23, hvac, master, state...).
   On mobile the grid shows first and the content moves below it. */
.cat-two-col       { display: flex; align-items: flex-start; gap: 1.75rem; }
.cat-two-col-left  { flex: 1 1 0; min-width: 0; order: 1; }
.cat-two-col-right { flex: 1 1 0; min-width: 0; order: 2; }

@media (max-width: 991px) {
  .cat-two-col       { flex-direction: column; }
  .cat-two-col-left  { flex: 1 1 auto; max-width: 100%; order: 2; }
  .cat-two-col-right { order: 1; width: 100%; }
}

/* 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); }

/* Category rich intro — split layout (main text + right-side jump nav, e.g. NEC edition buttons) */
.cat-rich-intro-split { display: flex; gap: 1.75rem; align-items: flex-start; }
.cat-rich-intro-main  { flex: 1 1 auto; min-width: 0; }
.cat-rich-intro-side  { flex: 0 0 230px; display: flex; flex-direction: column; gap: .6rem; }
.cat-rich-nav-label {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--gray-500); margin-bottom: .1rem;
}
.cat-rich-nav-btn {
  display: flex; flex-direction: column; justify-content: center; gap: .2rem;
  min-height: 60px; border: 1.5px solid; border-radius: .65rem; padding: .85rem 1.05rem;
  text-decoration: none; transition: transform .12s, box-shadow .12s;
}
.cat-rich-nav-btn:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0,0,0,.08); text-decoration: none; }
.cat-rich-nav-btn-title { font-size: .87rem; font-weight: 700; }
.cat-rich-nav-btn-sub   { font-size: .72rem; font-weight: 500; opacity: .85; }

/* State exam facts panel (/state/{slug}) — real question count / time limit /
   pass score pulled from sd_state_exam_info, only shown when confidence != unverified */
.state-exam-facts {
  background: #fff; border: 1px solid var(--gray-200); border-radius: .75rem;
  padding: 1.1rem 1.25rem;
}
.state-exam-facts-title {
  font-size: .95rem; font-weight: 700; color: var(--gray-900);
  display: flex; align-items: center; gap: .5rem; margin-bottom: .8rem;
}
.state-exam-facts-grid {
  display: flex; flex-wrap: wrap; gap: 1.5rem;
}
.state-exam-facts-grid > div { display: flex; flex-direction: column; gap: .1rem; }
.state-exam-facts-grid strong { font-size: 1.05rem; color: var(--gray-900); }
.state-exam-facts-grid span   { font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: var(--gray-500); }
.state-exam-facts-note   { font-size: .82rem; color: var(--gray-600); line-height: 1.6; margin: .8rem 0 0; }
.state-exam-facts-source { font-size: .75rem; color: var(--gray-500); text-decoration: underline; }

@media (max-width: 767px) {
  .cat-rich-intro-split { flex-direction: column; }
  .cat-rich-intro-side  { flex-direction: row; flex-wrap: wrap; width: 100%; }
  .cat-rich-nav-btn     { flex: 1 1 150px; min-height: 54px; }
}

/* Homepage — "The Theory Behind Each Exam" cards (8/4 split, alternating sides) */
.theory-section  { padding: 3rem 0 1rem; }
.theory-heading  { font-size: 1.55rem; font-weight: 700; color: var(--gray-900); margin: 0 0 .3rem; text-align: center; }
.theory-sub      { font-size: 1rem; color: var(--gray-600); margin: 0 0 2rem; text-align: center; }

.theory-card {
  display: flex;
  background: #fff; border: 1px solid var(--gray-200); border-radius: .9rem;
  box-shadow: 0 1px 3px rgba(15,23,42,.04);
  overflow: hidden; margin-bottom: 1.5rem;
}
.theory-card:last-child { margin-bottom: 0; }

/* Per-card accent color, driven by --accent / --accent-rgb custom properties set inline */
.theory-card-accent { width: 5px; flex-shrink: 0; background: var(--accent); }
.theory-card-inner   { flex: 1; min-width: 0; }

.theory-card-main { padding: 1.75rem 2rem; }
.theory-eyebrow {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--accent); margin-bottom: .25rem;
}
.theory-title { font-size: 1.28rem; font-weight: 700; color: var(--gray-900); margin: 0 0 1.1rem; line-height: 1.3; }

.theory-content-row { display: flex; align-items: flex-start; gap: 1.5rem; }

.theory-image-slot {
  flex: 0 0 280px; aspect-ratio: 4 / 3; border-radius: .75rem;
  background: rgba(var(--accent-rgb), .08);
  border: 1px solid rgba(var(--accent-rgb), .18);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.theory-image-slot img { width: 100%; height: 100%; object-fit: cover; }
.theory-text-slot { flex: 1; min-width: 0; }

.theory-body p { font-size: .98rem; color: var(--gray-600); line-height: 1.7; margin-bottom: .8rem; }
.theory-body p:last-child { margin-bottom: 0; }
.theory-body strong { color: var(--gray-800); }
.theory-cta {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .84rem; font-weight: 600; color: var(--accent);
  text-decoration: none; margin-top: 1.1rem;
}
.theory-cta:hover { text-decoration: underline; }

.theory-links-panel { background: var(--gray-50); padding: 1.35rem 1.5rem; height: 100%; }
.theory-links-panel-right { border-left: 1px solid var(--gray-200); }
.theory-links-panel-left  { border-right: 1px solid var(--gray-200); }
.theory-links-label {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--gray-500); margin-bottom: .9rem;
}
.theory-links-list { list-style: none; margin: 0 0 .6rem; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.theory-link-group-label {
  font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--gray-500); margin: .2rem 0 -.15rem;
}
.theory-link-group-label:first-child { margin-top: 0; }

/* Deck-of-cards look: each link is its own raised card, dealt in with a staggered
   animation the first time its panel scrolls into view (.in-view, toggled by JS). */
@keyframes theoryCardDeal {
  from { opacity: 0; transform: translateY(12px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.theory-link-card {
  display: flex; align-items: center; gap: .65rem;
  padding: .55rem .7rem; border-radius: .6rem;
  background: #fff; border: 1px solid var(--gray-200);
  box-shadow: 0 1px 2px rgba(15,23,42,.05);
  text-decoration: none !important;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background-color .16s ease;
  animation: theoryCardDeal .5s ease both paused;
}
.theory-links-panel.in-view .theory-link-card { animation-play-state: running; }
.theory-links-list li:nth-child(1) .theory-link-card { animation-delay: .03s; }
.theory-links-list li:nth-child(2) .theory-link-card { animation-delay: .09s; }
.theory-links-list li:nth-child(3) .theory-link-card { animation-delay: .15s; }
.theory-links-list li:nth-child(4) .theory-link-card { animation-delay: .21s; }
.theory-links-list li:nth-child(5) .theory-link-card { animation-delay: .27s; }
.theory-links-list li:nth-child(6) .theory-link-card { animation-delay: .33s; }
.theory-link-card:hover {
  transform: translateX(4px) translateY(-2px);
  box-shadow: 0 10px 20px rgba(var(--accent-rgb), .18);
  border-color: rgba(var(--accent-rgb), .5);
  background-color: rgba(var(--accent-rgb), .04);
}
.theory-link-icon {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: .5rem;
  background: rgba(var(--accent-rgb), .12); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: .8rem;
  transition: background-color .16s ease, color .16s ease;
}
.theory-link-card:hover .theory-link-icon { background: var(--accent); color: #fff; }
.theory-link-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.theory-link-title {
  font-size: .82rem; font-weight: 600; color: var(--accent); line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.theory-link-meta { font-size: .68rem; color: var(--gray-500); }
.theory-link-chevron {
  font-size: .7rem; color: var(--gray-300); flex-shrink: 0;
  transition: transform .16s ease, color .16s ease;
}
.theory-link-card:hover .theory-link-chevron { transform: translateX(3px); color: var(--accent); }
.theory-links-viewall {
  display: block; text-align: center; margin-top: .75rem;
  padding: .55rem; border-radius: .5rem; background: #fff; border: 1px solid rgba(var(--accent-rgb), .3);
  font-size: .78rem; font-weight: 600; color: var(--accent); text-decoration: none;
}
.theory-links-viewall:hover { background: rgba(var(--accent-rgb), .08); text-decoration: none; }

@media (max-width: 991px) {
  .theory-links-panel-right, .theory-links-panel-left { border-left: none; border-right: none; border-top: 1px solid var(--gray-200); }
}
@media (max-width: 767px) {
  .theory-heading      { font-size: 1.2rem; }
  .theory-card-main    { padding: 1.35rem 1.35rem 1.1rem; }
  .theory-title        { font-size: 1.05rem; }
  .theory-content-row  { flex-direction: column; }
  .theory-image-slot, .theory-text-slot { order: unset !important; }
  .theory-image-slot   { flex-basis: auto; width: 100%; aspect-ratio: 16 / 8; }
  .theory-links-panel  { padding: 1.1rem 1.35rem 1.25rem; }
}

/* Homepage — Flashcards promo (before "The Theory Behind Each Exam") */
.fc-home-section {
  padding: 3.5rem 0; margin: 1rem 0;
  background: radial-gradient(120% 180% at 15% 0%, rgba(37,99,235,.07), transparent 55%),
              radial-gradient(120% 180% at 85% 100%, rgba(124,58,237,.07), transparent 55%),
              linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  border-top: 1px solid var(--gray-200); border-bottom: 1px solid var(--gray-200);
}
.fc-home-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem;
  flex-wrap: wrap; margin-bottom: 2rem;
}
.fc-home-eyebrow {
  display: inline-flex; align-items: center; font-size: .72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em; color: #7c3aed;
  background: #f5f3ff; border: 1px solid #ddd6fe; padding: .3rem .75rem;
  border-radius: 99px; margin-bottom: .75rem;
}
.fc-home-heading { font-size: 1.55rem; font-weight: 800; color: var(--gray-900); margin: 0 0 .35rem; }
.fc-home-sub      { font-size: .95rem; color: var(--gray-600); margin: 0; max-width: 560px; }
.fc-home-cta {
  display: inline-flex; align-items: center; gap: .4rem; flex-shrink: 0;
  padding: .65rem 1.25rem; border-radius: 99px; font-weight: 700; font-size: .88rem;
  color: #fff; text-decoration: none;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  box-shadow: 0 8px 20px -8px rgba(124,58,237,.55);
  transition: transform .15s ease, box-shadow .15s ease;
}
.fc-home-cta:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px -8px rgba(124,58,237,.6); }

.fc-home-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem;
}
.fc-home-tile {
  display: block; text-decoration: none; perspective: 1200px; height: 190px;
}
.fc-home-tile-inner {
  position: relative; width: 100%; height: 100%; text-align: center;
  transform-style: preserve-3d; transition: transform .5s cubic-bezier(.34,1.15,.4,1);
}
.fc-home-tile:hover .fc-home-tile-inner,
.fc-home-tile:focus-visible .fc-home-tile-inner { transform: rotateY(180deg); }
.fc-home-tile-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 16px; padding: 1.35rem 1.1rem; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  border: 1px solid rgba(var(--accent-rgb),.18); background: #fff;
  box-shadow: 0 6px 18px -8px rgba(15,23,42,.1);
}
.fc-home-tile-front { background: linear-gradient(160deg,#fff 0%, rgba(var(--accent-rgb),.06) 100%); }
.fc-home-tile-icon {
  width: 42px; height: 42px; border-radius: 12px; margin-bottom: .65rem;
  display: flex; align-items: center; justify-content: center; font-size: 1.15rem;
  background: rgba(var(--accent-rgb),.14); color: var(--accent);
}
.fc-home-tile-cat {
  font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--accent); margin-bottom: .3rem;
}
.fc-home-tile-title {
  font-size: .92rem; font-weight: 700; color: var(--gray-900); margin: 0 0 .4rem; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.fc-home-tile-count { font-size: .74rem; font-weight: 600; color: var(--gray-500); }
.fc-home-tile-back {
  transform: rotateY(180deg); color: #fff; gap: .5rem;
  background: linear-gradient(135deg, rgba(var(--accent-rgb),.92), var(--accent));
  box-shadow: 0 10px 24px -8px rgba(var(--accent-rgb),.55);
}
.fc-home-tile-play { font-size: 2rem; }
.fc-home-tile-back-label { font-size: .88rem; font-weight: 700; }

@media (max-width: 991px) {
  .fc-home-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767px) {
  .fc-home-section  { padding: 2.5rem 0; }
  .fc-home-heading  { font-size: 1.3rem; }
  .fc-home-grid     { grid-template-columns: repeat(2, 1fr); gap: .85rem; }
  .fc-home-tile     { height: 170px; }
}
@media (max-width: 420px) {
  .fc-home-grid { grid-template-columns: 1fr 1fr; }
}
@media (hover: none) {
  /* No hover on touch — tap navigates straight through, front face stays put */
  .fc-home-tile:hover .fc-home-tile-inner { transform: none; }
}

/* Homepage — "Free Study Guides & Calculation Walkthroughs" (dynamic /learn pages) */
.study-guides-section { padding: 3rem 0; }
.study-guides-header {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.study-guides-heading { font-size: 1.45rem; font-weight: 700; color: var(--gray-900); margin: 0 0 .3rem; }
.study-guides-sub     { font-size: .96rem; color: var(--gray-600); margin: 0; }
.study-guides-viewall {
  font-size: .84rem; font-weight: 600; color: var(--primary-600); text-decoration: none;
  white-space: nowrap;
}
.study-guides-viewall:hover { text-decoration: underline; }

.study-guides-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.study-guide-card {
  position: relative;
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--gray-200); border-radius: .9rem;
  padding: 1.35rem 1.4rem 1.25rem; text-decoration: none; overflow: hidden;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
/* Top accent bar, colored per category via --accent */
.study-guide-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--accent, var(--primary-600));
  transform: scaleX(0); transform-origin: left; transition: transform .22s ease;
}
.study-guide-card:hover {
  transform: translateY(-4px); text-decoration: none;
  box-shadow: 0 14px 28px rgba(var(--accent-rgb, 37,99,235), .16);
  border-color: rgba(var(--accent-rgb, 37,99,235), .35);
}
.study-guide-card:hover::before { transform: scaleX(1); }
.study-guide-icon {
  width: 36px; height: 36px; border-radius: .6rem; flex-shrink: 0;
  background: rgba(var(--accent-rgb, 37,99,235), .12); color: var(--accent, var(--primary-600));
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
  margin-bottom: .8rem; transition: background-color .18s ease, color .18s ease;
}
.study-guide-card:hover .study-guide-icon { background: var(--accent, var(--primary-600)); color: #fff; }
.study-guide-cat {
  display: inline-block; align-self: flex-start;
  font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--accent, var(--primary-600)); background: rgba(var(--accent-rgb, 37,99,235), .12);
  padding: .2rem .55rem; border-radius: 99px; margin-bottom: .65rem;
}
.study-guide-title   { font-size: .96rem; font-weight: 700; color: var(--gray-900); margin: 0 0 .5rem; line-height: 1.35; transition: color .18s ease; }
.study-guide-card:hover .study-guide-title { color: var(--accent, var(--gray-900)); }
.study-guide-excerpt { font-size: .82rem; color: var(--gray-600); line-height: 1.6; margin: 0 0 .9rem; flex-grow: 1; }
.study-guide-link    { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 600; color: var(--accent, var(--primary-600)); }
.study-guide-link i  { transition: transform .18s ease; }
.study-guide-card:hover .study-guide-link i { transform: translateX(3px); }

@media (max-width: 991px) {
  .study-guides-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
  .study-guides-grid { grid-template-columns: 1fr; }
}

/* /learn hub page */
.learn-hero {
  background: linear-gradient(135deg, #1e3a8a, #2563eb 55%, #4338ca);
  padding: 3rem 0 2.5rem; color: #fff;
}
.learn-hero-eyebrow {
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: #bfdbfe; margin: 0 0 .6rem;
}
.learn-hero-title { font-size: 2.2rem; font-weight: 800; margin: 0 0 .75rem; }
.learn-hero-sub   { font-size: 1.1rem; color: #dbeafe; max-width: 580px; margin: 0 auto; }

.learn-tabs { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: 2.25rem; }
.learn-tab {
  display: inline-block; padding: .4rem 1rem; border-radius: 99px;
  font-size: .9rem; font-weight: 600; color: var(--gray-600);
  background: #fff; border: 1.5px solid var(--gray-200); text-decoration: none;
  transition: transform .12s, box-shadow .12s;
}
.learn-tab:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0,0,0,.06); text-decoration: none; }
.learn-tab.active { color: #fff; border-color: var(--primary-600); background: var(--primary-600); }

.learn-group { margin-bottom: 2.5rem; }
.learn-group-head {
  display: flex; align-items: baseline; gap: .75rem; margin-bottom: .3rem;
  padding: .1rem 0 .1rem .85rem; border-left: 4px solid var(--gray-300);
}
.learn-group-title { font-size: 1.25rem; font-weight: 700; color: var(--gray-900); margin: 0; }
.learn-group-count { font-size: .85rem; color: var(--gray-500); }
.learn-group-desc  { font-size: .95rem; color: var(--gray-600); margin: .5rem 0 1rem .85rem; }

.learn-empty { text-align: center; padding: 3rem 1rem; color: var(--gray-400); }
.learn-empty .bi { font-size: 2.5rem; display: block; margin-bottom: .75rem; }

.learn-page .study-guide-title   { font-size: 1.06rem; }
.learn-page .study-guide-excerpt { font-size: .9rem; }
.learn-page .study-guide-link    { font-size: .85rem; }

@media (max-width: 575px) {
  .learn-hero-title { font-size: 1.6rem; }
  .learn-hero-sub   { font-size: 1rem; }
}

/* /learn/{slug} article page */
.learn-article-page { background: var(--gray-200); min-height: calc(100vh - 400px); }
.learn-breadcrumb { margin-bottom: 1.1rem; font-size: .9rem; color: var(--gray-500); }
.learn-breadcrumb a { color: var(--gray-500); text-decoration: none; }
.learn-breadcrumb a:hover { color: var(--primary-600); text-decoration: underline; }
.learn-breadcrumb .sep { margin: 0 .4rem; }
.learn-breadcrumb .current { color: var(--gray-800); }

.learn-article-card {
  background: #fff; border: 1px solid var(--gray-200); border-radius: .9rem;
  border-top: 4px solid var(--accent);
  box-shadow: 0 1px 3px rgba(15,23,42,.04);
  padding: 2rem 2.25rem 2.25rem;
}
.learn-article-header { margin-bottom: 1.75rem; border-bottom: 1px solid var(--gray-100); padding-bottom: 1.5rem; }
.learn-article-cat {
  display: inline-block; background: rgba(var(--accent-rgb, 37,99,235), .1); color: var(--accent);
  border-radius: 99px; padding: .2rem .75rem; font-size: .72rem; font-weight: 700;
}
.learn-article-title    { font-size: 1.95rem; font-weight: 800; color: var(--gray-900); line-height: 1.25; margin: 0 0 .75rem; }
.learn-article-excerpt  { font-size: 1.1rem; color: var(--gray-600); line-height: 1.6; margin: 0; }
.learn-article-updated  { font-size: .85rem; color: var(--gray-400); margin-top: .75rem; }

.learn-article-nav {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-top: 1.5rem;
}
.learn-nav-link {
  display: flex; align-items: center; gap: .6rem; flex: 1 1 260px; max-width: 100%;
  background: #fff; border: 1px solid var(--gray-200); border-radius: .65rem;
  padding: .85rem 1.1rem; font-size: .85rem; font-weight: 600; color: var(--gray-800);
  text-decoration: none; transition: border-color .12s, box-shadow .12s;
}
.learn-nav-link:hover { border-color: var(--primary-200, #bfdbfe); box-shadow: 0 4px 12px rgba(15,23,42,.06); text-decoration: none; color: var(--gray-800); }
.learn-nav-link small { display: block; color: var(--gray-400); font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.learn-nav-next { justify-content: flex-end; text-align: right; }

@media (max-width: 575px) {
  .learn-article-card   { padding: 1.35rem 1.35rem 1.6rem; }
  .learn-article-title  { font-size: 1.35rem; }
}

/* 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 — sticky to the viewport bottom rather than sitting in normal flow
   after the question body. A long question (extra option text, an image, more answer
   choices) pushed this bar below the fold, so every single question meant scrolling
   down to reach Next/Submit, then quiz-engine.js's own scroll-to-top on renderQuestion()
   would jump back up — a scroll-down-then-up cycle on every question of a 100+ question
   exam. Sticky keeps Prev/Next/Submit always reachable without scrolling at all. */
.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;
  position: sticky; bottom: .75rem; z-index: 20;
  box-shadow: 0 8px 24px -10px rgba(17,24,39,.18);
}
.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.75rem; }
.related-tests-heading {
  font-size: 1.05rem; font-weight: 700; color: var(--gray-900); margin-bottom: 1.1rem;
  display: flex; align-items: center;
}
.related-tests-heading i { color: var(--accent-500); }
.related-tests-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem;
}
.related-test-card {
  position: relative; display: flex; align-items: flex-start; gap: .75rem;
  background: #fff; border: 1px solid var(--gray-200); border-radius: .8rem;
  padding: 1rem 1.05rem; overflow: hidden;
  text-decoration: none; color: inherit;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.related-test-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--primary-600); transform: scaleX(0); transform-origin: left;
  transition: transform .22s ease;
}
.related-test-card:hover {
  transform: translateY(-3px); color: inherit; text-decoration: none;
  box-shadow: 0 12px 24px rgba(37,99,235,.14); border-color: var(--primary-100);
}
.related-test-card:hover::before { transform: scaleX(1); }
.rtc-icon {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: .6rem;
  background: var(--primary-50); color: var(--primary-600);
  display: flex; align-items: center; justify-content: center; font-size: .9rem;
  transition: background-color .18s ease, color .18s ease;
}
.related-test-card:hover .rtc-icon { background: var(--primary-600); color: #fff; }
.rtc-body { flex: 1; min-width: 0; }
.rtc-title { font-size: .87rem; font-weight: 700; color: var(--gray-900); line-height: 1.4; margin-bottom: .45rem; transition: color .18s ease; }
.related-test-card:hover .rtc-title { color: var(--primary-700); }
.rtc-meta { display: flex; gap: .75rem; font-size: .74rem; color: var(--gray-500); margin-bottom: .55rem; }
.rtc-meta i { margin-right: 2px; }
.rtc-cta { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 600; color: var(--primary-600); }
.rtc-cta i { transition: transform .18s ease; }
.related-test-card:hover .rtc-cta i { transform: translateX(3px); }
@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 — NEWSLETTER SUBSCRIBE SECTION
══════════════════════════════════════════════════════════════════════════ */
.home-subscribe-section { padding: 3rem 0; }
.subscribe-card {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(135deg, #0f2138 0%, #1e3a5f 55%, #1d4ed8 130%);
  border-radius: 24px; padding: 3rem 2rem; text-align: center;
  box-shadow: 0 20px 45px -15px rgba(15,33,56,.45);
}
.subscribe-grid-overlay {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(rgba(96,165,250,.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96,165,250,.14) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(ellipse 75% 80% at 50% 40%, #000 40%, transparent 90%);
          mask-image: radial-gradient(ellipse 75% 80% at 50% 40%, #000 40%, transparent 90%);
}
.subscribe-glow {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 55% at 50% 0%, rgba(249,115,22,.22) 0%, transparent 70%);
}
.subscribe-badge {
  position: relative; z-index: 1;
  width: 56px; height: 56px; margin: 0 auto 1.1rem; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent-500), var(--accent-600));
  box-shadow: 0 8px 20px -4px rgba(249,115,22,.55);
  font-size: 1.4rem; color: #fff;
  animation: subscribeBellRing 5s ease-in-out infinite;
}
@keyframes subscribeBellRing {
  0%, 60%, 100% { transform: rotate(0deg); }
  63% { transform: rotate(-12deg); } 66% { transform: rotate(10deg); }
  69% { transform: rotate(-8deg); } 72% { transform: rotate(5deg); } 75% { transform: rotate(0deg); }
}
.subscribe-title {
  position: relative; z-index: 1;
  font-size: clamp(1.35rem, 3vw, 1.75rem); font-weight: 800; color: #fff;
  letter-spacing: -.01em; margin-bottom: .5rem;
}
.subscribe-sub {
  position: relative; z-index: 1;
  font-size: .96rem; color: rgba(255,255,255,.72); line-height: 1.6;
  max-width: 480px; margin: 0 auto 1.75rem;
}
.subscribe-form {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center;
  max-width: 560px; margin: 0 auto;
}
.subscribe-field {
  position: relative; flex: 1 1 160px; display: flex; align-items: center;
}
.subscribe-field-grow { flex: 1 1 220px; }
.subscribe-field-icon {
  position: absolute; left: 14px; color: var(--gray-400); font-size: .85rem; pointer-events: none;
}
.subscribe-input {
  width: 100%; border: 1px solid transparent; background: rgba(255,255,255,.96);
  border-radius: 999px; padding: .72rem 1rem .72rem 2.15rem; font-size: .88rem;
  color: var(--gray-800); outline: none; transition: box-shadow .15s, transform .1s;
}
.subscribe-input::placeholder { color: var(--gray-400); }
.subscribe-input:focus { box-shadow: 0 0 0 3px rgba(249,115,22,.4); }
.subscribe-btn {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent-500), var(--accent-600)); color: #fff;
  border: none; border-radius: 999px; padding: .72rem 1.6rem; font-size: .88rem; font-weight: 700;
  white-space: nowrap; box-shadow: 0 6px 16px -4px rgba(249,115,22,.55);
  transition: transform .12s, box-shadow .12s;
}
.subscribe-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -4px rgba(249,115,22,.65); color: #fff; }
.subscribe-btn:disabled { opacity: .75; transform: none; }
.subscribe-msg {
  position: relative; z-index: 1;
  margin: 1.1rem 0 0; font-weight: 600; font-size: .92rem; color: #bbf7d0;
}
.subscribe-trust {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: .6rem; margin-top: 1.6rem;
}
.subscribe-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px; padding: .32rem .8rem; font-size: .74rem; color: rgba(255,255,255,.8);
}
@media (max-width: 575px) {
  .subscribe-card { padding: 2.25rem 1.25rem; border-radius: 18px; }
  .subscribe-form { flex-direction: column; }
  .subscribe-btn { width: 100%; }
}

/* ══════════════════════════════════════════════════════════════════════════
   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.32rem; font-weight: 800; color: var(--gray-900); margin: 0 0 .2rem;
}
.home-reviews-sub { font-size: .92rem; 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: .96rem; 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; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PLAN 02 — HOME PAGE NEW SECTIONS
   ═══════════════════════════════════════════════════════════════════════════ */

/* NEC 2026 freshness banner */
.nec2026-banner { background:#eff6ff; border-bottom:1px solid #bfdbfe; padding:.65rem 0; }
.nec2026-banner-inner { display:flex; align-items:center; gap:.875rem; flex-wrap:wrap; }
.nec2026-badge { background:#2563eb; color:#fff; font-size:.68rem; font-weight:700; padding:.18rem .45rem; border-radius:4px; flex-shrink:0; letter-spacing:.06em; }
.nec2026-text { font-size:.93rem; color:#1e40af; flex:1; min-width:0; }
.nec2026-link { font-size:.93rem; font-weight:600; color:#2563eb; text-decoration:none; white-space:nowrap; flex-shrink:0; }
.nec2026-link:hover { text-decoration:underline; }

/* NEC 2026 callout box used inside category rich content */
.nec2026-callout { background:#eff6ff; border-left:4px solid #2563eb; border-radius:0 8px 8px 0; padding:.875rem 1.1rem; margin:1.25rem 0; font-size:.9rem; color:#1e3a8a; }
.nec2026-callout strong { color:#1e40af; }

/* How It Works */
.how-it-works-section { background: #fff; box-shadow: 0 1px 0 var(--gray-200), 0 -1px 0 var(--gray-200); }
.hiw-num { width:52px; height:52px; border-radius:50%; background:#2563eb; color:#fff; font-size:1.4rem; font-weight:700; display:flex; align-items:center; justify-content:center; margin:0 auto; }
.hiw-step { padding:1.25rem .75rem; }

/* About / Trust */
.trust-item { display:flex; align-items:flex-start; gap:.75rem; padding:.875rem 0; border-bottom:1px solid #f1f5f9; }
.trust-item:last-child { border-bottom:none; }
.trust-item .bi { font-size:1.2rem; flex-shrink:0; margin-top:.1rem; }
.trust-item strong { display:block; font-size:1rem; margin-bottom:.1rem; }
.trust-item .trust-sub { font-size:.92rem; color:#64748b; }

/* ═══════════════════════════════════════════════════════════════════════════
   PLAN 01 — CATEGORY PAGE LONG-FORM CONTENT
   ═══════════════════════════════════════════════════════════════════════════ */

.cat-rich-below { font-size:.925rem; line-height:1.75; color:#374151; }
.cat-rich-below h2 { font-size:1.2rem; font-weight:700; margin-top:2rem; margin-bottom:.6rem; color:#111827; border-bottom:2px solid #e5e7eb; padding-bottom:.35rem; }
.cat-rich-below h3 { font-size:1rem; font-weight:700; margin-top:1.25rem; margin-bottom:.35rem; color:#1f2937; }
.cat-rich-below p { margin-bottom:.85rem; }
.cat-rich-below ul { padding-left:1.4rem; margin-bottom:.85rem; }
.cat-rich-below li { margin-bottom:.35rem; }
.cat-rich-below table { width:100%; border-collapse:collapse; margin:.75rem 0 1.25rem; font-size:.87rem; }
.cat-rich-below table th { background:#f1f5f9; font-weight:600; text-align:left; padding:.45rem .65rem; border:1px solid #e2e8f0; }
.cat-rich-below table td { padding:.4rem .65rem; border:1px solid #e2e8f0; vertical-align:top; }
.cat-rich-below table tr:nth-child(even) td { background:#f8fafc; }
.cat-rich-intro .cat-rich-body h2 { font-size:1.15rem; font-weight:700; margin-top:1.5rem; margin-bottom:.5rem; color:#111827; }
.cat-rich-intro .cat-rich-body h3 { font-size:1rem; font-weight:600; margin-top:1rem; margin-bottom:.3rem; }
.cat-rich-intro .cat-rich-body p { margin-bottom:.75rem; font-size:.925rem; line-height:1.72; }
.cat-rich-intro .cat-rich-body ul { padding-left:1.3rem; margin-bottom:.75rem; font-size:.9rem; }
.cat-rich-intro .cat-rich-body ul li { margin-bottom:.3rem; }
.cat-header-download { margin-top:.75rem; }
.cat-header-download .btn { font-size:.8rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   PLAN 04 — QUIZ PRE-GUIDE & POST-CONTENT
   ═══════════════════════════════════════════════════════════════════════════ */

.quiz-preguide { background:#f0f7ff; border-left:4px solid #2563eb; border-radius:0 8px 8px 0; padding:1rem 1.25rem; font-size:.9rem; line-height:1.7; margin-bottom:1rem; color:#1e3a5f; }
.quiz-preguide p:last-child { margin-bottom:0; }
.quiz-preguide strong { color:#1e40af; }
.quiz-post-content { font-size:.915rem; line-height:1.72; color:#374151; }
.quiz-post-content h2 { font-size:1.1rem; font-weight:700; color:#111827; margin-top:1.5rem; margin-bottom:.5rem; }
.quiz-post-content h2:first-child { margin-top:0; }
.quiz-post-content h3 { font-size:1rem; font-weight:700; color:#111827; margin-top:1.2rem; margin-bottom:.4rem; }
.quiz-post-content h3:first-child { margin-top:0; }
.related-quiz-card { background:#f8fafc; border-color:#e2e8f0!important; transition:border-color .15s,background .15s; }
.related-quiz-card:hover { background:#eff6ff; border-color:#bfdbfe!important; }
.quiz-post-content p { margin-bottom:.75rem; }
.quiz-post-content ul { padding-left:1.3rem; margin-bottom:.75rem; }
.quiz-post-content ul li { margin-bottom:.3rem; }
.related-quizzes-box { background:#f8fafc; border:1px solid #e2e8f0; border-radius:10px; padding:1.1rem 1.2rem; position:sticky; top:80px; }
.related-quizzes-box h3 { font-size:.9rem; font-weight:700; color:#111827; margin-bottom:.75rem; }
.related-quizzes-box ul li a { font-size:.83rem; color:#374151; text-decoration:none; display:flex; align-items:flex-start; gap:.2rem; padding:.3rem 0; border-bottom:1px solid #f1f5f9; line-height:1.4; }
.related-quizzes-box ul li:last-child a { border-bottom:none; }
.related-quizzes-box ul li a:hover { color:#2563eb; }

/* ═══════════════════════════════════════════════════════════════════════════
   PLAN 03 — TRUST / SOURCE TRANSPARENCY ELEMENTS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Source note under category header stats */
.cat-source-note { font-size:.78rem; color:#6b7280; }
.cat-source-note .bi-patch-check-fill { font-size:.78rem; }

/* Source note at bottom of exam card in quiz sidebar */
.exam-source-note { margin-top:.65rem; padding-top:.6rem; border-top:1px solid var(--gray-100); font-size:.72rem; color:#6b7280; line-height:1.5; }
.exam-source-note .bi-patch-check-fill { font-size:.72rem; color:#16a34a; }

/* About page */
.about-page-wrap { max-width:1140px; }
.about-prose { max-width:820px; }
.about-eyebrow { display:inline-block; font-size:.72rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--primary-600); background:var(--primary-50); padding:.3rem .8rem; border-radius:999px; margin-bottom:.6rem; }
.about-card-soft { background:#fff; box-shadow:0 1px 2px rgba(15,23,42,.04), 0 8px 24px -12px rgba(15,23,42,.10); border:1px solid #f1f5f9; }
.about-card-accent { background:linear-gradient(135deg,#fff,var(--primary-50)); border:1px solid var(--primary-100); box-shadow:0 8px 24px -14px rgba(37,99,235,.25); }
.about-credential-banner { max-width:820px; background:linear-gradient(135deg,#eff6ff,#f0fdf4); border:1px solid #bfdbfe; border-radius:16px; padding:1.1rem 1.3rem; box-shadow:0 8px 24px -14px rgba(37,99,235,.25); }
.about-credential-banner .acb-icon { font-size:1.7rem; line-height:1; }
.about-credential-banner strong { display:block; font-size:1.02rem; color:#1e3a8a; margin-bottom:.25rem; }
.about-credential-banner p { font-size:.9rem; color:#334155; margin:0; }
.about-trust-grid { display:grid; grid-template-columns:repeat(3, 1fr); gap:1rem; margin:1.2rem 0; }
.about-trust-item { background:#fff; border:1px solid #eef1f5; border-radius:14px; padding:1.1rem 1.2rem; box-shadow:0 1px 2px rgba(15,23,42,.03), 0 6px 18px -12px rgba(15,23,42,.10); transition:transform .15s ease, box-shadow .15s ease; }
.about-trust-item:hover { transform:translateY(-3px); box-shadow:0 10px 24px -12px rgba(15,23,42,.18); }
.about-trust-item .ati-icon { display:inline-flex; align-items:center; justify-content:center; width:2.4rem; height:2.4rem; font-size:1.2rem; margin-bottom:.6rem; border-radius:10px; background:var(--primary-50); }
.about-trust-item strong { display:block; font-size:.88rem; margin-bottom:.25rem; color:#111827; }
.about-trust-item p { font-size:.82rem; color:#6b7280; margin:0; line-height:1.55; }
.about-source-link { display:inline-flex; align-items:center; gap:.4rem; font-size:.83rem; color:#2563eb; text-decoration:none; padding:.4rem .8rem; border:1px solid var(--primary-100); border-radius:999px; background:var(--primary-50); margin:.25rem .25rem .25rem 0; transition:background .12s ease, transform .12s ease; }
.about-source-link:hover { background:#dbeafe; transform:translateY(-1px); }
@media(max-width:991px) { .about-trust-grid { grid-template-columns:1fr 1fr; } }
@media(max-width:575px) { .about-trust-grid { grid-template-columns:1fr; } }

/* ═══════════════════════════════════════════════════════════════════════════
   PLAN 05 — PDF DOWNLOAD PAGES
   ═══════════════════════════════════════════════════════════════════════════ */

.download-card { transition:box-shadow .15s,transform .15s; }
.download-card:hover { box-shadow:0 8px 24px rgba(0,0,0,.1)!important; transform:translateY(-2px); }
.download-card-icon { font-size:2rem; color:#dc2626; }
.download-icon-lg { font-size:3rem; color:#dc2626; flex-shrink:0; }

@media (max-width:575px) {
  .nec2026-banner-inner { gap:.5rem; }
  .nec2026-text { font-size:.78rem; }
  .hiw-num { width:44px; height:44px; font-size:1.2rem; }
  .cat-rich-below h2 { font-size:1.05rem; }
  .download-icon-lg { font-size:2rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PLAN 06 — ELECTRICIAN MATH CATEGORY (GROUPED DISPLAY)
   ═══════════════════════════════════════════════════════════════════════════ */

.math-group-header {
  display:flex;
  align-items:center;
  gap:1rem;
  padding:1rem 1.25rem;
  border-left:5px solid #6366f1;
  border-radius:0 10px 10px 0;
  background:#f5f3ff;
}
.math-group-icon {
  width:44px;
  height:44px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  color:#fff;
  font-size:1.1rem;
}
.math-group-info { flex:1; min-width:0; }
.math-group-title { font-size:1rem; font-weight:700; line-height:1.3; }
.math-group-meta { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem; margin-top:.35rem; }
.math-formula-chip {
  background:#fff;
  border:1px solid #d1d5db;
  border-radius:5px;
  padding:.15rem .5rem;
  font-size:.72rem;
  font-family:ui-monospace,monospace;
  color:#1e293b;
  white-space:nowrap;
}
.math-nec-ref { font-size:.72rem; color:#6b7280; white-space:nowrap; }
.math-steps-chip { font-size:.7rem; background:#e0f2fe; color:#0369a1; border-radius:20px; padding:.1rem .5rem; }
.math-calc-chip { font-size:.7rem; border-radius:20px; padding:.1rem .5rem; }
.math-calc-chip.calc-yes { background:#d1fae5; color:#065f46; }
.math-calc-chip.calc-no  { background:#fee2e2; color:#991b1b; }
.math-group-count {
  font-size:.8rem; font-weight:600; color:#6b7280;
  background:#fff; border:1px solid #e5e7eb; border-radius:20px;
  padding:.25rem .75rem; white-space:nowrap;
}
.math-quiz-card {
  display:block; background:#fff;
  border:1.5px solid var(--math-color,#6366f1);
  border-top:4px solid var(--math-color,#6366f1);
  border-radius:10px; padding:1rem 1.1rem;
  transition:box-shadow .15s,transform .15s; height:100%;
}
.math-quiz-card:hover { box-shadow:0 6px 20px rgba(0,0,0,.1); transform:translateY(-2px); }
.math-card-top {
  display:flex; align-items:flex-start;
  justify-content:space-between; gap:.5rem; margin-bottom:.6rem;
}
.math-card-formula {
  font-family:ui-monospace,monospace; font-size:.7rem;
  background:var(--math-bg,#f5f3ff); color:#374151;
  padding:.2rem .55rem; border-radius:5px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  max-width:75%; border:1px solid #e5e7eb;
}
.math-card-badge {
  font-size:.65rem; font-weight:700;
  background:#fef3c7; color:#92400e;
  border:1px solid #fde68a; border-radius:4px;
  padding:.1rem .4rem; white-space:nowrap; flex-shrink:0;
}
.math-card-title { font-size:.9rem; font-weight:700; color:#111827; margin:0 0 .4rem; line-height:1.4; }
.math-card-desc { font-size:.78rem; color:#6b7280; margin-bottom:.6rem; line-height:1.5; }
.math-card-stats { display:flex; gap:.75rem; font-size:.72rem; color:#6b7280; margin-bottom:.7rem; }
.math-card-stats i { margin-right:.2rem; }
.math-card-cta { font-size:.78rem; font-weight:600; color:var(--math-color,#6366f1); display:flex; align-items:center; }
.math-tools-callout { background:#faf5ff; border:1.5px solid #d8b4fe; border-radius:10px; padding:1rem 1.25rem; }

@media(max-width:575px) {
  .math-group-header { flex-wrap:wrap; gap:.6rem; }
  .math-group-count { margin-left:auto; }
  .math-card-formula { max-width:60%; }
}

/* ── EPA 608 segmented sections (left info panel / right quiz grid) ── */
.epa-nav-tabs {
  display:flex; flex-wrap:wrap; gap:.5rem; background:#fff; border:1px solid var(--gray-200);
  border-radius:.6rem; padding:.65rem .75rem; margin-bottom:1.5rem;
}
.epa-nav-tab {
  font-size:.8rem; font-weight:700; text-decoration:none; border-radius:99px;
  padding:.4rem .95rem; border:1.5px solid; transition:transform .12s, box-shadow .12s;
}
.epa-nav-tab:hover { transform:translateY(-1px); box-shadow:0 3px 8px rgba(0,0,0,.08); }

.epa-section { scroll-margin-top:1.25rem; }
.epa-section-panel {
  background:#fff; border:1px solid var(--gray-200); border-left:5px solid;
  border-radius:.75rem; padding:1.4rem 1.5rem; height:100%;
  box-shadow:0 1px 4px rgba(15,23,42,.05);
}
.epa-section-badge {
  display:inline-block; font-size:.7rem; font-weight:700;
  border-radius:99px; padding:.28rem .8rem; margin-bottom:.7rem;
  border:1px solid currentColor;
}
.epa-section-title { font-size:1.35rem; font-weight:800; margin:0 0 .4rem; }
.epa-section-format {
  display:inline-flex; align-items:center; font-size:.78rem; font-weight:700;
  color:var(--gray-700); background:var(--gray-100); border-radius:.4rem;
  padding:.35rem .65rem; margin-bottom:1rem;
}
.epa-section-body p { font-size:.87rem; color:var(--gray-700); line-height:1.7; margin-bottom:.75rem; }
.epa-section-body ul { padding-left:1.15rem; margin-bottom:0; font-size:.85rem; color:var(--gray-700); }
.epa-section-body ul li { margin-bottom:.4rem; }
.epa-section-body strong { color:var(--gray-900); }
.epa-universal-cta {
  background:#fef2f2; border:1px solid #fecaca; border-radius:.75rem;
  padding:1.4rem; font-size:.87rem; color:var(--gray-700); height:100%;
  display:flex; flex-direction:column; justify-content:center;
}

@media(max-width:991px) {
  .epa-section-panel { margin-bottom:0; }
  .epa-nav-tabs { padding:.5rem; gap:.4rem; }
  .epa-nav-tab { font-size:.75rem; padding:.35rem .75rem; }
}

/* ── NEC Edition by State widget ────────────────────────────────────────── */
.nec-widget {
  background:#fff; border:1px solid var(--gray-200); border-radius:14px;
  padding:1.6rem; box-shadow:0 1px 4px rgba(15,23,42,.05);
}
.nec-widget-compact { margin-bottom:1.75rem; }
.nec-widget-head {
  display:flex; align-items:flex-start; justify-content:space-between;
  gap:1rem; flex-wrap:wrap; margin-bottom:1.1rem;
}
.nec-widget-title {
  font-size:1.15rem; font-weight:800; color:var(--gray-900); margin:0 0 .3rem;
  display:flex; align-items:center; gap:.5rem;
}
.nec-widget-title .bi { color:#eda100; }
.nec-widget-sub { font-size:.85rem; color:var(--gray-500); margin:0; }
.nec-widget-more {
  font-size:.82rem; font-weight:700; color:var(--primary-600); text-decoration:none;
  white-space:nowrap; display:inline-flex; align-items:center; gap:.3rem;
  transition:gap .12s;
}
.nec-widget-more:hover { gap:.5rem; color:var(--primary-700); }

/* controls row: search + edition tabs */
.nec-controls {
  display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; margin-bottom:1.1rem;
}
.nec-search {
  flex:1 1 220px; max-width:280px; position:relative;
}
.nec-search input {
  width:100%; padding:.55rem .9rem .55rem 2.1rem; border:1px solid var(--gray-300);
  border-radius:99px; font-size:.85rem; transition:border-color .12s, box-shadow .12s;
}
.nec-search input:focus {
  outline:none; border-color:var(--primary-600); box-shadow:0 0 0 3px var(--primary-50);
}
.nec-search .bi { position:absolute; left:.8rem; top:50%; transform:translateY(-50%); color:var(--gray-400); font-size:.85rem; }

.nec-tabs { display:flex; gap:.4rem; flex-wrap:wrap; }
.nec-tab {
  border:1.5px solid var(--gray-200); background:#fff; color:var(--gray-600);
  border-radius:99px; padding:.4rem .9rem; font-size:.78rem; font-weight:700;
  cursor:pointer; transition:transform .12s, box-shadow .12s, border-color .12s, background .12s, color .12s;
  white-space:nowrap;
}
.nec-tab:hover { transform:translateY(-1px); box-shadow:0 3px 8px rgba(0,0,0,.07); }
.nec-tab.active { border-color:transparent; color:#fff; }
.nec-tab[data-edition="all"].active  { background:var(--gray-700); }
.nec-tab[data-edition="2026"].active { background:#1baf7a; }
.nec-tab[data-edition="2023"].active { background:#2a78d6; }
.nec-tab[data-edition="2020"].active { background:#eda100; }
.nec-tab[data-edition="2017"].active { background:#e34948; }

/* edition badge */
.nec-edition-badge {
  display:inline-flex; align-items:center; gap:.3rem; border-radius:99px;
  padding:.22rem .7rem; font-size:.74rem; font-weight:700;
}
.nec-edition-2026 { background:#ecfdf5; color:#047857; }
.nec-edition-2023 { background:#eff6ff; color:#1d4ed8; }
.nec-edition-2020 { background:#fffbeb; color:#b45309; }
.nec-edition-2017 { background:#fef2f2; color:#b91c1c; }
.nec-edition-none { background:var(--gray-100); color:var(--gray-500); }
.nec-edition-badge .bi { font-size:.65rem; }

/* stat tiles (full page only) */
.nec-stats { display:flex; gap:.75rem; flex-wrap:wrap; margin-bottom:1.25rem; }
.nec-stat-tile {
  flex:1 1 120px; border-radius:10px; padding:.75rem .9rem; border:1px solid var(--gray-200);
  background:var(--gray-50);
}
.nec-stat-num { font-size:1.35rem; font-weight:800; color:var(--gray-900); line-height:1.1; }
.nec-stat-label { font-size:.72rem; color:var(--gray-500); font-weight:600; margin-top:.15rem; }

/* compact mode: chip grid */
.nec-chip-grid {
  display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:.6rem;
}
.nec-chip {
  border:1px solid var(--gray-200); border-left:4px solid var(--gray-300); border-radius:9px;
  padding:.65rem .8rem; text-decoration:none; display:block; background:#fff;
  transition:transform .12s, box-shadow .12s, border-color .12s;
}
.nec-chip:hover { transform:translateY(-2px); box-shadow:0 6px 16px rgba(15,23,42,.08); }
.nec-chip-2026 { border-left-color:#1baf7a; }
.nec-chip-2023 { border-left-color:#2a78d6; }
.nec-chip-2020 { border-left-color:#eda100; }
.nec-chip-2017 { border-left-color:#e34948; }
.nec-chip-none { border-left-color:var(--gray-300); }
.nec-chip-name { font-size:.85rem; font-weight:700; color:var(--gray-900); margin-bottom:.35rem; }
.nec-chip-name .bi { font-size:.7rem; color:var(--primary-600); float:right; opacity:0; transition:opacity .12s; }
.nec-chip:hover .nec-chip-name .bi { opacity:1; }
.nec-chip-cta {
  display:block; margin-top:.45rem; padding-top:.45rem; border-top:1px solid var(--gray-100);
  font-size:.7rem; font-weight:600; color:var(--primary-600);
}
.nec-chip.is-hidden { display:none; }

/* full mode: table */
.nec-table-wrap { overflow-x:auto; border:1px solid var(--gray-200); border-radius:10px; }
.nec-table { width:100%; border-collapse:collapse; font-size:.84rem; }
.nec-table thead th {
  position:sticky; top:0; background:var(--gray-50); text-align:left; padding:.65rem .8rem;
  color:var(--gray-500); font-weight:700; font-size:.72rem; text-transform:uppercase;
  letter-spacing:.03em; border-bottom:2px solid var(--gray-200); cursor:pointer; user-select:none;
  white-space:nowrap;
}
.nec-table thead th:hover { color:var(--primary-600); }
.nec-table thead th .bi { font-size:.65rem; margin-left:.2rem; opacity:.5; }
.nec-table tbody tr { border-bottom:1px solid var(--gray-100); transition:background .1s; }
.nec-table tbody tr:hover { background:var(--primary-50); }
.nec-table tbody tr.is-hidden { display:none; }
.nec-table td { padding:.6rem .8rem; vertical-align:top; }
.nec-table td.nec-td-state { font-weight:700; color:var(--gray-900); white-space:nowrap; }
.nec-table td.nec-td-notes { color:var(--gray-500); font-size:.78rem; max-width:340px; }
.nec-table td.nec-td-scope { color:var(--gray-500); text-transform:capitalize; }
.nec-pending-note { font-size:.7rem; color:var(--gray-400); margin-top:.2rem; }
.nec-confidence-dot {
  display:inline-block; width:6px; height:6px; border-radius:50%; margin-right:.35rem;
}
.nec-confidence-verified   { background:#1baf7a; }
.nec-confidence-reported   { background:var(--gray-300); }
.nec-confidence-unverified { background:#eda100; }

.nec-empty-state { text-align:center; padding:2rem 1rem; color:var(--gray-400); font-size:.85rem; }

.nec-footnote {
  font-size:.75rem; color:var(--gray-400); margin:1rem 0 0; line-height:1.6;
}

@media(max-width:575px) {
  .nec-chip-grid { grid-template-columns:repeat(auto-fill, minmax(130px, 1fr)); }
  .nec-controls { flex-direction:column; align-items:stretch; }
  .nec-search { max-width:none; }
}

/* ── Flashcards: study-card UI (shared by show.php + daily.php) ── */
.fc-header      { text-align:center; margin-bottom:1.75rem; }
.fc-cat-badge   { display:inline-flex; align-items:center; font-size:.75rem; font-weight:700; padding:.32rem .8rem;
                  border-radius:99px; margin-bottom:.75rem; box-shadow:0 1px 2px rgba(15,23,42,.04); }
.fc-cat-badge-sm { font-size:.7rem; padding:.24rem .6rem; margin-bottom:0; }
.fc-title       { font-size:1.85rem; font-weight:800; color:#0f172a; margin:0 0 .5rem; }
.fc-desc        { color:#64748b; font-size:.95rem; max-width:620px; margin:0 auto; }
.fc-pro-chip    { display:inline-flex; align-items:center; gap:.25rem;
                  background:linear-gradient(135deg,#1e293b,#334155); color:#fde68a;
                  font-size:.65rem; font-weight:800; padding:.15rem .5rem; border-radius:99px; margin-left:.4rem; }
.fc-header-actions { display:flex; flex-wrap:wrap; gap:.5rem; justify-content:flex-start; margin-top:.9rem; }
.fc-mini-stat   { display:inline-flex; align-items:center; gap:.3rem; background:#f1f5f9; color:#475569;
                  font-size:.76rem; font-weight:600; padding:.32rem .7rem; border-radius:99px;
                  box-shadow:0 1px 2px rgba(15,23,42,.04); }
.fc-mini-stat-challenge { background:#eff6ff; color:#1d4ed8; }
.fc-mini-stat-link { text-decoration:none; transition:background .15s; }
.fc-mini-stat-link:hover { background:#e2e8f0; color:#1e293b; }

.fc-study       { max-width:660px; margin:0 auto; }
.fc-progressbar { height:8px; background:#e2e8f0; border-radius:99px; overflow:hidden; margin-bottom:.6rem; }
.fc-progressbar-fill { height:100%; width:0%; border-radius:99px; transition:width .3s ease;
                  background:linear-gradient(90deg, rgba(var(--accent-rgb),.7), var(--accent));
                  box-shadow:0 0 10px rgba(var(--accent-rgb),.55); }
.fc-meta-row    { display:flex; justify-content:space-between; align-items:center;
                  font-size:.8rem; color:#64748b; margin-bottom:1rem; }
.fc-stats       { display:flex; gap:.85rem; }
.fc-stat        { display:flex; align-items:center; gap:.3rem; font-weight:600; }
.fc-stat-know   { color:#16a34a; }
.fc-stat-learning { color:#d97706; }
.fc-pop         { animation:fc-pop .35s cubic-bezier(.34,1.6,.64,1); }
@keyframes fc-pop { 0% { transform:scale(1); } 35% { transform:scale(1.35); } 100% { transform:scale(1); } }

.fc-card-wrap   { perspective:1400px; margin-bottom:1.25rem; }
/* Grid-stack (not absolute positioning) so the card's height tracks whichever
   face has more content — a long answer no longer clips past the box. */
.fc-card        { position:relative; display:grid; width:100%; min-height:360px; cursor:pointer;
                  transform-style:preserve-3d; transition:transform .55s cubic-bezier(.34,1.2,.44,1); }
.fc-card:hover  { transform:translateY(-2px); }
.fc-card.flipped:hover { transform:rotateY(180deg) translateY(-2px); }
.fc-card.flipped { transform:rotateY(180deg); }
.fc-anim-in     { animation:fc-card-in .32s cubic-bezier(.2,.7,.3,1); }
.fc-card:focus-visible { outline:3px solid var(--accent); outline-offset:4px; border-radius:20px; }
@keyframes fc-card-in { from { opacity:0; transform:translateY(10px) scale(.98); } to { opacity:1; transform:translateY(0) scale(1); } }
.fc-face        { grid-area:1 / 1; position:relative; overflow-y:auto; max-height:min(65vh,580px);
                  backface-visibility:hidden; -webkit-backface-visibility:hidden;
                  border-radius:24px; padding:2.75rem 2.25rem 3rem; display:flex; flex-direction:column;
                  align-items:center; justify-content:center; text-align:center;
                  box-shadow:0 22px 48px -14px rgba(var(--accent-rgb),.5), 0 4px 14px rgba(15,23,42,.07);
                  border:2px solid rgba(var(--accent-rgb),.3); background:#fff;
                  transition:box-shadow .2s ease; isolation:isolate; }
/* Solid accent bar across the top so the card reads as "branded" at a glance */
.fc-face::after { content:''; position:absolute; top:0; left:0; right:0; height:7px; z-index:2;
                  background:linear-gradient(90deg, var(--accent), rgba(var(--accent-rgb),.6));
                  border-radius:24px 24px 0 0; }
.fc-face-front  { background:radial-gradient(130% 130% at 100% 0%, rgba(var(--accent-rgb),.24), transparent 55%),
                  linear-gradient(160deg,#fff 0%,rgba(var(--accent-rgb),.08) 100%); }
.fc-face-back   { transform:rotateY(180deg);
                  background:radial-gradient(130% 130% at 0% 100%, rgba(var(--accent-rgb),.22), transparent 55%),
                  linear-gradient(160deg,#fff 0%,rgba(var(--accent-rgb),.08) 100%); }
/* Diagonal sheen that sweeps across the active face right after a flip */
.fc-face::before { content:''; position:absolute; inset:0; pointer-events:none; z-index:1;
                  background:linear-gradient(115deg,transparent 40%,rgba(255,255,255,.55) 50%,transparent 60%);
                  background-size:220% 220%; background-position:120% 0; opacity:0; }
.fc-card.flipped .fc-face-back::before,
.fc-card:not(.flipped) .fc-face-front::before { animation:fc-sheen .7s ease-out .05s; }
@keyframes fc-sheen { 0% { background-position:120% 0; opacity:0; } 15% { opacity:1; } 100% { background-position:-20% 0; opacity:0; } }
.fc-face-label  { display:inline-flex; font-size:.7rem; font-weight:800; text-transform:uppercase; letter-spacing:.08em;
                  color:#fff; background:var(--accent); padding:.32rem .85rem;
                  border-radius:99px; margin-bottom:1.35rem; box-shadow:0 4px 10px -3px rgba(var(--accent-rgb),.5); }
.fc-face-body   { font-size:1.55rem; font-weight:700; color:#0f172a; line-height:1.45; }
.fc-face-back .fc-face-body { font-size:1.2rem; font-weight:550; color:#334155; }
.fc-tap-hint    { position:absolute; bottom:1rem; left:0; right:0; font-size:.75rem; color:#94a3b8; }
.fc-nec-ref     { position:absolute; bottom:1rem; left:0; right:0; font-size:.75rem; font-family:monospace; color:var(--accent); font-weight:700; }

@media (prefers-reduced-motion: reduce) {
  .fc-card, .fc-card.flipped, .fc-card:hover, .fc-progressbar-fill, .fc-mark-btn, .fc-nav-btn { transition:none !important; }
  .fc-card { animation:none !important; }
  .fc-face::before { animation:none !important; }
}

.fc-mark-row    { display:flex; gap:.6rem; margin-bottom:1rem; }
.fc-mark-btn    { flex:1; border:none; border-radius:12px; padding:.8rem; font-weight:700; font-size:.88rem;
                  color:#fff; display:flex; align-items:center; justify-content:center; gap:.4rem;
                  transition:transform .15s ease, box-shadow .15s ease, filter .15s ease; }
.fc-mark-btn:hover { transform:translateY(-2px); filter:brightness(1.05); }
.fc-mark-btn:active { transform:scale(.97); }
.fc-mark-learning { background:linear-gradient(135deg,#fbbf24,#f59e0b); box-shadow:0 6px 16px -6px rgba(245,158,11,.6); }
.fc-mark-know     { background:linear-gradient(135deg,#34d399,#059669); box-shadow:0 6px 16px -6px rgba(5,150,105,.55); }

.fc-nav-row     { display:flex; align-items:center; justify-content:center; gap:.6rem; margin-bottom:.6rem; }
.fc-nav-btn     { background:#fff; border:1px solid #e2e8f0; border-radius:99px; padding:.55rem .95rem;
                  color:#334155; font-weight:600; font-size:.85rem; display:flex; align-items:center; gap:.3rem;
                  transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease, color .12s ease; }
.fc-nav-btn:hover { border-color:var(--accent); color:var(--accent); transform:translateY(-1px);
                  box-shadow:0 4px 10px -4px rgba(var(--accent-rgb),.4); }
.fc-nav-btn-flip { flex:0 0 auto; padding-left:1.2rem; padding-right:1.2rem; border:none; color:#fff;
                  background:linear-gradient(135deg, rgba(var(--accent-rgb),.85), var(--accent));
                  box-shadow:0 6px 16px -6px rgba(var(--accent-rgb),.6); }
.fc-nav-btn-flip:hover { color:#fff; filter:brightness(1.08); box-shadow:0 8px 18px -6px rgba(var(--accent-rgb),.65); }
.fc-kbd-hint    { text-align:center; font-size:.72rem; color:#94a3b8; margin-top:.5rem; }
.fc-kbd-hint kbd { background:#f1f5f9; border:1px solid #e2e8f0; border-radius:4px; padding:0 .35rem; font-size:.7rem; }

.fc-summary     { max-width:520px; margin:0 auto; text-align:center; background:#fff; border-radius:20px;
                  padding:2.5rem 2rem; box-shadow:0 16px 36px -14px rgba(245,158,11,.35), 0 2px 8px rgba(15,23,42,.06);
                  border:1px solid #fde68a; }
.fc-summary-icon { display:inline-flex; align-items:center; justify-content:center; width:64px; height:64px;
                  border-radius:50%; font-size:1.7rem; color:#fff; margin-bottom:1rem;
                  background:linear-gradient(135deg,#fde68a,#f59e0b); box-shadow:0 10px 22px -6px rgba(245,158,11,.55); }
.fc-summary h2  { font-size:1.4rem; font-weight:800; color:#0f172a; margin-bottom:.5rem; }
.fc-summary p   { color:#64748b; margin-bottom:1.5rem; }
.fc-summary-actions { display:flex; flex-direction:column; gap:.6rem; }

/* ── Flashcards: deck show page — sidebar layout add-ons ── */
.fc-side-card   { border-top:3px solid var(--accent); }
.fc-print-btn   { display:flex; align-items:center; justify-content:center; width:100%; padding:.75rem;
                  border-radius:.6rem; text-decoration:none; font-weight:700; font-size:.9rem; color:#fff;
                  background:linear-gradient(135deg, rgba(var(--accent-rgb),.85), var(--accent));
                  box-shadow:0 6px 16px -6px rgba(var(--accent-rgb),.55);
                  transition:transform .12s ease, filter .12s ease; }
.fc-print-btn:hover { color:#fff; filter:brightness(1.06); transform:translateY(-1px); }
.fc-more-decks-link { display:inline-flex; align-items:center; font-size:.83rem; font-weight:600;
                  color:var(--gray-500); text-decoration:none; }
.fc-more-decks-link:hover { color:var(--accent); }

@media (max-width:767px) {
  .fc-card      { min-height:300px; }
  .fc-face      { padding:2rem 1.5rem 2.5rem; }
  .fc-face-body { font-size:1.3rem; }
  .fc-face-back .fc-face-body { font-size:1.05rem; }
}

@media (max-width:480px) {
  .fc-card      { min-height:270px; }
  .fc-face      { padding:1.6rem 1.25rem 2.1rem; }
  .fc-face-body { font-size:1.15rem; }
  .fc-face-back .fc-face-body { font-size:.98rem; }
  .fc-title     { font-size:1.5rem; }
}

/* ── Flashcards: badge-earned toast (shared by show.php + daily.php via flashcards.js) ── */
.fc-badge-toast {
  position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 1080;
  display: flex; align-items: center; gap: .75rem;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  padding: .85rem 1.1rem; box-shadow: 0 10px 30px rgba(15,23,42,.18);
  font-size: .85rem; color: #1e293b; max-width: 300px;
  transform: translateY(12px); opacity: 0; transition: transform .3s cubic-bezier(.34,1.4,.44,1), opacity .3s ease;
}
.fc-badge-toast.is-shown { transform: translateY(0); opacity: 1; }
.fc-badge-toast i { font-size: 1.5rem; color: #f59e0b; flex-shrink: 0; }
.fc-badge-share-btn {
  margin-top: .3rem; border: none; background: #f1f5f9; color: #475569;
  font-size: .72rem; font-weight: 600; padding: .2rem .55rem; border-radius: 6px;
}
.fc-badge-share-btn:hover { background: #e2e8f0; color: #1e293b; }
@media (prefers-reduced-motion: reduce) {
  .fc-badge-toast { transition: none; }
}

/* ── Auth split layout (login) ──────────────────────────────────────────── */
.auth-split {
  display: flex; min-height: calc(100vh - 300px);
}
.auth-split-left {
  flex: 1 1 46%; display: flex; align-items: center;
  background: linear-gradient(135deg,#1e3a5f 0%,#2563eb 100%);
  padding: 4rem 3.5rem; position: relative; overflow: hidden;
}
.auth-split-left::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 85% 15%, rgba(255,255,255,.08) 0, transparent 55%);
  pointer-events: none;
}
.auth-split-left-inner { max-width: 440px; margin: 0 auto; position: relative; }
.auth-brand {
  display: flex; align-items: center; gap: .5rem; color: #fff; font-weight: 700;
  font-size: 1.05rem; margin-bottom: 2.5rem;
}
.auth-brand i { color: #93c5fd; }
.auth-split-heading {
  color: #fff; font-size: 2rem; font-weight: 800; line-height: 1.25;
  letter-spacing: -.01em; margin-bottom: 1rem;
}
.auth-split-sub { color: rgba(255,255,255,.75); font-size: 1rem; line-height: 1.6; margin-bottom: 2rem; }
.auth-feature-list { list-style: none; padding: 0; margin: 0 0 2.5rem; }
.auth-feature-list li {
  display: flex; align-items: center; gap: .65rem; color: rgba(255,255,255,.92);
  font-size: .92rem; padding: .5rem 0;
}
.auth-feature-list i { color: #4ade80; font-size: 1.05rem; flex-shrink: 0; }
.auth-stat {
  display: inline-flex; flex-direction: column; gap: .1rem;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  border-radius: 12px; padding: .9rem 1.3rem;
}
.auth-stat-num { color: #fff; font-size: 1.4rem; font-weight: 800; line-height: 1; }
.auth-stat-label { color: rgba(255,255,255,.6); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }

.auth-split-right {
  flex: 1 1 54%; min-width: 0; display: flex; align-items: center; justify-content: center;
  background: #fff; padding: 3rem 2rem;
}
.auth-split-right-inner { width: 100%; max-width: 380px; }

@media (max-width: 991px) {
  .auth-split-left { display: none; }
  .auth-split-right { flex: 1 1 100%; }
}
@media (max-width: 480px) {
  .auth-split-right { padding: 2.5rem 1.25rem; }
}

/* ── NATE hub (/category/nate) + section switcher on /category/nate_* ─────── */
.nate-group-title { font-size: 1rem; font-weight: 700; color: var(--gray-800); margin-bottom: .75rem; }
.nate-sec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .85rem; }
.nate-sec-card {
  display: flex; align-items: flex-start; gap: .8rem; padding: 1rem 1.1rem;
  background: #fff; border: 1.5px solid var(--gray-200); border-left: 4px solid var(--sec);
  border-radius: .75rem; text-decoration: none; color: var(--gray-800);
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.nate-sec-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.08); border-color: var(--sec); color: var(--gray-900); }
.nate-sec-icon {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: var(--sec); background: color-mix(in srgb, var(--sec) 12%, #fff);
}
.nate-sec-body  { display: flex; flex-direction: column; gap: .15rem; min-width: 0; flex: 1; }
.nate-sec-name  { font-weight: 700; font-size: .95rem; }
.nate-sec-meta  { font-size: .74rem; font-weight: 600; color: var(--sec); }
.nate-sec-blurb { font-size: .8rem; color: var(--gray-600); line-height: 1.4; }
.nate-sec-go    { color: var(--gray-400); align-self: center; transition: transform .12s, color .12s; }
.nate-sec-card:hover .nate-sec-go { color: var(--sec); transform: translateX(3px); }

.nate-switcher { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.nate-switch-btn {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 38px; padding: .35rem .85rem;
  border: 1.5px solid var(--gray-200); border-radius: 99px; background: #fff;
  font-size: .82rem; font-weight: 600; color: var(--gray-700); text-decoration: none;
}
.nate-switch-btn:hover { border-color: var(--primary-600); color: var(--primary-700); }
.nate-switch-btn.active { background: var(--primary-600); border-color: var(--primary-600); color: #fff; }
.nate-switch-btn .n { font-size: .7rem; opacity: .75; }
@media (max-width: 480px) {
  .nate-sec-grid { grid-template-columns: 1fr; }
  .nate-switcher { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .25rem; -webkit-overflow-scrolling: touch; }
  .nate-switch-btn { flex-shrink: 0; min-height: 44px; }
}

/* ── Home: hero sub-heading + HVAC/EPA 608/NATE SEO block ─────────────────── */
.hero-heading-sub {
  display: block; margin-top: .45rem; font-size: clamp(1rem, 2.4vw, 1.45rem);
  font-weight: 600; letter-spacing: 0; color: rgba(255,255,255,.82);
}
.hvac-seo-section { background: #fff; border-top: 1px solid var(--gray-200); }
.hvac-seo-card {
  padding: 1.35rem 1.4rem; border: 1px solid var(--gray-200); border-radius: .85rem; background: var(--gray-50);
  display: flex; flex-direction: column;
}
.hvac-seo-card p { flex: 1; }
.hvac-seo-step { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-500); margin-bottom: .4rem; }
.hvac-seo-link { font-weight: 600; font-size: .88rem; text-decoration: none; }
.hvac-seo-link:hover { text-decoration: underline; }
.hvac-seo-list { padding-left: 1.1rem; color: var(--gray-700); font-size: .92rem; }
.hvac-seo-list li { margin-bottom: .45rem; }

/* ── Site videos (site_video() helper; Admin → Pricing → Site Videos) ── */
.site-video-section { padding: 2.5rem 0 1rem; }
.site-video-wrap { max-width: 860px; margin: 1.5rem auto; }
.site-video-heading { font-size: 1.35rem; font-weight: 800; text-align: center; margin: 0 0 1rem; }
.site-video { margin: 0 0 1rem; }
.site-video-play, .site-video-frame {
  display: block; position: relative; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0;
  border-radius: 14px; overflow: hidden; background: #0b1220; box-shadow: 0 12px 32px rgba(15, 23, 42, .18);
}
.site-video-play { cursor: pointer; }
.site-video-play img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease, filter .3s ease; }
.site-video-play:hover img, .site-video-play:focus-visible img { transform: scale(1.03); filter: brightness(.85); }
.site-video-btn {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: #fbbf24; color: #0b1220; font-size: 2.4rem;
  box-shadow: 0 0 0 8px rgba(251, 191, 36, .25), 0 8px 24px rgba(0, 0, 0, .35); transition: transform .2s ease;
}
.site-video-btn i { margin-left: 4px; }
.site-video-play:hover .site-video-btn { transform: scale(1.08); }
.site-video-len {
  position: absolute; right: 10px; bottom: 10px; padding: 2px 8px; border-radius: 6px; font-size: .8rem; font-weight: 700;
  color: #fff; background: rgba(0, 0, 0, .75);
}
.site-video-caption { margin-top: .5rem; font-size: .9rem; font-weight: 600; color: #475569; text-align: center; }
.site-video-caption i { color: #ef4444; }
@media (max-width: 767px) {
  .site-video-wrap { margin: 1rem auto; }
  .site-video-btn { width: 60px; height: 60px; margin: -30px 0 0 -30px; font-size: 2rem; }
}
