/* ══════════════════════════════════════════════════════
   FIND MY PLAN — compact, mobile-first lead generator.
   Deliberately does NOT reuse the marketing-site hero/nav/footer
   pattern: this is a focused, single-purpose tool, not a page.
   ══════════════════════════════════════════════════════ */

html, body.qp-body { height: 100%; }
body.qp-body { background: var(--cream); }

.qp-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── COMPACT TOPBAR (replaces the full site nav on this page) ── */
.qp-topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.65rem 1rem;
  background: rgba(250, 248, 243, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.qp-brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  flex-shrink: 0;
}
.qp-brand-logo {
  width: 28px; height: 28px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--green-deep);
  object-fit: contain;
  background: #fff;
}
.qp-brand-text {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--green-deep);
  letter-spacing: 0.02em;
}
.qp-progress-track {
  flex: 1;
  min-width: 32px;
  height: 5px;
  border-radius: 100px;
  background: var(--border);
  overflow: hidden;
}
.qp-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--gold), var(--green-mid));
  transition: width 0.35s ease;
}
.qp-topbar .lang-toggle { flex-shrink: 0; padding: 0.2rem; }
.qp-topbar .lang-btn { padding: 0.42rem; }
.qp-topbar .lang-btn .lang-flag { width: 22px; height: 16px; }

/* ── MAIN — centers the current card in the remaining viewport ── */
.qp-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vh, 2.2rem) 1rem;
  width: 100%;
}

/* ── QUESTION CARD ── */
.qp-card {
  width: 100%;
  max-width: 540px;
  animation: qpFadeUp 0.35s ease both;
}
@keyframes qpFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.qp-qnum {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}
.qp-question {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 5.5vw, 2.1rem);
  line-height: 1.25;
  color: var(--green-deep);
  margin-bottom: 1.6rem;
}

.qp-options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.qp-option {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  text-align: left;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0.95rem 1.1rem;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.15s ease;
}
.qp-option:hover { border-color: var(--gold); background: var(--cream); }
.qp-option.selected { border-color: var(--green-mid); background: var(--green-pale); }
.qp-option-dot {
  flex-shrink: 0;
  width: 19px; height: 19px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: #fff;
  position: relative;
}
.qp-option.selected .qp-option-dot { border-color: var(--green-mid); }
.qp-option.selected .qp-option-dot::after {
  content: '';
  position: absolute; inset: 3px;
  border-radius: 50%;
  background: var(--green-mid);
}

.qp-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  min-height: 2rem;
}
.qp-back-link, .qp-next-link {
  font-size: 0.9rem;
  font-weight: 700;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem 0;
}
.qp-back-link { color: var(--text-muted); }
.qp-back-link:hover { color: var(--green-deep); }
.qp-back-link:disabled { visibility: hidden; }
.qp-next-link { color: var(--gold); animation: qpFadeUp 0.2s ease both; }
.qp-next-link:hover { color: var(--green-deep); }

/* ── RESULT VIEW ── */
.qp-result { width: 100%; max-width: 620px; animation: qpFadeUp 0.4s ease both; }
.qp-result-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(201,151,58,0.12);
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  margin-bottom: 0.9rem;
}
.qp-score-hero { text-align: center; margin-bottom: 1.8rem; }
.qp-score-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem, 12vw, 3.8rem);
  font-weight: 700;
  line-height: 1;
  color: var(--gold);
}
.qp-score-num.tier-strong { color: var(--green-mid); }
.qp-score-num.tier-early { color: #C9573A; }
.qp-score-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.qp-score-sub {
  font-size: 0.9rem;
  color: var(--text-mid);
  margin-top: 0.5rem;
  max-width: 420px;
  margin-left: auto; margin-right: auto;
}

.qp-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 1rem;
}
@media (max-width: 560px) { .qp-result-grid { grid-template-columns: 1fr; } }
.qp-result-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.2rem 1.3rem;
}
.qp-result-card.wide { grid-column: 1 / -1; }
.qp-result-card.dark { background: var(--green-deep); border-color: var(--green-deep); }
.qp-result-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.4rem;
}
.qp-result-card.dark .qp-result-label { color: var(--gold-light); }
.qp-result-heading { font-size: 1.05rem; font-weight: 700; color: var(--green-deep); margin-bottom: 0.35rem; }
.qp-result-card.dark .qp-result-heading { color: #fff; }
.qp-result-text { font-size: 0.88rem; color: var(--text-mid); line-height: 1.55; }
.qp-result-card.dark .qp-result-text { color: rgba(255,255,255,0.85); }

.qp-score-bars { display: flex; flex-direction: column; gap: 0.55rem; margin-top: 0.3rem; }
.qp-score-row { display: flex; align-items: center; gap: 0.7rem; }
.qp-score-name { flex: 0 0 108px; font-size: 0.76rem; font-weight: 600; color: var(--text-mid); }
.qp-score-track { flex: 1; height: 7px; border-radius: 100px; background: var(--border); overflow: hidden; }
.qp-score-fill { height: 100%; border-radius: 100px; background: var(--gold); }
.qp-score-fill.low { background: #C9573A; }
.qp-score-fill.high { background: var(--green-mid); }
.qp-score-pct { flex: 0 0 34px; text-align: right; font-size: 0.74rem; font-weight: 700; color: var(--text-mid); }

.qp-contact-row { margin: 1.2rem 0 0.4rem; }
.qp-contact-row input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  background: var(--white);
  color: var(--text-dark);
}
.qp-contact-row input:focus { outline: none; border-color: var(--green-mid); }

.qp-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.2rem;
}
.qp-btn-primary, .qp-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.85rem 1.4rem;
  border-radius: 10px;
  cursor: pointer;
  flex: 1 1 auto;
  text-align: center;
}
.qp-btn-primary { background: var(--gold); color: #fff; border: none; }
.qp-btn-primary:hover { background: var(--green-mid); }
.qp-btn-ghost { background: transparent; color: var(--green-deep); border: 1.5px solid var(--border); }
.qp-btn-ghost:hover { border-color: var(--gold); }

.qp-footer-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
  margin-top: 1.6rem;
}
.qp-restart, .qp-home-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.qp-restart:hover, .qp-home-link:hover { color: var(--green-deep); }

/* ── SMALL SCREENS ── */
@media (max-width: 380px) {
  .qp-brand-text { display: none; }
  .qp-topbar { gap: 0.6rem; padding: 0.6rem 0.8rem; }
}

/* ── RTL (Arabic) ──
   Note: flex-direction: row (the default) already visually mirrors on
   its own once direction: rtl is inherited from html[dir="rtl"] — adding
   flex-direction: row-reverse on top of that would cancel the native
   mirroring and flip things back to an LTR-looking order. So the only
   RTL-specific rule actually needed here is text-align. ── */
html[dir="rtl"] .qp-card, html[dir="rtl"] .qp-result { text-align: right; }
html[dir="rtl"] .qp-option { text-align: right; }
