:root {
  --bg: #fbf6ee;
  --surface: #ffffff;
  --ink: #23332e;
  --muted: #5f6f69;
  --line: #e7dfd2;
  --brand: #1f6f5c;
  --brand-ink: #ffffff;
  --brand-soft: #e3f1ec;
  --accent: #e8794a;
  --accent-soft: #fdeee6;
  --error: #b42318;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(35, 51, 46, .06), 0 12px 32px -12px rgba(35, 51, 46, .18);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 "Nunito", system-ui, sans-serif;
}

.wrap { width: min(720px, 100% - 32px); margin-inline: auto; }

/* Header */
.top { padding: 18px 0; }
.top__inner { display: flex; align-items: baseline; justify-content: space-between; }
.logo { font: 700 28px/1 "Fraunces", Georgia, serif; color: var(--brand); letter-spacing: -.02em; }
.logo__dot { color: var(--accent); }
.top__tag { font-size: 13px; font-weight: 700; color: var(--muted); }

/* Hero */
.hero { padding: 28px 0 24px; }
.eyebrow {
  display: inline-block; margin: 0 0 14px; padding: 6px 12px;
  background: var(--accent-soft); color: #9a3f19;
  border-radius: 999px; font-size: 14px; font-weight: 700;
}
h1 {
  margin: 0 0 14px;
  font: 700 clamp(30px, 6vw, 44px)/1.1 "Fraunces", Georgia, serif;
  letter-spacing: -.02em;
}
.lead { margin: 0; font-size: 18px; color: var(--muted); max-width: 58ch; }

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px 24px 24px;
  margin-bottom: 32px;
}

.block { border: 0; margin: 0; padding: 20px 0; min-width: 0; }
.block + .block { border-top: 1px dashed var(--line); }
.block[hidden] { display: none; }

.block__title {
  display: flex; align-items: center; gap: 10px;
  padding: 0; margin: 0 0 16px;
  font: 700 21px/1.2 "Fraunces", Georgia, serif;
}
.block__title--sub { margin-top: 28px; }
.num {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand); color: var(--brand-ink);
  font: 800 14px/1 "Nunito", sans-serif;
}

/* Choice cards */
.choice-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-card {
  position: relative; display: grid; gap: 4px; cursor: pointer;
  padding: 18px 16px; border: 2px solid var(--line); border-radius: 16px;
  background: var(--bg); transition: border-color .15s, background .15s, transform .15s;
}
.choice-card:hover { border-color: #c9d9d2; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card__icon { font-size: 30px; line-height: 1; margin-bottom: 6px; }
.choice-card__title { font-weight: 800; font-size: 17px; }
.choice-card__sub { font-size: 14px; color: var(--muted); }
.choice-card:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.choice-card:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Fields */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > span, .field > .label { font-weight: 700; font-size: 15px; }

input[type="text"], input[type="tel"], select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235f6f69' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(31, 111, 92, .15);
}
.invalid { border-color: var(--error) !important; }

/* Pills */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills label { cursor: pointer; }
.pills input { position: absolute; opacity: 0; pointer-events: none; }
.pills span {
  display: inline-block; padding: 9px 14px;
  border: 1.5px solid var(--line); border-radius: 999px;
  font-weight: 600; font-size: 15px; background: #fff;
  transition: all .15s;
}
.pills label:hover span { border-color: #c9d9d2; }
.pills input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.pills input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.pills input:disabled + span { opacity: .45; cursor: not-allowed; }

/* Checks */
.check {
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
  padding: 14px; margin-bottom: 8px; border-radius: 12px; background: var(--bg);
}
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--brand); }
.check span { font-size: 15px; }

/* Errors & messages */
.error { margin: 4px 0 0; min-height: 0; color: var(--error); font-size: 14px; font-weight: 600; }
.error:empty { display: none; }
.form-msg { margin: 12px 0 0; font-weight: 700; color: var(--error); }
.form-msg:empty { display: none; }

/* Button */
.btn {
  width: 100%; margin-top: 16px; padding: 16px;
  font: 800 18px/1 "Nunito", sans-serif; color: #fff;
  background: var(--accent); border: 0; border-radius: 14px; cursor: pointer;
  box-shadow: 0 8px 20px -8px rgba(232, 121, 74, .7);
  transition: transform .1s, filter .15s;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: wait; }

/* Thanks */
.thanks { text-align: center; padding: 40px 24px; }
.thanks__icon { font-size: 48px; }
.thanks h2 { font: 700 30px/1.2 "Fraunces", Georgia, serif; margin: 8px 0 12px; }
.thanks p { margin: 0 auto; max-width: 46ch; color: var(--muted); font-size: 17px; }

/* Footer */
.foot { padding: 0 0 32px; text-align: center; color: var(--muted); font-size: 14px; }

@media (max-width: 560px) {
  .card { padding: 4px 18px 20px; }
  .grid { grid-template-columns: 1fr; }
  .choice-cards { grid-template-columns: 1fr; }
  .choice-card { grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; }
  .choice-card__icon { grid-row: span 2; margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
