:root {
  --bg: #f7faf9;
  --surface: #ffffff;
  --text: #17212b;
  --muted: #60717f;
  --line: #d8e2df;
  --blue: #245c9c;
  --blue-dark: #18477b;
  --green: #21836c;
  --green-soft: #dff2ec;
  --gray-soft: #edf3f1;
  --shadow: 0 18px 45px rgba(36, 92, 156, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

.app {
  min-height: 100vh;
}

.screen {
  display: none;
  min-height: 100vh;
  padding: 32px 20px;
}

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

.shell {
  width: min(1040px, 100%);
  margin: 0 auto;
}

.intro-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.75fr);
  gap: 56px;
  align-items: center;
}

.eyebrow,
.question-kicker {
  margin: 0 0 18px;
  color: var(--green);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.45;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 20px;
  font-size: clamp(2.45rem, 5vw, 4.7rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.lead {
  max-width: 620px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.5;
}

.primary-btn {
  display: inline-flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
  line-height: 1;
  padding: 0 28px;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}

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

.fine-print {
  max-width: 760px;
  margin: 18px 0 0;
  color: #6f7f89;
  font-size: 0.82rem;
  line-height: 1.55;
}

.intro-visual {
  display: flex;
  justify-content: center;
}

.focus-panel {
  width: min(360px, 100%);
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(33, 131, 108, 0.08), rgba(36, 92, 156, 0.04)),
    var(--surface);
  box-shadow: var(--shadow);
  padding: 34px;
}

.focus-ring {
  display: grid;
  width: 220px;
  height: 220px;
  margin: 24px auto 38px;
  place-items: center;
  border: 18px solid #d5ece5;
  border-top-color: var(--green);
  border-right-color: var(--blue);
  border-radius: 50%;
}

.focus-ring span {
  font-size: 1.8rem;
  font-weight: 800;
}

.metric-list {
  display: grid;
  gap: 14px;
}

.metric-list span {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #365260;
  display: flex;
  align-items: center;
  padding: 0 18px;
  font-weight: 700;
}

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

.quiz-shell {
  padding-top: 18px;
}

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

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: #4e6473;
  font-size: 0.95rem;
  font-weight: 700;
}

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

.progress-fill {
  width: 10%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
  transition: width 220ms ease;
}

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

.question-card {
  padding: clamp(24px, 4vw, 44px);
}

.question-card h2 {
  margin-bottom: 12px;
  font-size: clamp(1.75rem, 3.8vw, 3rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.question-help {
  max-width: 720px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

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

.option-btn {
  width: 100%;
  min-height: 62px;
  border: 1px solid #cfded9;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 700;
  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(--green);
  background: var(--green-soft);
  box-shadow: 0 0 0 3px rgba(33, 131, 108, 0.12);
}

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

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

.memory-words {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin: 28px 0;
}

.memory-words span {
  min-height: 72px;
  border: 1px solid #cbded8;
  border-radius: 8px;
  background: var(--gray-soft);
  display: grid;
  place-items: center;
  color: #233946;
  font-size: 1.1rem;
  font-weight: 800;
}

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

.loading-shell {
  max-width: 620px;
  text-align: center;
}

.loader-mark {
  width: 96px;
  height: 96px;
  margin: 0 auto 28px;
  border: 12px solid #d9e9e5;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-shell h2 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.loading-shell p {
  min-height: 28px;
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 700;
}

.loading-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbe7e4;
}

.loading-bar div {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
  transition: width 500ms ease;
}

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

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

.result-shell {
  display: grid;
  gap: 20px;
  padding: 18px 0 32px;
}

.result-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 28px;
  align-items: center;
  padding: clamp(24px, 4vw, 42px);
}

.result-hero h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.08;
}

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

.score-box {
  text-align: center;
}

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

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

.recommendation-copy {
  max-width: 860px;
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.recommendation-copy h3 {
  margin-bottom: 10px;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.18;
}

.recommendation-copy p {
  color: var(--muted);
  line-height: 1.6;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 22px;
}

.offer-btn {
  flex: 0 0 auto;
}

.secondary-btn {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border: 1px solid #c9d8d4;
  border-radius: 8px;
  background: #ffffff;
  color: #49606d;
  font-weight: 800;
  line-height: 1;
  padding: 0 20px;
  text-decoration: none;
}

.secondary-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

@media (max-width: 820px) {
  .screen {
    padding: 22px 14px;
  }

  .intro-layout,
  .result-hero {
    grid-template-columns: 1fr;
  }

  .intro-visual {
    order: -1;
  }

  .focus-panel {
    min-height: auto;
    padding: 22px;
  }

  .focus-ring {
    width: 168px;
    height: 168px;
    margin: 8px auto 22px;
    border-width: 14px;
  }

  .metric-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .metric-list span {
    justify-content: center;
    min-height: 40px;
    padding: 0 8px;
    font-size: 0.86rem;
  }

  .memory-words {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .score-box {
    order: -1;
  }
}

@media (max-width: 460px) {
  .primary-btn,
  .option-btn,
  .secondary-btn {
    width: 100%;
  }

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

  .memory-words span {
    min-height: 60px;
  }
}
