:root {
  color-scheme: light;
  --blue: #1765e8;
  --blue-dark: #0d4fbe;
  --blue-soft: #edf4ff;
  --navy: #132849;
  --body: #405576;
  --muted: #71839d;
  --line: #dbe7f7;
  --surface: #ffffff;
  --success: #16845b;
  --danger: #b42318;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #f7faff;
  color: var(--navy);
}

button, input, textarea { font: inherit; }

button { cursor: pointer; }

.survey-shell {
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 32px 18px;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(2px);
  pointer-events: none;
}

.ambient-one {
  width: 430px;
  height: 430px;
  top: -220px;
  right: -130px;
  background: rgba(23, 101, 232, 0.12);
}

.ambient-two {
  width: 360px;
  height: 360px;
  left: -190px;
  bottom: -190px;
  background: rgba(23, 101, 232, 0.08);
}

.survey-frame {
  position: relative;
  z-index: 1;
  width: min(100%, 760px);
}

.survey-header,
.survey-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.survey-header { margin-bottom: 12px; }

.program-label {
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.invite-label {
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid #b9cbe5;
  color: var(--muted);
  font-size: 12px;
}

.progress-text {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.progress-track {
  height: 6px;
  overflow: hidden;
  margin-bottom: 18px;
  border-radius: 999px;
  background: #dfe9f7;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #4f8df3);
  transition: width 280ms ease;
}

.card-host {
  min-height: 520px;
  display: grid;
}

.question-card {
  width: 100%;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 6vw, 56px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 26px 70px rgba(17, 55, 110, 0.12);
  animation: card-in 260ms ease both;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.question-number,
.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.question-card h1,
.question-card h2 {
  max-width: 650px;
  margin: 0;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.question-card h2 { font-size: clamp(26px, 4vw, 36px); }

.lead {
  max-width: 630px;
  margin: 18px 0 0;
  color: var(--body);
  font-size: 17px;
  line-height: 1.7;
}

.benefits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.feature-label {
  margin: 24px 0 0;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.feature-label + .benefits { margin-top: 10px; }

.benefits li {
  padding: 13px 14px;
  border: 1px solid #d7e4f6;
  border-radius: 12px;
  background: #f8fbff;
  color: var(--body);
  font-size: 14px;
  font-weight: 600;
}

.benefits li::before {
  content: "✓";
  margin-right: 8px;
  color: var(--blue);
  font-weight: 700;
}

.choices {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.choice {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 15px 16px;
  border: 1px solid #cedbed;
  border-radius: 12px;
  background: white;
  color: var(--body);
  line-height: 1.45;
  transition: 160ms ease;
}

.choice:hover { border-color: #7aa9ef; background: #f9fbff; }

.choice:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: 0 0 0 1px var(--blue);
  color: #134fba;
}

.choice input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--blue);
}

.choice-copy { display: grid; gap: 3px; }
.choice-copy strong { color: var(--navy); }
.choice-copy small { color: var(--muted); font-size: 13px; }

.field-wrap { margin-top: 28px; }

.other-field {
  display: none;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid #cfe0f8;
  border-radius: 12px;
  background: #f8fbff;
}

.other-field.is-visible {
  display: block;
  animation: card-in 180ms ease both;
}

.text-field,
.text-area {
  width: 100%;
  border: 0;
  border-bottom: 2px solid #b8c8de;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--navy);
  font-size: 20px;
  padding: 13px 2px;
}

.text-area {
  min-height: 130px;
  resize: vertical;
  line-height: 1.55;
}

.text-field:focus,
.text-area:focus { border-color: var(--blue); }

.field-hint {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.rating-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
  margin-top: 28px;
}

.rating-row .choice {
  justify-content: center;
  padding: 16px 8px;
}

.rating-row .choice input { position: absolute; opacity: 0; }
.rating-row strong { font-size: 20px; }

.rating-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 30px;
}

.primary,
.secondary {
  min-height: 46px;
  border-radius: 10px;
  padding: 0 20px;
  font-weight: 700;
}

.primary {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: white;
  box-shadow: 0 8px 18px rgba(23, 101, 232, 0.2);
}

.primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.primary:disabled { cursor: wait; opacity: .68; }

.secondary {
  border: 1px solid #cad8eb;
  background: white;
  color: var(--body);
}

.key-hint { margin-left: auto; color: var(--muted); font-size: 12px; }

.error {
  min-height: 21px;
  margin: 14px 0 -8px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
}

.privacy-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.completion-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  border-radius: 18px;
  background: #e7f7f0;
  color: var(--success);
  font-size: 30px;
  font-weight: 700;
}

.confirmation-id {
  width: fit-content;
  margin: 22px 0 0;
  padding: 10px 13px;
  border: 1px solid #cfe0f8;
  border-radius: 9px;
  background: #f5f9ff;
  color: var(--body);
  font-size: 13px;
}

.survey-footer {
  padding: 14px 5px 0;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 600px) {
  .survey-shell { padding: 18px 12px; place-items: start center; }
  .survey-header { align-items: flex-end; }
  .invite-label { display: block; margin: 3px 0 0; padding: 0; border: 0; }
  .question-card { min-height: calc(100dvh - 118px); border-radius: 18px; padding: 28px 20px; }
  .card-host { min-height: calc(100dvh - 118px); }
  .benefits { grid-template-columns: 1fr; }
  .rating-row { gap: 5px; }
  .rating-row .choice { padding: 14px 4px; }
  .key-hint { display: none; }
  .survey-footer { display: none; }
}

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