:root {
  --bg: #f5fbf8;
  --surface: #ffffff;
  --surface-warm: #fff7ed;
  --text: #17211f;
  --muted: #62716d;
  --line: #d9e7e1;
  --primary: #006d77;
  --primary-dark: #00545d;
  --accent: #e76f51;
  --accent-dark: #c8583f;
  --soft: #e8f5f1;
  --shadow: 0 14px 34px rgba(0, 77, 84, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f5fbf8 0%, #eef7f3 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

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

.app {
  min-height: 100vh;
}

.screen {
  display: none;
  min-height: 100svh;
  padding: 18px 16px 28px;
}

.screen.is-active {
  display: flex;
  align-items: flex-start;
}

.shell {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.intro-screen.is-active {
  align-items: center;
}

.intro-layout {
  padding: 14px 0;
}

.eyebrow,
.question-kicker {
  margin: 0 0 14px;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.45;
}

h1 {
  margin-bottom: 16px;
  font-size: 2.45rem;
  line-height: 1.04;
}

.lead {
  margin-bottom: 22px;
  color: #40514d;
  font-size: 1.12rem;
  line-height: 1.5;
}

.intro-points {
  display: grid;
  gap: 10px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.intro-points li {
  position: relative;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #263b37;
  display: flex;
  align-items: center;
  padding: 10px 14px 10px 42px;
  font-weight: 750;
  line-height: 1.3;
}

.intro-points li::before {
  content: "";
  position: absolute;
  left: 15px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(231, 111, 81, 0.14);
}

.primary-btn {
  display: inline-flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
  font-weight: 850;
  line-height: 1.1;
  padding: 0 22px;
  text-align: center;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}

.primary-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.fine-print {
  margin: 16px 0 0;
  color: #6d7b77;
  font-size: 0.8rem;
  line-height: 1.5;
}

.quiz-screen,
.result-screen {
  align-items: flex-start;
}

.quiz-shell,
.result-shell {
  padding-top: 8px;
}

.progress-wrap {
  margin-bottom: 16px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #4c625d;
  font-size: 0.88rem;
  font-weight: 800;
}

.progress-track,
.loading-bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #d7e6e0;
}

.progress-fill,
.loading-bar div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  transition: width 260ms ease;
}

.question-card,
.result-hero {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.question-card {
  padding: 22px 16px 18px;
}

.question-card h2 {
  margin-bottom: 10px;
  font-size: 1.78rem;
  line-height: 1.12;
}

.question-help {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

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

.option-btn {
  width: 100%;
  min-height: 58px;
  border: 1px solid #cbded8;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px;
  text-align: left;
  font-size: 1rem;
  font-weight: 760;
  line-height: 1.3;
  transition: border 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.option-btn:hover,
.option-btn.is-selected {
  border-color: var(--primary);
  background: var(--soft);
  box-shadow: 0 0 0 3px rgba(0, 109, 119, 0.12);
}

.option-btn::after {
  content: "";
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-left: 14px;
  border: 2px solid #a6bbb4;
  border-radius: 50%;
}

.option-btn.is-selected::after {
  border-color: var(--primary);
  background: radial-gradient(circle at center, var(--primary) 0 44%, transparent 48%);
}

.memory-words {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 22px 0;
}

.memory-words span {
  min-height: 58px;
  border: 1px solid #cbded8;
  border-radius: 8px;
  background: var(--surface-warm);
  display: grid;
  place-items: center;
  color: #253835;
  font-size: 1rem;
  font-weight: 850;
}

.memory-words span:last-child {
  grid-column: 1 / -1;
}

.question-actions {
  margin-top: 18px;
}

.loading-shell {
  max-width: 520px;
  padding-top: 18vh;
  text-align: center;
}

.loader-mark {
  width: 76px;
  height: 76px;
  margin: 0 auto 24px;
  border: 10px solid #d7e6e0;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-shell h2 {
  margin-bottom: 10px;
  font-size: 2rem;
  line-height: 1.12;
}

.loading-shell p {
  min-height: 26px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 800;
}

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

.result-hero {
  display: grid;
  gap: 22px;
  padding: 22px 16px 18px;
}

.result-hero h2 {
  margin-bottom: 12px;
  font-size: 1.9rem;
  line-height: 1.1;
}

.result-hero p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.score-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fcfa;
}

.score-ring {
  display: grid;
  flex: 0 0 auto;
  width: 74px;
  height: 74px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--primary) 0deg, var(--primary) 0deg, #dbe7e4 0deg);
}

.score-ring span {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 900;
}

.score-box p {
  margin: 0;
  color: #354a45;
  font-size: 0.96rem;
  font-weight: 850;
  line-height: 1.3;
}

.recommendation-copy {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.recommendation-copy h3 {
  margin-bottom: 10px;
  color: #243a35;
  font-size: 1.28rem;
  line-height: 1.18;
}

.recommendation-copy p {
  margin-bottom: 12px;
}

.result-actions {
  display: flex;
  margin-top: 20px;
}

.offer-btn {
  min-height: 62px;
  background: var(--accent);
  color: #ffffff;
  font-size: 1.02rem;
  box-shadow: 0 12px 24px rgba(231, 111, 81, 0.24);
}

.offer-btn:hover {
  background: var(--accent-dark);
}

@media (min-width: 560px) {
  .screen {
    padding: 28px 22px;
  }

  h1 {
    font-size: 3rem;
  }

  .question-card,
  .result-hero {
    padding: 28px 24px;
  }

  .question-card h2,
  .result-hero h2 {
    font-size: 2.15rem;
  }
}

@media (min-width: 860px) {
  .shell {
    max-width: 640px;
  }

  .intro-layout {
    padding: 24px 0;
  }
}
