/* =========================================================
   MRI CAREER REPORT — SLIDE-IN PANEL
   Uses the same CSS variables already defined in :root
   (--cyan, --text, --muted, --card-bg, --glass-border etc.)
   so it automatically matches light/dark theme.
   ========================================================= */

.mri-overlay{
  position:fixed;
  inset:0;
  background:rgba(10,8,4,0.55);
  backdrop-filter:blur(3px);
  -webkit-backdrop-filter:blur(3px);
  z-index:2000;
  opacity:0;
  pointer-events:none;
  transition:opacity .35s ease;
}
.mri-overlay.show{
  opacity:1;
  pointer-events:auto;
}

.mri-panel{
  position:fixed;
  top:0; right:0;
  height:100vh;
  width:min(440px,100vw);
  background:var(--bg,#fff);
  z-index:2001;
  box-shadow:-20px 0 60px rgba(0,0,0,0.25);
  transform:translateX(100%);
  transition:transform .4s cubic-bezier(.16,1,.3,1);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.mri-overlay.show .mri-panel{
  transform:translateX(0);
}

.mri-panel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:26px 26px 18px;
  border-bottom:1px solid var(--glass-border);
  flex:none;
}
.mri-panel-head-text h2{
  margin:0 0 6px;
  font-size:21px;
  font-weight:800;
  color:var(--text);
  letter-spacing:-0.01em;
}
.mri-panel-head-text p{
  margin:0;
  font-size:13px;
  line-height:1.55;
  color:var(--muted);
  max-width:320px;
}
.mri-close{
  flex:none;
  width:32px;height:32px;
  border-radius:50%;
  border:1px solid var(--glass-border);
  background:var(--glass);
  color:var(--text);
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;
  transition:background .2s ease, transform .2s ease, border-color .2s ease;
}
.mri-close:hover{background:var(--cyan); border-color:var(--cyan); color:#000; transform:rotate(90deg);}
.mri-close svg{width:15px;height:15px;}

.mri-panel-body{
  flex:1;
  overflow-y:auto;
  padding:24px 26px 30px;
}

/* ---------- shared field styles ---------- */
.mri-field{margin-bottom:16px;}
.mri-field label{
  display:block;
  font-size:12px;
  font-weight:600;
  color:var(--muted);
  margin-bottom:7px;
}
.mri-field label .req{color:var(--cyan);}
.mri-input{
  width:100%;
  padding:13px 14px;
  border-radius:10px;
  border:1px solid var(--glass-border);
  background:var(--glass);
  color:var(--text);
  font-size:14px;
  font-family:inherit;
  outline:none;
  transition:border-color .2s ease, background .2s ease;
}
.mri-input::placeholder{color:var(--muted); opacity:.75;}
.mri-input:focus{border-color:var(--cyan); background:rgba(225,181,76,0.06);}
.mri-input.mri-error{border-color:#c0392b;}
.mri-error-msg{
  display:none;
  font-size:11.5px;
  color:#c0392b;
  margin-top:6px;
}
.mri-field.mri-has-error .mri-error-msg{display:block;}

/* phone row: country code + number */
.mri-phone-row{
  display:flex;
  gap:10px;
}
.mri-cc-select{
  flex:none;
  width:100px;
  padding:0 10px;
  border-radius:10px;
  border:1px solid var(--glass-border);
  background:var(--glass);
  color:var(--text);
  font-size:13.5px;
  font-family:inherit;
  outline:none;
  cursor:pointer;
}
.mri-cc-select:focus{border-color:var(--cyan);}
.mri-phone-row .mri-input{flex:1;}

/* submit button */
.mri-submit{
  width:100%;
  margin-top:6px;
  padding:14px 20px;
  border-radius:11px;
  border:none;
  background:#e1b54c;
  color:#1a1712;
  font-size:14.5px;
  font-weight:800;
  letter-spacing:.02em;
  cursor:pointer;
  box-shadow:0 10px 26px rgba(225,181,76,0.4);
  transition:transform .2s ease, box-shadow .2s ease, opacity .2s ease;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.mri-submit:hover{transform:translateY(-2px); box-shadow:0 14px 32px rgba(225,181,76,0.5);}
.mri-submit:disabled{opacity:.6; cursor:not-allowed; transform:none;}

.mri-terms{
  margin:16px 0 0;
  font-size:11.5px;
  line-height:1.6;
  color:var(--muted);
  text-align:center;
}
.mri-terms a{color:var(--cyan); text-decoration:none;}
.mri-terms a:hover{text-decoration:underline;}

/* ---------- OTP step ---------- */
.mri-step{display:none;}
.mri-step.mri-active{display:block;}

.mri-otp-sub{
  font-size:13px;
  color:var(--muted);
  line-height:1.6;
  margin:0 0 22px;
}
.mri-otp-sub b{color:var(--text);}
.mri-otp-sub .mri-change-num{
  color:var(--cyan);
  cursor:pointer;
  font-weight:600;
  text-decoration:underline;
}

.mri-otp-boxes{
  display:flex;
  gap:10px;
  margin-bottom:18px;
}
.mri-otp-box{
  width:100%;
  aspect-ratio:1;
  text-align:center;
  font-size:19px;
  font-weight:700;
  border-radius:10px;
  border:1px solid var(--glass-border);
  background:var(--glass);
  color:var(--text);
  outline:none;
  transition:border-color .2s ease, background .2s ease;
}
.mri-otp-box:focus{border-color:var(--cyan); background:rgba(225,181,76,0.06);}

.mri-resend-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:4px 0 22px;
  font-size:12.5px;
  color:var(--muted);
}
.mri-resend-btn{
  background:none;
  border:none;
  color:var(--cyan);
  font-weight:700;
  cursor:pointer;
  font-size:12.5px;
  padding:0;
}
.mri-resend-btn:disabled{color:var(--muted); cursor:not-allowed; font-weight:500;}

.mri-back-link{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-top:16px;
  font-size:12.5px;
  color:var(--muted);
  cursor:pointer;
  background:none;
  border:none;
  padding:0;
}
.mri-back-link:hover{color:var(--text);}

/* demo notice — remove this block once a real SMS API is wired in */
.mri-demo-note{
  margin:0 0 18px;
  padding:10px 12px;
  border-radius:10px;
  background:rgba(225,181,76,0.12);
  border:1px dashed rgba(225,181,76,0.4);
  font-size:11.5px;
  line-height:1.55;
  color:var(--text);
}
.mri-demo-note b{color:var(--cyan);}

/* ---------- success step ---------- */
.mri-success-icon{
  width:64px;height:64px;
  border-radius:50%;
  background:rgba(225,181,76,0.14);
  border:1px solid rgba(225,181,76,0.35);
  display:flex;align-items:center;justify-content:center;
  margin:20px auto 22px;
}
.mri-success-icon svg{width:30px;height:30px; color:var(--cyan);}
.mri-step.mri-success{text-align:center;}
.mri-step.mri-success h3{
  font-size:18px;
  font-weight:800;
  margin:0 0 8px;
  color:var(--text);
}
.mri-step.mri-success p{
  font-size:13px;
  color:var(--muted);
  line-height:1.6;
  margin:0 0 22px;
}

@media (max-width:520px){
  .mri-panel{width:100vw;}
}

/* =========================================================
   QUIZ / AI CAREER REPORT — full-panel takeover
   Still a same-page overlay (no new URL / new tab), just
   expands the existing .mri-panel to a full-screen, two-
   column layout for the questionnaire + report.
   ========================================================= */

.mri-overlay.mri-quiz-active .mri-panel{
  width:100vw;
  max-width:100vw;
  height:100vh;
  transform:translateX(0);
}
.mri-quiz-active .mri-panel-head,
.mri-quiz-active .mri-panel-body{ display:none; }

.mri-quiz-wrap{
  display:none;
  width:100%;
  height:100%;
  position:relative;
  flex-direction:row;
}
.mri-quiz-active .mri-quiz-wrap{ display:flex; }

.mri-quiz-close{
  position:absolute;
  top:20px; right:24px;
  z-index:5;
  width:36px;height:36px;
  border-radius:50%;
  border:1px solid var(--glass-border);
  background:var(--glass);
  color:var(--text);
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;
  transition:background .2s ease, transform .2s ease, border-color .2s ease;
}
.mri-quiz-close:hover{background:var(--cyan); border-color:var(--cyan); color:#000; transform:rotate(90deg);}
.mri-quiz-close svg{width:16px;height:16px;}

/* ---------- sidebar ---------- */
.mri-quiz-sidebar{
  flex:none;
  width:320px;
  background:var(--text);
  color:var(--bg);
  padding:34px 28px;
  overflow-y:auto;
}
.mri-quiz-brand{
  font-size:15px;
  font-weight:900;
  letter-spacing:.04em;
  margin-bottom:30px;
  color:var(--bg);
}
.mri-quiz-brand span{font-weight:500; opacity:.6; font-size:12px;}

.mri-quiz-steps{margin-bottom:26px;}
.mri-quiz-steps-label{
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  color:var(--cyan);
  margin-bottom:10px;
}
.mri-quiz-steps-track{display:flex; gap:6px;}
.mri-quiz-steps-bar{
  height:4px;
  flex:1;
  border-radius:3px;
  background:rgba(255,255,255,0.18);
}
.mri-quiz-steps-bar-fill{background:var(--cyan);}

.mri-quiz-why{
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.12);
  border-radius:14px;
  padding:18px 18px 20px;
  margin-bottom:26px;
}
.mri-quiz-why-label{
  font-size:10.5px;
  font-weight:800;
  letter-spacing:.08em;
  color:var(--cyan);
  margin-bottom:10px;
}
.mri-quiz-why-h{
  font-size:14.5px;
  font-weight:700;
  line-height:1.5;
  margin:0 0 8px;
  color:var(--bg);
}
.mri-quiz-why-b{
  font-size:12.5px;
  line-height:1.6;
  margin:0;
  color:rgba(255,255,255,0.65);
}

.mri-quiz-alumni-pills{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}
.mri-alumni-pill{
  font-size:11px;
  font-weight:600;
  padding:6px 11px;
  border-radius:20px;
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.14);
  color:rgba(255,255,255,0.85);
}

/* ---------- main content ---------- */
.mri-quiz-main{
  flex:1;
  display:flex;
  flex-direction:column;
  min-width:0;
}
.mri-quiz-content{
  flex:1;
  overflow-y:auto;
  padding:44px 56px 30px;
}
.mri-quiz-topline{
  font-size:11.5px;
  font-weight:800;
  letter-spacing:.08em;
  color:var(--cyan);
  margin-bottom:12px;
}
.mri-quiz-title{
  font-size:28px;
  font-weight:800;
  letter-spacing:-0.01em;
  color:var(--text);
  margin:0 0 34px;
  max-width:640px;
}

.mri-q{margin-bottom:34px;}
.mri-q-head{
  display:flex;
  align-items:baseline;
  gap:10px;
  margin-bottom:4px;
}
.mri-q-num{
  font-size:11px;
  font-weight:800;
  color:var(--muted);
}
.mri-q-text{
  font-size:15.5px;
  font-weight:700;
  color:var(--text);
}
.mri-q-sub{
  font-size:12.5px;
  color:var(--muted);
  margin:2px 0 14px 24px;
}
.mri-q-head + .mri-q-grid{margin-top:16px;}

.mri-q-error{
  display:none;
  font-size:12px;
  color:#c0392b;
  margin-top:8px;
}
.mri-q-invalid .mri-q-error{display:block;}
.mri-q-invalid .mri-q-grid{outline:1px solid rgba(192,57,43,0.4); outline-offset:8px; border-radius:12px;}

.mri-q-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.mri-q-grid-2col{grid-template-columns:repeat(2,minmax(240px,1fr));}

.mri-opt{
  display:flex;
  align-items:flex-start;
  gap:12px;
  text-align:left;
  padding:16px 16px;
  border-radius:12px;
  border:1px solid var(--glass-border);
  background:var(--glass);
  cursor:pointer;
  transition:border-color .18s ease, background .18s ease, transform .12s ease;
  font-family:inherit;
}
.mri-opt:hover{border-color:var(--cyan); transform:translateY(-1px);}
.mri-opt-selected{
  border-color:var(--cyan);
  background:rgba(225,181,76,0.10);
}
.mri-opt-icon{font-size:18px; line-height:1; flex:none; margin-top:1px;}
.mri-opt-text{flex:1; display:flex; flex-direction:column; gap:4px;}
.mri-opt-label{font-size:13.5px; font-weight:700; color:var(--text);}
.mri-opt-desc{font-size:12px; color:var(--muted); line-height:1.5;}
.mri-opt-check{
  flex:none;
  width:20px;height:20px;
  border-radius:50%;
  border:1px solid var(--glass-border);
  display:flex;align-items:center;justify-content:center;
  color:transparent;
  transition:background .18s ease, border-color .18s ease, color .18s ease;
}
.mri-opt-check svg{width:12px;height:12px;}
.mri-opt-selected .mri-opt-check{background:var(--cyan); border-color:var(--cyan); color:#1a1712;}

/* ---------- footer nav ---------- */
.mri-quiz-footer{
  flex:none;
  border-top:1px solid var(--glass-border);
  padding:16px 56px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.mri-quiz-progress-label{font-size:12.5px; color:var(--muted); font-weight:600;}
.mri-quiz-nav-btns{display:flex; align-items:center; gap:12px;}
.mri-quiz-back-btn{
  width:42px;height:42px;
  border-radius:10px;
  border:1px solid var(--glass-border);
  background:var(--glass);
  color:var(--text);
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;
  transition:border-color .18s ease, background .18s ease;
}
.mri-quiz-back-btn svg{width:16px;height:16px;}
.mri-quiz-back-btn:hover:not(:disabled){border-color:var(--cyan);}
.mri-quiz-back-btn:disabled{opacity:.4; cursor:not-allowed;}
.mri-quiz-continue-btn{
  display:flex;align-items:center;gap:8px;
  padding:13px 22px;
  border-radius:10px;
  border:none;
  background:#e1b54c;
  color:#1a1712;
  font-size:13.5px;
  font-weight:800;
  cursor:pointer;
  box-shadow:0 10px 26px rgba(225,181,76,0.4);
  transition:transform .18s ease, box-shadow .18s ease;
}
.mri-quiz-continue-btn:hover{transform:translateY(-2px); box-shadow:0 14px 32px rgba(225,181,76,0.5);}
.mri-quiz-continue-btn svg{width:15px;height:15px;}

/* ---------- loading step ---------- */
.mri-quiz-loading{
  max-width:420px;
  margin:22vh auto 0;
  text-align:center;
}
.mri-quiz-loading-title{font-size:19px; font-weight:800; color:var(--text); margin-bottom:8px;}
.mri-quiz-loading-sub{font-size:13px; color:var(--muted); margin-bottom:24px;}
.mri-quiz-loading-track{
  height:5px;
  border-radius:4px;
  background:var(--glass-border);
  overflow:hidden;
}
.mri-quiz-loading-bar{
  height:100%;
  width:6%;
  background:var(--cyan);
  border-radius:4px;
  transition:width 1.7s cubic-bezier(.4,0,.2,1);
}

/* ---------- report step ---------- */
.mri-report{
  max-width:560px;
  margin:4vh auto 0;
  text-align:center;
}
.mri-report-kicker{
  font-size:11.5px;
  font-weight:800;
  letter-spacing:.08em;
  color:var(--cyan);
  margin-bottom:14px;
}
.mri-report-title{
  font-size:30px;
  font-weight:800;
  line-height:1.3;
  color:var(--text);
  margin:0 0 12px;
}
.mri-report-sub{
  font-size:14px;
  color:var(--muted);
  margin:0 0 30px;
}
.mri-report-gauge-wrap{
  position:relative;
  width:200px;
  margin:0 auto;
}
.mri-report-gauge{width:100%; display:block;}
.mri-report-gauge-score{
  position:absolute;
  left:50%; bottom:2px;
  transform:translateX(-50%);
  display:flex;
  flex-direction:column;
  align-items:center;
}
.mri-report-gauge-num{font-size:34px; font-weight:900; color:var(--text); line-height:1;}
.mri-report-gauge-den{font-size:11px; color:var(--muted); margin-top:2px;}
.mri-report-gauge-label{
  font-size:11px;
  font-weight:800;
  letter-spacing:.06em;
  color:var(--muted);
  margin:10px 0 30px;
}
.mri-report-cta{max-width:340px; margin-left:auto; margin-right:auto;}
.mri-report-cta-note{font-size:11.5px; color:var(--muted); margin-top:10px;}

/* ---------- responsive ---------- */
@media (max-width:860px){
  .mri-quiz-sidebar{width:260px; padding:26px 20px;}
  .mri-quiz-content{padding:36px 28px 24px;}
  .mri-quiz-footer{padding:14px 28px;}
  .mri-quiz-title{font-size:23px;}
}
@media (max-width:640px){
  .mri-quiz-wrap{flex-direction:column;}
  .mri-quiz-sidebar{
    width:100%;
    padding:56px 20px 18px;
    order:1;
  }
  .mri-quiz-brand,
  .mri-quiz-why,
  .mri-quiz-alumni{display:none;}
  .mri-quiz-steps{margin-bottom:0;}
  .mri-quiz-main{order:2; min-height:0;}
  .mri-quiz-content{padding:22px 18px 20px;}
  .mri-quiz-footer{padding:14px 18px;}
  .mri-q-grid,
  .mri-q-grid-2col{grid-template-columns:1fr;}
  .mri-report-title{font-size:22px;}
}
