/* Wedding Career Profiler — extends the tokens/reset from css/style.css
   with its own refined palette: Ivory / Champagne / Peach / Antique Gold. */

:root {
  --champagne: #EFE3C8;       /* light tint — backgrounds/fills only */
  --champagne-deep: #9C8656;  /* text-safe */
  --peach: #F0C9AC;           /* light tint — backgrounds/fills only */
  --peach-deep: #B9744A;      /* text-safe */
  --antique-gold: #A9834F;    /* primary quiz accent */
}

.quiz-body { overflow-x: hidden; }

.quiz-app {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.quiz-screen:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Defensive: several elements below set `display` unconditionally so their
   layout applies whenever they're the active screen — without this, that
   authored `display` would beat the browser's default [hidden]{display:none}
   even while the hidden attribute is present. */
.quiz-app [hidden] { display: none !important; }

/* ===== Top bar ===== */
.quiz-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 16px var(--side-pad);
  background: rgba(247, 242, 233, .92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(32, 24, 16, .07);
}
.quiz-topbar-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 820px;
  margin: 0 auto;
}
.quiz-exit {
  font-size: 24px;
  line-height: 1;
  color: var(--muted);
  padding: 6px 8px;
  flex-shrink: 0;
  border-radius: 50%;
  transition: background-color .18s ease, color .18s ease;
}
.quiz-exit:hover, .quiz-exit:focus-visible { color: var(--ink); background: rgba(32, 24, 16, .06); }
.quiz-progress-wrap { flex: 1; display: flex; align-items: center; gap: 14px; }
.quiz-progress-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(32, 24, 16, .08);
  width: 100%;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--antique-gold), var(--peach-deep));
  transition: width .5s cubic-bezier(.4, 0, .2, 1);
}
.quiz-progress-label {
  display: block;
  flex-shrink: 0;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-label);
  font-weight: 500;
}

/* ===== Bottom bar ===== */
.quiz-bottombar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  padding: 16px var(--side-pad) calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--ivory);
  border-top: 1px solid rgba(32, 24, 16, .08);
}
.quiz-bottombar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 820px;
  margin: 0 auto;
}
.quiz-back {
  font-size: 13px;
  color: var(--muted);
  padding: 12px 8px;
  transition: color .18s ease, transform .18s ease;
}
.quiz-back:hover, .quiz-back:focus-visible { color: var(--ink); transform: translateX(-2px); }
.quiz-next {
  background: linear-gradient(135deg, var(--antique-gold), #8F6D3F);
  color: var(--ivory);
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 15px 38px;
  border-radius: 999px;
  box-shadow: 0 10px 24px -10px rgba(169, 131, 79, .55);
  transition: opacity .18s ease, transform .18s ease, box-shadow .18s ease;
}
.quiz-next:disabled { opacity: .35; cursor: not-allowed; box-shadow: none; }
.quiz-next:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 14px 28px -10px rgba(169, 131, 79, .6); }

/* ===== Shared buttons ===== */
.quiz-btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--antique-gold), #8F6D3F);
  color: var(--ivory);
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 16px 40px;
  border-radius: 999px;
  text-align: center;
  box-shadow: 0 12px 28px -10px rgba(169, 131, 79, .55);
  transition: transform .18s ease, box-shadow .18s ease;
}
.quiz-btn-primary:hover, .quiz-btn-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -10px rgba(169, 131, 79, .6);
}
.quiz-btn-secondary {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--antique-gold);
  color: var(--antique-gold);
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 15px 38px;
  border-radius: 999px;
  text-align: center;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
.quiz-btn-secondary:hover, .quiz-btn-secondary:focus-visible {
  background: var(--antique-gold);
  color: var(--ivory);
  transform: translateY(-2px);
}

.quiz-eyebrow {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--antique-gold);
  margin: 0 0 14px;
}

/* ===== Landing ===== */
.quiz-landing {
  align-items: center;
  justify-content: center;
  padding: clamp(48px, 10vh, 96px) var(--side-pad);
  text-align: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 30% 15%, rgba(240, 201, 172, .35), transparent 55%),
    radial-gradient(ellipse at 80% 85%, rgba(239, 227, 200, .5), transparent 55%),
    var(--ivory);
}
.quiz-landing-inner {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  opacity: 0;
  animation: quizLandingIn .8s cubic-bezier(.19, 1, .22, 1) .1s forwards;
}
@media (min-width: 900px) {
  .quiz-landing-inner { max-width: 620px; }
}
@keyframes quizLandingIn { to { opacity: 1; } }
.quiz-landing-mark {
  width: 64px;
  height: auto;
  margin: 0 auto 22px;
  animation: quizMarkFloat 3.2s ease-in-out infinite;
}
@keyframes quizMarkFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.quiz-landing-title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(38px, 8vw, 58px);
  line-height: 1.05;
  color: var(--ink);
  margin: 0 0 20px;
}
.quiz-landing-desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 400px;
  margin: 0 auto 28px;
}
.quiz-landing-meta {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0;
  margin: 0 0 36px;
}
.quiz-landing-meta li {
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--champagne-deep);
  background: rgba(169, 131, 79, .1);
  border: 1px solid rgba(169, 131, 79, .22);
  border-radius: 999px;
  padding: 8px 16px;
}
.quiz-landing-back {
  display: block;
  margin-top: 28px;
  font-size: 13px;
  color: var(--muted);
  transition: color .18s ease;
}
.quiz-landing-back:hover, .quiz-landing-back:focus-visible { color: var(--antique-gold); }
@media (prefers-reduced-motion: reduce) {
  .quiz-landing-inner { animation: none; opacity: 1; }
  .quiz-landing-mark { animation: none; }
}

/* ===== Question screen ===== */
.quiz-question { justify-content: center; }
.quiz-question-inner {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 40px var(--side-pad) 48px;
  opacity: 0;
  transform: translateY(14px);
}
@media (min-width: 900px) {
  .quiz-question-inner { max-width: 780px; padding-top: 64px; padding-bottom: 72px; }
}
.quiz-question-inner.quiz-anim-in {
  animation: quizFadeIn .45s cubic-bezier(.19, 1, .22, 1) forwards;
}
@keyframes quizFadeIn { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .quiz-question-inner.quiz-anim-in { animation: none; opacity: 1; transform: none; }
}

.quiz-question-text {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(24px, 5vw, 32px);
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 32px;
}
@media (min-width: 900px) {
  .quiz-question-text { font-size: 40px; margin-bottom: 40px; }
}
.quiz-hint {
  font-size: 12px;
  color: var(--muted-label);
  margin: -20px 0 20px;
}

.quiz-options { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 900px) {
  .quiz-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .quiz-option { padding: 20px 22px; font-size: 16px; }
  .quiz-option:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.quiz-option {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  border: 1px solid rgba(32, 24, 16, .12);
  border-radius: 16px;
  background: var(--ivory);
  padding: 16px 20px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink);
  opacity: 0;
  transform: translateY(10px);
  animation: quizOptionIn .5s cubic-bezier(.19, 1, .22, 1) forwards;
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.quiz-options .quiz-option:nth-child(1) { animation-delay: .04s; }
.quiz-options .quiz-option:nth-child(2) { animation-delay: .1s; }
.quiz-options .quiz-option:nth-child(3) { animation-delay: .16s; }
.quiz-options .quiz-option:nth-child(4) { animation-delay: .22s; }
.quiz-options .quiz-option:nth-child(5) { animation-delay: .28s; }
.quiz-options .quiz-option:nth-child(6) { animation-delay: .34s; }
@keyframes quizOptionIn { to { opacity: 1; transform: translateY(0); } }
.quiz-option-badge {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid rgba(169, 131, 79, .4);
  color: var(--antique-gold);
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.quiz-option-label { flex: 1; }
.quiz-option-check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  opacity: 0;
  transform: scale(.6);
  color: var(--antique-gold);
  transition: opacity .2s ease, transform .2s ease;
}
.quiz-option-check svg { width: 100%; height: 100%; }
.quiz-option:hover:not(.is-disabled) {
  border-color: rgba(169, 131, 79, .55);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -14px rgba(43, 33, 24, .35);
}
.quiz-option.is-selected {
  border-color: var(--antique-gold);
  background: rgba(169, 131, 79, .1);
  font-weight: 500;
  box-shadow: 0 10px 24px -14px rgba(169, 131, 79, .45);
}
.quiz-option.is-selected .quiz-option-badge {
  background: var(--antique-gold);
  border-color: var(--antique-gold);
  color: var(--ivory);
  transform: scale(1.08);
}
.quiz-option.is-selected .quiz-option-check { opacity: 1; transform: scale(1); }
.quiz-option.is-disabled { opacity: .35; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) {
  .quiz-option { animation: none; opacity: 1; transform: none; }
}

/* ===== Slider ===== */
.quiz-slider-wrap { text-align: center; padding-top: 12px; }
.quiz-slider-value {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 56px;
  color: var(--antique-gold);
  line-height: 1;
  margin-bottom: 24px;
  transition: transform .15s ease;
}
.quiz-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--antique-gold), var(--peach-deep)) 0 / var(--fill, 50%) 100% no-repeat,
    rgba(32, 24, 16, .1);
  outline: none;
}
.quiz-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ivory);
  border: 3px solid var(--antique-gold);
  box-shadow: 0 6px 16px -6px rgba(169, 131, 79, .6);
  cursor: pointer;
  transition: transform .15s ease;
}
.quiz-slider::-webkit-slider-thumb:hover { transform: scale(1.12); }
.quiz-slider::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ivory);
  border: 3px solid var(--antique-gold);
  box-shadow: 0 6px 16px -6px rgba(169, 131, 79, .6);
  cursor: pointer;
}
.quiz-slider::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--antique-gold), var(--peach-deep));
}
.quiz-slider-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--muted-label);
}
.quiz-slider-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding: 0 1px;
}
.quiz-slider-ticks span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(32, 24, 16, .15);
  transition: background-color .2s ease, transform .2s ease;
}
.quiz-slider-ticks span.is-active { background: var(--antique-gold); transform: scale(1.2); }

/* ===== Lead capture ===== */
.quiz-lead { justify-content: center; }
.quiz-lead-inner {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 40px var(--side-pad) 80px;
}
@media (min-width: 900px) {
  .quiz-lead-inner { max-width: 500px; padding-top: 64px; }
}
.quiz-lead-title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(26px, 5vw, 34px);
  color: var(--ink);
  margin: 0 0 12px;
}
.quiz-lead-desc { font-size: 14px; color: var(--muted); line-height: 1.6; margin: 0 0 32px; }
.quiz-lead-form { display: flex; flex-direction: column; gap: 22px; }
.quiz-field { display: flex; flex-direction: column; }
.quiz-field label {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-label);
  margin-bottom: 8px;
}
.quiz-field input, .quiz-field select {
  border: none;
  border-bottom: 1px solid rgba(32, 24, 16, .25);
  background: transparent;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--ink);
  padding: 10px 2px;
}
.quiz-field input:focus, .quiz-field select:focus { outline: none; border-bottom-color: var(--antique-gold); }
.quiz-field input[aria-invalid="true"] { border-bottom-color: #B3261E; }
.quiz-field-error { display: block; min-height: 16px; font-size: 12px; color: #B3261E; margin-top: 6px; }
.quiz-lead-submit { margin-top: 8px; width: 100%; }
.quiz-lead-back { display: block; width: 100%; text-align: center; margin-top: 24px; }

/* ===== Results ===== */
.results-inner { max-width: 640px; margin: 0 auto; padding: 48px var(--side-pad) 96px; }
@media (min-width: 900px) {
  .results-inner { max-width: 780px; padding-top: 64px; }
}
.results-eyebrow { text-align: center; }
.results-headline {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(32px, 7vw, 48px);
  text-align: center;
  color: var(--ink);
  margin: 0 0 18px;
  opacity: 0;
  animation: resultFade .7s ease forwards;
}
.results-desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  text-align: center;
  max-width: 480px;
  margin: 0 auto 48px;
  opacity: 0;
  animation: resultFade .7s ease .1s forwards;
}
@keyframes resultFade { to { opacity: 1; } }

.results-section-label {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-label);
  margin: 0 0 18px;
}

.result-cards { display: flex; flex-direction: column; gap: 18px; margin-bottom: 44px; }
.result-card {
  border: 1px solid rgba(32, 24, 16, .08);
  border-radius: 18px;
  background: var(--ivory);
  padding: 24px;
  box-shadow: 0 16px 32px -22px rgba(43, 33, 24, .35);
  opacity: 0;
  transform: translateY(16px);
  animation: cardIn .6s cubic-bezier(.19, 1, .22, 1) forwards;
  transition: transform .2s ease, box-shadow .2s ease;
}
.result-card:hover { transform: translateY(-3px); box-shadow: 0 20px 36px -20px rgba(43, 33, 24, .4); }
.result-card:nth-child(1) { animation-delay: .05s; }
.result-card:nth-child(2) { animation-delay: .2s; }
.result-card:nth-child(3) { animation-delay: .35s; }
@keyframes cardIn { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .results-headline, .results-desc, .result-card { animation: none !important; opacity: 1 !important; transform: none !important; }
  .result-card:hover { transform: none; }
}

.result-card-head { display: flex; align-items: flex-start; gap: 16px; }
@media (min-width: 900px) {
  .result-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .result-card-head { flex-direction: column; align-items: flex-start; }
  .result-pct { margin-top: 6px; }
}
.result-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 15px;
  color: var(--ivory);
  background: linear-gradient(135deg, var(--antique-gold), #8F6D3F);
  box-shadow: 0 8px 18px -8px rgba(169, 131, 79, .55);
}
.rank-champagne .result-rank { background: linear-gradient(135deg, var(--champagne-deep), #7A6740); }
.rank-peach .result-rank { background: linear-gradient(135deg, var(--peach-deep), #92562F); }

.result-card-title { flex: 1; }
.result-card-title .result-card-kicker {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--antique-gold);
  margin: 0 0 5px;
}
.rank-champagne .result-card-kicker { color: var(--champagne-deep); }
.rank-peach .result-card-kicker { color: var(--peach-deep); }
.result-card-title h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 19px;
  color: var(--ink);
  margin: 0 0 6px;
}
.result-card-title p { font-size: 12.5px; color: var(--muted); line-height: 1.55; margin: 0; }

.result-pct {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 24px;
  color: var(--ink);
  flex-shrink: 0;
}

.result-meter {
  height: 5px;
  border-radius: 999px;
  background: rgba(32, 24, 16, .08);
  margin-top: 18px;
  overflow: hidden;
}
.result-meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--antique-gold), var(--peach-deep));
  transition: width 1s cubic-bezier(.19, 1, .22, 1);
}
.rank-champagne .result-meter-fill { background: var(--champagne-deep); }
.rank-peach .result-meter-fill { background: var(--peach-deep); }

.results-panel {
  background: rgba(169, 131, 79, .06);
  border: 1px solid rgba(169, 131, 79, .14);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 20px;
}
.results-panel-label {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--antique-gold);
  margin: 0 0 14px;
}
.results-skills { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.results-skills li {
  font-size: 14.5px;
  color: var(--ink);
  padding-left: 18px;
  position: relative;
}
.results-skills li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 1px;
  background: var(--antique-gold);
}
.results-path {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  color: var(--ink);
  margin: 0;
}

.results-fitscore { text-align: center; margin: 0 auto 40px; }
.results-fitscore-label {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-label);
  margin-bottom: 10px;
}
.results-fitscore-num {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(48px, 10vw, 68px);
  color: var(--ink);
  line-height: 1;
}
.results-fitscore-max { font-size: .4em; color: var(--muted); margin-left: 4px; }
.results-fitscore-stars { margin-top: 10px; font-size: 20px; color: var(--antique-gold); letter-spacing: .06em; }
.results-fitscore-stars span {
  display: block;
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-label);
  margin-top: 6px;
}
.results-persona-name { font-family: var(--font-serif); font-weight: 500; font-size: 22px; color: var(--ink); margin: 0 0 10px; }
.results-desc--left { text-align: left; margin: 0; max-width: none; }
.results-skills--check li { padding-left: 22px; }
.results-skills--check li::before {
  content: '\2714';
  width: auto;
  height: auto;
  background: none;
  top: -1px;
  color: var(--antique-gold);
  font-size: 13px;
}

.results-cta-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 36px;
}
.results-cta-row .quiz-btn-primary,
.results-cta-row .quiz-btn-secondary { text-align: center; }
.results-footer-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
}
.results-retake {
  display: block;
  margin: 0;
  font-size: 12.5px;
  color: var(--muted-label);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.results-retake:hover, .results-retake:focus-visible { color: var(--antique-gold); }

@media (min-width: 640px) {
  .results-cta-row { flex-direction: row; }
  .results-cta-row .quiz-btn-primary,
  .results-cta-row .quiz-btn-secondary { flex: 1; }
  .results-footer-row { flex-direction: row; gap: 20px; }
}
