/* ====================================================================
   Tests / quiz UI
   Depends on: /css/mentranova.css (for tokens + nav)
   ==================================================================== */

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
@media (max-width: 600px) { .container { padding: 32px 16px 60px; } }

/* ---- INTRO SCREEN ---- */
.intro { text-align: center; padding: 32px 0 16px; }
.intro-icon { font-size: 56px; margin-bottom: 20px; line-height: 1; }
.intro h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin-bottom: 18px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}
.intro-subtitle {
  font-size: 18px;
  color: var(--ink-2);
  margin-bottom: 32px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.55;
}
.intro-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  margin-bottom: 36px;
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}
.intro-meta span { display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; }
.intro-meta span + span { border-left: 1px solid var(--line); }

.btn-start {
  background: var(--ink);
  color: var(--bg);
  border: 0;
  padding: 14px 36px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
  letter-spacing: -0.01em;
}
.btn-start:hover {
  background: var(--accent-ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow-m);
}

.disclaimer {
  margin-top: 28px;
  padding: 14px 18px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
}

/* ---- QUIZ SCREEN ---- */
.quiz { display: none; }
.progress-container { margin-bottom: 28px; }
.progress-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.progress-bar {
  height: 4px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--warm));
  border-radius: 999px;
  transition: width .4s ease;
}

.question-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-s);
}
@media (max-width: 600px) {
  .question-card { padding: 28px 22px; border-radius: var(--radius-l); }
}
.question-number {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--accent-ink);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.question-text {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 700;
  margin-bottom: 28px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.options { display: flex; flex-direction: column; gap: 10px; }
.option {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  cursor: pointer;
  transition: all .15s;
}
.option:hover {
  border-color: var(--accent);
  background: var(--accent-tint);
}
.option.selected {
  border-color: var(--accent);
  background: var(--accent-tint);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 12%, transparent);
}
.option-radio {
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--ink-3);
  border-radius: 50%;
  margin-right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
  background: var(--surface);
}
.option.selected .option-radio { border-color: var(--accent); background: var(--accent); }
.option.selected .option-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}
.option-text { font-size: 15px; font-weight: 500; color: var(--ink); line-height: 1.4; }

.nav-buttons { display: flex; gap: 12px; margin-top: 24px; }
.btn-nav {
  flex: 1;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
  border: 0;
}
.btn-prev {
  background: var(--surface);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.btn-prev:hover { border-color: var(--line-2); color: var(--ink); }
.btn-next { background: var(--ink); color: var(--bg); }
.btn-next:hover { background: var(--accent-ink); }
.btn-next:disabled {
  background: var(--line);
  color: var(--ink-3);
  cursor: not-allowed;
}

/* ---- EMAIL GATE ---- */
.email-gate { text-align: center; padding: 32px 0; display: none; }
.email-gate-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  box-shadow: var(--shadow-s);
}
@media (max-width: 600px) {
  .email-gate-card { padding: 32px 24px; border-radius: var(--radius-l); }
}
.email-gate-icon { font-size: 56px; margin-bottom: 20px; line-height: 1; }
.email-gate h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 14px;
}
.email-gate p {
  font-size: 15.5px;
  color: var(--ink-2);
  margin-bottom: 28px;
  line-height: 1.55;
}
.email-form { max-width: 400px; margin: 0 auto; }
.email-input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  font-size: 15px;
  font-family: inherit;
  margin-bottom: 12px;
  background: var(--bg);
  color: var(--ink);
}
.email-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 12%, transparent);
}
.btn-email {
  width: 100%;
  background: var(--ink);
  color: var(--bg);
  border: 0;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-m);
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.btn-email:hover { background: var(--accent-ink); }
.email-error { color: var(--red); font-size: 13px; margin-top: 10px; display: none; }
.email-privacy {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 16px;
  font-family: var(--ff-mono);
  letter-spacing: 0.02em;
}

/* ---- RESULTS ---- */
.results { display: none; text-align: center; }
.result-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  box-shadow: var(--shadow-s);
  margin-bottom: 24px;
  text-align: center;
}
@media (max-width: 600px) {
  .result-card { padding: 36px 24px; border-radius: var(--radius-l); }
}
.result-icon { font-size: 56px; margin-bottom: 16px; line-height: 1; }
.result-type-label {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--accent-ink);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.result-score {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
  color: var(--ink);
  line-height: 1;
}
.result-score.low { color: var(--green); }
.result-score.mild { color: oklch(0.78 0.14 120); }
.result-score.moderate { color: var(--warm); }
.result-score.high { color: var(--red); }
.result-label {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
  line-height: 1.2;
}
.result-desc {
  font-size: 15.5px;
  color: var(--ink-2);
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto 28px;
}
.result-breakdown {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 22px;
  text-align: left;
  margin-top: 24px;
}
.result-breakdown h3 {
  font-family: var(--ff-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.breakdown-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.breakdown-item:last-child { border-bottom: none; padding-bottom: 0; }
.breakdown-item > span:first-child { font-weight: 500; }
.breakdown-item > span:last-child {
  font-family: var(--ff-mono);
  font-size: 13px;
  color: var(--ink-3);
}
.breakdown-item > div:first-child,
.breakdown-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
}
.breakdown-bar-bg {
  height: 6px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.breakdown-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width .4s ease;
}
.breakdown-bar-fill.secure { background: var(--green); }
.breakdown-bar-fill.anxious { background: var(--warm); }
.breakdown-bar-fill.avoidant { background: var(--accent); }
.breakdown-bar-fill.disorganized { background: var(--red); }

.result-why {
  background: var(--accent-tint);
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius-l);
  padding: 22px;
  text-align: left;
  margin-top: 16px;
}
.result-why h3 {
  font-family: var(--ff-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 12px;
}
.result-why ul { margin: 0; padding-left: 18px; }
.result-why li {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
  margin-bottom: 6px;
}

/* ---- CTA ---- */
.cta-box {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-ink) 100%);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  color: white;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.cta-box::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -10%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklch, var(--warm) 50%, transparent) 0, transparent 60%);
  pointer-events: none;
}
.cta-box h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
  position: relative;
  color: white;
}
.cta-box p { opacity: 0.92; margin-bottom: 22px; font-size: 15px; position: relative; }
.cta-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; position: relative; }
.btn-cta {
  background: white;
  color: var(--ink);
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all .15s;
}
.btn-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,0,0,.15);
}

/* ---- Share ---- */
.share-buttons { margin-bottom: 24px; }
.share-buttons h4 {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.share-links { display: flex; gap: 10px; justify-content: center; }
.share-link {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 17px;
  transition: all .15s;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
}
.share-link:hover {
  transform: translateY(-1px);
  border-color: var(--line-2);
  box-shadow: var(--shadow-s);
  color: var(--ink);
}

.btn-restart {
  background: none;
  border: 1px solid var(--line);
  padding: 12px 30px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: var(--ink-2);
  font-family: inherit;
  transition: all .15s;
}
.btn-restart:hover {
  border-color: var(--line-2);
  color: var(--ink);
  background: var(--surface);
}

/* ---- Warning box (ACE, violence, etc.) ---- */
.warning-box, .warning {
  background: var(--warm-tint);
  border: 1px solid var(--warm-soft);
  border-radius: var(--radius-l);
  padding: 20px 22px;
  margin: 24px 0;
  text-align: left;
}
.warning-box h4, .warning h4 {
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--warm-ink);
}
.warning-box p, .warning p {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0;
}
.warning-box a, .warning a {
  color: var(--warm-ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
