:root {
  --red: #e60000;
  --red-dark: #b70000;
  --ink: #171717;
  --muted: #686868;
  --line: #e7e1da;
  --paper: #fffaf4;
  --white: #ffffff;
  --teal: #007c89;
  --yellow: #ffd24d;
  --green: #148f5a;
  --shadow: 0 20px 60px rgba(23, 23, 23, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(230, 0, 0, 0.08), rgba(0, 124, 137, 0.08)),
    var(--paper);
  font-family: Arial, Helvetica, sans-serif;
}

button {
  font: inherit;
}

.app {
  width: min(100%, 620px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--white);
  box-shadow: var(--shadow);
}

.screen {
  min-height: 100vh;
}

.hidden {
  display: none;
}

.hero {
  position: relative;
  min-height: 52vh;
  overflow: hidden;
  background: #d9eef1;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23, 23, 23, 0.18), rgba(23, 23, 23, 0.78));
}

.hero-copy {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  color: var(--white);
}

.eyebrow,
.question-kicker,
.mini-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-copy h1,
.result-header h1,
.admin-screen h1 {
  margin: 10px 0 10px;
  font-size: clamp(34px, 10vw, 52px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy p:last-child,
.result-header p,
.privacy-note,
.admin-screen p {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
}

.intro-panel {
  padding: 24px;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.intro-grid > div {
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
}

.mini-label {
  display: block;
  color: var(--red);
  margin-bottom: 8px;
}

.intro-grid strong {
  display: block;
  font-size: 18px;
  line-height: 1.2;
}

.privacy-note {
  color: var(--muted);
  margin-bottom: 18px;
}

.primary-button,
.secondary-button {
  width: 100%;
  min-height: 54px;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  color: var(--white);
  background: var(--red);
  box-shadow: 0 10px 24px rgba(230, 0, 0, 0.22);
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--red-dark);
}

.secondary-button {
  color: var(--ink);
  background: #f2eee8;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

.progress-wrap {
  flex: 1;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eee7df;
}

.progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--teal));
  transition: width 180ms ease;
}

.question-card {
  padding: 26px 20px 32px;
}

.question-kicker {
  color: var(--teal);
  margin-bottom: 10px;
}

.question-card h2 {
  margin: 0 0 22px;
  font-size: 28px;
  line-height: 1.12;
}

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

.answer-button {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 76px;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  text-align: left;
  cursor: pointer;
}

.answer-button:hover,
.answer-button:focus-visible {
  border-color: var(--red);
  background: #fff6f4;
}

.answer-letter {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--ink);
  font-weight: 900;
}

.answer-button:nth-child(2) .answer-letter {
  background: var(--teal);
}

.answer-button:nth-child(3) .answer-letter {
  background: var(--green);
}

.answer-text {
  font-size: 17px;
  line-height: 1.28;
  font-weight: 700;
}

.result-screen,
.admin-screen {
  padding: 26px 20px 34px;
}

.result-header {
  padding: 24px;
  border-radius: 8px;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(230, 0, 0, 0.95), rgba(0, 124, 137, 0.92)),
    var(--red);
}

.result-header h1 {
  font-size: clamp(32px, 9vw, 48px);
}

.result-actions {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.recommendations,
.summary-panel {
  margin-top: 20px;
}

.recommendations h2,
.summary-heading h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.recommendation-list {
  display: grid;
  gap: 10px;
}

.tip {
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
}

.tip::before {
  content: "";
  width: 8px;
  border-radius: 999px;
  background: var(--yellow);
}

.tip strong {
  display: block;
  margin-bottom: 3px;
}

.tip span {
  color: var(--muted);
  line-height: 1.35;
}

.summary-panel {
  scroll-margin-top: 18px;
  padding: 18px;
  border: 2px solid var(--red);
  border-radius: 8px;
  background: #fff8f6;
}

.summary-heading {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.badge {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--white);
  background: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.answer-summary {
  display: grid;
  gap: 10px;
}

.summary-item {
  padding: 12px;
  border-radius: 8px;
  background: var(--white);
  border: 1px solid #f0d7d2;
}

.summary-item strong {
  display: block;
  margin-bottom: 6px;
  line-height: 1.25;
}

.summary-item span {
  color: var(--muted);
  line-height: 1.35;
}

pre {
  white-space: pre-wrap;
  padding: 14px;
  border-radius: 8px;
  background: #f3f3f3;
  color: #333;
}

@media (min-width: 760px) {
  body {
    padding: 28px;
  }

  .app,
  .screen {
    min-height: calc(100vh - 56px);
  }
}

@media (max-width: 380px) {
  .intro-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    font-size: 34px;
  }
}
