:root {
  --ink: #142033;
  --muted: #5a6e84;
  --line: #d7e2ea;
  --line-soft: #e9f0f4;
  --paper: rgba(255, 255, 255, 0.95);
  --accent: #0f766e;
  --accent-soft: #d7f3ef;
  --accent-strong: #0c5e57;
  --error: #b54708;
  --shadow: 0 20px 45px rgba(17, 24, 39, 0.08);
  font-family: "IBM Plex Sans", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.18), transparent 45%),
    linear-gradient(180deg, #f7fbfd 0%, #edf4f7 100%);
  min-height: 100vh;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.shell {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 18px 48px;
  display: grid;
  gap: 18px;
  align-content: start;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.brand-mark {
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px 24px;
  box-shadow: var(--shadow);
  animation: fadeIn 220ms ease-out;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 700;
}

h1 {
  margin: 4px 0 14px;
  font-size: clamp(1.6rem, 4.6vw, 2.1rem);
  line-height: 1.1;
}
h2 {
  margin: 8px 0 6px;
  font-size: clamp(1.25rem, 3.6vw, 1.5rem);
  line-height: 1.25;
}

.lede {
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.55;
  margin: 0 0 20px;
}

.fineprint {
  color: var(--muted);
  font-size: 0.86rem;
  margin: 12px 0 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid transparent;
  padding: 13px 22px;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 80ms ease, background 120ms ease, color 120ms ease;
}
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: var(--accent);
  color: #fff;
  min-width: 130px;
}
.btn.primary:hover { background: var(--accent-strong); }
.btn.primary:disabled { background: #9bbeb9; cursor: not-allowed; }
.btn.ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}
.btn.ghost:hover { color: var(--ink); border-color: #aecad1; }
.btn.ghost:disabled { color: #b9c4cd; cursor: not-allowed; }

/* Question card */
.section-name {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.question-title {
  margin: 6px 0 4px;
}
.question-subtitle {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.96rem;
}

.question-body {
  display: grid;
  gap: 10px;
  margin-bottom: 6px;
}

/* Choice rows */
.choice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
  cursor: pointer;
  user-select: none;
}
.choice:hover {
  border-color: #aecad1;
  background: #fbfeff;
}
.choice.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent) inset;
}
.choice .ind {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #c1d3da;
  flex: 0 0 22px;
  margin-top: 1px;
  position: relative;
  background: #fff;
}
.choice.multi .ind {
  border-radius: 6px;
}
.choice.selected .ind {
  border-color: var(--accent);
  background: var(--accent);
}
.choice.selected .ind::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'><polyline points='3,8 7,12 13,4'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px;
}
.choice .label {
  flex: 1;
  line-height: 1.4;
}
.choice .other-input {
  display: block;
  margin-top: 10px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
}
.choice .other-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}

/* Email field */
.email-field {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 1rem;
  background: #fff;
}
.email-field:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}

/* Panel cards (informational interludes) */
.panel-body {
  background: var(--accent-soft);
  border: 1px solid #b8e2dc;
  border-radius: 14px;
  padding: 16px;
  color: #0c4f48;
  line-height: 1.5;
}

/* Progress block (counter + bar, top of question card) */
.progress-block {
  margin: -4px 0 18px;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 0.84rem;
}
.step-counter {
  color: var(--muted);
  font-weight: 500;
}
.progress-pct {
  color: var(--accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.progress-pct.almost-done {
  color: var(--good, #15803d);
}
.progress {
  height: 8px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--accent);
  transition: width 240ms ease, background 240ms ease;
  width: 0%;
  border-radius: 999px;
}
.progress-bar.almost-done {
  background: var(--good, #15803d);
}

/* Actions row */
.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}
.step-counter {
  text-align: center;
  color: var(--muted);
  font-size: 0.84rem;
  margin: 14px 0 0;
}

.error-msg {
  color: var(--error);
  font-size: 0.92rem;
  margin: 12px 0 0;
}

/* Thanks */
.thanks {
  text-align: center;
  padding: 40px 24px;
}
.thanks-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 36px;
  margin-bottom: 12px;
  box-shadow: 0 10px 25px rgba(15, 118, 110, 0.3);
}
.thanks code {
  background: #eef5f4;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 2px 6px;
}

.hidden { display: none !important; }

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.site-footer {
  text-align: center;
  padding: 18px 12px 28px;
  color: var(--muted);
  font-size: 0.86rem;
  display: flex;
  gap: 10px;
  justify-content: center;
}

@media (max-width: 480px) {
  .card { padding: 22px 18px; border-radius: 18px; }
  .actions { flex-direction: row; }
  .btn { padding: 12px 18px; }
  .btn.primary { min-width: 110px; }
}
