:root {
  --bg0: #14091f;
  --bg1: #1e1030;
  --card: #ffffff;
  --ink: #1b1330;
  --muted: #6b6580;
  --accent: #b5336b;
  --accent2: #6d3fd8;
  --gold: #d9a441;
  --ok: #1f7a4d;
  --soft: #f3effa;
}

* { box-sizing: border-box; }

/* WordPress themes often override the native [hidden] attribute with their
   own display rules, which would show every quiz stage stacked at once.
   We control visibility entirely with an explicit active class instead. */
#app .screen,
#gigready-app .screen { display: none !important; }
#app .screen.active,
#gigready-app .screen.active { display: block !important; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: linear-gradient(160deg, var(--bg0), var(--bg1) 55%, #2a1240);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 24px 16px;
}

#app { width: 100%; max-width: 720px; }

.screen { margin-top: 4vh; }

.card {
  background: var(--card);
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
}

.card-center { text-align: center; }

.brand {
  color: var(--accent2);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

h1 { font-size: 30px; line-height: 1.15; margin: 8px 0 14px; }
h2 { font-size: 24px; margin: 8px 0 12px; }
h3 { font-size: 17px; margin: 0 0 6px; }

.lead { color: var(--muted); font-size: 16px; line-height: 1.55; }

.checks { text-align: left; margin: 20px 0; padding: 0; list-style: none; }
.checks li { padding: 7px 0 7px 28px; position: relative; font-size: 15px; }
.checks li::before {
  content: "✓";
  position: absolute; left: 0; top: 7px;
  color: var(--accent);
  font-weight: 800;
}

.btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  box-shadow: 0 8px 22px rgba(181,51,107,.4);
}
.btn-block { width: 100%; }
.btn-secondary {
  background: var(--soft);
  color: var(--accent2);
}
.btn:disabled { opacity: .55; cursor: not-allowed; }

.small { color: var(--muted); font-size: 13px; margin-top: 16px; }

.progressbar {
  height: 8px; border-radius: 999px;
  background: rgba(255,255,255,.2);
  overflow: hidden; margin-bottom: 8px;
}
.progressbar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--accent));
  transition: width .25s ease;
}
.progress-label {
  color: rgba(255,255,255,.85);
  font-size: 13px; text-align: center; margin-bottom: 18px;
}

#question-card h2 { padding-right: 8px; }
.answers { display: flex; flex-direction: column; gap: 10px; margin: 22px 0; }

.answer {
  display: flex; align-items: center; gap: 14px;
  text-align: left; width: 100%;
  background: var(--soft);
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 15px; line-height: 1.4;
  font-family: inherit; color: var(--ink);
  cursor: pointer; transition: border-color .12s ease, background .12s ease;
}
.answer .letter {
  flex: none;
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: #fff; font-weight: 800; color: var(--accent2);
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.answer.selected {
  border-color: var(--accent);
  background: #fdecff;
}
.nav { display: flex; gap: 10px; }
.nav .btn { flex: 1; }

label { display: block; text-align: left; margin-top: 16px; font-weight: 600; font-size: 14px; }
input[type=text], input[type=email] {
  width: 100%; margin-top: 6px;
  padding: 12px 14px; font-size: 16px;
  border: 2px solid #e2dbf0; border-radius: 12px;
  font-family: inherit;
}
input:focus { outline: none; border-color: var(--accent2); }
.consent {
  display: flex; gap: 10px; align-items: flex-start;
  font-weight: 400; font-size: 13px; color: var(--muted); margin-top: 18px;
}
.consent input { margin-top: 2px; width: auto; }
.error { color: #c62828; font-size: 14px; min-height: 20px; margin: 10px 0 0; text-align: left; }

.spinner {
  width: 44px; height: 44px; margin: 10px auto 20px;
  border: 5px solid var(--soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.result-card { text-align: left; }
.result-mask { text-align: center; }

.score-hero {
  text-align: center;
  background: linear-gradient(160deg, var(--bg0), var(--bg1));
  color: #fff;
  border-radius: 16px; padding: 26px 20px; margin-bottom: 6px;
}
.score-hero .level { font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.score-hero .level-name { font-size: 30px; font-weight: 800; margin: 4px 0; }
.score-hero .score { font-size: 52px; font-weight: 900; line-height: 1; margin-top: 6px; }
.score-hero .desc { color: rgba(255,255,255,.85); margin-top: 6px; font-size: 15px; }

.result-block { padding: 8px 0 4px; }
.result-block h3 { color: var(--accent2); }

.section-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid #efeaf9;
}
.section-row .name { font-size: 15px; }
.section-row .val { text-align: right; font-size: 14px; }
.section-row .val .score { font-weight: 800; color: var(--accent); }
.pill {
  display: inline-block; font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
  background: var(--soft); color: var(--accent2); margin-top: 3px;
}

.priority {
  background: var(--soft); border-radius: 14px;
  padding: 14px 16px; margin: 10px 0;
}
.priority .tag { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--accent2); }
.priority p { margin: 6px 0 0; font-size: 15px; line-height: 1.5; }

.cta {
  background: linear-gradient(160deg, var(--bg0), var(--bg1));
  color: #fff; border-radius: 16px; padding: 24px 20px; margin-top: 18px; text-align: center;
}
.cta h3 { color: var(--gold); }
.cta p { color: rgba(255,255,255,.9); font-size: 15px; line-height: 1.55; }
.cta .btn { margin-top: 12px; display: block; width: 100%; }

.closing { margin-top: 22px; text-align: center; color: var(--muted); }
.closing .sig { margin-top: 14px; font-style: italic; font-size: 14px; }

.divider { border: none; border-top: 1px solid #efeaf9; margin: 22px 0; }

@media (max-width: 480px) {
  h1 { font-size: 26px; }
  .card { padding: 24px 18px; }
  .score-hero .score { font-size: 44px; }
}