:root {
  color-scheme: dark;
  --bg: #100b0f;
  --ink: #fff7f2;
  --muted: #c9aaa4;
  --line: rgba(255, 255, 255, 0.14);
  --panel: rgba(32, 18, 25, 0.86);
  --panel-strong: rgba(48, 23, 32, 0.94);
  --accent: #ff4268;
  --accent-2: #f5b665;
  --green: #48d597;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.44);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(115deg, rgba(16, 11, 15, 0.92), rgba(30, 12, 23, 0.74)),
    url("https://images.unsplash.com/photo-1524504388940-b1c1722653e1?auto=format&fit=crop&w=1800&q=82") center / cover fixed,
    var(--bg);
}

button {
  font: inherit;
}

.quiz-shell {
  width: min(1120px, calc(100% - 28px));
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(18px, 4vw, 44px) 0 18px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-2);
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
}

.eyebrow,
.question-kicker {
  margin: 0;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 2.5vw, 2.25rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.quiz-stage,
.result-stage {
  align-self: center;
  display: grid;
  gap: 18px;
}

.question-panel {
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.meter {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(22px, 4vw, 38px);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.meter-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
}

.meter-fill {
  width: 16.6%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 240ms ease;
}

.question-panel h2 {
  max-width: 820px;
  margin: 10px 0 0;
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.answers-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.answers-grid.two-answer {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.answer-card {
  position: relative;
  min-height: clamp(190px, 25vw, 285px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: #24131b;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.32);
  cursor: pointer;
  isolation: isolate;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.answer-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--image);
  background-color: #12070d;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1);
  transition: transform 260ms ease, filter 180ms ease;
  z-index: -2;
}

.answer-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(16, 11, 15, 0.02), rgba(16, 11, 15, 0.78)),
    linear-gradient(35deg, rgba(255, 66, 104, 0.24), rgba(245, 182, 101, 0.04));
  z-index: -1;
}

.answer-card:hover,
.answer-card:focus-visible,
.answer-card.selected {
  transform: translateY(-4px);
  border-color: rgba(245, 182, 101, 0.72);
  box-shadow: 0 24px 60px rgba(255, 66, 104, 0.24);
  outline: none;
}

.answer-card:hover::before,
.answer-card:focus-visible::before,
.answer-card.selected::before {
  transform: scale(1.02);
  filter: saturate(1.1) contrast(1.05);
}

.answer-content {
  position: absolute;
  inset: auto 0 0;
  padding: 18px;
}

.answer-label {
  display: block;
  margin-bottom: 8px;
  font-size: clamp(1.08rem, 2vw, 1.45rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.7);
}

.answer-sub {
  display: block;
  color: rgba(255, 247, 242, 0.78);
  font-size: 0.9rem;
  line-height: 1.25;
}

.quiz-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.nav-button,
.cta-button {
  min-height: 58px;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.nav-button span,
.cta-button span {
  font-size: 1.35rem;
  line-height: 1;
}

.nav-button:hover,
.cta-button:hover {
  transform: translateY(-2px);
}

.nav-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

.ghost {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
}

.primary,
.cta-button {
  background: linear-gradient(135deg, var(--accent), #b91f46 58%, var(--accent-2));
  box-shadow: 0 20px 44px rgba(255, 66, 104, 0.28);
}

.result-stage {
  grid-template-columns: minmax(280px, 0.95fr) minmax(280px, 1.05fr);
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.result-image {
  min-height: clamp(380px, 52vw, 620px);
  background:
    linear-gradient(180deg, rgba(16, 11, 15, 0), rgba(16, 11, 15, 0.38)),
    url("https://images.unsplash.com/photo-1496747611176-843222e1e57c?auto=format&fit=crop&w=1200&q=85") center / cover,
    #24131b;
}

.result-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 5vw, 62px);
}

.result-copy h2 {
  margin: 10px 0 14px;
  font-size: clamp(2.35rem, 6vw, 5.7rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.result-copy p:not(.eyebrow) {
  max-width: 560px;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.6;
}

.cta-button {
  width: min(100%, 360px);
  margin-top: 16px;
}

.legal {
  color: rgba(255, 247, 242, 0.58);
  font-size: 0.78rem;
  line-height: 1.4;
  text-align: center;
}

.hidden {
  display: none;
}

@media (max-width: 900px) {
  body {
    background-attachment: scroll;
  }

  .answers-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-stage {
    grid-template-columns: 1fr;
  }

  .result-image {
    min-height: 360px;
  }
}

@media (max-width: 560px) {
  .quiz-shell {
    width: min(100% - 20px, 1120px);
    padding-top: 14px;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
  }

  .meter {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .answers-grid {
    grid-template-columns: 1fr;
  }

  .answers-grid.two-answer {
    grid-template-columns: 1fr;
  }

  .answer-card {
    min-height: 172px;
  }

  .quiz-controls {
    position: sticky;
    bottom: 10px;
    z-index: 5;
  }

  .nav-button,
  .cta-button {
    min-height: 54px;
  }
}
