:root {
  --ade-primary: #714b67;
  --ade-primary-dark: #5a3d52;
  --ade-primary-soft: #714b6714;
  --ade-gradient: linear-gradient(90deg, #714b67 0%, #9b6b8f 100%);
  --stone-50: #fafaf9;
  --stone-200: #e7e5e4;
  --stone-500: #78716c;
  --stone-700: #44403c;
  --stone-900: #1c1917;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(180deg, var(--stone-50) 0%, #fff 40%, #714b670d 100%);
  color: var(--stone-900);
  line-height: 1.5;
  min-height: 100vh;
}

.top-bar {
  height: 4px;
  background: var(--ade-gradient);
}

header {
  border-bottom: 1px solid #e7e5e480;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

header img {
  height: 48px;
  width: auto;
}

.brand-name {
  font-size: 1.125rem;
  font-weight: 700;
}

.brand-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ade-primary);
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

.hero {
  text-align: center;
  margin-bottom: 2rem;
}

.kicker {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ade-primary);
}

.hero h1 {
  margin-top: 0.5rem;
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  line-height: 1.2;
}

.hero p {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--stone-500);
  max-width: 36rem;
  margin-inline: auto;
}

.hero .hint {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #a8a29e;
}

#error-box {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.875rem;
}

.progress-wrap {
  margin-bottom: 1.25rem;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--stone-500);
  margin-bottom: 0.5rem;
}

.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--stone-200);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--ade-gradient);
  transition: width 0.4s ease;
}

.step-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.chip {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  background: #f5f5f4;
  color: #a8a29e;
}

.chip-active {
  background: var(--ade-primary);
  color: #fff;
}

.chip-done {
  background: var(--ade-primary-soft);
  color: var(--ade-primary);
}

.form-card {
  background: #fff;
  border: 1px solid var(--stone-200);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

@media (min-width: 640px) {
  .form-card {
    padding: 2rem;
  }
}

.block-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ade-primary);
}

.block-sub {
  margin-top: 0.25rem;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid #f5f5f4;
  font-size: 0.875rem;
  color: var(--stone-500);
}

.questions {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.field-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--stone-700);
}

.required {
  color: var(--ade-primary);
}

.field-label-error {
  color: #b91c1c;
}

.field-input-error {
  border-color: #ef4444 !important;
  background: #fef2f2;
  box-shadow: 0 0 0 3px #ef444433 !important;
}

.field-input-error:focus {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px #ef444444 !important;
}

.question-error {
  padding: 0.75rem;
  margin: -0.75rem;
  border-radius: 0.75rem;
  background: #fef2f208;
}

.field-group-error .pill,
.field-group-error .option-card {
  border-color: #fca5a5;
}

.field-group-error {
  padding: 0.5rem;
  margin-top: 0.25rem;
  border-radius: 0.75rem;
  border: 1px dashed #fca5a5;
  background: #fef2f2;
}

.field-error-msg {
  margin-top: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #dc2626;
}

.field-input {
  width: 100%;
  margin-top: 0.5rem;
  border: 1px solid var(--stone-200);
  border-radius: 0.75rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field-input:focus {
  border-color: var(--ade-primary);
  box-shadow: 0 0 0 3px #714b6733;
}

.help-tip {
  margin-top: 0.375rem;
}

.help-tip-btn {
  border: none;
  background: none;
  color: var(--ade-primary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.help-tip-btn:hover {
  color: var(--ade-primary-dark);
}

.help-tip-panel {
  margin-top: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #714b6726;
  background: var(--ade-primary-soft);
  font-size: 0.75rem;
  color: var(--stone-500);
  line-height: 1.5;
}

.yesno-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.pill {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--stone-200);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pill-active {
  background: var(--ade-primary);
  border-color: var(--ade-primary);
  color: #fff;
}

.option-list,
.checkbox-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .checkbox-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.option-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--stone-200);
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.option-card input {
  margin-top: 0.125rem;
  accent-color: var(--ade-primary);
}

.option-active {
  border-color: var(--ade-primary);
  background: var(--ade-primary-soft);
}

.form-actions {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.75rem;
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .form-actions {
    flex-direction: row;
    justify-content: space-between;
  }
}

.btn {
  border: none;
  border-radius: 0.75rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--ade-primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--ade-primary-dark);
}

.btn-secondary {
  background: #fff;
  border: 1px solid var(--stone-200);
  color: var(--stone-700);
}

.btn-secondary:hover:not(:disabled) {
  background: #fafaf9;
}

.success-card {
  text-align: center;
  background: #fff;
  border: 1px solid var(--stone-200);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.success-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  border-radius: 999px;
  background: var(--ade-primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--ade-primary);
}

.success-card h2 {
  font-size: 1.25rem;
}

.success-card p {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--stone-500);
}

.success-email {
  margin-top: 1rem !important;
}

footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--stone-200);
  text-align: center;
  font-size: 0.75rem;
  color: #a8a29e;
}

footer strong {
  color: var(--stone-700);
}
