:root {
  --bg: #FAF6F1;
  --card: #FFFFFF;
  --ink: #241F1B;
  --muted: #6E645C;
  --line: #E3DACE;
  --line-strong: #CFC2B2;
  --accent: #A85064;
  --accent-soft: #F3E8EA;
  --err: #9A3B2E;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 660px;
  margin: 0 auto;
  padding: 40px 22px 96px;
}

/* progress */
.progress { margin-bottom: 26px; }
.progress-label {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.progress-track {
  height: 3px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 220ms ease;
}

/* steps */
.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 34px 32px 30px;
}

.step h1, .step h2 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.step h1 { font-size: 34px; }
.step h2 { font-size: 27px; }

.step p { margin: 0 0 16px; }

/* warm at the front */
.opening {
  background: #FFFDFB;
  border-color: var(--line-strong);
  padding-top: 42px;
}
.opening h1 { font-size: 38px; margin-bottom: 20px; }
.opening p { color: #3A322C; }
.opening .field { margin-top: 20px; }

.helper {
  color: var(--muted);
  font-size: 15.5px;
  margin: 0 0 22px;
}

/* fields */
.field { margin: 0 0 20px; }

label, legend {
  display: block;
  font-size: 15px;
  margin-bottom: 8px;
  color: var(--ink);
}

input[type="text"],
input[type="email"],
input[type="number"],
textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 11px 12px;
  display: block;
}

textarea { resize: vertical; line-height: 1.5; }

input.num { max-width: 160px; }

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* choices */
.choices { border: 0; margin: 0 0 8px; padding: 0; }
.choices legend { margin-bottom: 12px; }
.choices.inline { display: flex; gap: 10px; flex-wrap: wrap; }
.choices.inline legend { flex-basis: 100%; }

.choice {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 12px 14px;
  margin-bottom: 9px;
  cursor: pointer;
  background: #fff;
}
.choices.inline .choice { margin-bottom: 0; min-width: 96px; }
.choice:hover { border-color: var(--accent); }
.choice input { margin: 4px 0 0; accent-color: var(--accent); flex: none; }
.choice span { font-size: 16px; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* follow-ups */
.followup {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.followup .followup { border-top: 0; padding-top: 10px; margin-top: 10px; }

/* actions */
.actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
}

.btn {
  font: inherit;
  font-size: 16px;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 4px;
  padding: 12px 30px;
  cursor: pointer;
}
.btn:hover { background: #8E4254; }
a.btn { display: inline-block; text-decoration: none; }
.copy-note { margin-top: 32px; }
.btn:disabled { opacity: 0.6; cursor: default; }

.back {
  font: inherit;
  font-size: 15px;
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.back:hover { color: var(--ink); }

/* errors */
.err {
  color: var(--err);
  font-size: 15px;
  margin: 14px 0 0;
}

/* result */
.result h1 { font-size: 32px; }
.send-note { color: var(--err); font-size: 15.5px; }

.answers { margin: 34px 0 0; padding: 28px 0 0; border-top: 1px solid var(--line); }
.answers dt {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 6px;
}
.answers dd {
  margin: 0 0 24px;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
.answers dd:last-child { margin-bottom: 0; }

/* utility */
.hp { position: absolute; left: -9999px; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 26px 16px 72px; }
  .step { padding: 26px 20px 24px; border-radius: 4px; }
  .step h1, .opening h1 { font-size: 28px; }
  .step h2 { font-size: 23px; }
  .actions { gap: 14px; }
  .btn { flex: 1; text-align: center; padding: 13px 20px; }
}
