:root {
  --page: #ffffff;
  --panel: #ffffff;
  --text: #000000;
  --muted: #6d6d6d;
  --green: #053f34;
  --green-2: #0b5a49;
  --gold: #d8a24c;
  --line: #d9d9d9;
  --field: #ffffff;
  --danger: #b3261e;
  --shadow: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--page);
  font: 16px/1.45 Arial, sans-serif;
}

button,
input {
  font: inherit;
}

.app {
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: 0 0 max(24px, env(safe-area-inset-bottom));
}

.panel {
  width: min(520px, 100%);
  overflow: hidden;
  background: var(--panel);
  border: 0;
  border-radius: 0;
  box-shadow: var(--shadow);
}

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

h1 {
  margin-bottom: 22px;
  color: #000;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 700;
}

.intro {
  padding: 0 8px 4px;
  background: #fff;
  color: #000;
}

.intro p {
  margin-bottom: 22px;
  color: #000;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 400;
}

.intro[hidden] {
  display: none;
}

.lead-form {
  padding: 0 8px 18px;
}

.progress {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.progress-line {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6eeeb;
}

.progress-line span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 0.22s ease;
}

.question-card {
  display: block;
  width: calc(100% + 16px);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin: 0 -8px 8px;
  border-radius: 0;
  background: #e8efec;
}

.question-card[hidden] {
  display: none;
}

h2 {
  margin-bottom: 14px;
  color: #000;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 700;
}

.hint {
  min-height: 0;
  margin: -4px 0 12px;
  color: var(--danger);
  font-weight: 800;
}

.hint:empty {
  display: none;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
  padding: 12px;
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
}

input:focus {
  outline: 3px solid rgba(216, 162, 76, 0.28);
  border-color: var(--gold);
  background: #fff;
}

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

.choice {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 12px;
  text-align: left;
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
}

.choice.selected {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.actions {
  display: grid;
  grid-template-columns: 0.84fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.actions button:only-child {
  grid-column: 1 / -1;
}

button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  padding: 12px;
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--green-2);
}

button:active {
  transform: translateY(1px);
}

button.secondary {
  background: #edf3f1;
  color: var(--green);
}

button.secondary:hover {
  background: #e1ebe7;
}

button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.success {
  display: grid;
  gap: 12px;
  padding: 18px 4px 4px;
  text-align: center;
}

.success h2 {
  margin-bottom: 0;
}

.success p {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 17px;
}

@media (min-width: 900px) {
  .app {
    padding-top: 0;
  }

  .panel {
    width: min(520px, 100%);
  }
}

@media (max-width: 520px) {
  .app {
    padding: 0;
    place-items: stretch;
  }

  .panel {
    width: 100%;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

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