*{box-sizing:border-box;margin:0;padding:0}
:root{--primary:#2563eb;--text:#0f172a;--text-soft:#6b7280;--border:#e5e7eb;--radius-card:18px}
body{
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:radial-gradient(circle at top,#e0f2fe 0,#f5f5f7 45%);
  color:var(--text);min-height:100vh;display:flex;justify-content:center
}
.page{width:100%;max-width:960px;padding:16px}
.nav{display:flex;align-items:center;justify-content:space-between;padding-bottom:12px}
.nav-left{display:flex;align-items:center;gap:10px}
.logo-mark{
  width:34px;height:34px;border-radius:999px;
  background:conic-gradient(from 180deg,#2563eb,#6366f1,#22c55e,#2563eb);
  display:flex;align-items:center;justify-content:center;font-weight:800;font-size:14px;color:#fff
}
.logo-title{font-size:18px;font-weight:800;line-height:1}
.nav-test-name{font-size:12px;color:var(--text-soft);margin-top:2px}
.exit-link{
  font-size:13px;color:var(--text-soft);text-decoration:none;padding:8px 12px;border-radius:999px;
  border:1px solid rgba(148,163,184,.7);background:rgba(248,250,252,.9)
}
.menu-btn{
  width:40px;height:40px;border-radius:999px;border:1px solid rgba(148,163,184,.7);
  background:rgba(248,250,252,.9);display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;cursor:pointer
}
.menu-btn span{display:block;width:16px;height:2px;background:#64748b;border-radius:999px}

.hero-card,.section,.question-layout,.result-card{
  background:#ffffffee;border-radius:var(--radius-card);border:1px solid rgba(148,163,184,.2);
  box-shadow:0 18px 40px rgba(15,23,42,.08);
  padding:20px 18px;margin-top:14px
}
.hero-title{font-size:28px;letter-spacing:-.02em;margin-bottom:8px}
.hero-subtitle{font-size:14px;color:var(--text-soft);margin-bottom:14px}
.hero-list{list-style:none;margin-bottom:18px}
.hero-list li{display:flex;align-items:center;gap:10px;font-size:14px;color:var(--text-soft);margin-bottom:10px}
.hero-list .bullet{width:6px;height:6px;border-radius:999px;background:var(--primary);flex-shrink:0}
.hero-actions{display:flex;gap:12px;margin-bottom:10px;flex-wrap:wrap}
.btn-primary,.btn-next{
  padding:12px 22px;border-radius:999px;border:none;
  background:linear-gradient(135deg,#2563eb,#6366f1);
  color:#fff;font-size:15px;font-weight:700;cursor:pointer
}
.btn-secondary{
  padding:11px 18px;border-radius:999px;border:1px solid rgba(148,163,184,.7);
  background:#f8fafc;font-size:14px;color:var(--text-soft);cursor:pointer
}
.section-title{font-size:18px;font-weight:800;margin-bottom:12px}
.test-carousel{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media (min-width:860px){.test-carousel{grid-template-columns:repeat(3,minmax(0,1fr))}}
.test-card{
  display:block;text-decoration:none;background:#f9fafb;border-radius:16px;padding:14px 14px 16px;border:1px solid var(--border)
}
.test-card strong{display:block;font-size:16px;color:var(--text)}
.test-card p{font-size:13px;color:var(--text-soft);margin-top:6px;line-height:1.35}
.all-tests-list{list-style:none;display:grid;gap:14px;margin-top:6px}
.all-tests-list a{font-size:16px;color:#1d4ed8;text-decoration:none}
.all-tests-list a:hover{text-decoration:underline}
.footer{margin-top:20px;padding-top:10px;border-top:1px solid rgba(148,163,184,.3);font-size:12px;color:var(--text-soft);text-align:center}
.footer-links{display:flex;justify-content:center;gap:12px;margin-bottom:6px}
.footer-copy{font-size:11px;color:#9ca3af}

/* Test UI */
.question-layout{max-width:720px;margin:14px auto}
.question-top-row{display:flex;justify-content:space-between;gap:8px;margin-bottom:8px}
.question-label,.question-count{font-size:12px;color:var(--text-soft)}
.progress-bar-wrap{width:100%;height:7px;border-radius:999px;background:#e5e7eb;overflow:hidden;margin-bottom:14px}
.progress-fill{height:100%;border-radius:inherit;background:linear-gradient(90deg,#2563eb,#6366f1)}
.question-card{border-radius:16px;border:1px solid var(--border);background:#f9fafb;padding:14px 12px 16px;margin-bottom:12px}
.timer-display{text-align:center;font-size:13px;color:var(--text-soft);margin-bottom:6px}
.question-title{font-size:15px;font-weight:800;margin-bottom:6px}
.question-text{font-size:15px;margin-bottom:12px;line-height:1.45}
.answers-list{list-style:none;display:grid;gap:10px}
.answer-option{
  border-radius:14px;border:1px solid var(--border);background:#fff;padding:12px 12px;display:flex;align-items:center;gap:10px;cursor:pointer;
  transition:background .15s ease,border-color .15s ease
}
.answer-option.selected{border-color:#2563eb;background:#e0edff}
.answer-badge{
  width:26px;height:26px;border-radius:999px;border:1px solid #d1d5db;display:flex;align-items:center;justify-content:center;
  font-size:12px;color:var(--text-soft);background:#f3f4f6;flex-shrink:0;font-weight:700
}
.bottom-nav{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:4px}
.btn-skip{border:none;background:transparent;font-size:13px;color:var(--text-soft);cursor:pointer}
.result-main-score{font-size:44px;font-weight:900;margin:10px 0}
.result-subline{font-size:14px;color:var(--text-soft);margin-bottom:10px}

/* --- Carousels (Index) --- */
.carousel{position:relative}
.carousel-viewport{
  overflow:hidden;
  border-radius:16px;
}
.carousel-track{
  display:flex;
  align-items:stretch;
  transition:transform .45s ease;
  will-change:transform;
}
.carousel-slide{min-width:0}
.carousel-dots{
  display:flex;
  gap:8px;
  justify-content:center;
  margin-top:10px;
}
.carousel-dots .dot{
  width:8px;height:8px;border-radius:999px;
  border:1px solid rgba(148,163,184,.8);
  background:transparent;
  cursor:pointer;
}
.carousel-dots .dot.active{
  background:rgba(37,99,235,.95);
  border-color:rgba(37,99,235,.95);
}

/* All tests cards: use existing test-carousel grid but with consistent spacing */
.all-tests-cards{margin-top:4px}


/* --- Index badges --- */
.test-card{position:relative}
.hot-badge{
  position:absolute;
  top:10px;
  right:10px;
  font-size:10px;
  font-weight:800;
  letter-spacing:.04em;
  padding:6px 8px;
  border-radius:999px;
  background:rgba(37,99,235,.12);
  border:1px solid rgba(37,99,235,.25);
  color:rgba(37,99,235,.95);
}

/* --- Test intro pages --- */
.test-intro-box{
  background:rgba(255,255,255,.75);
  border:1px solid rgba(148,163,184,.35);
  border-radius:18px;
  padding:14px;
}
.test-intro-box h3{margin:0 0 8px 0}
.test-intro-box p{margin:0 0 10px 0; color:var(--text-soft)}
.intro-bullets{display:flex; gap:8px; flex-wrap:wrap}
.pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.35);
  background:rgba(255,255,255,.7);
  font-weight:700;
  font-size:12px;
}

/* --- Results insights --- */
.result-insights{background:rgba(255,255,255,.65);border:1px solid rgba(148,163,184,.35);border-radius:18px;padding:12px}
.insight-row{display:flex;gap:10px;justify-content:space-between;align-items:flex-start}
.insight-label{font-weight:800}
.insight-text{color:var(--text-soft);font-weight:700;text-align:right}
.scale-wrap{margin-top:10px}
.scale-bar{height:10px;border-radius:999px;background:rgba(148,163,184,.25);position:relative}
.scale-marker{position:absolute;top:50%;width:12px;height:12px;border-radius:999px;background:rgba(37,99,235,.95);border:2px solid #fff;box-shadow:0 6px 18px rgba(15,23,42,.15);transform:translate(-50%,-50%)}
.scale-labels{display:flex;justify-content:space-between;margin-top:6px;font-size:12px;color:var(--text-soft);font-weight:700}


/* --- Diagonal HOT ribbon --- */
.test-card{position:relative; overflow:hidden}
.hot-badge{
  position:absolute;
  top:12px;
  right:-36px;
  transform:rotate(45deg);
  background:#dc2626;
  color:#fff;
  font-size:10px;
  font-weight:800;
  padding:4px 40px;
  text-transform:uppercase;
  letter-spacing:.08em;
  box-shadow:0 4px 12px rgba(0,0,0,.15);
}


/* --- IQ scale markers --- */
.iq-scale-ticks{
  position:relative;
  height:18px;
  margin-top:8px;
}
.iq-scale-ticks .tick{
  position:absolute;
  top:0;
  transform:translateX(-50%);
  font-size:11px;
  font-weight:800;
  color:var(--text-soft);
}
.iq-scale-bands{
  position:relative;
  margin-top:6px;
  height:14px;
}
.iq-scale-bands span{
  position:absolute;
  top:0;
  font-size:11px;
  font-weight:800;
  color:var(--text-soft);
  white-space:nowrap;
}


/* --- IQ results: marker on bar + key --- */
.scale-bar{position:relative}
.scale-marker{
  position:absolute !important;
  top:50% !important;
  transform:translate(-50%,-50%) !important;
  width:12px;
  height:12px;
  border-radius:999px;
  background:rgba(37,99,235,.95);
  border:2px solid #fff;
  box-shadow:0 6px 18px rgba(15,23,42,.15);
}
.iq-key{
  margin-top:10px;
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:8px 14px;
  font-size:12px;
  color:var(--text-soft);
  font-weight:700;
}
@media (min-width: 860px){
  .iq-key{grid-template-columns:repeat(5, minmax(0,1fr));}
}
.key-dot{
  display:inline-block;
  width:10px;height:10px;border-radius:999px;
  margin-right:8px;
  border:1px solid rgba(148,163,184,.35);
  background:rgba(148,163,184,.25);
}
.key-dot.avg{background:rgba(34,197,94,.18)}
.key-dot.above{background:rgba(59,130,246,.18)}
.key-dot.high{background:rgba(168,85,247,.18)}
.key-dot.vhigh{background:rgba(239,68,68,.18)}
.key-dot.below{background:rgba(251,191,36,.18)}


/* Ensure IQ scale ticks align with the bar width */
.scale-wrap{width:100%}
.iq-scale-ticks{width:100%}


/* --- Share buttons (results) --- */
.share-wrap{margin-top:14px}
.share-title{font-weight:900;margin-bottom:8px}
.share-buttons{display:flex;gap:10px;flex-wrap:wrap}
.share-btn{
  width:44px;height:44px;border-radius:14px;
  display:inline-flex;align-items:center;justify-content:center;
  border:1px solid rgba(148,163,184,.35);
  background:rgba(255,255,255,.7);
  font-weight:900;
  text-decoration:none;
  cursor:pointer;
  user-select:none;
}
.share-btn span{font-size:14px}
.share-toast{
  position:fixed;
  left:50%;
  bottom:22px;
  transform:translateX(-50%);
  padding:10px 12px;
  border-radius:999px;
  background:rgba(15,23,42,.92);
  color:#fff;
  font-weight:800;
  font-size:13px;
  opacity:0;
  pointer-events:none;
  transition:opacity .2s ease;
  z-index:9999;
}
.share-toast.show{opacity:1}




/* --- Compact share column (fits within former "Share" label width) --- */
.share-inline{
  margin-left:auto;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:flex-end;
  max-width:44px; /* prevent spilling outside the card */
  overflow:hidden;
}
.share-label{display:none !important;}
.share-buttons{
  display:flex;
  flex-direction:column;
  gap:8px;
  align-items:flex-end;
}
.share-btn{
  width:32px;
  height:32px;
  border-radius:12px;
}
/* --- Results footer alignment tweaks --- */
.share-inline{
  max-width:160px; /* enough for 4 icons */
  overflow:hidden;
}
.share-buttons{
  display:flex !important;
  flex-direction:row !important;
  gap:10px;
  align-items:center;
  justify-content:flex-end;
}
.share-btn{
  width:32px;
  height:32px;
  border-radius:12px;
}

/* Ensure action buttons stay normal sized */
#retakeBtn, a.btn-primary, a.btn-secondary{
  width:auto !important;
  min-width:0 !important;
  height:auto !important;
  padding:12px 16px !important;
  border-radius:999px !important;
}


/* Trait bar (uses same visual style as scale bar) */
.score-bar-wrap{margin-top:10px}
.score-bar{height:10px;border-radius:999px;background:rgba(148,163,184,.25);position:relative}
.score-dot{position:absolute;top:50%;width:12px;height:12px;border-radius:999px;background:rgba(37,99,235,.95);border:2px solid #fff;box-shadow:0 6px 18px rgba(15,23,42,.15);transform:translate(-50%,-50%)}

/* Trait test result bar: 4 subtle segments and labels */
.score-bar.trait-bar{background:linear-gradient(to right,rgba(148,163,184,.28) 0%,rgba(148,163,184,.28) 25%,rgba(148,163,184,.18) 25%,rgba(148,163,184,.18) 50%,rgba(148,163,184,.28) 50%,rgba(148,163,184,.28) 75%,rgba(148,163,184,.18) 75%,rgba(148,163,184,.18) 100%)}
.trait-scale-labels{display:flex;justify-content:space-between;gap:6px;margin-top:8px;font-size:12px;color:rgba(15,23,42,.65);user-select:none}
.trait-scale-labels span{flex:1;text-align:center}


.footer-links a{color:inherit;text-decoration:none;font-weight:600;opacity:.9}
.footer-links a:hover{opacity:1;text-decoration:underline}


/* Legal pages layout fix */
.page-wrapper{min-height:100vh;display:flex;flex-direction:column}
.page-content{flex:1}


.page-wrapper .footer{margin-top:auto}

/* Legal pages typography */
.legal-content p{line-height:1.7;margin:0 0 14px 0;color:rgba(15,23,42,.86)}
.legal-content h2{margin:18px 0 10px 0;font-size:18px}
.legal-content ul{margin:10px 0 14px 18px;line-height:1.7}
.legal-content a{color:inherit;text-decoration:underline}


/* Small button (used on legal pages) */
.btn-sm{padding:8px 12px;font-size:0.95rem;}
.legal-hero-actions{margin-top:12px;}


/* Ensure header logo/brand never looks like a default link (used on legal pages) */
.nav-left a, .nav-left a:visited {
  color: inherit;
  text-decoration: none;
}

/* Legal pages: keep typography consistent across Terms/Privacy/Disclaimer/Contact */
.legal-content {
  font-size: 16px;
  line-height: 1.6;
}
.legal-content h2 {
  font-size: 18px;
  line-height: 1.3;
  margin-top: 18px;
}
.legal-content p, .legal-content li {
  font-size: 16px;
  line-height: 1.6;
}
