/* IQTester.co — Complete Stylesheet v2 */
/* Design: Teal #0d9488 / Navy #0f172a / Inter font */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand */
  --teal: #0d9488;
  --teal-dark: #0a7c72;
  --teal-light: #14b8a6;
  --teal-bg: #f0fdfa;
  --teal-mid: rgba(13,148,136,.12);
  --navy: #0f172a;
  --navy-light: #1e293b;

  /* Grays */
  --gray-50:  #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --white:    #ffffff;

  /* Accents */
  --red:         #ef4444;
  --red-light:   #fee2e2;
  --green:       #22c55e;
  --green-light: #dcfce7;
  --yellow:      #eab308;
  --orange:      #f97316;

  /* Radii */
  --radius:    12px;
  --radius-sm:  8px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -2px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.06);

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* Spacing */
  --page-px: 20px;
}

/* ===== BASE ===== */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  font-family: var(--font);
  color: var(--navy);
  background: var(--white);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
img  { max-width: 100%; display: block; }
a    { color: var(--teal); text-decoration: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; -webkit-tap-highlight-color: transparent; }
input, select, textarea { font-family: var(--font); }
h1, h2, h3, h4, h5, h6 { line-height: 1.2; font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ===== LAYOUT ===== */
.container    { max-width: 1200px; margin: 0 auto; padding: 0 var(--page-px); }
.container-sm { max-width:  720px; margin: 0 auto; padding: 0 var(--page-px); }
.container-md { max-width:  900px; margin: 0 auto; padding: 0 var(--page-px); }

/* ===== PAGE TRANSITIONS ===== */
.page-enter {
  animation: pageEnter 320ms var(--ease) both;
}
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in  { animation: fadeIn  360ms var(--ease) both; }
.slide-up { animation: slideUp 360ms var(--ease) both; }
@keyframes fadeIn  { from { opacity: 0; }                         to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--page-px);
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--navy);
  text-decoration: none;
}
.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--teal);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}
.header-actions { display: flex; align-items: center; gap: 12px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .9375rem;
  transition: all 180ms var(--ease);
  white-space: nowrap;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  cursor: pointer;
}
.btn:active { transform: scale(.97); }

.btn-primary { background: var(--teal); color: white; }
.btn-primary:hover { background: var(--teal-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary:active { background: var(--teal-dark); transform: scale(.97); box-shadow: none; }

.btn-secondary { background: var(--gray-100); color: var(--navy); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-secondary:active { background: var(--gray-200); transform: scale(.97); }

.btn-outline { border: 1.5px solid var(--gray-300); color: var(--navy); background: var(--white); }
.btn-outline:hover { border-color: var(--teal); color: var(--teal); }
.btn-outline:active { border-color: var(--teal-dark); transform: scale(.97); }

.btn-ghost { color: var(--gray-600); padding: 8px 16px; font-size: .875rem; min-height: 44px; }
.btn-ghost:hover { color: var(--teal); }

.btn-danger { background: var(--red); color: white; }
.btn-danger:hover { background: #dc2626; transform: translateY(-1px); }
.btn-danger:active { transform: scale(.97); }

.btn-lg { padding: 16px 36px; font-size: 1.0625rem; border-radius: var(--radius); min-height: 56px; }
.btn-sm { padding: 10px 18px; font-size: .8125rem; min-height: 40px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; pointer-events: none; cursor: not-allowed; }

/* Pulsing CTA */
.btn-pulse {
  animation: ctaPulse 2.2s ease-in-out infinite;
}
@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(13,148,136,.4); }
  50%       { box-shadow: 0 0 0 12px rgba(13,148,136,0); }
}

/* ===== HERO ===== */
.hero {
  padding: 72px 0 56px;
  text-align: center;
  background: linear-gradient(180deg, var(--teal-bg) 0%, var(--white) 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(13,148,136,.07) 0%, transparent 70%);
  pointer-events: none;
}
.hero .brain-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  display: block;
  animation: brainBob 3s ease-in-out infinite;
}
@keyframes brainBob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}
.hero h1 {
  font-size: clamp(2rem, 5.5vw, 3.25rem);
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero .subtitle {
  font-size: clamp(1rem, 2.5vw, 1.1875rem);
  color: var(--gray-600);
  max-width: 580px;
  margin: 0 auto 32px;
  line-height: 1.7;
}
.hero-cta { margin-bottom: 24px; }
.hero-cta .btn-lg { padding: 18px 52px; font-size: 1.125rem; }

/* Counter */
.counter-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 24px;
  padding: 8px 18px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--gray-600);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.counter-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 1.5s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .6; transform: scale(1.3); }
}
.counter-badge strong { color: var(--teal); }

/* Social proof row */
.social-proof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.social-proof .stars { color: var(--yellow); font-size: 1.2rem; letter-spacing: 1px; }
.social-proof .label { font-size: .875rem; color: var(--gray-600); }

/* Trust badges */
.trust-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.trust-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--gray-500);
}
.trust-badge .icon { font-size: 1rem; }

/* ===== HOW IT WORKS ===== */
.steps-section { padding: 80px 0; background: var(--white); }
.steps-section h2 { text-align: center; font-size: clamp(1.5rem, 3vw, 1.875rem); margin-bottom: 12px; }
.steps-section .section-sub { text-align: center; color: var(--gray-500); font-size: .9375rem; margin-bottom: 48px; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; }
.step-card {
  text-align: center;
  padding: 36px 24px;
  border-radius: var(--radius-lg);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  transition: box-shadow 200ms var(--ease), transform 200ms var(--ease);
}
.step-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.step-num {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0 auto 18px;
}
.step-card h3 { font-size: 1.125rem; margin-bottom: 10px; }
.step-card p  { font-size: .9375rem; color: var(--gray-600); line-height: 1.6; }

/* ===== FEATURES ===== */
.features-section { padding: 80px 0; background: var(--gray-50); }
.features-section h2 { text-align: center; font-size: clamp(1.5rem, 3vw, 1.875rem); margin-bottom: 48px; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.feature-card {
  padding: 28px 24px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--gray-200);
  transition: box-shadow 200ms var(--ease), transform 200ms var(--ease);
}
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-icon { font-size: 2.25rem; margin-bottom: 14px; }
.feature-card h3 { font-size: 1rem; margin-bottom: 8px; }
.feature-card p  { font-size: .875rem; color: var(--gray-600); line-height: 1.6; }

/* ===== FAMOUS IQ COMPARE SECTION ===== */
.famous-compare-section { padding: 80px 0; background: var(--white); }
.famous-compare-section h2 { text-align: center; font-size: clamp(1.5rem, 3vw, 1.875rem); margin-bottom: 8px; }
.famous-compare-section .section-sub { text-align: center; color: var(--gray-500); font-size: .9375rem; margin-bottom: 40px; }
.compare-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.compare-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  min-width: 130px;
  flex-shrink: 0;
  transition: box-shadow 200ms;
}
.compare-card:hover { box-shadow: var(--shadow-md); }
.compare-card .c-icon  { font-size: 2rem; margin-bottom: 8px; }
.compare-card .c-name  { font-size: .8125rem; font-weight: 600; color: var(--navy); margin-bottom: 2px; }
.compare-card .c-role  { font-size: .75rem; color: var(--gray-500); margin-bottom: 10px; }
.compare-card .c-iq    { font-size: 1.375rem; font-weight: 800; color: var(--gray-700); }
.compare-card.you-card {
  border-color: var(--teal);
  background: var(--teal-bg);
  box-shadow: 0 0 0 2px rgba(13,148,136,.2);
}
.compare-card.you-card .c-iq { color: var(--teal); }
.compare-card.you-card .c-name { color: var(--teal); }

/* ===== TESTIMONIALS ===== */
.testimonials-section { padding: 80px 0; background: var(--gray-50); }
.testimonials-section h2 { text-align: center; font-size: clamp(1.5rem, 3vw, 1.875rem); margin-bottom: 48px; }
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.testimonial-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
  transition: box-shadow 200ms var(--ease);
}
.testimonial-card:hover { box-shadow: var(--shadow-md); }
.testimonial-card .t-stars { color: var(--yellow); font-size: 1rem; letter-spacing: 2px; margin-bottom: 12px; }
.testimonial-card .t-text  { font-size: .9375rem; color: var(--gray-700); line-height: 1.7; margin-bottom: 16px; font-style: italic; }
.testimonial-card .t-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.t-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  font-weight: 700;
  font-size: .875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.t-name { font-size: .875rem; font-weight: 600; color: var(--navy); }
.t-meta { font-size: .75rem; color: var(--gray-400); }

/* ===== FAQ ===== */
.faq-section { padding: 80px 0; background: var(--white); }
.faq-section h2 { text-align: center; font-size: clamp(1.5rem, 3vw, 1.875rem); margin-bottom: 48px; }
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--gray-200); }
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 20px 0;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  color: var(--navy);
  cursor: pointer;
  gap: 12px;
  min-height: 48px;
}
.faq-q .faq-arrow {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .875rem;
  color: var(--gray-500);
  transition: transform 260ms var(--ease), background 180ms;
  flex-shrink: 0;
}
.faq-item.open .faq-q .faq-arrow { transform: rotate(45deg); background: var(--teal-bg); color: var(--teal); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 320ms var(--ease); }
.faq-item.open .faq-a { max-height: 400px; }
.faq-a p { padding: 0 0 20px; font-size: .9375rem; color: var(--gray-600); line-height: 1.7; }

/* ===== FOOTER ===== */
.site-footer { padding: 40px 0; border-top: 1px solid var(--gray-200); background: var(--gray-50); }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { font-size: .875rem; color: var(--gray-500); transition: color 150ms; }
.footer-links a:hover { color: var(--teal); }
.footer-copy { font-size: .8125rem; color: var(--gray-400); }

/* Sticky mobile CTA bar */
.sticky-cta-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  padding: 12px var(--page-px);
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 200;
  box-shadow: 0 -4px 12px rgba(0,0,0,.08);
}
.sticky-cta-bar.visible { display: block; }
.sticky-cta-bar .btn { font-size: 1rem; }

/* ===== START PAGE ===== */
.start-page {
  padding: 60px 0;
  text-align: center;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.start-page h1 { font-size: clamp(1.5rem, 4vw, 2.25rem); margin-bottom: 32px; }
.info-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
  max-width: 480px;
  width: 100%;
}
.info-card {
  padding: 20px 16px;
  border-radius: var(--radius);
  background: var(--teal-bg);
  border: 1px solid rgba(13,148,136,.18);
}
.info-card .num   { font-size: 1.625rem; font-weight: 800; color: var(--teal); line-height: 1; }
.info-card .label { font-size: .8125rem; color: var(--gray-600); margin-top: 5px; }
.start-features   { list-style: none; text-align: left; max-width: 360px; margin: 0 auto 32px; width: 100%; }
.start-features li {
  padding: 9px 0;
  font-size: .9375rem;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--gray-100);
}
.start-features li:last-child { border-bottom: none; }
.start-features li::before { content: '✓'; color: var(--teal); font-weight: 700; font-size: 1rem; flex-shrink: 0; }
.disclaimer { font-size: .75rem; color: var(--gray-400); max-width: 480px; margin: 24px auto 0; line-height: 1.6; }

/* ===== QUIZ ===== */
.quiz-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--white);
}
.quiz-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 12px 20px;
}
.quiz-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.quiz-timer {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
}
.progress-bar-outer  { height: 5px; background: var(--gray-200); border-radius: 3px; }
.progress-bar-inner  { height: 100%; background: var(--teal); border-radius: 3px; transition: width 400ms var(--ease); }
.quiz-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px var(--page-px);
}
.question-card { max-width: 640px; width: 100%; }
.question-meta { font-size: .8125rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px; text-align: center; }
.question-text {
  font-size: clamp(1.0625rem, 2.5vw, 1.25rem);
  font-weight: 700;
  margin-bottom: 28px;
  text-align: center;
  line-height: 1.45;
  color: var(--navy);
}
.options-list  { display: flex; flex-direction: column; gap: 12px; }
.option-btn {
  display: block;
  width: 100%;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--gray-200);
  background: var(--white);
  text-align: left;
  font-size: 1rem;
  color: var(--navy);
  transition: all 180ms var(--ease);
  cursor: pointer;
  font-weight: 500;
  min-height: 52px;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.4;
}
.option-btn:hover   { border-color: var(--teal); background: var(--teal-bg); }
.option-btn:active  { transform: scale(.985); }
.option-btn.selected { border-color: var(--teal); background: var(--teal); color: white; }

.quiz-footer {
  padding: 16px 20px;
  text-align: center;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
}
.quiz-footer .q-counter { font-size: .9375rem; color: var(--gray-600); font-weight: 500; }
.quiz-submit-btn { margin-top: 28px; }
.quiz-submit-btn .btn-lg { min-height: 56px; }

/* Demographic badge */
.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--teal-bg);
  color: var(--teal);
  border: 1px solid var(--teal-mid);
  border-radius: 12px;
  padding: 4px 12px;
  font-size: .75rem;
  font-weight: 600;
  margin-bottom: 16px;
}

/* Interstitial */
.interstitial { text-align: center; padding: 60px 20px; max-width: 480px; margin: 0 auto; }
.interstitial .i-emoji { font-size: 3.5rem; margin-bottom: 20px; animation: brainBob 2s ease-in-out infinite; }
.interstitial h2 { font-size: 1.625rem; margin-bottom: 12px; color: var(--teal); }
.interstitial p  { color: var(--gray-600); margin-bottom: 32px; font-size: 1rem; }

/* ===== ANALYZING ===== */
.analyzing-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: var(--white);
  text-align: center;
}
.analyzing-page h2 { font-size: 1.5rem; margin-bottom: 12px; }
.analyzing-status {
  font-size: 1rem;
  color: var(--teal);
  font-weight: 500;
  margin-bottom: 40px;
  min-height: 24px;
  transition: opacity 300ms;
}
.analysis-bars { width: 100%; max-width: 520px; }
.analysis-bar  { margin-bottom: 22px; }
.analysis-bar .a-label {
  font-size: .875rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 7px;
  text-align: left;
  display: flex;
  justify-content: space-between;
}
.analysis-bar .a-label .a-pct { color: var(--teal); font-weight: 600; }
.bar-track { height: 10px; background: var(--gray-100); border-radius: 5px; overflow: hidden; }
.bar-fill  { height: 100%; background: linear-gradient(90deg, var(--teal-light), var(--teal)); border-radius: 5px; width: 0%; transition: width 1.4s var(--ease); }

/* Spinner */
.spinner {
  width: 56px;
  height: 56px;
  border: 4px solid var(--gray-100);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto 28px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== EMAIL CAPTURE ===== */
.email-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}
.email-preview {
  position: relative;
  margin: 0 auto 32px;
  display: inline-block;
}
.email-preview .preview-score {
  font-size: 5rem;
  font-weight: 800;
  color: var(--teal);
  line-height: 1;
  letter-spacing: -2px;
  filter: blur(5px);
  user-select: none;
}
.email-preview .lock-badge {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: white;
  font-size: .75rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  white-space: nowrap;
}
.email-page h2   { font-size: clamp(1.5rem, 4vw, 1.875rem); margin-bottom: 10px; }
.email-page .teaser { font-size: 1rem; color: var(--gray-600); margin-bottom: 28px; max-width: 380px; }
.email-form { width: 100%; max-width: 420px; }
.email-input {
  width: 100%;
  padding: 16px 18px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  margin-bottom: 12px;
  outline: none;
  transition: border-color 180ms, box-shadow 180ms;
  min-height: 52px;
  color: var(--navy);
}
.email-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13,148,136,.12);
}
.email-input.error { border-color: var(--red); }
.email-social-proof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: .8125rem;
  color: var(--gray-500);
  margin-top: 14px;
}
.email-social-proof .face { font-size: 1rem; }
.email-anti-spam {
  font-size: .75rem;
  color: var(--gray-400);
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* ===== CHECKOUT ===== */
.checkout-page { min-height: 100vh; background: var(--gray-50); }
.checkout-banner {
  background: var(--teal);
  color: white;
  padding: 10px 0;
  overflow: hidden;
  white-space: nowrap;
}
.checkout-banner .scroll-text {
  display: inline-block;
  animation: scrollText 14s linear infinite;
  font-size: .875rem;
  font-weight: 500;
  padding-right: 40px;
}
@keyframes scrollText {
  0%   { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

.checkout-content { max-width: 520px; margin: 0 auto; padding: 28px var(--page-px); }

.checkout-timer {
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.checkout-timer .t-badge {
  background: var(--red);
  color: white;
  padding: 4px 12px;
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.0625rem;
}

.iq-compare { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 28px; }
.iq-card {
  text-align: center;
  padding: 14px 8px 16px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1.5px solid var(--gray-200);
}
.iq-card.you { border-color: var(--teal); background: var(--teal-bg); }
.iq-card-photo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 8px;
  border: 2px solid var(--gray-200);
}
.iq-card-photo-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--teal-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  font-size: 1.5rem;
  border: 2px solid var(--teal);
}
.iq-card .iq-name  { font-size: .75rem; color: var(--gray-500); margin-bottom: 4px; font-weight: 500; }
.iq-card .iq-score { font-size: 1.875rem; font-weight: 800; color: var(--navy); line-height: 1; }
.iq-card.you .iq-score { color: var(--teal); }
.iq-card .iq-sub   { font-size: .6875rem; color: var(--gray-400); margin-top: 4px; }

.checkout-heading { text-align: center; font-size: clamp(1.25rem, 3vw, 1.5rem); margin-bottom: 20px; line-height: 1.35; }

/* Payment section — compact, card above button */
.payment-block {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.payment-price-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}
.price-amount {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--teal);
  line-height: 1;
}
.price-terms  { font-size: .8125rem; color: var(--gray-500); line-height: 1.4; }
.price-badge  {
  background: var(--red);
  color: white;
  font-size: .6875rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Express Checkout + Payment Element containers */
#express-checkout-element {
  border-radius: var(--radius-sm);
}
#payment-element {
  border-radius: var(--radius-sm);
}

.pay-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  margin-bottom: 16px;
}
.pay-trust-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .75rem;
  color: var(--gray-500);
}
.pay-trust-item .icon { font-size: .875rem; color: var(--green); }

.payment-disclaimer {
  font-size: .6875rem;
  color: var(--gray-400);
  text-align: center;
  margin-top: 14px;
  line-height: 1.6;
}

/* Checkout press + testimonials */
.press-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  opacity: .5;
}
.press-logos span {
  font-size: .75rem;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.checkout-testimonials { margin-bottom: 24px; }
.checkout-testimonial {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--gray-200);
  margin-bottom: 10px;
}
.checkout-testimonial .ct-stars  { color: var(--yellow); font-size: .9rem; margin-bottom: 7px; }
.checkout-testimonial .ct-text   { font-size: .875rem; color: var(--gray-700); line-height: 1.6; margin-bottom: 7px; font-style: italic; }
.checkout-testimonial .ct-author { font-size: .8125rem; color: var(--gray-400); font-weight: 500; }

/* Payment success overlay */
.payment-success-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.96);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}
.payment-success-overlay .check-anim {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin-bottom: 24px;
  animation: checkPop .5s var(--ease) both;
}
@keyframes checkPop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.payment-success-overlay h2 { font-size: 1.75rem; margin-bottom: 8px; color: var(--navy); }
.payment-success-overlay p  { color: var(--gray-600); font-size: 1rem; }

/* ===== PORTAL LAYOUT ===== */
.portal-layout   { min-height: 100vh; padding-bottom: 72px; background: var(--gray-50); }
.portal-layout-white { background: var(--white); }
.portal-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  height: 60px;
}
.portal-header .logo { font-size: 1.125rem; }

/* Profile menu */
.profile-menu { position: relative; }
.profile-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  font-weight: 700;
  font-size: .9375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 150ms;
}
.profile-btn:hover { opacity: .85; }
.profile-dropdown {
  position: absolute;
  right: 0;
  top: 46px;
  width: 210px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xl);
  display: none;
  z-index: 60;
  overflow: hidden;
}
.profile-dropdown.open { display: block; animation: fadeIn 160ms var(--ease); }
.profile-dropdown a {
  display: block;
  padding: 13px 16px;
  font-size: .875rem;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
  transition: background 150ms, color 150ms;
}
.profile-dropdown a:last-child { border-bottom: none; color: var(--red); }
.profile-dropdown a:hover { background: var(--gray-50); color: var(--teal); }
.profile-dropdown a:last-child:hover { color: var(--red); background: var(--red-light); }

/* Bottom Tabs */
.bottom-tabs {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  display: flex;
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 10px rgba(0,0,0,.06);
}
.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 0;
  min-height: 58px;
  font-size: .6875rem;
  font-weight: 500;
  color: var(--gray-400);
  transition: color 180ms;
  -webkit-tap-highlight-color: transparent;
}
.tab-btn:active { opacity: .7; }
.tab-btn.active { color: var(--teal); }
.tab-icon { font-size: 1.375rem; }

/* Portal Content */
.portal-content { padding: 24px var(--page-px); max-width: 1200px; margin: 0 auto; }
.portal-section  { margin-bottom: 32px; }
.portal-section h2 { font-size: 1.375rem; margin-bottom: 16px; }
.portal-section h3 { font-size: 1.0625rem; margin-bottom: 12px; color: var(--gray-700); }

/* IQ hero card on lobby */
.iq-hero-card {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  color: white;
  text-align: center;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.iq-hero-card::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.iq-hero-card .hero-score { font-size: 4rem; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.iq-hero-card .hero-label { font-size: .9375rem; opacity: .9; margin-bottom: 16px; }
.iq-hero-card .hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.iq-hero-card .hero-actions .btn { background: rgba(255,255,255,.2); color: white; border: 1.5px solid rgba(255,255,255,.3); min-height: 40px; padding: 9px 20px; font-size: .875rem; }
.iq-hero-card .hero-actions .btn:hover { background: rgba(255,255,255,.3); }

/* Daily streak */
.streak-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--teal-bg);
  border: 1px solid var(--teal-mid);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--teal-dark);
  margin-bottom: 24px;
}
.streak-icon { font-size: 1.25rem; }

/* Training Card */
.training-card {
  padding: 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: white;
  margin-bottom: 24px;
}
.training-card h3 { font-size: 1.1875rem; margin-bottom: 8px; color: white; }
.training-card p  { font-size: .875rem; opacity: .9; margin-bottom: 16px; }
.training-card .btn { background: white; color: var(--teal); min-height: 40px; }

/* Games Grid */
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.game-card {
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: box-shadow 200ms var(--ease), transform 200ms var(--ease);
}
.game-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.game-thumb {
  height: 128px;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  position: relative;
}
.game-thumb.featured { background: linear-gradient(135deg, var(--teal-bg), var(--teal-mid)); }
.game-featured-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--teal);
  color: white;
  font-size: .6875rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.game-info { padding: 16px; }
.game-info h4 { font-size: .9375rem; margin-bottom: 5px; }
.game-meta  { display: flex; align-items: center; gap: 8px; font-size: .75rem; color: var(--gray-500); margin-bottom: 8px; }
.game-meta .g-rating { color: var(--yellow); font-weight: 600; }
.game-info p { font-size: .8125rem; color: var(--gray-600); margin-bottom: 14px; line-height: 1.45; }

/* Filter Tabs */
.filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
  padding: 9px 18px;
  border-radius: 20px;
  font-size: .8125rem;
  font-weight: 500;
  white-space: nowrap;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  color: var(--gray-600);
  transition: all 180ms;
  flex-shrink: 0;
  min-height: 38px;
  cursor: pointer;
}
.filter-tab:active { transform: scale(.97); }
.filter-tab.active { background: var(--teal); color: white; border-color: var(--teal); }
.filter-tab:hover:not(.active) { border-color: var(--teal); color: var(--teal); }

/* Tests Grid */
.tests-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.test-card {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 200ms var(--ease), transform 200ms var(--ease);
  position: relative;
}
.test-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.test-card.completed-card { opacity: .7; }
.test-card-header { display: flex; align-items: flex-start; gap: 12px; }
.test-icon { font-size: 2rem; flex-shrink: 0; }
.test-card-title h4 { font-size: .9375rem; margin-bottom: 4px; }
.test-card-meta { display: flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--gray-500); flex-wrap: wrap; }
.test-card-meta .t-stars { color: var(--yellow); }
.test-card p { font-size: .8125rem; color: var(--gray-600); line-height: 1.45; flex: 1; }
.badge-new {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--orange);
  color: white;
  font-size: .625rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.badge-completed {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--green-light);
  color: var(--green);
  font-size: .75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
}
.progress-counter {
  font-size: .8125rem;
  color: var(--gray-500);
  text-align: right;
  margin-bottom: 4px;
}
.sort-bar { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.sort-bar select {
  padding: 7px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: 6px;
  font-size: .8125rem;
  background: var(--white);
  outline: none;
  cursor: pointer;
}
.sort-bar select:focus { border-color: var(--teal); }

/* ===== IQ REPORT ===== */
.report-page { padding: 32px 20px; max-width: 720px; margin: 0 auto; padding-bottom: 80px; }
.report-page h1 { font-size: 1.5rem; text-align: center; margin-bottom: 28px; }

.iq-display { text-align: center; margin-bottom: 36px; }
.iq-number  { font-size: 5.5rem; font-weight: 800; color: var(--teal); line-height: 1; letter-spacing: -3px; }
.iq-class   { font-size: 1.1875rem; font-weight: 600; color: var(--navy); margin-top: 6px; }
.iq-label   { font-size: .9375rem; color: var(--gray-500); margin-top: 4px; }

/* Bell curve */
.bell-curve { max-width: 480px; margin: 20px auto 0; }
.bell-curve svg { width: 100%; height: auto; }

/* Score Bars */
.score-bars { margin-bottom: 36px; }
.score-bar-item { margin-bottom: 18px; }
.score-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: .875rem;
  margin-bottom: 6px;
}
.score-bar-label span:first-child { font-weight: 500; }
.score-bar-label span:last-child  { color: var(--teal); font-weight: 600; }
.score-bar-track { height: 10px; background: var(--gray-100); border-radius: 5px; overflow: hidden; }
.score-bar-fill  { height: 100%; background: linear-gradient(90deg, var(--teal-light), var(--teal)); border-radius: 5px; transition: width 700ms var(--ease); }

/* Certificate */
.certificate {
  border: 2px solid var(--teal);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  margin: 36px 0;
  background: var(--teal-bg);
  position: relative;
  overflow: hidden;
}
.certificate::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--teal), var(--teal-light), var(--teal));
}
.certificate h3 { font-size: 1.25rem; color: var(--teal); margin-bottom: 8px; }
.cert-score { font-size: 3.5rem; font-weight: 800; color: var(--navy); line-height: 1; }
.cert-name  { font-size: 1rem; color: var(--gray-600); margin-top: 8px; }
.cert-date  { font-size: .8125rem; color: var(--gray-400); margin-top: 4px; }

/* Famous people */
.famous-section { margin: 36px 0; }
.famous-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.famous-card {
  text-align: center;
  padding: 20px 14px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--gray-200);
  transition: box-shadow 200ms;
}
.famous-card:hover { box-shadow: var(--shadow-md); }
.famous-card .f-icon { font-size: 2.5rem; margin-bottom: 8px; }
.famous-card h4     { font-size: .9375rem; margin-bottom: 4px; }
.famous-card .f-iq  { font-size: 1.25rem; font-weight: 700; color: var(--teal); }
.famous-card .f-desc { font-size: .75rem; color: var(--gray-500); margin-top: 3px; }

/* Collapsible answers */
.answers-review { margin-top: 36px; }
.answers-section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; cursor: pointer; }
.answers-section-title h3 { font-size: 1.0625rem; }
.answers-toggle-btn {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--teal);
  padding: 6px 14px;
  border: 1px solid var(--teal-mid);
  border-radius: 8px;
  background: var(--teal-bg);
}
.answers-list { display: none; }
.answers-list.open { display: block; }
.answer-item {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  border: 1px solid var(--gray-200);
  background: var(--white);
}
.answer-item.correct   { border-left: 3px solid var(--green); }
.answer-item.incorrect { border-left: 3px solid var(--red); }
.answer-item .q-num  { font-size: .75rem; color: var(--gray-400); margin-bottom: 4px; }
.answer-item .q-text { font-size: .9375rem; font-weight: 500; margin-bottom: 8px; }
.answer-item .a-status { font-size: .8125rem; }
.answer-item .a-status.right { color: var(--green); font-weight: 600; }
.answer-item .a-status.wrong { color: var(--red); }

/* Report action bar */
.report-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 28px 0;
}

/* ===== TEST RESULTS (generic) ===== */
.test-result-page { padding: 32px 20px; max-width: 640px; margin: 0 auto; text-align: center; padding-bottom: 80px; }
.test-result-page h1 { font-size: 1.5rem; margin-bottom: 8px; }
.result-type  { font-size: 1.25rem; color: var(--teal); font-weight: 700; margin-bottom: 24px; }
.result-details { text-align: left; }
.result-bar-item { margin-bottom: 16px; }
.result-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: .875rem;
  margin-bottom: 6px;
  font-weight: 500;
}
.result-bar-track { height: 8px; background: var(--gray-200); border-radius: 4px; overflow: hidden; }
.result-bar-fill  { height: 100%; background: linear-gradient(90deg, var(--teal-light), var(--teal)); border-radius: 4px; transition: width 600ms var(--ease); }

/* ===== SETTINGS ===== */
.settings-page { padding: 32px var(--page-px); max-width: 480px; margin: 0 auto; padding-bottom: 100px; }
.settings-page h1 { font-size: 1.5rem; margin-bottom: 28px; }
.settings-section { margin-bottom: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--gray-200); }
.settings-section:last-child { border-bottom: none; }
.settings-section h2 { font-size: 1rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; margin-bottom: 16px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: 7px; color: var(--gray-700); }
.form-group input,
.form-group select {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  outline: none;
  transition: border-color 180ms, box-shadow 180ms;
  min-height: 52px;
  color: var(--navy);
  background: var(--white);
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13,148,136,.12);
}

/* Toggle switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-label { font-size: .9375rem; color: var(--navy); }
.toggle-sub   { font-size: .8125rem; color: var(--gray-500); margin-top: 2px; }
.toggle {
  position: relative;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--gray-300);
  border-radius: 26px;
  transition: background 200ms;
  cursor: pointer;
}
.toggle input:checked + .toggle-track { background: var(--teal); }
.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  box-shadow: var(--shadow);
  transition: transform 200ms var(--ease);
  pointer-events: none;
}
.toggle input:checked ~ .toggle-thumb { transform: translateX(20px); }

/* ===== HELP CENTER ===== */
.help-page { padding: 32px var(--page-px); max-width: 720px; margin: 0 auto; padding-bottom: 80px; }
.help-page h1 { font-size: 1.5rem; margin-bottom: 8px; text-align: center; }
.help-search {
  position: relative;
  max-width: 440px;
  margin: 0 auto 32px;
}
.help-search input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 1rem;
  outline: none;
  transition: border-color 180ms;
  min-height: 52px;
}
.help-search input:focus { border-color: var(--teal); }
.help-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.125rem;
  color: var(--gray-400);
  pointer-events: none;
}
.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.help-card {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--gray-200);
  transition: box-shadow 200ms;
}
.help-card:hover { box-shadow: var(--shadow-md); }
.help-card h3 { font-size: 1rem; margin-bottom: 14px; }
.help-card ul { list-style: none; }
.help-card li { border-bottom: 1px solid var(--gray-100); }
.help-card li:last-child { border-bottom: none; }
.help-card a {
  display: block;
  padding: 10px 0;
  font-size: .875rem;
  color: var(--gray-700);
  transition: color 150ms;
}
.help-card a:hover { color: var(--teal); }

/* Help inline FAQ */
.help-faq { margin-top: 32px; }
.help-faq h2 { font-size: 1.125rem; margin-bottom: 16px; }

/* ===== CANCEL PAGE — 3-step retention flow ===== */
.cancel-page {
  padding: 40px var(--page-px);
  max-width: 560px;
  margin: 0 auto;
  padding-bottom: 80px;
  text-align: center;
}
.cancel-step { display: none; }
.cancel-step.active { display: block; animation: fadeIn 300ms var(--ease); }
.cancel-step h1 { font-size: clamp(1.375rem, 3vw, 1.75rem); margin-bottom: 14px; }
.cancel-step p { color: var(--gray-600); margin-bottom: 28px; max-width: 420px; margin-left: auto; margin-right: auto; font-size: .9375rem; }
.retention-benefits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
  text-align: left;
}
.retention-benefit {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--teal-bg);
  border-radius: var(--radius-sm);
  padding: 14px;
  border: 1px solid var(--teal-mid);
}
.retention-benefit .rb-icon { font-size: 1.25rem; flex-shrink: 0; }
.retention-benefit .rb-text { font-size: .875rem; color: var(--navy); font-weight: 500; }
.cancel-reason-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.cancel-reason-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: .9375rem;
  color: var(--navy);
  text-align: left;
  transition: border-color 150ms, background 150ms;
  min-height: 52px;
}
.cancel-reason-btn:hover { border-color: var(--teal); background: var(--teal-bg); }
.cancel-reason-btn:active { transform: scale(.99); }
.cancel-reason-btn .cr-icon { font-size: 1.25rem; }
.cancel-actions { display: flex; flex-direction: column; gap: 12px; max-width: 360px; margin: 0 auto; }

/* ===== STAT CARDS (global standing) ===== */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat-card {
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  text-align: center;
}
.stat-card .stat-val  { font-size: 1.625rem; font-weight: 800; color: var(--teal); line-height: 1; }
.stat-card .stat-label { font-size: .8125rem; color: var(--gray-500); margin-top: 4px; }

/* ===== INFO BOX ===== */
.info-box {
  background: var(--teal-bg);
  border: 1px solid var(--teal-mid);
  border-radius: var(--radius);
  padding: 16px;
  font-size: .9375rem;
  color: var(--gray-700);
  line-height: 1.6;
  margin: 16px 0;
}
.disclaimer-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: .8125rem;
  color: #92400e;
  line-height: 1.6;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* 1024px: tablet */
@media (max-width: 1024px) {
  .games-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 768px: mobile-ish */
@media (max-width: 768px) {
  :root { --page-px: 16px; }

  .hero { padding: 52px 0 40px; }
  .hero h1 { font-size: clamp(1.75rem, 6vw, 2.25rem); }
  .hero-cta .btn-lg { padding: 16px 36px; }

  .steps-grid    { grid-template-columns: 1fr; max-width: 380px; margin: 0 auto; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }

  .iq-compare { gap: 7px; }
  .iq-card .iq-score { font-size: 1.625rem; }

  .games-grid { grid-template-columns: 1fr; }
  .tests-grid { grid-template-columns: 1fr; }
  .famous-grid { grid-template-columns: 1fr 1fr; }

  .footer-inner { flex-direction: column; text-align: center; }

  .report-page { padding: 24px var(--page-px); }
  .iq-number   { font-size: 4.5rem; }

  .retention-benefits { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

/* 480px: small phones */
@media (max-width: 480px) {
  body { font-size: 16px; } /* Enforce minimum 16px on mobile */

  .container,
  .container-sm,
  .container-md { padding: 0 var(--page-px); }

  .features-grid { grid-template-columns: 1fr; }
  .info-cards    { gap: 8px; }
  .info-card     { padding: 16px 8px; }

  .btn-lg { padding: 16px 28px; min-height: 56px; }

  .hero-cta .btn-lg { width: 100%; max-width: 380px; }

  .trust-badges { gap: 12px; }

  .famous-grid { grid-template-columns: 1fr; }
  .help-grid   { grid-template-columns: 1fr; }

  .compare-grid { gap: 8px; }
  .compare-card { min-width: 110px; padding: 14px 10px; }

  .option-btn { padding: 15px 16px; font-size: .9375rem; }

  .cert-score { font-size: 2.75rem; }
  .iq-number  { font-size: 4rem; }

  .iq-compare   { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .iq-card      { padding: 12px 4px; }
  .iq-card .iq-score { font-size: 1.25rem; }
  .iq-card .iq-name  { font-size: .6875rem; }
  .iq-card-photo { width: 40px; height: 40px; }
  .iq-card-photo-placeholder { width: 40px; height: 40px; font-size: 1.2rem; }

  .checkout-content { padding: 20px var(--page-px); }

  /* Mobile-optimized payment section */
  .payment-block { padding: 18px 14px; }
  .payment-price-row { flex-direction: column; text-align: center; gap: 6px; }
  .price-amount { font-size: 2rem; }

  /* Visual question responsive */
  .visual-question-svg svg { max-width: 280px; height: auto; }
  .visual-options-grid { grid-template-columns: 1fr 1fr; gap: 8px; max-width: 300px !important; }
  .visual-option-btn { padding: 10px !important; min-height: 80px !important; }

  .settings-page { padding: 24px var(--page-px) 100px; }

  .email-preview .preview-score { font-size: 4rem; }
}

/* Safe area for iPhones with notch */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .sticky-cta-bar { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .bottom-tabs    { padding-bottom: env(safe-area-inset-bottom); }
}

/* Dark mode toggle visual indicator */
body.dark-mode {
  --white: #0f172a;
  --navy: #f1f5f9;
  --gray-50: #1e293b;
  --gray-100: #334155;
  --gray-200: #475569;
  --gray-300: #64748b;
  --gray-500: #94a3b8;
  --gray-600: #cbd5e1;
  --gray-700: #e2e8f0;
  background: #0f172a;
  color: #f1f5f9;
}

/* ===== LEGAL PAGES (Terms, Privacy) ===== */
.legal-page { padding: 40px 20px 60px; max-width: 720px; margin: 0 auto; }
.legal-page h1 { font-size: 2rem; margin-bottom: 4px; }
.legal-updated { font-size: .8125rem; color: var(--gray-500); margin-bottom: 32px; }
.legal-content h2 { font-size: 1.125rem; margin: 28px 0 10px; color: var(--gray-900, #0f172a); }
.legal-content p { font-size: .9375rem; line-height: 1.75; color: var(--gray-600); margin-bottom: 12px; }
.legal-content ul { padding-left: 20px; margin-bottom: 16px; }
.legal-content li { font-size: .9375rem; line-height: 1.75; color: var(--gray-600); margin-bottom: 6px; }
.legal-content a { color: var(--teal); text-decoration: underline; }

/* ===== GAME IFRAME MODAL ===== */
#game-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 200ms var(--ease);
  pointer-events: none;
}
#game-modal.open { opacity: 1; pointer-events: auto; }
#game-modal.open .game-modal-container {
  transform: scale(1); opacity: 1;
}
.game-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.7);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.game-modal-container {
  position: relative; z-index: 1;
  width: 95vw; max-width: 800px;
  height: 85vh; max-height: 700px;
  background: var(--gray-900, #0f172a);
  border-radius: 12px;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
  transform: scale(.95); opacity: 0;
  transition: transform 250ms cubic-bezier(.16,1,.3,1), opacity 200ms ease;
}
.game-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: rgba(0,0,0,.4);
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.game-modal-title {
  font-size: .9375rem; font-weight: 600;
  color: #fff; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.game-modal-close {
  background: rgba(255,255,255,.1); border: none;
  color: #fff; font-size: 1.5rem; line-height: 1;
  width: 36px; height: 36px; border-radius: 50%;
  cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: background 180ms;
  flex-shrink: 0;
}
.game-modal-close:hover { background: rgba(255,255,255,.2); }
.game-modal-body {
  flex: 1; position: relative; overflow: hidden;
}
.game-modal-loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: var(--gray-900, #0f172a);
}
.game-iframe {
  width: 100%; height: 100%; border: none;
  display: block; background: #000;
}

/* Mobile: make modal full screen */
@media (max-width: 640px) {
  .game-modal-container {
    width: 100vw; height: 100vh;
    max-width: none; max-height: none;
    border-radius: 0;
  }
  .game-modal-header { padding: 10px 12px; }
  .game-modal-close { width: 32px; height: 32px; font-size: 1.25rem; }
}
