/*
Theme Name: Campus Achievers
Theme URI: https://campusachievers.com
Author: Campus Achievers
Author URI: https://campusachievers.com
Description: Professional educational theme for Campus Achievers placement test platform. Includes built-in test engine with timer, fullscreen, and tab-switch detection.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: campus-achievers
Tags: education, e-learning, placement, tests
*/

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Lora:ital,wght@0,400;0,600;1,400&display=swap');

/* ── FORCE LIGHT MODE — ignore OS/browser dark mode ── */

/* ── CSS Variables ── */
:root {
  color-scheme: only light;
  --navy:        #0B1F4B;
  --blue:        #1B3A8C;
  --blue-mid:    #2952C4;
  --orange:      #E8581A;
  --orange-light:#FFF4EF;
  --orange-mid:  #F97316;
  --bg:          #F5F7FF;
  --bg-card:     #FFFFFF;
  --text:        #1A1A2E;
  --text-muted:  #6B7280;
  --border:      #E2E8F8;
  --success:     #16A34A;
  --danger:      #DC2626;
  --warning:     #D97706;
  --radius:      14px;
  --radius-sm:   8px;
  --shadow:      0 4px 28px rgba(11,31,75,.10);
  --shadow-lg:   0 12px 48px rgba(11,31,75,.16);
  --font:        'Outfit', sans-serif;
  --font-serif:  'Lora', serif;
  --header-h:    80px;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  color-scheme: only light; /* block Brave element-level dark mode */
}
/* Prevent Brave's CSS filter (invert/hue-rotate) on html & body */
html, body { -webkit-filter: none !important; filter: none !important; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; transition: color .2s; }
a:hover { color: var(--orange); }
ul { list-style: none; }

/* ── Layout ── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }

/* ══════════════════════════════════════════
   HEADER / NAV
══════════════════════════════════════════ */
#site-header {
  background: rgba(11,31,75,.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  height: var(--header-h);
  display: flex;
  align-items: stretch;
  overflow: visible;
}
.header-container {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 0;
  overflow: visible;
  position: relative;
}

/* ── Logo ── */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.3px;
  text-decoration: none;
  flex-shrink: 0;
  line-height: 1;
}
.site-logo:hover { color: white; }
.logo-icon {
  width: 38px; height: 38px;
  background: var(--orange);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(232,88,26,.35);
}
.site-logo-img {
  width: 36px; height: 36px;
  border-radius: 50%; object-fit: cover; flex-shrink: 0;
}

.nav-icon {
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}
.nav-label { line-height: 1; }
.nav-cta {
  background: var(--orange) !important;
  color: white !important;
  font-weight: 700 !important;
  padding: 9px 16px !important;
  border-radius: 8px !important;
}
.nav-cta:hover { background: #c94910 !important; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(232,88,26,.4); }

/* ── Header right group ── */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
  overflow: visible;
  position: relative;
}

/* search removed */

/* ── Mobile menu toggle ── */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px;
  cursor: pointer;
  padding: 9px 10px;
  width: 44px; height: 44px;
  min-width: 44px; min-height: 44px;
  justify-content: center;
  align-items: center;
  pointer-events: auto;
  -webkit-tap-highlight-color: rgba(255,255,255,.15);
  touch-action: manipulation;
  position: relative;
  z-index: 100000;
  -webkit-appearance: none;
  appearance: none;
  flex-shrink: 0;
}
.menu-toggle span {
  display: block;
  width: 18px; height: 2px;
  background: white;
  border-radius: 2px;
  transition: all .25s;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Nav user ── */
.nav-user {
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 40px;
  padding: 5px 14px 5px 5px;
}
.nav-user-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--orange);
  color: white;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
  flex-shrink: 0;
}
.nav-user-info { display: flex; flex-direction: column; gap: 1px; }
.nav-user-name { color: white; font-size: .82rem; font-weight: 700; line-height: 1; }
.nav-logout { color: rgba(255,255,255,.45); font-size: .72rem; text-decoration: none; transition: color .2s; line-height: 1; }
.nav-logout:hover { color: rgba(255,255,255,.8); }
.nav-login-btn { white-space: nowrap; }
/* ── Profile dropdown ── */
.nav-profile-wrap {
  position: relative;
  flex-shrink: 0;
}
.nav-profile-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 40px;
  padding: 5px 14px 5px 5px;
  cursor: pointer;
  transition: background .2s;
  font-family: var(--font);
  outline: none;
}
.nav-profile-btn:hover { background: rgba(255,255,255,.14); }
.nav-profile-btn.open  { background: rgba(255,255,255,.18); }
/* New classes for the profile button text */
.nav-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--orange);
  color: white;
  font-weight: 800;
  font-size: .8rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-profile-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
}
.nav-profile-name { color: white; font-size: .82rem; font-weight: 700; line-height: 1.2; }
.nav-profile-sub  { color: rgba(255,255,255,.5); font-size: .7rem; line-height: 1.2; }
/* Hide text on mobile — avatar only */

.nav-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: 240px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(11,31,75,.25), 0 2px 8px rgba(11,31,75,.1);
  border: 1px solid #E2E8F8;
  overflow: visible;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 99999;
}
.nav-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
/* Arrow pointer */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -7px;
  right: 18px;
  width: 14px;
  height: 14px;
  background: #0B1F4B;
  transform: rotate(45deg);
  border-radius: 2px;
}

.nav-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, #0B1F4B, #1B3A8C);
  border-radius: 14px 14px 0 0;
  overflow: hidden;
}
.nd-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--orange);
  color: white;
  font-weight: 900;
  font-size: .88rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.25);
  line-height: 1;
}
.nd-name  { color: #ffffff; font-size: .9rem; font-weight: 700; line-height: 1.3; margin: 0; }
.nd-email { color: rgba(255,255,255,.55); font-size: .72rem; margin-top: 2px; display: block; }

.nav-dropdown-body { padding: 6px 8px; }
.nd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #0B1F4B;
  font-size: .88rem;
  font-weight: 600;
  transition: background .15s;
  line-height: 1;
}
.nd-item:hover { background: #F5F7FF; color: #0B1F4B; }
.nd-icon { font-size: .95rem; width: 22px; text-align: center; flex-shrink: 0; }

.nav-dropdown-footer {
  padding: 6px 8px 8px;
  border-top: 1px solid #E2E8F8;
  margin-top: 2px;
}
.nd-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #DC2626;
  font-size: .88rem;
  font-weight: 700;
  transition: background .15s;
  width: 100%;
  line-height: 1;
}
.nd-logout:hover { background: #FEF2F2; color: #DC2626; }

/* ══════════════════════════════════════════
   HERO
══════════════════════════════════════════ */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 55%, #2952C4 100%);
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 80px;
  background: var(--bg);
  clip-path: ellipse(55% 100% at 50% 100%);
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(232,88,26,.2);
  border: 1px solid rgba(232,88,26,.4);
  color: #FFA07A;
  font-size: .8rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.hero h1 {
  font-size: 3.2rem;
  font-weight: 900;
  color: white;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -.5px;
}
.hero h1 span { color: var(--orange); }
.hero p {
  color: rgba(255,255,255,.78);
  font-size: 1.1rem;
  margin-bottom: 36px;
  max-width: 480px;
  line-height: 1.75;
}
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.hero-stat-num {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--orange);
}
.hero-stat-label {
  font-size: .8rem;
  color: rgba(255,255,255,.7);
  text-transform: uppercase;
  letter-spacing: .5px;
}
@media (max-width: 768px) {
  /* Hero: stack to single column */
  .hero {
    padding: 60px 0 160px;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-visual {
    display: none; /* hide decorative card stack on mobile */
  }
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero p {
    font-size: 1rem;
    max-width: 100%;
  }
  .hero-btns {
    flex-direction: column;
  }
  .hero-btns .btn {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
  /* Hide hero stats on mobile — shown in stats strip below */
  .hero-stats {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.9rem; }
}
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-card-stack {
  position: relative;
  width: 340px;
  height: 340px;
}
.hero-mock-card {
  position: absolute;
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  padding: 20px 24px;
  color: white;
}
.hero-mock-card.card-1 { width: 280px; top: 0; left: 20px; }
.hero-mock-card.card-2 { width: 260px; bottom: 30px; right: 0; }
.card-tag {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--orange);
  margin-bottom: 8px;
}
.card-title { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.card-sub { font-size: .82rem; opacity: .65; margin-bottom: 16px; }
.card-bar { height: 6px; background: rgba(255,255,255,.15); border-radius: 3px; overflow: hidden; }
.card-bar-fill { height: 100%; background: var(--orange); border-radius: 3px; }
.card-timer-big { font-size: 2rem; font-weight: 900; color: #FFA07A; font-variant-numeric: tabular-nums; }
.card-timer-label { font-size: .78rem; opacity: .65; }

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  border: none;
  transition: all .2s;
  text-decoration: none;
  line-height: 1;
}
.btn-primary { background: var(--orange); color: white; }
.btn-primary:hover { background: #c94910; color: white; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(232,88,26,.35); }
.btn-secondary { background: white; color: var(--navy); }
.btn-secondary:hover { background: #f0f4ff; color: var(--navy); }
.btn-outline { background: transparent; color: white; border: 2px solid rgba(255,255,255,.4); }
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: white; color: white; }
.btn-navy { background: var(--navy); color: white; }
.btn-navy:hover { background: #0a1840; color: white; }
.btn-lg { padding: 15px 36px; font-size: 1.05rem; border-radius: 10px; }
.btn-sm { padding: 8px 18px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ══════════════════════════════════════════
   CARDS / FEATURES
══════════════════════════════════════════ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all .25s;
}
.feature-card:hover {
  border-color: var(--blue-mid);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.feature-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--orange-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 18px;
}
.feature-icon.blue-bg { background: #EEF2FF; }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.feature-card p { font-size: .9rem; color: var(--text-muted); line-height: 1.7; }

/* ══════════════════════════════════════════
   SECTION HEADINGS
══════════════════════════════════════════ */
.section-label {
  display: inline-block;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--orange);
  margin-bottom: 10px;
}
.section-title {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--navy);
  line-height: 1.2;
  letter-spacing: -.3px;
}
.section-title span { color: var(--orange); }

/* Dark background sections — force white text regardless of browser/dark-mode overrides */
.section-sm[style*="navy"] .section-title,
.section-sm[style*="linear-gradient"] .section-title,
.ca-dark-section .section-title { color: #ffffff !important; }
.section-sm[style*="navy"] .section-label,
.section-sm[style*="linear-gradient"] .section-label,
.ca-dark-section .section-label { color: rgba(255,200,150,.9) !important; }
.section-sm[style*="navy"] p,
.section-sm[style*="linear-gradient"] p,
.ca-dark-section p { color: rgba(255,255,255,.82) !important; }
.section-sub {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 12px;
  max-width: 540px;
}
.section-header { margin-bottom: 48px; }
.section-header.center { text-align: center; }
.section-header.center .section-sub { margin-left: auto; margin-right: auto; }

/* ══════════════════════════════════════════
   STATS STRIP
══════════════════════════════════════════ */
.stats-strip {
  background: var(--navy);
  padding: 48px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  text-align: center;
}
.stat-item {
  padding: 0 24px;
  border-right: 1px solid rgba(255,255,255,.1);
}
.stat-item:last-child { border-right: none; }
.stat-num { font-size: 2.6rem; font-weight: 900; color: white; line-height: 1; }
.stat-num span { color: var(--orange); }
.stat-label { font-size: .82rem; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .8px; margin-top: 6px; }
@media (max-width: 600px) {
  .stats-strip { padding: 36px 0; }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
  }
  .stat-item {
    padding: 20px 16px;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .stat-item:nth-child(odd)  { border-right: 1px solid rgba(255,255,255,.08); }
  .stat-item:nth-child(3),
  .stat-item:nth-child(4)    { border-bottom: none; }
  .stat-num { font-size: 2rem; }
}

/* ══════════════════════════════════════════
   TEST PLATFORM STYLES
══════════════════════════════════════════ */
.test-page-wrap { max-width: 900px; margin: 0 auto; padding: 0 24px; }

/* Instructions card */
.test-intro-card {
  background: var(--bg-card);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.test-intro-header {
  background: linear-gradient(135deg, var(--navy), var(--blue));
  padding: 40px 48px;
  color: white;
  text-align: center;
}
.test-intro-header .test-icon { font-size: 3rem; margin-bottom: 12px; }
.test-intro-header h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 6px; }
.test-intro-header p { opacity: .78; font-size: 1rem; }
.test-intro-body { padding: 36px 48px 40px; }
.test-meta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.test-meta-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 16px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--navy);
}
.instructions-box {
  background: #F8FAFF;
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px;
  margin-bottom: 28px;
}
.instructions-box h4 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.instructions-box ul li {
  font-size: .92rem;
  color: var(--text-muted);
  padding: 5px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}
.instructions-box ul li > span { display: inline; }
.instructions-box ul li strong { display: inline; font-weight: 700; color: var(--navy); }
.instructions-box ul li::before { content: '→'; color: var(--blue); font-weight: 700; flex-shrink: 0; }

@media (max-width: 600px) {
  .test-intro-header { padding: 28px 20px; }
  .test-intro-header h2 { font-size: 1.3rem; }
  .test-intro-body { padding: 20px 16px 24px; }
  .instructions-box { padding: 14px 16px; }
}

/* Test screen */
#screen-test { display: none; }
.test-topbar {
  background: var(--navy);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-title { color: rgba(255,255,255,.8); font-size: .9rem; font-weight: 600; }
#cat-timer {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 8px 20px;
  font-size: 1.4rem;
  font-weight: 900;
  color: white;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  transition: background .3s;
  border: 1px solid rgba(255,255,255,.12);
}
#cat-timer.urgent {
  background: var(--danger);
  border-color: #ef4444;
  animation: timerPulse 1s infinite;
}
@keyframes timerPulse { 0%,100%{opacity:1} 50%{opacity:.7} }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.warn-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: .82rem;
  color: rgba(255,255,255,.75);
  font-weight: 600;
}
.warn-badge.has-warnings { background: rgba(217,119,6,.2); border-color: rgba(217,119,6,.4); color: #FCD34D; }
.q-progress-text { font-size: .85rem; color: rgba(255,255,255,.6); font-weight: 600; }

/* Warning banner */
#cat-warn-banner {
  display: none;
  padding: 13px 24px;
  font-size: .9rem;
  font-weight: 600;
  animation: slideDown .3s ease;
}
#cat-warn-banner.show-warn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #FFFBEB;
  border-left: 4px solid var(--warning);
  color: #92400E;
}
#cat-warn-banner.show-danger {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #FEF2F2;
  border-left: 4px solid var(--danger);
  color: #991B1B;
}
@keyframes slideDown { from{opacity:0;transform:translateY(-8px)} to{opacity:1;transform:translateY(0)} }

/* Question body */
.test-body {
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 36px 40px 28px;
  min-height: 360px;
}
.q-label {
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--orange);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.q-marks-tag {
  background: var(--orange-light);
  color: var(--orange);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: .72rem;
}
.q-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.65;
  margin-bottom: 28px;
}
.options-list { display: flex; flex-direction: column; gap: 11px; }
.option-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all .18s;
  background: var(--bg-card);
  user-select: none;
}
.option-item:hover { border-color: var(--blue-mid); background: #F5F7FF; }
.option-item.selected { border-color: var(--blue); background: #EEF2FF; }
.option-item input[type=radio] { display: none; }
.opt-letter {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #EEF2FF;
  color: var(--navy);
  font-weight: 800;
  font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all .18s;
}
.option-item.selected .opt-letter { background: var(--blue); color: white; }
.opt-text { font-size: .95rem; color: var(--text); line-height: 1.45; }

/* Navigation footer */
.test-nav {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.btn-flag {
  background: var(--bg);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: .82rem;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all .15s;
}
.btn-flag:hover  { background: #fff7ed; border-color: #fb923c; color: #ea580c; }
.btn-flag.flagged { background: #fff7ed; border-color: #fb923c; color: #ea580c; }

/* ── Test area: body + palette ──────────────────────────────────────────── */
.test-area-wrap {
  display: flex;
  align-items: flex-start;
  position: relative;
  min-height: 0;
}
/* Main column wraps test-body + test-nav + test-submit-bar */
.test-main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  order: 1;
}

/* ── QUESTION PALETTE ───────────────────────────────────────────────────── */
.qpal {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-right: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  position: sticky;
  top: 64px;
  order: 2;
  transition: transform .25s ease, opacity .2s;
}
/* Hide palette by default on desktop until JS opens it */

.qpal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border);
  background: #f8faff;
  position: sticky; top: 0; z-index: 2;
}
.qpal-title { font-size: .85rem; font-weight: 700; color: var(--navy); }
.qpal-close-btn {
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  font-size: 1rem; line-height: 1; padding: 2px 6px; border-radius: 4px;
  display: none; /* hidden on desktop */
}

.qpal-legend {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 5px 10px; padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: #fafbff;
}
.qpal-legend-item { display: flex; align-items: center; gap: 5px; font-size: .72rem; color: var(--text-muted); }
.qpal-dot {
  width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0;
  border: 1.5px solid currentColor;
}
.qpal-dot-current    { background: var(--blue); border-color: var(--blue); color: var(--blue); }
.qpal-dot-answered   { background: #16a34a;     border-color: #16a34a;     color: #16a34a; }
.qpal-dot-flagged    { background: #ea580c;     border-color: #ea580c;     color: #ea580c; }
.qpal-dot-unanswered { background: var(--bg);   border-color: var(--border);color: var(--border); }

.qpal-progress-wrap {
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--border);
}
.qpal-progress-bar {
  height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 5px;
}
.qpal-progress-fill { height: 5px; background: #16a34a; border-radius: 3px; transition: width .3s; }
.qpal-progress-label { font-size: .72rem; color: var(--text-muted); text-align: center; }

/* Number grid */
.qpal-grid {
  padding: 10px 12px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  border-bottom: 1px solid var(--border);
}
.qpal-btn {
  width: 100%; aspect-ratio: 1;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all .15s;
  display: flex; align-items: center; justify-content: center;
  min-width: 0; padding: 0;
}
.qpal-btn:hover      { border-color: var(--blue); color: var(--blue); background: #eff6ff; }
.qpal-btn.qpal-current   { border-color: var(--blue); background: var(--blue); color: #fff; }
.qpal-btn.qpal-answered  { border-color: #16a34a;    background: #dcfce7;     color: #15803d; font-weight: 800; }
.qpal-btn.qpal-flagged   { border-color: #ea580c;    background: #fff7ed;     color: #ea580c; }
.qpal-btn.qpal-ans-flagged { border-color: #ea580c;  background: #ea580c;     color: #fff; }
.qpal-btn.qpal-current.qpal-answered { background: #15803d; border-color: #15803d; color: #fff; }

/* Summary counts */
.qpal-summary {
  padding: 10px 14px;
  display: flex; flex-direction: column; gap: 5px;
  border-bottom: 1px solid var(--border);
}
.qpal-sum-row { display: flex; align-items: center; gap: 7px; font-size: .78rem; color: var(--text-muted); }
.qpal-sum-row strong { color: var(--text); }

.qpal-submit-btn {
  margin: 12px 12px;
  padding: 10px;
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: .85rem;
  width: calc(100% - 24px);
  transition: opacity .15s;
}
.qpal-submit-btn:hover { opacity: .88; }

/* Toggle button in topbar */
.qpal-toggle-btn {
  display: flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.85); border-radius: 8px;
  padding: 5px 12px; cursor: pointer; font-size: .82rem; font-weight: 600;
  transition: background .15s;
}
.qpal-toggle-btn:hover { background: rgba(255,255,255,.18); }
.qpal-toggle-icon { font-size: 1rem; }

/* Overlay (mobile only) */
.qpal-overlay {
  display: none;
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 199;
}

/* ── MOBILE: palette slides in from right ────────────────────────────────── */

/* ── DESKTOP: palette always visible as sidebar ──────────────────────────── */

/* Legacy dot classes kept for compatibility */
.q-dots { display:none; }
.q-dot  { display:none; }

/* Submit bar */
.test-submit-bar {
  background: #F8FAFF;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.answered-info { font-size: .88rem; color: var(--text-muted); }
.answered-info strong { color: var(--navy); }

/* Result screen */
#screen-result { display: none; }
.result-card {
  background: var(--bg-card);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  text-align: center;
}
.result-header-pass {
  background: linear-gradient(135deg, #14532D, #16A34A);
  padding: 48px;
  color: white;
}
.result-header-fail {
  background: linear-gradient(135deg, #7F1D1D, #DC2626);
  padding: 48px;
  color: white;
}
.result-header-auto {
  background: linear-gradient(135deg, var(--navy), var(--blue));
  padding: 48px;
  color: white;
}
.result-icon { font-size: 4rem; margin-bottom: 14px; }
.result-title { font-size: 2rem; font-weight: 900; margin-bottom: 6px; }
.result-sub { opacity: .78; font-size: 1rem; }
.result-body { padding: 40px 48px; }
.result-score-ring {
  width: 140px; height: 140px;
  border-radius: 50%;
  border: 10px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 32px;
  position: relative;
}
.result-score-ring.pass { border-color: var(--success); }
.result-score-ring.fail { border-color: var(--danger); }
.result-pct { font-size: 2rem; font-weight: 900; color: var(--navy); }
.result-stats-row {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 28px;
}
.result-stat span { display: block; font-size: 1.8rem; font-weight: 900; color: var(--navy); }
.result-stat label { font-size: .78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .6px; }
.result-message {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px 24px;
  font-size: .95rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}

/* Test list page */
.tests-list { display: flex; flex-direction: column; gap: 16px; }
.test-list-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: all .22s;
  box-shadow: 0 1px 4px rgba(11,31,75,.05);
}
.test-list-card:hover { box-shadow: var(--shadow); border-color: var(--blue-mid); }
.test-list-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.test-list-card p { font-size: .88rem; color: var(--text-muted); margin-bottom: 12px; }
.test-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.test-pill {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
}
.test-action { flex-shrink: 0; text-align: center; }
.score-badge { margin-bottom: 8px; }
.score-pass { color: var(--success); font-weight: 800; font-size: .95rem; }
.score-fail { color: var(--danger); font-weight: 800; font-size: .95rem; }
.score-num { font-size: .82rem; color: var(--text-muted); }
.no-tests { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.no-tests .no-tests-icon { font-size: 3rem; margin-bottom: 12px; }

/* Login notice */
.login-notice {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 60px 40px;
  text-align: center;
  max-width: 480px;
  margin: 60px auto;
}
.login-notice .ln-icon { font-size: 2.5rem; margin-bottom: 14px; }
.login-notice h3 { font-size: 1.3rem; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.login-notice p { color: var(--text-muted); font-size: .95rem; margin-bottom: 24px; }

/* ══════════════════════════════════════════
   COURSES PAGE
══════════════════════════════════════════ */
.courses-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .25s;
}
.course-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.course-card-top { padding: 28px; }
.course-card-top.navy { background: var(--navy); }
.course-card-top.orange { background: var(--orange); }
.course-card-top.blue { background: var(--blue); }
.course-card-icon { font-size: 2rem; margin-bottom: 10px; }
.course-card h3 { color: white; font-size: 1.1rem; font-weight: 800; margin-bottom: 6px; }
.course-card .course-sub { color: rgba(255,255,255,.72); font-size: .85rem; }
.course-card-body { padding: 24px 28px; }
.course-card-body ul { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.course-card-body ul li {
  font-size: .88rem;
  color: var(--text-muted);
  display: flex; gap: 8px; align-items: flex-start; line-height: 1.5;
}
.course-card-body ul li::before { content: '✓'; color: var(--success); font-weight: 800; flex-shrink: 0; }

/* ══════════════════════════════════════════
   BLOG
══════════════════════════════════════════ */
.blog-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .25s;
}
.blog-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.blog-thumb {
  height: 130px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}
.blog-thumb.t1 { background: #EEF2FF; }
.blog-thumb.t2 { background: var(--orange-light); }
.blog-thumb.t3 { background: #ECFDF5; }
.blog-card-body { padding: 20px 22px; }
.blog-tag {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 10px;
}
.blog-tag.t1 { background: #EEF2FF; color: var(--blue); }
.blog-tag.t2 { background: var(--orange-light); color: var(--orange); }
.blog-tag.t3 { background: #ECFDF5; color: var(--success); }
.blog-card h3 { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; line-height: 1.4; }
.blog-card p { font-size: .85rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 14px; }
.blog-read-more { font-size: .85rem; font-weight: 700; color: var(--blue); }
.blog-read-more:hover { color: var(--orange); }

/* ══════════════════════════════════════════
   CONTACT
══════════════════════════════════════════ */
.contact-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 40px; align-items: start; }
.contact-info-item {
  display: flex; gap: 16px; align-items: flex-start;
  margin-bottom: 24px;
}
.contact-info-icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--orange-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.contact-info-icon.blue { background: #EEF2FF; }
.contact-info-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 3px; }
.contact-info-val { font-size: .95rem; font-weight: 600; color: var(--navy); }
.contact-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: .85rem; font-weight: 700; color: var(--navy); margin-bottom: 7px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font); font-size: .95rem;
  color: var(--text); background: var(--bg-card);
  transition: border .2s, box-shadow .2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(27,58,140,.1);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ══════════════════════════════════════════
   LOGIN PAGE
══════════════════════════════════════════ */
.login-page-wrap {
  min-height: calc(100vh - var(--header-h));
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  padding: 48px 20px;
}
.login-card {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 44px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}
.login-card .login-logo { text-align: center; margin-bottom: 28px; }
.login-card h2 { font-size: 1.7rem; font-weight: 900; color: var(--navy); margin-bottom: 4px; }
.login-card .login-sub { font-size: .9rem; color: var(--text-muted); }

/* ══════════════════════════════════════════
   PAGE HERO (inner pages)
══════════════════════════════════════════ */







/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
#site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.65);
  padding: 56px 0 32px;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.footer-brand p { font-size: .88rem; line-height: 1.7; margin-top: 12px; max-width: 280px; }
.footer-col h4 { color: white; font-size: .9rem; font-weight: 700; margin-bottom: 16px; text-transform: uppercase; letter-spacing: .5px; }
.footer-col ul { display: flex; flex-direction: column; gap: 9px; }
.footer-col ul li a { color: rgba(255,255,255,.55); font-size: .88rem; text-decoration: none; transition: color .2s; }
.footer-col ul li a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 24px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: .82rem;
}
.footer-bottom a { color: rgba(255,255,255,.45); }
.footer-bottom a:hover { color: white; }

/* ══════════════════════════════════════════
   ABOUT
══════════════════════════════════════════ */
.about-mission {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.about-img-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.about-img-card {
  border-radius: 14px;
  padding: 28px;
  text-align: center;
}
.about-img-card.c1 { background: var(--navy); color: white; }
.about-img-card.c2 { background: var(--orange); color: white; margin-top: 24px; }
.about-img-card.c3 { background: #EEF2FF; color: var(--navy); margin-top: -24px; }
.about-img-card.c4 { background: #F0FDF4; color: var(--navy); }
.about-img-card .big-num { font-size: 2rem; font-weight: 900; display: block; }
.about-img-card .big-label { font-size: .78rem; opacity: .75; text-transform: uppercase; letter-spacing: .5px; }

/* ══════════════════════════════════════════
   UTILITY
══════════════════════════════════════════ */
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-6 { margin-bottom: 24px; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-2 { gap: 8px; }
.page-content { padding: 48px 0; }

/* ══════════════════════════════════════════
   RESPONSIVE — Full Device Coverage

/* ══════════════════════════════════════════
   HOMEPAGE — New Sections Responsive
══════════════════════════════════════════ */
.ca-hp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.ca-tests-grid { gap: 20px; }
.ca-hiw-grid   { gap: 32px; }

@media (max-width: 900px) {
  .ca-hp-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .ca-hp-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* ── Profile page layout ── */
.profile-page { background: var(--bg); min-height: calc(100vh - var(--header-h)); padding: 48px 0 80px; }
.profile-grid { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: start; }
.profile-grid > * { min-width: 0; }
.profile-main { min-width: 0; }
.profile-tabs-content { display: block; }

/* ── Profile tabs ── */
.profile-tabs { display: flex; background: white; border: 1px solid var(--border); border-radius: 10px; padding: 4px; gap: 4px; margin-bottom: 20px; }
.ptab { flex: 1; padding: 9px 12px; border-radius: 8px; border: none; background: none; cursor: pointer; font-family: var(--font); font-size: .88rem; font-weight: 600; color: var(--text-muted); transition: all .2s; text-align: center; }
.ptab.active { background: var(--navy); color: white; }
.ptab:hover:not(.active) { background: var(--bg); color: var(--navy); }
.tab-content { display: none !important; }
.tab-content.active { display: block !important; }

/* ── Ad slot wrapper — hide when empty ── */
.ca-ad-wrap:empty { display: none; }
