:root {
  color-scheme: light;
  --ink: #122426;
  --muted: #62777a;
  --paper: #f6f2e8;
  --panel: #ffffff;
  --line: #d9e2de;
  --primary: #0e3b43;
  --primary-strong: #092c32;
  --accent: #d86f45;
  --accent-soft: #fff0e7;
  --good: #1d7d5b;
  --shadow: 0 20px 60px rgba(8, 35, 39, 0.14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background:
    linear-gradient(140deg, rgba(216, 111, 69, 0.18), transparent 36%),
    linear-gradient(320deg, rgba(14, 59, 67, 0.14), transparent 42%),
    var(--paper);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  width: min(100%, 460px);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  display: grid;
}

.screen {
  display: none;
  min-height: calc(100svh - 36px);
  align-content: center;
  gap: 18px;
}

.screen-active {
  display: grid;
}

.brand-block {
  text-align: center;
  padding-top: 4px;
}

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

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 0.95;
}

h1 {
  font-size: clamp(3.1rem, 16vw, 5.4rem);
  font-weight: 950;
  color: var(--primary);
}

h2 {
  font-size: clamp(1.55rem, 8vw, 2.3rem);
  font-weight: 900;
}

.payoff {
  margin: 10px 0 0;
  font-size: clamp(1.35rem, 7vw, 2rem);
  font-weight: 850;
  color: var(--primary);
}

.intro-copy {
  max-width: 39rem;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: clamp(0.93rem, 3.8vw, 1.05rem);
  line-height: 1.45;
}

.choice-panel,
.flow-form,
.price-note,
.match-box,
.result-screen {
  border: 1px solid rgba(14, 59, 67, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.choice-panel {
  padding: 22px;
}

.choice-panel h2 {
  font-size: clamp(1.35rem, 6vw, 1.9rem);
  line-height: 1.08;
}

.choice-panel p,
.fine-print,
.price-note span,
.match-box span,
.result-screen p {
  color: var(--muted);
  line-height: 1.45;
}

.choice-panel p {
  margin: 12px 0 20px;
}

.choice-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.primary-action,
.secondary-action,
.icon-button,
.whatsapp-preview {
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
  text-decoration: none;
  display: inline-grid;
  place-items: center;
}

.primary-action {
  background: var(--primary);
  color: white;
  box-shadow: 0 12px 26px rgba(14, 59, 67, 0.22);
}

.primary-action:active {
  background: var(--primary-strong);
}

.secondary-action {
  background: var(--accent-soft);
  color: #8f3e22;
}

.full {
  width: 100%;
}

.legal-link {
  margin: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-align: center;
  text-decoration: underline;
  text-transform: uppercase;
  cursor: pointer;
}

.screen-header {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
}

.icon-button {
  width: 48px;
  min-height: 48px;
  background: var(--panel);
  color: var(--primary);
  border: 1px solid var(--line);
  font-size: 2rem;
  line-height: 1;
}

.flow-form {
  padding: 16px;
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
}

label span {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--ink);
  padding: 12px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 59, 67, 0.12);
}

.two-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.match-box,
.price-note {
  padding: 14px;
  display: grid;
  gap: 5px;
}

.match-box {
  background: #eef8f4;
  border-color: rgba(29, 125, 91, 0.25);
}

.match-box strong {
  color: var(--good);
}

.check-row {
  grid-template-columns: 22px 1fr;
  align-items: start;
}

.check-row input {
  min-height: auto;
  margin-top: 3px;
}

.price-note {
  background: var(--accent-soft);
  border-color: rgba(216, 111, 69, 0.22);
}

.result-screen {
  align-content: center;
  padding: 24px;
  text-align: center;
}

.result-mark {
  width: 76px;
  height: 76px;
  margin: 0 auto 6px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--good);
  color: white;
  font-size: 2.4rem;
  font-weight: 900;
}

.whatsapp-preview {
  background: #e9f8ef;
  color: #116834;
  padding: 0 14px;
}

.whatsapp-preview[hidden] {
  display: none;
}

.legal-panel {
  padding: 18px;
  border: 1px solid rgba(14, 59, 67, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.legal-panel h3 {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 1rem;
}

.legal-panel p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

.legal-panel p:last-child {
  margin-bottom: 0;
}

@media (min-width: 560px) {
  .app-shell {
    padding-block: 32px;
  }

  .screen {
    min-height: calc(100svh - 64px);
  }

  .two-fields {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-height: 720px) {
  .screen {
    align-content: start;
  }

  h1 {
    font-size: clamp(2.9rem, 15vw, 4.8rem);
  }

  .choice-panel {
    padding: 18px;
  }
}
