:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1a1d21;
  --muted: #5c6570;
  --border: #d8dde3;
  --accent: #2563eb;
  --error: #b91c1c;
  --warning: #b45309;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.container {
  max-width: 640px;
  margin: 2rem auto;
  padding: 0 1rem 3rem;
}

.survey-header h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
}

.intro {
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.survey-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.survey-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.survey-panel-title {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.survey-panel .question:last-child {
  margin-bottom: 0;
}

.survey-form-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0.25rem 0;
}

.question {
  border: none;
  margin: 0 0 1.25rem;
  padding: 0;
}

.question legend,
.question > label:first-of-type {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.address-fields label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin: 0.75rem 0 0.35rem;
}

.address-fields label:first-of-type {
  margin-top: 0;
}

.address-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 480px) {
  .address-row {
    grid-template-columns: 1fr;
  }
}

.select-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  background: var(--surface);
  color: var(--text);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
}

textarea {
  resize: vertical;
}

.checkbox-label,
.radio-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: normal;
  margin-bottom: 0.35rem;
  cursor: pointer;
}

.checkbox-label .consent-link {
  display: block;
  margin-top: 0.25rem;
  color: var(--accent);
  font-size: 0.9rem;
  text-decoration: underline;
}

.checkbox-label .consent-link:hover {
  filter: brightness(1.1);
}

.options-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.slider-input {
  flex: 1;
}

.slider-bound {
  color: var(--muted);
  font-size: 0.75rem;
  max-width: 5rem;
  text-align: center;
  line-height: 1.2;
}

.slider-value {
  min-width: 1.5rem;
  font-weight: 600;
  text-align: center;
}

.submit-btn {
  padding: 0.6rem 1.25rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.submit-btn:hover {
  filter: brightness(1.05);
}

.flash-messages {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.flash-error {
  background: #fef2f2;
  color: var(--error);
  border: 1px solid #fecaca;
}

.flash-warning {
  background: #fffbeb;
  color: var(--warning);
  border: 1px solid #fde68a;
}

.trial-hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
}

.trial-terms-note {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0.35rem 0 0 1.75rem;
  line-height: 1.4;
}

.trial-terms-note a {
  color: var(--accent);
}

.trial-credentials {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

.trial-credentials h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.trial-note {
  color: var(--muted);
  font-size: 0.875rem;
  margin: 0.5rem 0 0;
}

.flash-trial {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.thank-you h1 {
  margin-top: 0;
}

.thank-you a {
  color: var(--accent);
}
