/* ==========================================================================
   Enthrone Capital — funding qualifier styles
   One question at a time. Feels native to the site (shares site.css tokens).
   ========================================================================== */

.q-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 80% at 90% -20%,
      color-mix(in srgb, var(--gold-bright) 10%, transparent), transparent 55%),
    var(--bg);
}

/* --- Slim qualifier header --------------------------------------------- */
.q-header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 50;
}
.q-header__inner {
  display: flex; align-items: center; gap: 1rem;
  height: 64px;
}
.q-header .brand { font-size: 1rem; }
.q-header__right { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; }
.q-secure {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.82rem; color: var(--text-muted);
}
.q-secure svg { width: 15px; height: 15px; color: var(--gold); }

/* --- Progress ----------------------------------------------------------- */
.q-progress { padding: 1.25rem 0 0; }
.q-progress__stages {
  display: flex; gap: 0.5rem; margin-bottom: 0.9rem;
  list-style: none; padding: 0;
}
.q-progress__stage {
  flex: 1; text-align: center;
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 600; color: var(--text-muted);
  padding-bottom: 0.6rem; border-bottom: 2px solid var(--border);
  transition: color 0.2s, border-color 0.2s;
}
.q-progress__stage.is-active { color: var(--gold); border-bottom-color: var(--gold-bright); }
.q-progress__stage.is-done { color: var(--text-soft); border-bottom-color: var(--gold); }

.q-progress__bar {
  height: 6px; border-radius: 999px; background: var(--surface-3);
  overflow: hidden;
}
.q-progress__fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  border-radius: 999px;
  transition: width 0.35s var(--ease);
}
.q-progress__count {
  margin-top: 0.6rem;
  font-size: 0.85rem; color: var(--text-muted); font-weight: 500;
}

/* --- Card / stage ------------------------------------------------------- */
.q-main { flex: 1; padding-block: clamp(1.5rem, 4vw, 3rem); }
.q-shell { max-width: 680px; margin-inline: auto; }

.q-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(1.5rem, 4vw, 2.75rem);
}
.q-step__eyebrow {
  font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold); font-weight: 700; margin-bottom: 0.6rem;
}
.q-step h1, .q-step h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  line-height: 1.15; margin-bottom: 0.5rem;
}
.q-step__help { color: var(--text-muted); margin-bottom: 1.6rem; max-width: 56ch; }

/* --- Options (radio-like) ---------------------------------------------- */
.q-options { display: grid; gap: 0.7rem; margin: 0 0 0.5rem; }
.q-options--2 { grid-template-columns: 1fr 1fr; }
.q-option {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 1rem 1.15rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, transform 0.1s;
  font-weight: 500;
  text-align: left;
  width: 100%;
  color: var(--text);
}
.q-option:hover { border-color: var(--border-strong); }
.q-option:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.q-option .box {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: grid; place-items: center;
  transition: border-color 0.15s, background-color 0.15s;
}
.q-option .box svg { width: 12px; height: 12px; color: var(--on-gold); opacity: 0; }
.q-option[aria-pressed="true"],
.q-option.is-selected {
  border-color: var(--gold-bright);
  background: var(--gold-soft);
}
.q-option.is-selected .box { border-color: var(--gold-bright); background: var(--gold-bright); }
.q-option.is-selected .box svg { opacity: 1; }
.q-option__text { display: flex; flex-direction: column; }
.q-option__text small { color: var(--text-muted); font-weight: 400; font-size: 0.85rem; }

@media (max-width: 520px) { .q-options--2 { grid-template-columns: 1fr; } }

/* --- Inputs ------------------------------------------------------------- */
.q-field { display: grid; gap: 0.4rem; margin-bottom: 1.1rem; }
.q-field label { font-weight: 600; font-size: 0.95rem; }
.q-field .hint { color: var(--text-muted); font-size: 0.82rem; }
.q-input, .q-select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.q-input:focus, .q-select:focus {
  outline: none;
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.q-input--amount { font-size: 1.15rem; font-weight: 600; }
.q-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
@media (max-width: 520px) { .q-row { grid-template-columns: 1fr; } }

.q-error {
  color: #b4462b; font-size: 0.85rem; margin-top: 0.4rem;
  display: none;
}
:root[data-theme="dark"] .q-error { color: #ff9d7a; }
.q-error.is-shown { display: block; }

/* --- Consent ------------------------------------------------------------ */
.q-consent {
  margin-top: 1.25rem; padding: 1.15rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-2);
}
.q-consent__pending {
  display: inline-block; margin-bottom: 0.85rem;
  font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold); font-weight: 700;
  border: 1px dashed var(--gold-bright); border-radius: 999px;
  padding: 0.2rem 0.7rem;
}
.q-check {
  display: flex; gap: 0.7rem; align-items: flex-start;
  margin-bottom: 0.9rem; font-size: 0.9rem; color: var(--text-soft);
  line-height: 1.5;
}
.q-check:last-child { margin-bottom: 0; }
.q-check input { margin-top: 0.2rem; width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--gold-bright); }
.q-check .opt { color: var(--text-muted); font-weight: 500; }

/* --- Footer nav --------------------------------------------------------- */
.q-nav {
  display: flex; align-items: center; gap: 0.75rem;
  margin-top: 1.75rem;
}
.q-nav .btn--gold { margin-left: auto; }
.q-back {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: transparent; border: 0; color: var(--text-muted);
  font-weight: 600; padding: 0.6rem 0.4rem;
}
.q-back:hover { color: var(--gold); }
.q-back svg { width: 16px; height: 16px; }
.q-back[hidden] { display: none; }

.q-autosave {
  text-align: center; margin-top: 1rem;
  font-size: 0.78rem; color: var(--text-muted);
}
.q-autosave svg { width: 13px; height: 13px; vertical-align: -2px; color: var(--gold); }

/* --- Result screen ------------------------------------------------------ */
.q-result { text-align: center; }
.q-result__badge {
  width: 84px; height: 84px; border-radius: 50%;
  display: grid; place-items: center; margin: 0 auto 1.25rem;
}
.q-result__badge svg { width: 42px; height: 42px; }
.q-result--strong .q-result__badge { background: var(--gold-soft); color: var(--gold); }
.q-result--review .q-result__badge {
  background: color-mix(in srgb, var(--focus-ring) 16%, transparent);
  color: var(--focus-ring);
}
.q-result--nomeet .q-result__badge {
  background: color-mix(in srgb, var(--text-muted) 18%, transparent);
  color: var(--text-muted);
}
.q-result h1 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
.q-result__msg { color: var(--text-soft); max-width: 52ch; margin: 0.5rem auto 1.5rem; font-size: 1.05rem; }
.q-summary {
  text-align: left; margin: 1.5rem 0;
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.q-summary dl { margin: 0; }
.q-summary .row {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--border);
}
.q-summary .row:last-child { border-bottom: 0; }
.q-summary dt { color: var(--text-muted); font-size: 0.9rem; }
.q-summary dd { margin: 0; font-weight: 600; text-align: right; }
.q-result__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 0.5rem; }
.q-result__note { margin-top: 1.5rem; font-size: 0.82rem; color: var(--text-muted); }
.q-referral-note {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; color: var(--text-muted);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 0.3rem 0.8rem; margin-bottom: 1rem;
}
.q-referral-note b { color: var(--gold); }

/* --- Fade between steps ------------------------------------------------- */
.q-step { animation: qfade 0.28s var(--ease); }
@keyframes qfade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .q-step { animation: none; } }
