:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --ink: #18202f;
  --muted: #657084;
  --line: #dbe1ea;
  --accent: #0f8f7b;
  --accent-dark: #087365;
  --warm: #ff7b54;
  --soft: #e8f5f2;
  --shadow: 0 18px 50px rgba(32, 43, 64, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(15, 143, 123, 0.12), transparent 34%),
    linear-gradient(315deg, rgba(255, 123, 84, 0.12), transparent 30%),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(920px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 16px 32px;
  display: flex;
  align-items: center;
}

.screen {
  display: none;
  width: 100%;
  background: var(--surface);
  border: 1px solid rgba(219, 225, 234, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(22px, 5vw, 42px);
}

.screen.is-active {
  display: block;
}

.topline {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
  text-transform: uppercase;
}

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

h1 {
  max-width: 12ch;
  font-size: 68px;
  line-height: 0.94;
  margin-bottom: 22px;
}

h2 {
  font-size: 42px;
  line-height: 1.05;
  margin-bottom: 18px;
}

h3 {
  font-size: 22px;
  line-height: 1.18;
  margin-bottom: 10px;
}

.lead {
  max-width: 590px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
  margin-bottom: 24px;
}

.value-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.value-strip span {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  padding: 9px 12px;
}

.primary-button,
.ghost-button,
.text-button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.primary-button {
  background: var(--accent);
  color: white;
  padding: 0 22px;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.ghost-button {
  background: var(--soft);
  color: var(--accent-dark);
  padding: 0 20px;
}

.text-button {
  display: block;
  width: fit-content;
  margin: 22px auto 0;
  background: transparent;
  color: var(--muted);
  padding: 0 8px;
}

.quiz-header {
  display: grid;
  gap: 22px;
}

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

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

.answer-area {
  display: grid;
  gap: 10px;
  margin: 26px 0;
}

.option-button {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  line-height: 1.25;
  padding: 14px 16px;
  text-align: left;
}

.option-button.is-selected {
  border-color: var(--accent);
  background: var(--soft);
  color: var(--accent-dark);
}

.text-input {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  padding: 0 16px;
}

.text-input:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(15, 143, 123, 0.16);
}

.hint {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin-top: 8px;
}

.shake {
  animation: shake 220ms ease;
}

.nav-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.nav-row .primary-button,
.nav-row .ghost-button {
  flex: 1;
}

.score-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0 22px;
}

.score-panel > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.score-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 7px;
  text-transform: uppercase;
}

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

.strategy-panel {
  margin: 8px 0 22px;
  border: 1px solid rgba(15, 143, 123, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(15, 143, 123, 0.1), rgba(255, 123, 84, 0.08));
  padding: 18px;
}

.strategy-panel h3 {
  margin-bottom: 8px;
}

.strategy-lead {
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.strategy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.strategy-item {
  border-top: 1px solid rgba(15, 143, 123, 0.18);
  padding-top: 10px;
}

.strategy-item span,
.plan-detail span {
  display: block;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.strategy-item p {
  color: var(--ink);
  line-height: 1.45;
  margin-bottom: 0;
}

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

.plan-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.plan-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.plan-card strong {
  display: inline-flex;
  color: var(--accent-dark);
  font-size: 15px;
  text-transform: uppercase;
}

.format-badge {
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent-dark);
  flex: 0 1 auto;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  padding: 7px 10px;
  text-align: right;
}

.plan-card h4 {
  font-size: 18px;
  line-height: 1.25;
  margin: 0 0 8px;
}

.plan-card p {
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0;
}

.plan-detail {
  border-top: 1px solid #edf1f5;
  margin-top: 12px;
  padding-top: 12px;
}

.plan-card .day-note {
  margin-top: 10px;
  color: var(--accent-dark);
  font-size: 15px;
  font-weight: 700;
}

.copy-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.copy-status {
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 800;
}

.offer-panel {
  margin-top: 22px;
  border-radius: 8px;
  background: #202b40;
  color: white;
  padding: 22px;
}

.offer-panel p {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
}

.offer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  text-decoration: none;
}

@media (max-width: 560px) {
  .app-shell {
    align-items: flex-start;
    padding: 12px;
  }

  .screen {
    padding: 22px 16px;
  }

  h1 {
    max-width: 11ch;
    font-size: 42px;
  }

  h2 {
    font-size: 30px;
  }

  .score-panel {
    grid-template-columns: 1fr;
  }

  .strategy-grid {
    grid-template-columns: 1fr;
  }

  .plan-card-header {
    display: grid;
  }

  .format-badge {
    justify-self: start;
    text-align: left;
  }

  .offer-actions .link-button {
    width: 100%;
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-4px);
  }

  75% {
    transform: translateX(4px);
  }
}
