/* ===========================================================================
   /quiz — layered on styles.css + doc.css
   The page ships fully readable: every question and result is in the markup
   and styled. The script hides that fallback and reveals the interactive card
   only once it has parsed the data, so a failed script leaves a real page and
   a crawler always sees real content.
   ========================================================================= */

/* The server-rendered fallback. Visible by default — the script removes this
   class from the shell and adds it here, never the other way round, so the
   readable version is what survives any failure. */
.quiz-static .q-block {
  margin-bottom: 30px;
}

.quiz-static .q-block h2 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.14rem;
  line-height: 1.3;
  color: var(--pearl);
}

.quiz-static ul {
  margin: 0;
  padding-left: 20px;
  color: rgba(253, 251, 255, 0.8);
  font-size: 0.97rem;
  line-height: 1.7;
}

/* ---------------------------------------------------------------- shell --- */

.quiz-shell {
  min-height: 340px;
}

.progress {
  display: flex;
  gap: 5px;
  margin-bottom: 22px;
}

.progress span {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: rgba(207, 216, 232, 0.15);
  transition: background 0.3s ease;
}

.progress span.done {
  background: var(--rim);
}

.q-card {
  padding: 22px;
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  background:
    radial-gradient(ellipse 110% 80% at 50% 0%, rgba(143, 212, 255, 0.07), transparent 70%),
    rgba(13, 20, 38, 0.56);
}

.q-card h2 {
  margin: 0 0 18px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.14rem, 5vw, 1.4rem);
  line-height: 1.28;
  letter-spacing: -0.02em;
  color: var(--pearl);
}

.options {
  display: grid;
  gap: 9px;
}

.option {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  border: 1px solid var(--hair);
  border-radius: var(--r-sm);
  background: rgba(6, 9, 18, 0.5);
  color: rgba(253, 251, 255, 0.88);
  font-family: var(--body);
  font-size: 0.98rem;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.option:active,
.option.picked {
  transform: scale(0.99);
  border-color: rgba(143, 212, 255, 0.6);
  background: rgba(143, 212, 255, 0.1);
  color: var(--pearl);
}

/* --------------------------------------------------------------- result --- */

.result {
  text-align: center;
}

.result .mark {
  font-family: var(--display);
  font-size: 2.6rem;
  line-height: 1;
  background: var(--rim);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.result h2 {
  margin: 12px 0 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.7rem, 8vw, 2.3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  background: linear-gradient(178deg, var(--pearl) 26%, #b3c1da 94%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.result .blurb {
  margin: 14px 0 0;
  color: rgba(253, 251, 255, 0.84);
  font-size: 1rem;
  line-height: 1.7;
  text-align: left;
}

.traits {
  display: grid;
  gap: 7px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.traits li {
  padding: 10px 14px;
  border: 1px solid var(--hair);
  border-radius: var(--r-sm);
  background: rgba(6, 9, 18, 0.45);
  color: rgba(253, 251, 255, 0.82);
  font-size: 0.93rem;
  line-height: 1.5;
}

.traits li::before {
  content: "✧ ";
  color: var(--halo);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.ghost {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.ghost:active,
.ghost:hover {
  color: var(--pearl);
  border-color: rgba(143, 212, 255, 0.5);
}

.result .cta-block {
  margin-top: 26px;
}
