:root {
  --ink: #0a0a0a;
  --paper: #f0f0f0;
  --white: #ffffff;
  --line: #d9d9d9;
  --muted: #777777;
  --acid: #d8ff3e;
  --header-h: 56px;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "HS Sans", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.module {
  font-size: 10px;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
}

main {
  padding-top: var(--header-h);
}

.screen {
  display: none;
  min-height: calc(100dvh - var(--header-h));
}

.screen.active {
  display: block;
  animation: rise 0.28s ease both;
}

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

.quiz-wrap {
  padding: 20px 16px 44px;
}

.quiz-note {
  margin: -14px 0 20px;
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
}

.progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 26px;
}

.progress span {
  height: 4px;
  background: #d9d9d9;
  border-radius: 2px;
}

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

.kicker {
  display: block;
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
}

.question-title {
  margin: 0 0 24px;
  font-size: clamp(34px, 10vw, 54px);
  line-height: 0.95;
  font-weight: 900;
  text-transform: uppercase;
}

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

.option {
  position: relative;
  width: 100%;
  min-height: 112px;
  display: grid;
  grid-template-columns: 108px 1fr;
  align-items: stretch;
  padding: 0;
  background: var(--white);
  border: 2px solid transparent;
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.option:active {
  transform: scale(0.985);
}

.option img {
  width: 108px;
  height: 112px;
  object-fit: cover;
  display: block;
}

.option-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 14px;
}

.option-copy strong {
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
}

.option-copy small {
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
}

.option.selected {
  border-color: var(--ink);
  background: var(--acid);
}

.option.selected small {
  color: rgba(0, 0, 0, 0.66);
}

.option.selected::after {
  content: "OK";
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--acid);
  font-size: 10px;
  font-weight: 900;
}

.loading {
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--white);
}

.loading.active {
  display: flex;
}

.loader-wrap {
  text-align: center;
}

.loader {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.loader::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--acid);
  border-top-color: transparent;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading p {
  margin: 22px 0 0;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.loading small {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.6);
}

.result-hero {
  position: relative;
  min-height: 46vh;
  color: var(--white);
}

.result-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.72));
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 46vh;
  padding: 20px 16px 24px;
}

.hero-code {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--acid);
}

.hero-title {
  margin: 6px 0 0;
  font-size: clamp(40px, 12vw, 64px);
  line-height: 0.9;
  font-weight: 900;
  text-transform: uppercase;
}

.result-body {
  padding: 24px 16px 56px;
}

.section-label {
  display: block;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
}

.pick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 28px;
}

.pick {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
}

.pick img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
}

.pick span {
  display: block;
  padding: 8px 8px 10px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.2;
}

.archetype {
  margin-bottom: 24px;
}

.result-title {
  margin: 0 0 12px;
  font-size: clamp(32px, 9vw, 48px);
  line-height: 0.95;
  font-weight: 900;
  text-transform: uppercase;
}

.result-desc {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: #333;
}

.unlock {
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius);
  padding: 16px;
}

.unlock h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1;
}

.unlock p {
  margin: 8px 0 14px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
}

.unlock-note {
  margin: -6px 0 14px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.primary-btn {
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: var(--acid);
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  text-decoration: none;
}

.primary-btn:active {
  transform: scale(0.99);
}

.replay {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 14px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.share {
  display: block;
  width: 100%;
  margin-top: 12px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: transparent;
  color: var(--white);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.share:active {
  transform: scale(0.99);
}

.foot {
  padding: 16px;
  text-align: center;
  font-size: 10px;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
}

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--white);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform 0.25s ease;
}

.sticky-cta.visible {
  transform: translateY(0);
}

.sticky-cta button {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 6px;
  background: var(--ink);
  color: var(--white);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.sticky-cta button:active {
  transform: scale(0.99);
}

.hidden {
  display: none !important;
}

@media (min-width: 760px) {
  .quiz-wrap,
  .result-body {
    width: 680px;
    margin: 0 auto;
  }

  .options {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .option img {
    width: 100%;
    height: 240px;
  }

  .option-copy {
    padding: 14px;
  }

  .result-hero,
  .hero-copy {
    min-height: 60vh;
  }

  .sticky-cta {
    max-width: 420px;
    left: 50%;
    transform: translateX(-50%) translateY(110%);
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .sticky-cta.visible {
    transform: translateX(-50%) translateY(0);
  }
}
