:root {
  --bg: #f4efe8;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-soft: rgba(255, 255, 255, 0.7);
  --surface-strong: #fffdf9;
  --text: #1f2430;
  --muted: #667081;
  --line: rgba(31, 36, 48, 0.1);
  --line-strong: rgba(31, 36, 48, 0.18);
  --accent: #b86f52;
  --accent-deep: #8b523f;
  --accent-soft: rgba(184, 111, 82, 0.12);
  --hero-deep: #1f2430;
  --hero-mid: #313849;
  --success-bg: rgba(60, 128, 102, 0.12);
  --success-text: #1d6c53;
  --error-bg: rgba(177, 67, 67, 0.12);
  --error-text: #9b2f2f;
  --button-start: #efd7bb;
  --button-end: #d8a982;
  --shadow-xl: 0 34px 84px rgba(45, 36, 29, 0.14);
  --shadow-lg: 0 22px 52px rgba(45, 36, 29, 0.1);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --container: 1260px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(184, 111, 82, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(157, 169, 137, 0.12), transparent 24%),
    linear-gradient(180deg, #faf6f1 0%, #f5f0e8 44%, #eee7df 100%);
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.wizard-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.wizard-page__glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(10px);
  pointer-events: none;
}

.wizard-page__glow--left {
  top: -140px;
  left: -120px;
  width: 380px;
  height: 380px;
  background: rgba(219, 165, 122, 0.14);
}

.wizard-page__glow--right {
  right: -160px;
  top: 160px;
  width: 460px;
  height: 460px;
  background: rgba(31, 36, 48, 0.06);
}

.wizard-shell {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
  padding: 18px 0 64px;
}

.wizard-card {
  backdrop-filter: blur(20px);
}

.wizard-eyebrow,
.wizard-panel__eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wizard-eyebrow {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(247, 243, 236, 0.82);
}

.wizard-hero h1,
.wizard-panel__header h2 {
  margin: 0;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.wizard-card {
  padding: 20px 22px 28px;
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 248, 240, 0.84)),
    rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-xl);
}

.wizard-progress {
  position: relative;
  margin-bottom: 18px;
}

.wizard-progress__bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 12px;
  height: 2px;
  border-radius: 999px;
  background: rgba(31, 36, 48, 0.08);
}

.wizard-progress__fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  transition: width 0.28s ease;
}

.wizard-steps {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.wizard-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
}

.wizard-step[disabled] {
  cursor: default;
}

.wizard-step__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(31, 36, 48, 0.1);
  background: rgba(255, 255, 255, 0.82);
  font-size: 0.7rem;
  font-weight: 800;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.wizard-step__text {
  display: none;
}

.wizard-step__text strong {
  font-size: 0.9rem;
  color: var(--text);
}

.wizard-step__text span {
  font-size: 0.78rem;
}

.wizard-step.is-complete .wizard-step__number,
.wizard-step.is-active .wizard-step__number {
  border-color: rgba(184, 111, 82, 0.26);
  background: linear-gradient(135deg, rgba(240, 212, 178, 0.86), rgba(215, 154, 116, 0.94));
  color: #2b231f;
}

.wizard-step.is-active .wizard-step__number {
  transform: none;
  box-shadow: 0 10px 18px rgba(54, 40, 31, 0.12);
}

.wizard-step.is-active {
  padding: 0;
}

.wizard-form {
  display: grid;
  gap: 22px;
}

.hidden-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.wizard-status {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  line-height: 1.7;
}

.wizard-status.is-success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid rgba(29, 108, 83, 0.18);
}

.wizard-status.is-error {
  background: var(--error-bg);
  color: var(--error-text);
  border: 1px solid rgba(155, 47, 47, 0.14);
}

.wizard-panel {
  display: grid;
  gap: 26px;
  min-height: 480px;
}

.wizard-panel[hidden] {
  display: none;
}

.wizard-panel__header {
  display: grid;
  gap: 16px;
}

.wizard-panel__eyebrow {
  width: fit-content;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.wizard-panel__header h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

.wizard-panel__header p {
  margin: 0;
  max-width: 72ch;
  color: var(--muted);
  line-height: 1.8;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field {
  display: grid;
  gap: 10px;
}

.field--full {
  grid-column: 1 / -1;
}

.field span {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text);
}

.field em {
  font-style: normal;
  color: var(--muted);
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.field textarea {
  min-height: 132px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #858c9b;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--line-strong);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(184, 111, 82, 0.56);
  box-shadow: 0 0 0 4px rgba(184, 111, 82, 0.12);
  transform: translateY(-1px);
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice-chip {
  appearance: none;
  border: 1px solid rgba(31, 36, 48, 0.1);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.22s ease;
}

.choice-chip:hover,
.choice-chip:focus-visible {
  border-color: rgba(184, 111, 82, 0.32);
  background: rgba(184, 111, 82, 0.08);
}

.choice-chip.is-applied {
  border-color: rgba(184, 111, 82, 0.38);
  background: rgba(184, 111, 82, 0.12);
  color: var(--accent-deep);
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.review-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(31, 36, 48, 0.08);
  background: var(--surface-soft);
}

.review-card h3 {
  margin: 0 0 18px;
  font-size: 1rem;
}

.review-list {
  display: grid;
  gap: 16px;
  margin: 0;
}

.review-list div {
  display: grid;
  gap: 6px;
}

.review-list dt {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.review-list dd {
  margin: 0;
  color: var(--text);
  line-height: 1.7;
  white-space: pre-line;
}

.legal-consent {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: rgba(31, 36, 48, 0.96);
  color: rgba(248, 244, 238, 0.92);
  line-height: 1.7;
}

.legal-consent input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: #e4b88f;
  flex: 0 0 auto;
}

.legal-consent a {
  color: #f3cfab;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.legal-consent a:hover,
.legal-consent a:focus-visible {
  color: #fff4e8;
}

.wizard-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 8px;
}

.wizard-actions--end {
  justify-content: flex-end;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 0 26px;
  border-radius: 999px;
  border: 0;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, opacity 0.22s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button--ghost {
  border: 1px solid rgba(31, 36, 48, 0.12);
  background: rgba(255, 255, 255, 0.68);
  color: var(--text);
}

.button--ghost:hover,
.button--ghost:focus-visible {
  box-shadow: var(--shadow-lg);
}

.button--primary,
.button--submit {
  background: linear-gradient(135deg, var(--button-start), var(--button-end));
  color: #2b231f;
  box-shadow: 0 18px 34px rgba(80, 55, 37, 0.18);
}

.button--primary:hover,
.button--primary:focus-visible,
.button--submit:hover,
.button--submit:focus-visible {
  box-shadow: 0 24px 42px rgba(80, 55, 37, 0.24);
}

.button--submit {
  width: 100%;
}

.button:disabled {
  opacity: 0.86;
  cursor: wait;
}

.button__loader {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(35, 32, 32, 0.28);
  border-top-color: #232020;
  border-radius: 50%;
  animation: wizard-spin 0.8s linear infinite;
}

.button.is-loading .button__loader {
  display: inline-flex;
}

.button.is-loading .button__label {
  opacity: 0.82;
}

@keyframes wizard-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1180px) {
  .wizard-shell {
    padding-top: 16px;
  }
}

@media (max-width: 860px) {
  .wizard-shell {
    width: min(calc(100% - 20px), var(--container));
    padding: 20px 0 42px;
  }

  .wizard-card,
  .wizard-card {
    padding: 18px 16px 22px;
    border-radius: 24px;
  }

  .form-grid,
  .review-grid {
    grid-template-columns: 1fr;
  }

  .wizard-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .button,
  .button--submit {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .wizard-step__number {
    width: 22px;
    height: 22px;
    font-size: 0.66rem;
  }

  .wizard-panel {
    min-height: auto;
  }

  .legal-consent {
    padding: 16px;
  }
}
