.quiz-shell {
  --sys-primary: #d92c2c;
  --sys-on-primary: #fff5f5;
  --sys-primary-container: #fbe9e9;
  --sys-on-primary-container: #d92c2c;
  --sys-secondary: #2c4364;
  --sys-on-secondary: #fbfcfd;
  --sys-secondary-container: #eff3f6;
  --sys-on-secondary-container: #2c4364;
  --sys-correct: #5d71be;
  --sys-on-correct: #fbfcfd;
  --sys-correct-container: #eff3f6;
  --sys-on-correct-container: #2c4364;
  --sys-error: #ff4241;
  --sys-error-container: #fff5f5;
  --sys-surface: #ffffff;
  --sys-on-surface: #0e1d2e;
  --sys-surface-container: #fbfcfd;
  --sys-on-surface-variant: #3e5475;
  --sys-surface-dim: #d3dce5;
  --sys-outline: #a8b5c6;
  --sys-shadow: rgba(14, 29, 46, 0.12);
  --font-editorial: "Lora", Georgia, serif;
  --font-copy: "Raleway", Arial, sans-serif;

  width: min(100%, 980px);
  margin: 0 auto;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--sys-surface-dim);
  border-top: 6px solid var(--sys-primary);
  border-radius: 4px;
  color: var(--sys-on-surface);
  background: var(--sys-surface);
  box-shadow: 0 12px 36px var(--sys-shadow);
  font-family: var(--font-copy);
  font-size: 16px;
  line-height: 1.25;
}

.quiz-shell *,
.quiz-shell *::before,
.quiz-shell *::after {
  box-sizing: border-box;
}

.quiz-shell button,
.quiz-shell img {
  -webkit-tap-highlight-color: transparent;
}

.quiz-shell button {
  font: inherit;
}

.quiz-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.eyebrow,
.category,
.source-note,
.progress-copy {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.eyebrow,
.category {
  color: var(--sys-primary);
}

.quiz-shell h1,
.quiz-shell h2,
.quiz-shell p {
  text-wrap: pretty;
}

.quiz-shell h1 {
  max-width: 720px;
  margin: 8px 0 6px;
  font-family: var(--font-editorial);
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.progress-copy {
  flex: 0 0 auto;
  min-width: 58px;
  padding: 9px 12px;
  border-radius: 2px;
  color: var(--sys-on-secondary);
  background: var(--sys-secondary);
  text-align: center;
  font-size: 14px;
}

.progress-track {
  height: 4px;
  margin: 24px 0 22px;
  overflow: hidden;
  background: var(--sys-secondary-container);
}

.progress-track span {
  display: block;
  width: 20%;
  height: 100%;
  background: var(--sys-primary);
  transition: width 240ms ease;
}

.setup-notice {
  margin: -4px 0 20px;
  padding: 10px 12px;
  color: var(--sys-on-secondary-container);
  border-left: 3px solid var(--sys-secondary);
  background: var(--sys-secondary-container);
  font-size: 14px;
  line-height: 18px;
}

.category {
  margin-bottom: 10px;
}

.choices {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.choice {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 2px solid var(--sys-surface-dim);
  border-radius: 3px;
  color: var(--sys-on-surface);
  background: var(--sys-surface);
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.choice:hover:not(:disabled),
.choice:focus-visible {
  border-color: var(--sys-secondary);
  box-shadow: 0 8px 22px rgba(44, 67, 100, 0.14);
  outline: none;
  transform: translateY(-2px);
}

.choice:focus-visible {
  box-shadow: 0 0 0 4px rgba(217, 44, 44, 0.22);
}

.choice:disabled {
  cursor: default;
}

.choice.is-correct {
  border-color: var(--sys-correct);
  color: var(--sys-on-surface);
  background: var(--sys-surface);
  box-shadow: inset 0 0 0 4px var(--sys-correct), 0 0 0 3px rgba(93, 113, 190, 0.24);
}

.choice.is-wrong {
  border-color: var(--sys-error);
  color: var(--sys-on-surface);
  background: var(--sys-surface);
  box-shadow: inset 0 0 0 4px var(--sys-error), 0 0 0 3px rgba(255, 66, 65, 0.22);
}

.image-frame {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(44, 67, 100, 0.05) 25%, transparent 25%) 0 0 / 20px 20px,
    linear-gradient(315deg, rgba(44, 67, 100, 0.05) 25%, transparent 25%) 0 0 / 20px 20px,
    var(--sys-surface-container);
}

.image-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  object-fit: contain;
  padding: 18px;
  background: transparent;
}

.image-frame img.has-image {
  display: block;
}

.image-placeholder {
  position: absolute;
  inset: 14%;
  display: grid;
  place-items: center;
  border: 1px dashed var(--sys-outline);
  color: var(--sys-on-surface-variant);
  background: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  font-weight: 600;
}

.image-frame img.has-image + .image-placeholder {
  display: none;
}

.verdict-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: none;
  padding: 8px 12px;
  border-radius: 2px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.choice.is-revealed .verdict-badge {
  display: inline-flex;
}

.choice.is-ikea .verdict-badge {
  color: var(--sys-correct);
  background: var(--sys-on-correct);
}

.choice.is-novus .verdict-badge {
  color: var(--sys-error);
  background: var(--sys-on-primary);
}

.choice-footer {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  min-height: 70px;
  padding: 12px 14px;
  border-top: 1px solid var(--sys-surface-dim);
}

.choice-letter {
  color: var(--sys-primary);
  font-size: 18px;
  font-weight: 700;
}

.choice.is-correct .choice-letter {
  color: var(--sys-correct);
}

.choice.is-wrong .choice-letter {
  color: var(--sys-error);
}

.choice-name {
  overflow-wrap: anywhere;
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
}

.answer-symbol {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 20;
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 6px solid currentColor;
  border-radius: 50%;
  background: var(--sys-surface);
  box-shadow: 0 12px 34px rgba(14, 29, 46, 0.24);
  font-family: Arial, sans-serif;
  font-size: 58px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  animation: answer-symbol-in 180ms ease-out both;
}

.answer-symbol.is-correct {
  color: var(--sys-correct);
}

.answer-symbol.is-wrong {
  color: var(--sys-error);
}

.answer-symbol[hidden] {
  display: none;
}

@keyframes answer-symbol-in {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.72);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.feedback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding: 18px;
  border-left: 4px solid var(--sys-primary);
  background: var(--sys-primary-container);
}

.feedback.is-correct {
  border-left-color: var(--sys-correct);
  background: var(--sys-correct-container);
}

.feedback-copy {
  min-width: 0;
}

.feedback-title {
  margin: 0 0 4px;
  font-family: var(--font-editorial);
  font-size: 21px;
  font-weight: 600;
  line-height: 28px;
}

.feedback-text {
  margin: 0;
  color: var(--sys-on-surface-variant);
  font-size: 14px;
  line-height: 20px;
}

.primary-button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 11px 18px;
  border: 0;
  border-radius: 2px;
  color: var(--sys-on-primary);
  background: var(--sys-primary);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.primary-button:hover,
.primary-button:focus-visible {
  background: #ae2323;
  box-shadow: 0 6px 16px rgba(217, 44, 44, 0.22);
  outline: none;
  transform: translateY(-1px);
}

.finish-screen {
  padding: clamp(26px, 6vw, 58px) 24px;
  border: 1px solid var(--sys-surface-dim);
  background: var(--sys-surface-container);
  text-align: center;
}

.finish-screen .score {
  margin: 8px 0 2px;
  color: var(--sys-primary);
  font-family: var(--font-editorial);
  font-size: clamp(44px, 8vw, 72px);
  font-weight: 600;
  line-height: 1;
}

.finish-screen h2 {
  margin: 18px auto 8px;
  font-family: var(--font-editorial);
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.2;
}

.finish-screen > p:not(.eyebrow):not(.score) {
  max-width: 560px;
  margin: 0 auto 22px;
  color: var(--sys-on-surface-variant);
  font-size: 16px;
  line-height: 22px;
}

.source-note {
  margin-top: 18px;
  color: var(--sys-on-surface-variant);
  letter-spacing: 0.03em;
}

.quiz-shell [hidden] {
  display: none !important;
}

.quiz-shell .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 620px) {
  .quiz-shell {
    padding: 20px 14px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .quiz-header {
    gap: 12px;
  }

  .quiz-shell h1 {
    font-size: clamp(28px, 9vw, 38px);
  }

  .progress-copy {
    min-width: 52px;
    padding: 7px 9px;
  }

  .progress-track {
    margin: 18px 0;
  }

  .choices {
    gap: 8px;
  }

  .choice-footer {
    grid-template-columns: 25px minmax(0, 1fr);
    min-height: 64px;
    padding: 8px;
  }

  .choice-letter {
    font-size: 16px;
  }

  .choice-name {
    font-size: 15px;
    line-height: 19px;
  }

  .verdict-badge {
    top: 7px;
    right: 7px;
    padding: 5px 7px;
    font-size: 11px;
  }

  .feedback {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding: 15px;
  }

  .primary-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .quiz-shell,
  .quiz-shell *,
  .quiz-shell *::before,
  .quiz-shell *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
