:root {
  --navy: #0f2143;
  --navy-deep: #0a1730;
  --card: #a8dce7;
  --card-edge: #93d2e0;
  --white: #ffffff;
  --radius-card: 28px;
  --radius-btn: 16px;
  --head: "Oswald", "Arial Narrow", Impact, sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--navy);
  color: var(--white);
  font-family: var(--body);
  min-height: 100%;
}

body {
  min-height: 100svh;
  display: flex;
}

#root {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  width: 100%;
}

button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
button:disabled { cursor: not-allowed; }

/* ---------- welcome ---------- */
.welcome {
  text-align: center;
  max-width: 460px;
  width: 100%;
  animation: rise .5s cubic-bezier(.2,.8,.2,1) both;
}
.welcome h1 {
  font-family: var(--head);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: clamp(52px, 18vw, 86px);
  line-height: .95;
  margin: 0 0 22px;
  color: var(--card);
}
.welcome p {
  font-size: 17px;
  line-height: 1.5;
  color: rgba(255,255,255,.82);
  margin: 0 auto 40px;
  max-width: 30ch;
}
.welcome .meta {
  margin-top: 26px;
  margin-bottom: 0;
  font-size: 13px;
  color: rgba(255,255,255,.45);
}

.btn-primary {
  display: inline-block;
  background: var(--card);
  color: var(--navy);
  font-family: var(--head);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 20px;
  padding: 20px 62px;
  border-radius: 999px;
  transition: transform .15s ease, filter .15s ease;
}
.btn-primary:active { transform: scale(.97); }

/* ---------- progress ---------- */
.progress-wrap {
  width: 100%;
  max-width: 460px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 20px;
}
.progress {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: rgba(168,220,231,.22);
  overflow: hidden;
}
.progress > i {
  display: block;
  height: 100%;
  background: var(--card);
  border-radius: 999px;
  transition: width .35s cubic-bezier(.2,.8,.2,1);
}
.progress-num {
  font-family: var(--head);
  font-size: 13px;
  letter-spacing: .1em;
  color: rgba(255,255,255,.5);
  min-width: 56px;
  text-align: right;
}

/* ---------- the card ---------- */
.card {
  width: 100%;
  max-width: 460px;
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 30px 24px 24px;
  color: var(--navy);
  display: flex;
  flex-direction: column;
  min-height: 66svh;
  box-shadow: 0 12px 34px rgba(0,0,0,.16);
  transition:
    min-height .6s cubic-bezier(.22,.9,.25,1),
    max-width .6s cubic-bezier(.22,.9,.25,1),
    padding .6s cubic-bezier(.22,.9,.25,1),
    border-radius .6s cubic-bezier(.22,.9,.25,1);
}
.card.is-intro {
  min-height: 32svh;
  max-width: 320px;
  border-radius: 34px;
  justify-content: center;
  padding: 30px 24px;
  cursor: pointer;
}
.card-body { display: flex; flex-direction: column; flex: 1; transition: opacity .22s ease; }
.card-body.fade { opacity: 0; }

/* category intro */
.cat-intro { text-align: center; }
.cat-intro .kicker {
  font-family: var(--head);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .28em;
  font-size: 13px;
  color: var(--white);
  margin: 0 0 12px;
}
.cat-intro .name {
  font-family: var(--head);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  line-height: 1.02;
  font-size: clamp(30px, 9vw, 40px);
  color: var(--white);
  margin: 0;
}

/* question */
.q-cat {
  font-family: var(--head);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: 12px;
  color: var(--white);
  margin: 0 0 20px;
}
.q-text {
  font-size: clamp(21px, 5.6vw, 25px);
  line-height: 1.28;
  font-weight: 500;
  margin: 0 0 6px;
  color: var(--navy);
}
.q-helper {
  font-size: 14px;
  line-height: 1.4;
  color: rgba(15,33,67,.62);
  margin: 8px 0 0;
}
.q-answers { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.q-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }

.opt {
  width: 100%;
  background: var(--white);
  color: var(--navy);
  border-radius: var(--radius-btn);
  padding: 17px 20px;
  font-size: 17px;
  font-weight: 500;
  text-align: left;
  transition: transform .12s ease, background .15s ease, color .15s ease;
  min-height: 56px;
}
.opt:active { transform: scale(.985); }
.opt[aria-pressed="true"] {
  background: var(--navy);
  color: var(--white);
}

/* check grid */
.grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.chip {
  background: var(--white);
  color: var(--navy);
  border-radius: var(--radius-btn);
  padding: 14px 6px 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.15;
  text-align: center;
  min-height: 88px;
  justify-content: center;
  transition: transform .12s ease, background .15s ease, color .15s ease;
}
.chip:active { transform: scale(.97); }
.chip svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.chip[aria-pressed="true"] { background: var(--navy); color: var(--white); }
.grid-hint { margin: 14px 0 0; font-size: 13px; color: rgba(15,33,67,.55); }

/* slider */
.slider-wrap { margin-top: 34px; }
.slider-value {
  font-family: var(--head);
  font-weight: 700;
  font-size: clamp(46px, 15vw, 64px);
  line-height: 1;
  color: var(--white);
  text-align: center;
  letter-spacing: .01em;
}
.slider-unit {
  text-align: center;
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: 12px;
  color: rgba(15,33,67,.6);
  margin-top: 8px;
}
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  margin: 30px 0 6px;
  background: transparent;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 999px; background: rgba(15,33,67,.2);
}
input[type="range"]::-moz-range-track {
  height: 6px; border-radius: 999px; background: rgba(15,33,67,.2);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--white); margin-top: -13px;
  box-shadow: 0 2px 6px rgba(15,33,67,.25);
}
input[type="range"]::-moz-range-thumb {
  width: 32px; height: 32px; border: none; border-radius: 50%;
  background: var(--white); box-shadow: 0 2px 6px rgba(15,33,67,.25);
}
.slider-ends {
  display: flex; justify-content: space-between;
  font-size: 12px; color: rgba(15,33,67,.5);
}

/* nav */
.nav {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  padding-top: 4px;
}
.nav button {
  flex: 1;
  border-radius: var(--radius-btn);
  padding: 17px 10px;
  font-family: var(--head);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 14px;
  min-height: 56px;
  transition: opacity .18s ease, transform .12s ease;
}
.nav .prev { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 2px rgba(15,33,67,.28); }
.nav .next { background: var(--navy); color: var(--white); flex: 1.35; }
.nav button:disabled { opacity: .32; }
.nav button:not(:disabled):active { transform: scale(.98); }

/* ---------- result ---------- */
.result-card {
  width: 100%;
  max-width: 460px;
  background: linear-gradient(160deg, #16305e 0%, #0f2143 62%);
  border-radius: var(--radius-card);
  padding: 44px 26px 38px;
  text-align: center;
  box-shadow: 0 14px 40px rgba(0,0,0,.28);
  animation: rise .55s cubic-bezier(.2,.8,.2,1) both;
}
.result-card .label {
  font-family: var(--head);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .3em;
  font-size: 12px;
  color: var(--card);
  margin: 0;
}
.result-card .score {
  font-family: var(--head);
  font-weight: 700;
  font-size: clamp(96px, 34vw, 140px);
  line-height: 1;
  margin: 14px 0 6px;
  color: var(--white);
  letter-spacing: -.01em;
}
.result-card .of {
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-family: var(--head);
  color: rgba(168,220,231,.7);
  margin: 0 0 26px;
}
.result-card .sell {
  font-size: 17px;
  line-height: 1.5;
  color: rgba(255,255,255,.85);
  margin: 0;
  max-width: 30ch;
  margin-inline: auto;
}
.result-actions { width: 100%; max-width: 460px; margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.act {
  border-radius: var(--radius-btn);
  padding: 18px 16px;
  font-family: var(--head);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 15px;
  min-height: 58px;
  transition: transform .12s ease;
}
.act:active { transform: scale(.985); }
.act.pay { background: var(--card); color: var(--navy); }
.act.share { background: var(--white); color: var(--navy); }
.act.ghost { background: transparent; color: rgba(255,255,255,.7); box-shadow: inset 0 0 0 2px rgba(168,220,231,.3); }
.note { font-size: 13px; color: rgba(255,255,255,.55); text-align: center; margin: 4px 0 0; line-height: 1.45; }

.email-box {
  width: 100%; max-width: 460px; margin-top: 26px;
  background: rgba(168,220,231,.08);
  border-radius: 22px; padding: 20px;
}
.email-box p { margin: 0 0 14px; font-size: 15px; line-height: 1.45; color: rgba(255,255,255,.8); }
.email-row { display: flex; gap: 8px; }
.email-row input {
  flex: 1; min-width: 0;
  background: var(--white); color: var(--navy);
  border: none; border-radius: var(--radius-btn);
  padding: 16px; font-size: 16px; font-family: var(--body);
  min-height: 54px;
}
.email-row button {
  background: var(--card); color: var(--navy);
  border-radius: var(--radius-btn); padding: 0 20px;
  font-family: var(--head); font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  font-size: 14px; min-height: 54px;
}
.email-msg { margin: 12px 0 0; font-size: 14px; color: var(--card); }

.footer {
  width: 100%; max-width: 460px; margin-top: 28px; text-align: center;
  font-size: 12px; color: rgba(255,255,255,.38);
}
.footer button { text-decoration: underline; color: inherit; font-size: 12px; padding: 8px; }

/* ---------- privacy ---------- */
.doc { max-width: 460px; width: 100%; padding: 10px 0 30px; animation: rise .4s cubic-bezier(.2,.8,.2,1) both; }
.doc h2 {
  font-family: var(--head); font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; font-size: 30px; margin: 0 0 18px; color: var(--card);
}
.doc p { font-size: 15px; line-height: 1.6; color: rgba(255,255,255,.8); margin: 0 0 14px; }
.doc ul { padding-left: 20px; margin: 0 0 14px; }
.doc li { font-size: 15px; line-height: 1.6; color: rgba(255,255,255,.8); margin-bottom: 8px; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001s !important; transition-duration: .001s !important; }
}

@media (min-width: 520px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}
