:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #20382a;
  background: #f2f6f1;
  font-size: 16px;
  line-height: 1.5;
  --ink: #20382a;
  --muted: #506356;
  --green: #2c5a40;
  --green-dark: #204532;
  --sage: #e6efe4;
  --line: #cbdacc;
  --paper: #fff;
  --shadow: 0 10px 28px rgb(33 74 47 / 8%);
  --page-gutter: clamp(.9rem, 4vw, 2rem);
  --page-width: 42rem;
  --dock-padding: .7rem;
  --dock-button-height: 3.1rem;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
body { margin: 0; }
.page {
  width: min(100%, var(--page-width));
  margin-inline: auto;
  padding: 0 var(--page-gutter) 1.25rem;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='780' height='420' viewBox='0 0 780 420' fill='none'%3E%3Cg stroke='%23739b79' stroke-opacity='.19' stroke-width='1.1'%3E%3Cpath d='M-50 169C60 260 175 266 304 172S560 30 816 172'/%3E%3Cpath d='M-50 182C60 273 175 279 304 185S560 43 816 185'/%3E%3Cpath d='M-50 195C60 286 175 292 304 198S560 56 816 198'/%3E%3Cpath d='M-50 208C60 299 175 305 304 211S560 69 816 211'/%3E%3Cpath d='M-50 221C60 312 175 318 304 224S560 82 816 224'/%3E%3Cpath d='M-50 234C60 325 175 331 304 237S560 95 816 237'/%3E%3Cpath d='M-50 247C60 338 175 344 304 250S560 108 816 250'/%3E%3C/g%3E%3C/svg%3E") center 14rem / min(100rem, 140vw) auto no-repeat;
}

.top {
  position: relative;
  display: grid;
  justify-items: center;
  margin: 0 calc(-1 * var(--page-gutter)) 1.4rem;
  padding: .7rem var(--page-gutter) .8rem;
  background: var(--paper);
}

.top img {
  display: block;
  width: clamp(7.8rem, 28vw, 10rem);
  height: auto;
  mix-blend-mode: multiply;
}

.back {
  position: absolute;
  inset-inline-start: var(--page-gutter);
  inset-block-start: 50%;
  transform: translateY(-50%);
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0 .5rem;
  border: 0;
  border-radius: .5rem;
  background: transparent;
  color: var(--green-dark);
  font: inherit;
  cursor: pointer;
}
.back:hover { background: var(--sage); }

.progress {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  width: 100%;
  height: .27rem;
  background: #dbe7da;
  overflow: hidden;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 0 .3rem .3rem 0;
  background: var(--green);
  transition: width 190ms ease-out;
}

main { display: grid; gap: 1rem; }
.offer, .card {
  border-radius: 1.25rem;
  padding: clamp(1.1rem, 4.5vw, 2rem);
}

.offer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: white;
  background: #214332;
  box-shadow: var(--shadow);
  text-align: center;
}

.offer::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    repeating-radial-gradient(ellipse at 106% 122%, transparent 0 10px, rgb(190 222 176 / 15%) 11px 12px, transparent 13px 16px),
    linear-gradient(135deg, #1c392b, #2b6042);
}

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e7edbb;
  border-radius: .4rem;
  background: #111813;
  color: #eef4c6;
  padding: .22rem .62rem;
  text-transform: uppercase;
  font-size: .75rem;
  font-weight: 750;
  letter-spacing: .1em;
}

h1, h2, p { margin: 0; }
h1, h2 { line-height: 1.16; text-wrap: balance; letter-spacing: -.028em; }
.offer h1 { margin-top: .65rem; font-size: clamp(1.65rem, 5.4vw, 2.5rem); }
.offer-benefit {
  text-decoration: underline;
  text-decoration-thickness: .08em;
  text-underline-offset: .12em;
}
.offer p { margin: .62rem auto 0; max-width: 35rem; color: #f0f6ed; font-size: .93rem; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.card h1, .card h2 { font-size: clamp(1.45rem, 5vw, 2.1rem); }
.card h1:focus, .card h2:focus { outline: none; }
.card p { color: var(--muted); margin-top: .65rem; }
.card .eyebrow {
  margin: 0 0 .4rem;
  color: var(--green);
  font-weight: 750;
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.step-heading { display: flex; align-items: baseline; gap: .42em; }
.step-heading span { font-size: .88em; }

.question-screen {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.question-screen .step-heading {
  display: block;
  max-width: 33rem;
  margin-inline: auto;
  text-align: center;
}
.question-screen .step-heading span { margin-inline-end: .3em; }
.question-screen .eyebrow,
.question-screen .choice-hint { text-align: center; }
.question-screen .choice-hint { margin-top: .45rem; }
.skip-question {
  display: block;
  min-height: 2.75rem;
  margin: .4rem auto 0;
  padding: 0 .75rem;
  border: 0;
  border-radius: .4rem;
  background: transparent;
  color: var(--green-dark);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: .2em;
  cursor: pointer;
}
.is-question .offer { padding: .8rem 1rem .9rem; }
.is-question .offer h1 { margin-top: .45rem; font-size: clamp(1.2rem, 4.3vw, 1.8rem); }

.choices {
  display: grid;
  grid-auto-rows: 1fr;
  gap: .6rem;
  margin-top: 1rem;
}
.choice {
  appearance: none;
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  min-height: 3.45rem;
  padding: .5rem .85rem;
  border: 2px solid var(--ink);
  border-radius: .55rem;
  background: var(--paper);
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease-out, border-color 140ms ease-out;
}

.choice:has(input:checked), .choice.selected {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: var(--paper);
}
.choice .emoji { flex: 0 0 1.8rem; font-size: 1.35rem; text-align: center; }
.choice .choice-label { flex: 1 1 auto; overflow-wrap: anywhere; }
.choice input {
  order: 1;
  margin: 0 0 0 auto;
  width: 1.2rem;
  height: 1.2rem;
  accent-color: var(--green);
  flex: 0 0 auto;
  cursor: pointer;
}
.choice input:checked { accent-color: var(--paper); }
.choice:has(input:focus-visible) { outline: 3px solid #357148; outline-offset: 3px; }
@media (hover: hover) {
  .choice:hover:not(.selected, :has(input:checked)) { background: var(--sage); }
}

.text-label { display: block; margin-top: 1rem; margin-bottom: .35rem; font-weight: 650; }
textarea {
  display: block;
  width: 100%;
  min-height: 7rem;
  padding: .72rem;
  resize: vertical;
  border-radius: .65rem;
  border: 1px solid #a5bea8;
  background: #fbfdfb;
  font: inherit;
  color: var(--ink);
}

.actions { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; margin-top: 1.15rem; }
.action-dock { margin-top: 1rem; }
.action-dock > .actions { margin: 0; }
.action-dock .primary { border-radius: 999px; }
.next-arrow { margin-inline-start: .55rem; font-size: 1.25em; line-height: 1; }
.primary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 3.1rem;
  border: 1px solid transparent;
  border-radius: .65rem;
  padding: .58rem .95rem;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}
.primary { flex: 1 1 auto; background: var(--green); color: white; }
.primary:hover { background: var(--green-dark); }
.primary:disabled { opacity: .55; cursor: not-allowed; }
button:focus-visible, a:focus-visible, textarea:focus-visible, input:focus-visible {
  outline: 3px solid #357148;
  outline-offset: 3px;
}

.review {
  margin: .95rem 0 0;
  padding: 1rem;
  border-radius: .8rem;
  border: 1px solid #d7e5d7;
  background: #f2f8f0;
}
.review blockquote { margin: .45rem 0 .6rem; color: var(--ink); font-size: 1.08rem; }
.review .review-copy { margin: .45rem 0 .6rem; color: var(--ink); font-size: 1.08rem; }
.review figcaption { color: var(--muted); font-size: .91rem; }
.review a, .field-help a { color: var(--green-dark); text-underline-offset: .15em; }
.card .field-help { margin-top: .4rem; font-size: .85rem; }
.stars { color: #5f4915; letter-spacing: .12em; font-size: 1.06rem; }
.summary { margin: .95rem 0 0; display: grid; gap: .55rem; }
.summary div { background: #eff6ef; border-radius: .6rem; padding: .68rem .8rem; }
.summary dt { font-size: .82rem; color: var(--muted); }
.summary dd { margin: .16rem 0 0; font-weight: 650; overflow-wrap: anywhere; }
.result { border-top: .25rem solid var(--green); }
.status { color: var(--muted); font-size: .86rem; margin-top: .6rem; }
.status:empty { display: none; }
.loading { text-align: center; padding: 2rem 0; color: var(--muted); }

@media (max-width: 47.99rem) {
  html { overscroll-behavior-y: none; }
  body.has-dock .page {
    padding-bottom: calc(var(--dock-button-height) + 2 * var(--dock-padding) + var(--safe-bottom) + 1rem);
  }
  .action-dock {
    position: fixed;
    z-index: 2;
    inset-inline: 0;
    bottom: 0;
    margin: 0;
    padding: var(--dock-padding) var(--page-gutter) calc(var(--dock-padding) + var(--safe-bottom));
    border-top: 1px solid var(--line);
    background: var(--paper);
  }
  .action-dock > .actions { max-width: calc(var(--page-width) - 2 * var(--page-gutter)); margin-inline: auto; }
  .action-dock .primary { min-height: var(--dock-button-height); }
}
@media (max-width: 47.99rem) and (max-height: 43rem) {
  .top { margin-bottom: .8rem; padding-block: .5rem .6rem; }
  .top img { width: 7.5rem; }
  .is-question main { gap: .7rem; }
  .is-question .offer { padding: .6rem .8rem .65rem; }
  .is-question .offer h1 { font-size: 1.15rem; }
  .question-screen .step-heading { font-size: 1.38rem; }
  .choices { gap: .4rem; margin-top: .7rem; }
  .choice {
    min-height: 2.85rem;
    padding: .25rem .7rem;
    font-size: .97rem;
    line-height: 1.24;
  }
  .choice .emoji { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
