:root {
  --background: #f7f6f2;
  --foreground: #151515;
  --muted: #666b73;
  --line: #dedbd2;
  --accent: #b42626;
  --accent-dark: #841d1d;
  --paper: #fffdf8;
  --ink: #101010;
  --sage: #66785f;
  --gold: #c89d45;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: Arial, Helvetica, sans-serif;
}

button {
  font: inherit;
}

.quiz-shell {
  min-height: 100vh;
  padding: 28px;
  display: grid;
  place-items: center;
}

.hero-panel {
  width: min(1120px, 100%);
  min-height: 640px;
  border: 1px solid var(--line);
  background: var(--paper);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  box-shadow: 0 24px 80px rgba(33, 29, 22, 0.12);
}

.pattern-field {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 18px;
  padding: 22px;
  color: var(--ink);
  opacity: 0.95;
  transform: rotate(-1deg);
}

.arrow-mark {
  font-size: clamp(24px, 4vw, 52px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.pattern-field::after {
  content: "";
  position: absolute;
  inset: 16% 17%;
  background: radial-gradient(circle, var(--paper) 0 62%, transparent 63%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(620px, 88%);
  text-align: center;
  padding: 44px 28px;
}

.eyebrow {
  margin: 0 0 14px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

h1 {
  margin: 0;
  font-size: clamp(2.35rem, 6vw, 5.7rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy p:not(.eyebrow),
.result-panel > p,
.note-band {
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.6;
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.primary-action,
.secondary-action,
.answer-button,
.back-button {
  border: 0;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.primary-action,
.secondary-action {
  min-height: 54px;
  padding: 0 28px;
  background: var(--accent);
  color: white;
  font-weight: 800;
  border-radius: 6px;
  box-shadow: 0 12px 24px rgba(180, 38, 38, 0.26);
}

.primary-action:hover,
.secondary-action:hover,
.answer-button:hover {
  transform: translateY(-2px);
}

.hero-actions span {
  color: var(--muted);
  font-weight: 700;
}

.note-band {
  width: min(1120px, 100%);
  margin-top: 18px;
  padding: 18px 22px;
  border-left: 4px solid var(--gold);
  background: #fff9ea;
}

.question-shell,
.result-shell {
  background:
    linear-gradient(90deg, rgba(180, 38, 38, 0.09), transparent 46%),
    var(--background);
}

.question-panel,
.result-panel {
  width: min(780px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: clamp(24px, 5vw, 48px);
  box-shadow: 0 24px 80px rgba(33, 29, 22, 0.12);
}

.progress-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-weight: 800;
}

.progress-track {
  height: 10px;
  margin: 16px 0 34px;
  background: #e8e3d8;
  overflow: hidden;
  border-radius: 999px;
}

.progress-track div {
  height: 100%;
  background: linear-gradient(90deg, var(--sage), var(--accent));
  border-radius: inherit;
}

.question-panel h1,
.result-panel h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.04;
}

.answer-grid {
  display: grid;
  gap: 12px;
  margin-top: 34px;
}

.answer-button {
  width: 100%;
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  background: white;
  color: var(--foreground);
  text-align: left;
  border-radius: 6px;
  font-weight: 800;
}

.answer-button span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: #f0eee7;
  color: var(--accent-dark);
  border-radius: 50%;
  flex: 0 0 auto;
}

.back-button {
  margin-top: 24px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.result-panel {
  text-align: center;
}

.score-ring {
  width: 156px;
  height: 156px;
  margin: 0 auto 24px;
  border: 14px solid #efe4cf;
  border-top-color: var(--accent);
  border-right-color: var(--sage);
  border-radius: 50%;
  display: grid;
  place-content: center;
}

.score-ring span {
  font-size: 3rem;
  font-weight: 900;
}

.score-ring small {
  color: var(--muted);
  font-weight: 800;
}

.result-tone {
  color: var(--accent-dark) !important;
  font-weight: 800;
}

.next-step {
  margin: 28px 0;
  padding: 20px;
  text-align: left;
  background: #f1f5ed;
  border-left: 4px solid var(--sage);
}

.next-step span {
  display: block;
  color: var(--sage);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.next-step p {
  margin: 8px 0 0;
  color: var(--foreground);
  line-height: 1.5;
  font-weight: 700;
}

@media (max-width: 720px) {
  .quiz-shell {
    padding: 14px;
    align-items: start;
  }

  .hero-panel {
    min-height: 610px;
  }

  .pattern-field {
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    padding: 14px;
  }

  .pattern-field::after {
    inset: 18% 7%;
  }

  .hero-copy {
    width: 94%;
    padding: 24px 10px;
  }

  .question-panel,
  .result-panel {
    margin-top: 18px;
  }
}
