:root {
  --navy: #1F3A70;
  --navy-deep: #13264d;
  --gold: #D4AF37;
  --gold-soft: #e8c869;
  --ink: #1a2238;
  --paper: #f7f5f0;
  --line: #e3ddd0;
  --red: #c0392b;
  --amber: #d68910;
  --green: #1e8449;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', -apple-system, 'Helvetica Neue', sans-serif;
  background:
    radial-gradient(circle at 15% 10%, rgba(212,175,55,.08), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(31,58,112,.12), transparent 45%),
    var(--paper);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* ---- Header brand ---- */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin: 14px 0 26px;
}
.brand .mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--navy), var(--navy-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 6px 16px rgba(31,58,112,.3);
  border: 1.5px solid var(--gold);
}
.brand .txt {
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--navy);
  font-weight: 700;
  text-transform: uppercase;
}

/* ---- Card ---- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(19,38,77,.10);
  overflow: hidden;
}
.card-top {
  height: 5px;
  background: linear-gradient(90deg, var(--navy), var(--gold), var(--navy));
}

/* ---- Intro ---- */
.intro {
  padding: 42px 36px 36px;
  text-align: center;
}
.eyebrow {
  display: inline-block;
  background: rgba(212,175,55,.16);
  color: #9a7a16;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 6px 14px;
  border-radius: 30px;
  text-transform: uppercase;
  margin-bottom: 18px;
}
h1 {
  font-size: 30px;
  line-height: 1.25;
  color: var(--navy);
  font-weight: 800;
  margin-bottom: 14px;
}
.intro h1 .hl {
  color: var(--gold);
}
.lead {
  font-size: 16px;
  color: #4a5268;
  max-width: 520px;
  margin: 0 auto 26px;
}
.meta-row {
  display: flex;
  gap: 22px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 30px;
  font-size: 13px;
  color: #6b7180;
}
.meta-row b {
  color: var(--navy);
}
.fronts {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.front-chip {
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--navy);
}
.btn {
  display: inline-block;
  cursor: pointer;
  border: none;
  font-family: inherit;
  background: linear-gradient(135deg, var(--navy), var(--navy-deep));
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 16px 42px;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(31,58,112,.35);
  transition: transform .15s, box-shadow .15s;
  border: 1.5px solid transparent;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(31,58,112,.45);
  border-color: var(--gold);
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), #b8941f);
  color: #1a1405;
  box-shadow: 0 10px 26px rgba(212,175,55,.4);
}
.btn-gold:hover {
  border-color: var(--navy);
}
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
  box-shadow: none;
}
.btn-ghost:hover {
  background: var(--navy);
  color: #fff;
}
.tiny {
  font-size: 12px;
  color: #8a8f9c;
  margin-top: 14px;
}

/* ---- Progress ---- */
.bar-wrap {
  padding: 22px 36px 0;
}
.bar-info {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: #6b7180;
  margin-bottom: 8px;
  font-weight: 600;
}
.bar {
  height: 8px;
  background: var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--navy), var(--gold));
  border-radius: 20px;
  transition: width .4s ease;
}

/* ---- Question ---- */
.qbody {
  padding: 30px 36px 36px;
}
.front-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .5px;
  padding: 6px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.qtext {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
  line-height: 1.4;
}
.qsub {
  font-size: 14px;
  color: #7a8090;
  margin-bottom: 22px;
}
.opts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.opt {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  padding: 16px 18px;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  background: #fff;
  transition: all .18s;
  font-size: 15px;
  color: var(--ink);
}
.opt:hover {
  border-color: var(--gold);
  background: #fffdf6;
  transform: translateX(3px);
}
.opt .dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #c4c9d4;
  flex-shrink: 0;
  transition: all .18s;
  position: relative;
}
.opt:hover .dot {
  border-color: var(--gold);
}
.opt.sel {
  border-color: var(--navy);
  background: #f3f6fc;
}
.opt.sel .dot {
  border-color: var(--navy);
  background: var(--navy);
}
.opt.sel .dot::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #fff;
}
.nav {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
}

/* ---- Loading ---- */
.loading {
  padding: 70px 36px;
  text-align: center;
}
.spinner {
  width: 54px;
  height: 54px;
  border: 5px solid var(--line);
  border-top-color: var(--gold);
  border-radius: 50%;
  margin: 0 auto 22px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.loading p {
  color: var(--navy);
  font-weight: 600;
  font-size: 16px;
}
.loading .seq {
  color: #8a8f9c;
  font-size: 13.5px;
  margin-top: 8px;
  font-weight: 400;
}

/* ---- Result ---- */
.res-head {
  padding: 38px 36px 26px;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, var(--navy), var(--navy-deep));
  position: relative;
}
.res-head::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft), var(--gold));
}
.score-ring {
  width: 150px;
  height: 150px;
  margin: 0 auto 18px;
  position: relative;
}
.score-ring svg {
  transform: rotate(-90deg);
}
.score-num {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.score-num .n {
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}
.score-num .l {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--gold-soft);
  text-transform: uppercase;
  margin-top: 4px;
}
.verdict {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}
.verdict-sub {
  font-size: 14.5px;
  color: #c7d0e4;
  max-width: 480px;
  margin: 0 auto;
}

.fronts-result {
  padding: 30px 36px 10px;
}
.fr-block {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 16px;
  background: #fff;
}
.fr-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.fr-name {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--navy);
}
.fr-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 5px 11px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.fr-bar {
  height: 9px;
  background: var(--line);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 10px;
}
.fr-bar span {
  display: block;
  height: 100%;
  border-radius: 20px;
  transition: width .8s ease;
}
.fr-diag {
  font-size: 13.5px;
  color: #555c6e;
}
.fr-diag b {
  color: var(--ink);
}

.root-cause {
  margin: 14px 36px 0;
  padding: 22px 24px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff8e8, #fdf3d6);
  border: 1px solid var(--gold);
}
.root-cause h3 {
  color: #9a7a16;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.root-cause p {
  font-size: 14.5px;
  color: #5a4f2e;
}

.cta-box {
  margin: 26px 36px 10px;
  padding: 28px 26px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--navy), var(--navy-deep));
  color: #fff;
  text-align: center;
}
.cta-box h3 {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 8px;
}
.cta-box h3 span {
  color: var(--gold);
}
.cta-box p {
  font-size: 14px;
  color: #c7d0e4;
  max-width: 480px;
  margin: 0 auto 20px;
}
.cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Lead form ---- */
.lead-form {
  padding: 6px 36px 34px;
}
.lead-form h4 {
  font-size: 15px;
  color: var(--navy);
  font-weight: 800;
  margin: 18px 0 4px;
  text-align: center;
}
.lead-form .lf-sub {
  text-align: center;
  font-size: 13px;
  color: #7a8090;
  margin-bottom: 18px;
}
.field {
  margin-bottom: 13px;
}
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 5px;
}
.field input, .field select {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
  background: #fff;
  transition: border .15s;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--gold);
}
.consent {
  font-size: 11.5px;
  color: #9096a3;
  text-align: center;
  margin-top: 6px;
}
.thankyou {
  padding: 50px 36px;
  text-align: center;
}
.thankyou .check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  margin: 0 auto 18px;
}
.thankyou h3 {
  color: var(--navy);
  font-size: 22px;
  margin-bottom: 10px;
}
.thankyou p {
  color: #5a6172;
  font-size: 15px;
  max-width: 440px;
  margin: 0 auto;
}

/* ---- Gate form ---- */
.gate-body {
  padding: 30px 36px 36px;
  text-align: center;
}
.gate-body .field {
  text-align: left;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}
.gate-lock {
  font-size: 40px;
  margin-bottom: 6px;
}
.gate-title {
  font-size: 23px;
  color: var(--navy);
  font-weight: 800;
  margin-bottom: 10px;
}
.gate-sub {
  font-size: 14.5px;
  color: #5a6172;
  max-width: 480px;
  margin: 0 auto 24px;
}
.gate-body .btn {
  max-width: 440px;
}
.gate-err {
  max-width: 440px;
  margin: 10px auto 0;
  background: #fbe9e7;
  color: #b3392b;
  border: 1px solid #f0c4bd;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.btn:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

.hidden {
  display: none;
}
.footer {
  text-align: center;
  font-size: 11.5px;
  color: #9aa0ad;
  margin-top: 26px;
  letter-spacing: .5px;
}

@media(max-width: 600px) {
  .intro, .qbody, .fronts-result, .lead-form {
    padding-left: 22px;
    padding-right: 22px;
  }
  .bar-wrap {
    padding-left: 22px;
    padding-right: 22px;
  }
  .res-head {
    padding-left: 22px;
    padding-right: 22px;
  }
  .root-cause, .cta-box {
    margin-left: 18px;
    margin-right: 18px;
  }
  h1 { font-size: 25px; }
  .qtext { font-size: 18px; }
}