:root {
  --white: #ffffff;
  --off-white: #f8f7f4;
  --bg: #f4f2ee;
  --surface: #ffffff;
  --surface2: #f0ede8;
  --border: #e2ddd6;
  --border-dark: #c9c3b9;
  --navy: #1a2236;
  --navy-mid: #2d3d5c;
  --teal: #1a7f74;
  --teal-light: #22a396;
  --teal-dim: rgba(26,127,116,0.1);
  --amber: #d97706;
  --text: #1a2236;
  --text-mid: #4a5568;
  --text-muted: #8a94a6;
  --shadow-sm: 0 1px 3px rgba(26,34,54,0.08), 0 1px 2px rgba(26,34,54,0.05);
  --shadow-md: 0 4px 16px rgba(26,34,54,0.1), 0 2px 6px rgba(26,34,54,0.06);
  --shadow-lg: 0 12px 40px rgba(26,34,54,0.14), 0 4px 12px rgba(26,34,54,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* subtle grid texture */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(26,34,54,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,34,54,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none; z-index: 0;
}

/* ─── NAV ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: rgba(244,242,238,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 2.5rem;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: 'Fraunces', serif;
  font-size: 1.2rem; font-weight: 900;
  color: var(--navy);
  letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 0.5rem;
}
.nav-logo-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.nav-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem; font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--teal);
  background: var(--teal-dim);
  border: 1px solid rgba(26,127,116,0.25);
  padding: 0.3rem 0.75rem; border-radius: 100px;
}
.nav-free-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  color: var(--amber);
  background: rgba(217,119,6,0.08);
  border: 1px solid rgba(217,119,6,0.2);
  padding: 0.25rem 0.6rem; border-radius: 100px;
}

/* ─── SCREENS ─── */
.screen { display: none; position: relative; z-index: 1; min-height: 100vh; }
.screen.active { display: block; }

/* ─── HOME ─── */
#home { padding: 100px 2rem 0; }
.home-inner { max-width: 1100px; margin: 0 auto; }

.hero-split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: center;
  margin-bottom: 5rem;
}
.hero-left { opacity: 0; animation: slideIn 0.6s 0.1s forwards; }
.hero-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.2rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.hero-label::before { content: ''; width: 24px; height: 1px; background: var(--teal); }
.hero-h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--navy);
  margin-bottom: 1.2rem;
}
.hero-h1 em { font-style: italic; color: var(--teal); }
.hero-p {
  font-size: 1rem; line-height: 1.75;
  color: var(--text-mid);
  max-width: 420px; margin-bottom: 2rem;
}
.free-pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(217,119,6,0.08);
  border: 1px solid rgba(217,119,6,0.25);
  border-radius: 100px;
  padding: 0.5rem 1rem;
  font-size: 0.82rem; color: var(--amber);
  font-weight: 600;
  margin-bottom: 2rem;
}
.free-pill-icon { font-size: 0.9rem; }

.hero-right {
  opacity: 0; animation: slideIn 0.6s 0.3s forwards;
  display: flex; flex-direction: column; gap: 0.6rem;
}
.mini-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem 1.4rem;
  display: flex; align-items: center; gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.mini-stat-card:hover { transform: translateX(4px); box-shadow: var(--shadow-md); }
.mini-stat-icon { font-size: 1.4rem; width: 2.4rem; text-align: center; }
.mini-stat-label { font-size: 0.82rem; color: var(--text-muted); }
.mini-stat-val { font-size: 0.95rem; font-weight: 600; color: var(--navy); }
.mini-stat-right { margin-left: auto; }
.mini-stat-chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem; letter-spacing: 0.08em;
  color: var(--teal);
  background: var(--teal-dim);
  border-radius: 100px; padding: 0.25rem 0.6rem;
}

/* ─── TEST GRID ─── */
.section-heading {
  font-family: 'Fraunces', serif;
  font-size: 1.6rem; font-weight: 700;
  color: var(--navy); margin-bottom: 0.4rem;
}
.section-sub { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 2rem; }

.tests-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem; margin-bottom: 3rem;
  opacity: 0; animation: fadeUp 0.5s 0.5s forwards;
}
.test-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 1.6rem;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4,0,0.2,1);
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.test-card::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(26,127,116,0.04), transparent);
  opacity: 0; transition: opacity 0.22s;
}
.test-card:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.test-card:hover::after { opacity: 1; }
.test-card.selected { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(26,127,116,0.12), var(--shadow-md); }
.test-card.selected::after { opacity: 1; }

.test-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 0.9rem; }
.tc-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  border: 1px solid var(--border);
}
.tc-free {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem; font-weight: 500; letter-spacing: 0.08em;
  color: var(--amber);
  background: rgba(217,119,6,0.08);
  border: 1px solid rgba(217,119,6,0.2);
  padding: 0.2rem 0.5rem; border-radius: 100px;
}
.tc-title {
  font-family: 'Fraunces', serif;
  font-size: 1.05rem; font-weight: 700; color: var(--navy);
  margin-bottom: 0.35rem;
}
.tc-desc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.55; margin-bottom: 0.9rem; }
.tc-meta {
  display: flex; align-items: center; gap: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem; color: var(--text-muted);
}
.tc-meta-item { display: flex; align-items: center; gap: 0.3rem; }
.tc-check {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--border);
  position: absolute; top: 1.4rem; right: 1.4rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.test-card.selected .tc-check {
  background: var(--teal); border-color: var(--teal);
  color: white; font-size: 0.65rem;
}

.start-row {
  display: flex; align-items: center; gap: 1.5rem;
  opacity: 0; animation: fadeUp 0.5s 0.7s forwards;
  margin-bottom: 4rem;
}
.btn-start {
  background: var(--navy);
  color: white;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem; font-weight: 600;
  padding: 0.85rem 2.2rem;
  border: none; border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-md);
}
.btn-start:hover { background: var(--navy-mid); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-start:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }
.start-note { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }
.start-note strong { color: var(--teal); }

/* ─── TEST SCREEN ─── */
#test { padding: 80px 2rem 4rem; background: var(--bg); }
.test-layout { max-width: 720px; margin: 0 auto; }

.test-topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 2rem; gap: 1rem; flex-wrap: wrap;
}
.test-title-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--teal);
  background: var(--teal-dim);
  border: 1px solid rgba(26,127,116,0.2);
  padding: 0.35rem 0.85rem; border-radius: 100px;
}
.progress-section { flex: 1; max-width: 300px; }
.progress-nums {
  display: flex; justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem; color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.progress-track {
  height: 4px; background: var(--border);
  border-radius: 100px; overflow: hidden;
}
.progress-bar-fill {
  height: 100%; background: var(--teal);
  border-radius: 100px;
  transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
}
.timer-box {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.92rem; font-weight: 500;
  color: var(--navy);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.4rem 0.9rem; border-radius: 8px;
  min-width: 72px; text-align: center;
}
.timer-box.urgent { color: #e53e3e; border-color: rgba(229,62,62,0.3); background: rgba(229,62,62,0.05); }

.question-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.q-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.12em; color: var(--text-muted);
  margin-bottom: 1rem;
}
.q-body {
  font-family: 'Fraunces', serif;
  font-size: 1.2rem; font-weight: 600; line-height: 1.55;
  color: var(--navy);
  margin-bottom: 2rem;
}
.options-list { display: flex; flex-direction: column; gap: 0.65rem; }
.opt {
  display: flex; align-items: center; gap: 0.9rem;
  background: var(--off-white);
  border: 1.5px solid var(--border);
  border-radius: 12px; padding: 0.9rem 1.1rem;
  cursor: pointer;
  transition: all 0.16s;
  font-size: 0.9rem; color: var(--text);
  text-align: left; width: 100%;
}
.opt:hover { border-color: var(--teal); background: var(--teal-dim); }
.opt.selected { border-color: var(--teal); background: var(--teal-dim); }
.opt.correct { border-color: #38a169; background: rgba(56,161,105,0.08); }
.opt.wrong { border-color: #e53e3e; background: rgba(229,62,62,0.06); }
.opt-key {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--border); border: 1px solid var(--border-dark);
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; font-size: 0.65rem;
  color: var(--text-muted); flex-shrink: 0;
  transition: all 0.16s;
}
.opt.selected .opt-key { background: var(--teal); border-color: var(--teal); color: white; }

.test-actions { display: flex; justify-content: space-between; align-items: center; }
.btn-next {
  background: var(--teal);
  color: white; font-family: 'Outfit', sans-serif;
  font-size: 0.9rem; font-weight: 600;
  padding: 0.8rem 2rem;
  border: none; border-radius: 100px; cursor: pointer;
  transition: all 0.2s; box-shadow: var(--shadow-sm);
}
.btn-next:hover { background: var(--teal-light); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-next:disabled { opacity: 0.3; cursor: not-allowed; transform: none; box-shadow: none; }
.skip-btn {
  font-size: 0.8rem; color: var(--text-muted);
  background: none; border: none; cursor: pointer;
  padding: 0.5rem 0; transition: color 0.15s;
}
.skip-btn:hover { color: var(--text); }

/* ─── GHOST / OUTLINE BUTTONS ─── */
.btn-ghost {
  background: none; border: 1.5px solid var(--border);
  border-radius: 100px; padding: 0.6rem 1.5rem;
  font-size: 0.82rem; color: var(--text-muted);
  cursor: pointer; transition: all 0.2s; margin-top: 0.75rem;
}
.btn-ghost:hover { border-color: var(--border-dark); color: var(--text); }

/* ─── RESULTS ─── */
#results { padding: 80px 2rem 5rem; }
.results-layout { max-width: 760px; margin: 0 auto; }

.results-hero {
  background: var(--navy);
  border-radius: 24px;
  padding: 3rem;
  text-align: center;
  margin-bottom: 1.5rem;
  position: relative; overflow: hidden;
}
.results-hero::before {
  content: '';
  position: absolute; top: -60px; right: -60px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(26,127,116,0.15);
  pointer-events: none;
}
.results-hero::after {
  content: '';
  position: absolute; bottom: -40px; left: -40px;
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255,255,255,0.03);
}
.result-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.2em;
  color: rgba(26,163,150,0.9); text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.result-test-name {
  font-family: 'Fraunces', serif;
  font-size: 1rem; font-style: italic;
  color: rgba(255,255,255,0.5); margin-bottom: 0.3rem;
}
.result-iq-number {
  font-family: 'Fraunces', serif;
  font-size: 6rem; font-weight: 900; line-height: 1;
  color: white; letter-spacing: -0.05em;
  margin: 0.5rem 0;
}
.result-iq-number span {
  font-size: 2rem; color: rgba(255,255,255,0.4);
  vertical-align: super; margin-left: 0.2rem;
}
.result-tier {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem; font-weight: 700;
  color: white; margin-bottom: 0.5rem;
}
.result-desc {
  font-size: 0.88rem; color: rgba(255,255,255,0.55);
  max-width: 460px; margin: 0 auto; line-height: 1.7;
}

.stats-trio {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 1rem; margin-bottom: 1.5rem;
}
.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 1.4rem;
  text-align: center; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.stat-tile::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--teal-light));
}
.stat-number {
  font-family: 'Fraunces', serif;
  font-size: 2rem; font-weight: 900;
  color: var(--teal); line-height: 1;
}
.stat-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.3rem; }

/* performance bar */
.perf-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 1.5rem;
  margin-bottom: 1.5rem; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.perf-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--teal), transparent 70%);
}
.perf-title {
  font-family: 'Fraunces', serif;
  font-size: 1rem; font-weight: 700; color: var(--navy);
  margin-bottom: 1.2rem;
}
.perf-bar-wrap { margin-bottom: 1rem; }
.perf-bar-label {
  display: flex; justify-content: space-between;
  font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.4rem;
}
.perf-bar-track { height: 8px; background: var(--surface2); border-radius: 100px; overflow: hidden; }
.perf-bar-fill { height: 100%; border-radius: 100px; transition: width 1.2s cubic-bezier(0.4,0,0.2,1); }

/* CTA section */
.cta-banner {
  background: linear-gradient(135deg, var(--surface) 0%, rgba(26,127,116,0.03) 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.cta-banner-top {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--teal-light), transparent);
}
.cta-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem; letter-spacing: 0.15em;
  color: var(--teal); text-transform: uppercase; margin-bottom: 0.5rem;
}
.cta-title {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem; font-weight: 700; color: var(--navy);
  margin-bottom: 0.4rem;
}
.cta-sub { font-size: 0.85rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 1.5rem; }
.app-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--off-white); border: 1px solid var(--border);
  border-radius: 12px; padding: 1rem 1.2rem;
  text-decoration: none; color: var(--text);
  transition: all 0.18s; margin-bottom: 0.65rem;
}
.app-card:hover { border-color: var(--teal); transform: translateX(3px); box-shadow: var(--shadow-sm); }
.app-card:last-child { margin-bottom: 0; }
.app-card-icon {
  font-size: 1.4rem;
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.app-card-name { font-size: 0.9rem; font-weight: 600; color: var(--navy); }
.app-card-desc { font-size: 0.76rem; color: var(--text-muted); margin-top: 0.1rem; }
.app-card-arrow { margin-left: auto; color: var(--teal); font-size: 1rem; }
.app-card-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem; letter-spacing: 0.06em;
  color: var(--amber); background: rgba(217,119,6,0.08);
  border: 1px solid rgba(217,119,6,0.2);
  padding: 0.15rem 0.45rem; border-radius: 100px; margin-left: 0.5rem;
}

.results-footer {
  display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center;
  padding-top: 0.5rem;
}
.btn-outline {
  background: var(--surface); border: 1.5px solid var(--border);
  color: var(--text-mid); font-family: 'Outfit', sans-serif;
  font-size: 0.83rem; font-weight: 500;
  padding: 0.75rem 1.8rem; border-radius: 100px;
  cursor: pointer; transition: all 0.18s;
  box-shadow: var(--shadow-sm);
}
.btn-outline:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes countUp {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

/* ─── SHARE BUTTONS ─── */
.share-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.8rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.share-title {
  font-family: 'Fraunces', serif;
  font-size: 1rem; font-weight: 700; color: var(--navy);
  margin-bottom: 0.3rem;
}
.share-sub {
  font-size: 0.78rem; color: var(--text-muted); margin-bottom: 1rem;
}
.share-row {
  display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap;
}
.share-btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem; font-weight: 500;
  padding: 0.55rem 1rem; border-radius: 100px;
  border: none; cursor: pointer;
  color: white; transition: all 0.18s;
  text-decoration: none;
}
.share-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.share-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.share-btn-twitter { background: #1da1f2; }
.share-btn-twitter:hover { background: #0d95e8; }
.share-btn-facebook { background: #1877f2; }
.share-btn-facebook:hover { background: #0d6ae4; }
.share-btn-whatsapp { background: #25d366; }
.share-btn-whatsapp:hover { background: #1ebf5a; }
.share-btn-copy { background: var(--navy); }
.share-btn-copy:hover { background: var(--navy-mid); }
.share-btn-copy.copied { background: var(--teal); }

/* ─── TOAST ─── */
.toast {
  position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--navy); color: white;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem; font-weight: 500;
  padding: 0.7rem 1.5rem; border-radius: 100px;
  box-shadow: var(--shadow-lg);
  z-index: 9999; pointer-events: none;
  opacity: 0; transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}
.toast.show {
  opacity: 1; transform: translateX(-50%) translateY(0);
}

/* ─── TEST COUNTER BANNER ─── */
.test-counter-banner {
  text-align: center; margin-bottom: 3rem;
  opacity: 0; animation: fadeUp 0.5s 0.4s forwards;
}
.test-counter-number {
  font-family: 'Fraunces', serif;
  font-size: 2rem; font-weight: 900;
  color: var(--teal);
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.test-counter-label {
  font-size: 0.85rem; color: var(--text-muted); margin-top: 0.2rem;
}

/* ─── COMING SOON CARDS ─── */
.test-card.coming-soon {
  opacity: 0.55; cursor: default;
  pointer-events: none;
}
.test-card.coming-soon:hover { transform: none; border-color: var(--border); box-shadow: var(--shadow-sm); }
.tc-soon {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem; font-weight: 500; letter-spacing: 0.08em;
  color: var(--text-muted);
  background: var(--surface2);
  border: 1px dashed var(--border-dark);
  padding: 0.2rem 0.5rem; border-radius: 100px;
}

/* ─── CHALLENGE BANNER ─── */
.challenge-banner {
  background: linear-gradient(135deg, rgba(217,119,6,0.08), rgba(26,127,116,0.08));
  border: 1.5px solid rgba(217,119,6,0.25);
  border-radius: 16px;
  padding: 1.3rem 1.8rem;
  margin-bottom: 2rem;
  display: flex; align-items: center; gap: 1rem;
  animation: fadeUp 0.4s forwards;
}
.challenge-banner-icon { font-size: 2rem; flex-shrink: 0; }
.challenge-banner-text { flex: 1; }
.challenge-banner-title {
  font-family: 'Fraunces', serif;
  font-size: 1.05rem; font-weight: 700; color: var(--navy);
  margin-bottom: 0.2rem;
}
.challenge-banner-sub { font-size: 0.82rem; color: var(--text-mid); }
.challenge-banner-btn {
  background: var(--amber); color: white;
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem; font-weight: 600;
  padding: 0.6rem 1.3rem; border: none;
  border-radius: 100px; cursor: pointer;
  transition: all 0.2s; white-space: nowrap;
}
.challenge-banner-btn:hover { background: #c26a04; transform: translateY(-1px); }

/* ─── CATEGORY BREAKDOWN ─── */
.category-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.category-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--teal-light), transparent);
}
.category-title {
  font-family: 'Fraunces', serif;
  font-size: 1rem; font-weight: 700; color: var(--navy);
  margin-bottom: 1.2rem;
}
.category-bar-row {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.category-bar-row:last-child { margin-bottom: 0; }
.category-bar-label {
  font-size: 0.78rem; color: var(--text-mid); font-weight: 500;
  min-width: 130px; flex-shrink: 0; line-height: 1.3;
}
.category-bar-track {
  height: 8px; background: var(--surface2);
  border-radius: 100px; overflow: hidden;
  flex: 1;
}
.category-bar-fill {
  height: 100%; border-radius: 100px;
  transition: width 1s cubic-bezier(0.4,0,0.2,1);
}
.category-bar-stat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem; color: var(--text-muted);
  min-width: 88px; text-align: right; flex-shrink: 0;
  white-space: nowrap;
}
.cat-fill-high { background: var(--teal); }
.cat-fill-mid { background: var(--amber); }
.cat-fill-low { background: #e53e3e; }

/* ─── CERTIFICATE CTA & MODAL ─── */
.cert-cta {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-radius: 16px;
  padding: 1.8rem 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-md);
  position: relative; overflow: hidden;
}
.cert-cta::before {
  content: '';
  position: absolute; top: -30px; right: -30px;
  width: 100px; height: 100px; border-radius: 50%;
  background: rgba(26,127,116,0.15);
  pointer-events: none;
}
.cert-cta::after {
  content: '';
  position: absolute; bottom: -20px; left: -20px;
  width: 70px; height: 70px; border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}
.cert-cta:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.cert-cta-icon { font-size: 2rem; margin-bottom: 0.5rem; position: relative; z-index: 1; }
.cert-cta-title {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem; font-weight: 700;
  margin-bottom: 0.3rem; position: relative; z-index: 1;
}
.cert-cta-sub { font-size: 0.78rem; color: rgba(255,255,255,0.55); position: relative; z-index: 1; }

.cert-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(26,34,54,0.6);
  backdrop-filter: blur(6px);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  opacity: 0; transition: opacity 0.25s;
  pointer-events: none;
}
.cert-modal-overlay.active { opacity: 1; pointer-events: auto; }
.cert-modal {
  background: var(--surface);
  border-radius: 24px;
  padding: 2.5rem 2rem 2rem;
  max-width: 480px; width: 100%;
  box-shadow: var(--shadow-lg);
  text-align: center;
  position: relative; overflow: hidden;
}
.cert-modal::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--teal-light), transparent);
}

.cert-modal-icon {
  font-size: 2.5rem;
  margin-bottom: 0.6rem;
}
.cert-modal-title {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem; font-weight: 700; color: var(--navy);
  margin-bottom: 0.4rem;
}
.cert-modal-sub {
  font-size: 0.82rem; color: var(--text-muted);
  margin-bottom: 1.5rem; line-height: 1.6;
}

.cert-form {
  display: flex; flex-direction: column; gap: 0.8rem;
  margin-bottom: 0.75rem;
  text-align: left;
}
.cert-input-group { display: flex; flex-direction: column; gap: 0.3rem; }
.cert-input-label {
  font-size: 0.75rem; font-weight: 600; color: var(--text-mid);
  letter-spacing: 0.02em;
}
.cert-modal-input {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem; color: var(--text);
  background: var(--off-white);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  width: 100%;
  outline: none; transition: border-color 0.2s;
}
.cert-modal-input:focus { border-color: var(--teal); }
.cert-modal-input::placeholder { color: var(--text-muted); }

.cert-error {
  color: #e53e3e; font-size: 0.78rem;
  min-height: 1.2rem; text-align: center;
  margin-bottom: 0.3rem;
}

.cert-modal-actions {
  display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap;
}
.cert-modal-actions .btn-ghost {
  border-color: var(--border); color: var(--text-muted);
  margin-top: 0;
}

.btn-cert-submit {
  background: var(--teal);
  color: white; font-family: 'Outfit', sans-serif;
  font-size: 0.9rem; font-weight: 600;
  padding: 0.75rem 1.8rem;
  border: none; border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-md);
}
.btn-cert-submit:hover { background: var(--teal-light); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-cert-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.cert-privacy-note {
  font-size: 0.7rem; color: var(--text-muted);
  margin-top: 1rem;
  line-height: 1.4;
}

/* Certificate Success View */
.cert-success-icon { font-size: 3rem; margin-bottom: 0.8rem; }
.cert-success-title {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem; font-weight: 700; color: var(--navy);
  margin-bottom: 0.5rem;
}
.cert-success-msg {
  font-size: 0.88rem; color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.cert-success-email {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem; color: var(--teal);
  background: var(--teal-dim);
  display: inline-block;
  padding: 0.35rem 0.9rem; border-radius: 100px;
  margin-bottom: 0.8rem;
}
.cert-success-note {
  font-size: 0.78rem; color: var(--text-muted);
  line-height: 1.5;
}

/* ─── FAQ SECTION ─── */
.faq-section {
  margin-top: 1rem;
  margin-bottom: 4rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.faq-heading {
  font-family: 'Fraunces', serif;
  font-size: 1.6rem; font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.4rem;
  text-align: center;
}
.faq-intro {
  font-size: 0.88rem; color: var(--text-muted);
  text-align: center;
  margin-bottom: 2rem;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 0.6rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}
.faq-item.open { box-shadow: var(--shadow-md); }
.faq-question {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem; font-weight: 600;
  color: var(--navy);
  background: none; border: none;
  padding: 1.1rem 1.4rem;
  cursor: pointer;
  text-align: left;
  transition: color 0.2s;
  line-height: 1.4;
}
.faq-question:hover { color: var(--teal); }
.faq-toggle-icon {
  font-size: 1.2rem; color: var(--teal);
  flex-shrink: 0;
  font-weight: 300;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--teal-dim);
  transition: background 0.2s;
}
.faq-item.open .faq-toggle-icon { background: var(--teal); color: white; }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1);
}
.faq-answer p {
  font-size: 0.84rem; color: var(--text-mid);
  line-height: 1.7;
  padding: 0 1.4rem 1.3rem;
}

/* ─── HOME APPS SECTION ─── */
.home-apps-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
  position: relative; overflow: hidden;
}
.home-apps-section::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--teal-light), transparent);
}
.home-apps-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem; letter-spacing: 0.15em;
  color: var(--teal); text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.home-apps-heading {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem; font-weight: 700; color: var(--navy);
  margin-bottom: 0.4rem;
}
.home-apps-sub {
  font-size: 0.85rem; color: var(--text-muted);
  line-height: 1.6; margin-bottom: 1.5rem;
}
.home-apps-list { text-align: left; }

.home-app-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--off-white); border: 1px solid var(--border);
  border-radius: 12px; padding: 1rem 1.2rem;
  text-decoration: none; color: var(--text);
  transition: all 0.18s; margin-bottom: 0.65rem;
}
.home-app-card:hover { border-color: var(--teal); transform: translateX(3px); box-shadow: var(--shadow-sm); }
.home-app-card:last-child { margin-bottom: 0; }
.home-app-icon {
  font-size: 1.4rem;
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.home-app-info { flex: 1; }
.home-app-name { font-size: 0.9rem; font-weight: 600; color: var(--navy); }
.home-app-desc { font-size: 0.76rem; color: var(--text-muted); margin-top: 0.1rem; }
.home-app-arrow { margin-left: auto; color: var(--teal); font-size: 1rem; flex-shrink: 0; }

/* ─── SITE FOOTER ─── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  padding: 2.5rem 2rem;
  position: relative; z-index: 1;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.footer-brand {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: 'Fraunces', serif;
  font-size: 1.1rem; font-weight: 900;
  color: white;
  margin-bottom: 0.6rem;
}
.footer-brand .nav-logo-dot { background: var(--teal-light); }
.footer-text {
  font-size: 0.8rem; color: rgba(255,255,255,0.45);
  line-height: 1.6; margin-bottom: 1rem;
  max-width: 400px; margin-left: auto; margin-right: auto;
}
.footer-links {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  margin-bottom: 1rem;
}
.footer-links a {
  font-size: 0.78rem; color: rgba(255,255,255,0.55);
  text-decoration: none; transition: color 0.2s;
}
.footer-links a:hover { color: var(--teal-light); }
.footer-sep { color: rgba(255,255,255,0.2); font-size: 0.7rem; }
.footer-copy {
  font-size: 0.68rem; color: rgba(255,255,255,0.3);
}

/* ─── VISUAL QUESTION DIAGRAMS ─── */
.diagram-area {
  display: flex; justify-content: center; align-items: center;
  margin-bottom: 1.5rem;
}
.diagram-matrix {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 4px; max-width: 300px; width: 100%;
  aspect-ratio: 1;
}
.diagram-cell {
  background: var(--off-white);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 6px;
  aspect-ratio: 1;
}
.diagram-cell svg { display: block; }
.diagram-cell-missing {
  border: 2px dashed var(--teal);
  background: rgba(26,127,116,0.04);
  position: relative;
}
.diagram-cell-q {
  font-family: 'Fraunces', serif;
  font-size: 1.8rem; font-weight: 900;
  color: var(--teal); opacity: 0.6;
}

.diagram-sequence {
  display: flex; align-items: center; justify-content: center;
  gap: 4px; flex-wrap: wrap;
}
.diagram-seq-cell {
  width: 70px; height: 70px;
  background: var(--off-white);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 6px; flex-shrink: 0;
}
.diagram-seq-arrow {
  font-size: 1.2rem; color: var(--text-muted);
  padding: 0 2px; flex-shrink: 0;
}

.diagram-rotation {
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
}
.diagram-rotation-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem; letter-spacing: 0.1em;
  color: var(--text-muted); text-transform: uppercase;
}
.diagram-ref-shape {
  width: 120px; height: 120px;
  background: var(--off-white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  padding: 10px;
}

.diagram-instruction {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; color: var(--teal);
  text-align: center; padding: 0.5rem;
  letter-spacing: 0.06em;
}

/* Visual option buttons (2x2 grid) */
.options-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  flex-direction: unset;
}
.opt-visual {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.4rem; padding: 0.8rem;
  min-height: 110px; position: relative;
  text-align: center;
}
.opt-key-visual {
  position: absolute; top: 0.5rem; left: 0.5rem;
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--border); border: 1px solid var(--border-dark);
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; font-size: 0.6rem;
  color: var(--text-muted);
}
.opt-visual.selected .opt-key-visual { background: var(--teal); border-color: var(--teal); color: white; }
.opt-svg-wrap {
  width: 70px; height: 70px;
  display: flex; align-items: center; justify-content: center;
}
.opt-svg-wrap svg { display: block; width: 100%; height: 100%; }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .hero-split { grid-template-columns: 1fr; gap: 2rem; }
  .tests-grid { grid-template-columns: 1fr 1fr; }
  .stats-trio { grid-template-columns: 1fr 1fr 1fr; }
  nav { padding: 0 1.2rem; }
  .share-row { gap: 0.5rem; }
  .share-btn { font-size: 0.72rem; padding: 0.5rem 0.8rem; }
  .challenge-banner { flex-direction: column; text-align: center; }
  .test-counter-number { font-size: 1.6rem; }
  .diagram-matrix { max-width: 260px; }
  .diagram-seq-cell { width: 60px; height: 60px; }
  .diagram-ref-shape { width: 100px; height: 100px; }
  .opt-svg-wrap { width: 60px; height: 60px; }
  .opt-visual { min-height: 95px; }
  .category-bar-label { min-width: 110px; font-size: 0.74rem; }
  .category-bar-stat { min-width: 78px; font-size: 0.62rem; }
  .results-hero { padding: 2.5rem 1.5rem; }
  .cta-banner { padding: 1.8rem 1.5rem; }
  .faq-section { margin-bottom: 3rem; }
  .home-apps-section { padding: 2rem 1.5rem; }
}
@media (max-width: 520px) {
  .tests-grid { grid-template-columns: 1fr; }
  .stats-trio { grid-template-columns: 1fr; }
  .result-iq-number { font-size: 4.5rem; }
  .cert-modal { padding: 1.5rem; }
  .diagram-matrix { max-width: 220px; gap: 3px; }
  .diagram-seq-cell { width: 50px; height: 50px; }
  .diagram-seq-arrow { font-size: 1rem; }
  .options-grid { gap: 0.5rem; }
  .opt-visual { min-height: 85px; padding: 0.6rem; }
  .opt-svg-wrap { width: 50px; height: 50px; }
  .category-bar-row { flex-wrap: wrap; gap: 0.3rem; }
  .category-bar-label { min-width: 100%; font-size: 0.74rem; }
  .category-bar-stat { min-width: auto; }
  .results-hero { padding: 2rem 1.2rem; }
  .results-hero::before { width: 120px; height: 120px; top: -30px; right: -30px; }
  .results-hero::after { width: 80px; height: 80px; }
  .cta-banner { padding: 1.5rem 1.2rem; }
  .app-card { padding: 0.85rem 1rem; }
  .app-card-icon { width: 36px; height: 36px; font-size: 1.2rem; }
  .share-row { flex-direction: column; }
  .share-btn { justify-content: center; }
  .start-row { flex-direction: column; text-align: center; gap: 1rem; }
  .faq-question { font-size: 0.85rem; padding: 1rem; }
  .faq-answer p { font-size: 0.8rem; padding: 0 1rem 1.1rem; }
  .home-apps-section { padding: 1.5rem 1.2rem; margin-bottom: 2rem; }
  .home-app-card { padding: 0.85rem 1rem; }
  .home-app-icon { width: 36px; height: 36px; font-size: 1.2rem; }
  .site-footer { padding: 2rem 1.5rem; }
}
