/* ============================================================
   grindale — qualifier modal quiz
   Dark AI/pixel aesthetic. Loaded after site.css.
   ============================================================ */

/* trigger button reuses .btn .btn-primary */

/* ---------- overlay ---------- */
.qm-overlay {
  position: fixed; inset: 0; z-index: 300; display: none;
  align-items: flex-start; justify-content: center;
  padding: clamp(12px, 4vw, 48px) clamp(12px, 4vw, 32px);
  background: rgba(4, 6, 8, 0.74);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  overflow-y: auto;
}
.qm-overlay.open { display: flex; }
body.qm-locked { overflow: hidden; }

/* ---------- modal shell ---------- */
.qm {
  position: relative; width: 100%; max-width: 620px;
  background: var(--bg-deep); border: 1px solid var(--border-2);
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 60px 140px -50px rgba(0,0,0,0.9), 0 0 0 1px rgba(0,255,102,0.04);
  margin: auto;
  animation: qm-in .32s cubic-bezier(.2,.7,.2,1);
}
@keyframes qm-in { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .qm { animation: none; } }
.qm .qm-grid { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(120% 80% at 80% 0%, #000 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(120% 80% at 80% 0%, #000 10%, transparent 75%);
}
.qm .qm-glow { position: absolute; z-index: 0; pointer-events: none; width: 300px; height: 300px; right: -120px; top: -110px; border-radius: 50%; filter: blur(90px); background: radial-gradient(circle, rgba(0,255,102,0.4), transparent 70%); opacity: .35; }

/* ---------- progress + top bar ---------- */
.qm-top { position: relative; z-index: 1; }
.qm-progress { height: 3px; width: 100%; background: rgba(255,255,255,0.07); }
.qm-progress .fill { height: 100%; width: 0%; background: var(--green); box-shadow: 0 0 12px rgba(0,255,102,0.6); transition: width .35s cubic-bezier(.2,.7,.2,1); }
.qm-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px clamp(20px, 4vw, 34px) 0; }
.qm-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.qm-step { font-family: var(--mono); font-weight: 700; font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--orange-lt); white-space: nowrap; }
.qm-time { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em; color: var(--text-mut); display: inline-flex; align-items: center; gap: 7px; }
.qm-time .rdot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.qm-close { background: none; border: 1px solid var(--border-2); color: var(--text-2); width: 34px; height: 34px; border-radius: 9px; cursor: pointer; font-size: 18px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; transition: all .15s ease; flex: 0 0 auto; }
.qm-close:hover { color: #fff; border-color: var(--text-2); }

/* ---------- body ---------- */
.qm-body { position: relative; z-index: 1; padding: 20px clamp(20px, 4vw, 34px) clamp(22px, 4vw, 32px); }
.qm-q { font-family: var(--display); font-weight: 700; font-size: clamp(22px, 3.2vw, 30px); letter-spacing: -0.025em; line-height: 1.16; margin: 0; text-wrap: balance; }
.qm-sub { margin: 12px 0 0; color: var(--text-2); font-size: 15px; line-height: 1.55; max-width: 52ch; }
.qm-anim { animation: qm-fade .26s ease; }
@keyframes qm-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .qm-anim { animation: none; } }

/* ---------- option cards ---------- */
.qm-opts { display: grid; gap: 10px; margin-top: 22px; }
.qm-opt {
  display: grid; grid-template-columns: 40px 1fr 18px; align-items: center; gap: 15px;
  text-align: left; background: var(--lift); border: 1px solid var(--border-2);
  border-radius: 13px; padding: 15px 16px; cursor: pointer; color: var(--text);
  transition: border-color .16s ease, background .16s ease, transform .16s ease, box-shadow .16s ease;
}
.qm-opt:hover { border-color: color-mix(in oklab, var(--green) 55%, transparent); transform: translateX(3px); }
.qm-opt.sel { border-color: var(--green); background: rgba(0,255,102,0.06); box-shadow: 0 0 0 1px var(--green), 0 16px 40px -22px rgba(0,255,102,0.6); }
.qm-opt .ico { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border-2); background: rgba(255,255,255,0.02); display: inline-flex; align-items: center; justify-content: center; color: var(--green); flex: 0 0 auto; transition: border-color .16s ease; }
.qm-opt .ico svg { width: 21px; height: 21px; }
.qm-opt:hover .ico, .qm-opt.sel .ico { border-color: color-mix(in oklab, var(--green) 50%, transparent); }
.qm-opt .tx .t { font-family: var(--display); font-weight: 600; font-size: 16.5px; letter-spacing: -0.01em; line-height: 1.25; }
.qm-opt .tx .s { margin-top: 3px; color: var(--text-2); font-size: 13px; line-height: 1.45; }
.qm-opt .arr { color: var(--text-mut); font-family: var(--mono); font-size: 15px; transition: color .16s ease, transform .16s ease; justify-self: end; }
.qm-opt .tx { display: flex; flex-direction: column; min-width: 0; }
.qm-opt:hover .arr, .qm-opt.sel .arr { color: var(--green); transform: translateX(3px); }

/* ---------- back / footer ---------- */
.qm-foot { margin-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.qm-back { font-family: var(--mono); font-size: 12.5px; color: var(--text-mut); background: none; border: 0; cursor: pointer; padding: 6px 0; transition: color .15s ease; }
.qm-back:hover { color: var(--text); }
.qm-back[hidden] { visibility: hidden; }

/* ---------- form (step 8) ---------- */
.qm-form { margin-top: 22px; display: grid; gap: 14px; }
.qm-field { display: grid; gap: 7px; }
.qm-field label { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); }
.qm-field label .req { color: var(--orange-lt); }
.qm-field input, .qm-field textarea {
  width: 100%; background: var(--black); border: 1px solid var(--border-2); border-radius: 10px;
  padding: 13px 15px; color: var(--text); font-family: var(--body); font-size: 15px; transition: border-color .15s ease;
}
.qm-field textarea { resize: vertical; min-height: 78px; line-height: 1.5; }
.qm-field input::placeholder, .qm-field textarea::placeholder { color: var(--text-mut); }
.qm-field input:focus, .qm-field textarea:focus { outline: none; border-color: var(--green); }
.qm-field.bad input, .qm-field.bad textarea { border-color: var(--orange); }
.qm-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .qm-row2 { grid-template-columns: 1fr; } }
.qm-submit { margin-top: 4px; }
.qm-submit .btn { width: 100%; }

/* ---------- result ---------- */
.qm-badge { font-family: var(--mono); font-weight: 700; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--orange-lt); display: inline-flex; align-items: center; gap: 8px; }
.qm-badge::before { content: '▌'; color: var(--orange); }
.qm-result h3 { margin: 16px 0 0; font-family: var(--display); font-weight: 700; font-size: clamp(23px, 3.4vw, 32px); letter-spacing: -0.025em; line-height: 1.14; text-wrap: balance; }
.qm-result .rtext { margin: 16px 0 0; color: rgba(255,255,255,0.82); font-size: 15.5px; line-height: 1.62; }
.qm-price { margin-top: 22px; border: 1px solid var(--green-line); background: var(--green-soft); border-radius: 14px; padding: 18px 20px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.qm-price .amt { font-family: var(--display); font-weight: 700; font-size: 30px; letter-spacing: -0.02em; }
.qm-price .per { font-family: var(--mono); font-size: 13px; color: var(--text-2); }
.qm-price .alt { width: 100%; margin-top: 6px; font-family: var(--mono); font-size: 11.5px; color: var(--text-mut); letter-spacing: 0.03em; }
.qm-actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.qm-secondary { font-family: var(--mono); font-size: 13px; color: var(--text-mut); background: none; border: 0; cursor: pointer; padding: 8px 4px; transition: color .15s ease; }
.qm-secondary:hover { color: var(--text-2); }
.qm-picks { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.qm-pick { font-family: var(--mono); font-size: 11px; color: var(--text-2); border: 1px solid var(--border-2); border-radius: 999px; padding: 6px 12px; white-space: nowrap; }

/* ---------- payment selector ---------- */
.qm-pay { margin-top: 22px; display: grid; gap: 10px; }
.qm-pay .pm { display: grid; grid-template-columns: 1fr 18px; gap: 10px; align-items: center;
    text-align: left; background: var(--lift); border: 1px solid var(--border-2); border-radius: 13px;
    padding: 16px 18px; cursor: pointer; color: var(--text); transition: all .16s ease; }
.qm-pay .pm .txp { display: flex; flex-direction: column; min-width: 0; }
.qm-pay .pm:hover { border-color: color-mix(in oklab, var(--green) 55%, transparent); transform: translateX(3px); }
.qm-pay .pm .t { font-family: var(--display); font-weight: 600; font-size: 16px; }
.qm-pay .pm .s { margin-top: 4px; color: var(--text-2); font-size: 13px; line-height: 1.45; }
.qm-pay .pm .arr { color: var(--text-mut); justify-self: end; font-family: var(--mono); }
.qm-pay .pm:hover .arr { color: var(--green); }
.qm-country { margin-top: 14px; display: none; }
.qm-country.show { display: block; }
.qm-country .lbl { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); margin-bottom: 9px; }
.qm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.qm-chip { font-family: var(--mono); font-size: 13px; color: var(--text); background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 999px; padding: 9px 15px; cursor: pointer; transition: all .15s ease; }
.qm-chip:hover { border-color: var(--green); color: var(--green); }
.qm-note { margin-top: 16px; font-family: var(--mono); font-size: 11.5px; color: var(--text-mut); line-height: 1.5; display: flex; gap: 9px; }
.qm-note::before { content: '$'; color: var(--green); font-weight: 700; }
