/* =================================================================
   ATTACHMENT TEST - v2 styles (paired with style.css variables)
   ================================================================= */

.test-wrapper { min-height: 100vh; padding-top: 80px; }

.test-screen { display: none; animation: fadeIn 0.4s ease; }
.test-screen.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- INTRO ---- */
.test-intro-inner { max-width: 660px; margin: 0 auto; padding: 64px 28px 96px; text-align: center; }
.test-title { font-family: var(--font-display); font-size: clamp(2.1rem, 5vw, 3.3rem); font-weight: 400; line-height: 1.08; letter-spacing: -0.02em; margin-bottom: 32px; color: var(--ink); }
.test-intro-body { font-size: 1.05rem; line-height: 1.8; color: var(--ink-soft); margin-bottom: 1.25em; text-align: left; }
.test-intro-btn { margin: 4px 0 32px; }
.test-intro-note { font-size: 0.92rem; color: var(--ink-soft); font-style: italic; margin-bottom: 44px; text-align: left; }

/* ---- QUESTIONS ---- */
.test-question-wrap { max-width: 680px; margin: 0 auto; padding: 56px 28px 88px; }
.test-progress-bar { width: 100%; height: 3px; background-color: var(--line); border-radius: 3px; margin-bottom: 12px; overflow: hidden; }
.test-progress-fill { height: 100%; background-color: var(--accent); border-radius: 3px; transition: width 0.35s ease; }
.test-progress-label { font-size: 0.8rem; color: var(--ink-soft); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 48px; }

.test-question-card { margin-bottom: 44px; }
.test-question-text { font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 1.85rem); font-weight: 400; line-height: 1.35; color: var(--ink); margin-bottom: 36px; letter-spacing: -0.01em; }

.test-options { display: flex; flex-direction: column; gap: 16px; }
.test-option {
  display: flex; align-items: flex-start; gap: 16px;
  min-height: 48px;
  padding: 20px 24px;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.12s ease;
  font-size: 1.02rem; line-height: 1.6; color: var(--ink); user-select: none;
}
.test-option:hover { border-color: var(--accent); background-color: var(--accent-tint); }
.test-option.selected { border-color: var(--accent); background-color: var(--accent-tint); }
.test-option input[type="radio"] { display: none; }
.test-option::before {
  content: ''; flex-shrink: 0; width: 19px; height: 19px;
  border: 1.5px solid var(--line); border-radius: 50%; margin-top: 2px;
  transition: border-color 0.18s ease, background-color 0.18s ease;
  background: var(--paper);
}
.test-option.selected::before { border-color: var(--accent); background-color: var(--accent); box-shadow: inset 0 0 0 4px var(--accent-tint); }
.test-option span { flex: 1; }

.test-nav { display: flex; justify-content: space-between; align-items: center; }
.test-nav-btn { background: none; border: none; font-family: var(--font-body); font-size: 0.92rem; font-weight: 500; color: var(--ink-soft); cursor: pointer; padding: 10px 0; transition: color 0.2s ease; }
.test-nav-btn:hover:not(:disabled) { color: var(--ink); }
.test-nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.test-nav-next { color: var(--accent); font-weight: 600; }

/* ---- EMAIL GATE ---- */
.test-email-inner { max-width: 560px; margin: 0 auto; padding: 72px 28px 96px; }
.test-email-title { font-family: var(--font-display); font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 400; line-height: 1.12; margin-bottom: 22px; color: var(--ink); letter-spacing: -0.02em; }
.test-email-body { font-size: 1.05rem; line-height: 1.8; color: var(--ink-soft); margin-bottom: 38px; }
.test-email-form { display: flex; flex-direction: column; gap: 22px; }
.test-field-group { display: flex; flex-direction: column; gap: 8px; }
.test-label { font-size: 0.85rem; color: var(--ink-soft); font-weight: 500; letter-spacing: 0.02em; }
.test-input {
  padding: 15px 18px; background-color: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  outline: none; min-height: 52px; transition: border-color 0.2s ease; width: 100%;
}
.test-input::placeholder { color: var(--ink-soft); }
.test-input:focus { border-color: var(--accent); }
/* Friendly, not a technical/red error - plain language, large enough to
   actually read, same warm ink tone used for body copy everywhere else. */
.test-field-error { font-size: 1.05rem; line-height: 1.6; font-weight: 500; color: var(--ink-soft); min-height: 1.2em; margin-top: 4px; }
.test-email-consent { font-size: 0.82rem; color: var(--ink-soft); line-height: 1.6; margin-top: -6px; }
.test-submit-btn { align-self: flex-start; }

/* ---- RESULTS ---- */
.test-results-inner { max-width: 700px; margin: 0 auto; padding: 56px 28px 96px; }
.result-header { margin-bottom: 56px; padding-bottom: 44px; border-bottom: 1px solid var(--line); }
.result-eyebrow { font-size: 0.78rem; color: var(--accent); letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; margin-bottom: 14px; }
.result-style-name { font-family: var(--font-display); font-size: clamp(2.1rem, 5vw, 3.2rem); font-weight: 400; line-height: 1.05; color: var(--ink); margin-bottom: 24px; letter-spacing: -0.02em; }
.result-style-bar-wrap { width: 100%; height: 5px; background-color: var(--line); border-radius: 5px; overflow: hidden; }
.result-style-bar { height: 100%; border-radius: 5px; transition: width 0.8s cubic-bezier(0.25,0.8,0.25,1); }

.result-summary { font-family: var(--font-display); font-size: 1.4rem; font-weight: 400; line-height: 1.5; color: var(--ink); margin-bottom: 30px; }
.result-body p { font-size: 1.04rem; line-height: 1.85; color: var(--ink-soft); margin-bottom: 1.4em; }
.result-body strong { color: var(--ink); }

.result-score-breakdown { margin-top: 52px; padding-top: 44px; border-top: 1px solid var(--line); margin-bottom: 52px; }
.result-breakdown-label { font-size: 0.85rem; color: var(--ink-soft); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 28px; font-weight: 600; }
.result-bars { display: flex; flex-direction: column; gap: 16px; }
.breakdown-row { display: grid; grid-template-columns: 180px 1fr 44px; align-items: center; gap: 16px; }
.breakdown-label { font-size: 0.9rem; color: var(--ink-soft); }
.breakdown-track { height: 7px; background-color: var(--line); border-radius: 7px; overflow: hidden; }
.breakdown-fill { height: 100%; border-radius: 7px; transition: width 0.8s cubic-bezier(0.25,0.8,0.25,1) 0.1s; }
.breakdown-pct { font-size: 0.82rem; color: var(--ink-soft); text-align: right; }

/* Quiet, single-line link - not a banner, not a box */
.result-cta { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); text-align: center; }
.result-cta .textlink { font-size: 0.98rem; }

/* ---- CALCULATING (2-3 second pause between last question and the gate) ---- */
.test-calculating-inner { max-width: 480px; margin: 0 auto; padding: 140px 28px; text-align: center; }
.test-spinner {
  width: 44px; height: 44px; margin: 0 auto 28px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.test-calculating-text { font-family: var(--font-display); font-size: 1.3rem; color: var(--ink-soft); }

/* ---- EMAIL TYPO SUGGESTION ---- */
#cap-email-suggestion { display: block; margin-top: 6px; }
.test-typo-suggestion {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--font-body); font-size: 0.88rem; font-weight: 600;
  color: var(--accent); text-decoration: underline; text-underline-offset: 3px;
}
.test-typo-suggestion:hover { color: var(--accent-dark); }

/* ---- POST-SUBMIT CONFIRMATION (the important part now that the full
   result lives only in the email - large, plain, not fine print) ---- */
.confirm-block {
  margin-top: 40px;
  padding: 28px 32px;
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.confirm-line { font-size: 1.05rem; line-height: 1.7; color: var(--ink); margin-bottom: 0.7em; }
.confirm-line:last-child { margin-bottom: 0; }
.confirm-line strong { color: var(--ink); }
#confirm-email { font-weight: 600; }

.result-teaser-text { font-size: 1.08rem; line-height: 1.75; color: var(--ink-soft); margin-bottom: 8px; }

/* Quiet, warm - not a legal disclaimer */
.result-honesty-line { font-size: 0.92rem; line-height: 1.7; color: var(--ink-soft); font-style: italic; margin-top: 32px; text-align: center; }

@media (max-width: 600px) {
  .breakdown-row { grid-template-columns: 130px 1fr 38px; gap: 10px; }
  .breakdown-label { font-size: 0.8rem; }
  .test-submit-btn { align-self: stretch; }
  .test-calculating-inner { padding: 100px 24px; }
  .confirm-block { padding: 24px 22px; }
}
