:root {
  color-scheme: light dark;
  --page: #f3f5f2;
  --page-accent: #e7eee9;
  --card: #ffffff;
  --text: #17221c;
  --muted: #526158;
  --line: #ccd5cf;
  --accent: #215c47;
  --accent-hover: #174533;
  --accent-soft: #e5f1eb;
  --danger: #9f2f2f;
  --danger-soft: #fff0ef;
  --focus: #176f9f;
  --shadow: 0 18px 50px rgba(20, 43, 31, 0.1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, var(--page-accent), transparent 38rem),
    var(--page);
  color: var(--text);
  font: 18px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell { width: min(760px, calc(100% - 28px)); margin: 0 auto; padding: 48px 0 72px; }
.heading { max-width: 650px; margin: 0 auto 28px; text-align: center; }
.eyebrow, .step { margin: 0 0 8px; color: var(--accent); font-size: .82rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(2.15rem, 7vw, 3.6rem); line-height: 1.08; letter-spacing: -.035em; }
h2 { margin: 0 0 6px; font-size: clamp(1.45rem, 4vw, 1.85rem); line-height: 1.2; }
.intro { margin: 14px 0 0; color: var(--muted); font-size: 1.08rem; }
.card { padding: clamp(24px, 6vw, 46px); border: 1px solid var(--line); border-radius: 24px; background: var(--card); box-shadow: var(--shadow); }
.notice { text-align: center; }
.section-note { margin: 0 0 32px; color: var(--muted); font-size: .94rem; }
/* min-width: 0 — a fieldset defaults to min-content width, which pushed the
   rating row past the card edge at phone width (#8915 host review). */
.question { min-width: 0; margin: 0 0 34px; padding: 0; border: 0; }
.question:last-child { margin-bottom: 28px; }
.question legend, .question-label, .identity-fields label { display: block; margin-bottom: 10px; font-weight: 700; }
.required, .optional { color: var(--muted); font-size: .86em; font-weight: 500; }
.choices, .rating { display: grid; gap: 10px; }
.rating { grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); }
.choice { display: flex; min-height: 52px; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.choice:hover { border-color: var(--accent); background: var(--accent-soft); }
input[type="radio"], input[type="checkbox"] { width: 23px; height: 23px; flex: 0 0 auto; accent-color: var(--accent); }
textarea, input[type="text"], input[type="email"] { width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid #8b9b91; border-radius: 11px; background: var(--card); color: var(--text); font: inherit; }
textarea { min-height: 130px; resize: vertical; }
input:focus-visible, textarea:focus-visible, summary:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.identity { margin: 10px 0 30px; border: 1px solid var(--line); border-radius: 16px; background: var(--accent-soft); overflow: hidden; }
.identity summary { min-height: 70px; padding: 16px 20px; cursor: pointer; font-weight: 700; }
.identity summary small { display: block; color: var(--muted); font-size: .84rem; font-weight: 500; }
.identity-fields { padding: 4px 20px 22px; }
.identity-fields label { margin-top: 18px; }
/* label.followup outranks `.identity-fields label { display: block }`, which
   otherwise stacked the checkbox above its words on phones (#8915). */
.identity-fields label.followup { display: flex; margin-top: 22px; background: var(--card); }
button { width: 100%; min-height: 58px; padding: 14px 24px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: 750 1.08rem/1.2 system-ui, sans-serif; cursor: pointer; transition: background .15s, transform .15s; }
button:hover { background: var(--accent-hover); transform: translateY(-1px); }
button:disabled { opacity: .65; cursor: wait; transform: none; }
.status { margin: 18px 0 0; text-align: center; }
.status:empty { display: none; }
.error { color: var(--danger); background: var(--danger-soft); }
.thank-you { text-align: center; }
.check { display: grid; width: 64px; height: 64px; margin: 0 auto 20px; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 2rem; font-weight: 800; }
.thank-you p { margin-bottom: 0; color: var(--muted); }
.contact { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.contact h3 { margin: 0 0 10px; font-size: 1.05rem; }
.contact p { margin: 4px 0; }
.contact a { color: var(--accent); overflow-wrap: anywhere; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
[hidden] { display: none !important; }

@media (prefers-color-scheme: dark) {
  :root {
    --page: #101713;
    --page-accent: #172a20;
    --card: #19231d;
    --text: #edf3ef;
    --muted: #b4c1b9;
    --line: #3c4b42;
    --accent: #7bc5a4;
    --accent-hover: #99d9bc;
    --accent-soft: #233b30;
    --danger: #ffb4ad;
    --danger-soft: #3d2221;
    --focus: #8ad5ff;
    --shadow: 0 20px 55px rgba(0, 0, 0, .25);
  }
  button { color: #0c251a; }
  textarea, input[type="text"], input[type="email"] { border-color: #718079; }
}

@media (max-width: 520px) {
  .shell { width: min(100% - 18px, 760px); padding-top: 28px; }
  .card { border-radius: 18px; }
  .rating { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .rating .choice { flex-direction: column; justify-content: center; gap: 4px; padding: 8px 2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
