.wizard-page-shell {
  width: min(calc(100% - 32px), 1180px);
}

.wizard-page {
  padding: 20px 0 64px;
  border-radius: 32px;
}

.wizard-section {
  padding-top: 8px;
}

.wizard-page-title {
  max-width: 760px;
  margin-bottom: 28px;
}

.wizard-page-title h1 {
  margin: 0;
  font-family: "Sora", "Be Vietnam Pro", sans-serif;
  font-size: clamp(2.3rem, 3.2vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.wizard-page-title p {
  max-width: 58ch;
  margin: 14px 0 0;
  font-size: 1.03rem;
  line-height: 1.7;
}

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

.wizard-draft-card,
.wizard-form,
.wizard-success {
  border: 1px solid rgba(126, 88, 56, 0.12);
  border-radius: 30px;
  background: rgba(255, 253, 249, 0.96);
  box-shadow: 0 22px 44px rgba(108, 78, 51, 0.08);
}

.wizard-draft-card {
  padding: 24px;
}

.wizard-main {
  min-width: 0;
  width: min(100%, 940px);
  margin: 0 auto;
}

.wizard-draft-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
}

.wizard-form,
.wizard-success {
  padding: 40px;
}

.wizard-form {
  max-width: 900px;
  margin: 0 auto;
}

.wizard-step-head {
  max-width: 640px;
  margin-bottom: 0;
}

.wizard-step-head-compact {
  margin: 4px 0 0;
}

.wizard-step-head h2 {
  margin: 0;
  font-family: "Sora", "Be Vietnam Pro", sans-serif;
  font-size: clamp(1.9rem, 2.2vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.wizard-step-head p:last-child {
  max-width: 58ch;
  margin-top: 14px;
  color: rgba(84, 68, 53, 0.82);
  line-height: 1.7;
}

.wizard-step + .wizard-step {
  margin-top: 0;
}

.wizard-step.is-active {
  display: grid;
  gap: 24px;
}

.wizard-block {
  padding: 24px;
  border: 1px solid rgba(136, 102, 72, 0.11);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 251, 246, 0.96), rgba(248, 241, 232, 0.9));
  max-width: 780px;
}

.wizard-panel {
  display: grid;
  gap: 22px;
  padding: 28px;
  border: 1px solid rgba(136, 102, 72, 0.12);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(253, 248, 241, 0.96), rgba(246, 237, 226, 0.92));
  max-width: 820px;
}

.wizard-panel-compact {
  gap: 16px;
  padding: 24px;
  background: rgba(255, 252, 249, 0.82);
}

.wizard-inline-heading {
  display: grid;
  gap: 6px;
}

.wizard-inline-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.12rem;
  line-height: 1.35;
}

.wizard-inline-heading p {
  margin: 0;
  color: rgba(84, 68, 53, 0.78);
  font-size: 0.94rem;
  line-height: 1.6;
}

.field-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.field-group-compact .field-label {
  margin-bottom: 0;
}

.field-grid {
  display: grid;
  gap: 18px;
  align-items: start;
}

.field-grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-grid.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-group-span-2 {
  grid-column: span 2;
}

.wizard-meta-grid {
  gap: 20px;
}

.field-grid-aligned .field-group {
  height: 100%;
}

.field-grid-aligned .field-label {
  min-height: 2.8em;
  display: flex;
  align-items: flex-end;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2px;
}

.field-label {
  display: block;
  margin-bottom: 0;
  color: rgba(41, 33, 25, 0.96);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.45;
}

.field-meta {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  color: var(--accent-deep);
  font-size: 0.92em;
  font-weight: 700;
  white-space: nowrap;
}

.field-meta.is-required {
  color: var(--accent-deep);
}

input[type="text"],
input[type="email"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid rgba(126, 88, 56, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font: inherit;
  line-height: 1.6;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(185, 118, 62, 0.32);
  box-shadow: 0 0 0 4px rgba(221, 171, 120, 0.18);
  background: #ffffff;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 52px;
  cursor: pointer;
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 18px;
  width: 10px;
  height: 10px;
  border-right: 1.8px solid rgba(96, 71, 49, 0.62);
  border-bottom: 1.8px solid rgba(96, 71, 49, 0.62);
  transform: translateY(-60%) rotate(45deg);
  pointer-events: none;
}

textarea {
  resize: vertical;
  min-height: 136px;
}

.choice-grid,
.chip-grid {
  display: grid;
  gap: 10px;
}

.project-type-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.choice-card {
  position: relative;
  display: block;
  cursor: pointer;
}

.choice-card input,
.chip-option input,
.inline-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-card span,
.chip-option span,
.inline-choice span {
  display: block;
}

.choice-card span {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 12px 14px;
  border: 1px solid rgba(126, 88, 56, 0.14);
  border-radius: 16px;
  background: rgba(255, 252, 248, 0.98);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.3;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.choice-card:hover span,
.chip-option:hover span,
.inline-choice:hover span {
  border-color: rgba(190, 126, 73, 0.24);
  background: rgba(251, 242, 233, 0.98);
}

.choice-card input:checked + span {
  transform: translateY(-1px);
  border-color: rgba(188, 124, 70, 0.3);
  background: rgba(247, 234, 220, 0.98);
  box-shadow: 0 10px 20px rgba(134, 94, 60, 0.08);
}

.chip-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.chip-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.chip-option,
.inline-choice {
  position: relative;
  display: block;
  cursor: pointer;
}

.chip-option span,
.inline-choice span {
  padding: 11px 13px;
  border: 1px solid rgba(126, 88, 56, 0.13);
  border-radius: 15px;
  background: rgba(255, 252, 248, 0.96);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.chip-option input:checked + span,
.inline-choice input:checked + span {
  border-color: rgba(188, 124, 70, 0.28);
  background: rgba(247, 236, 224, 0.98);
  box-shadow: 0 12px 22px rgba(134, 94, 60, 0.07);
  transform: translateY(-1px);
}

.stack-choices {
  display: grid;
  gap: 8px;
}

.stack-choices .inline-choice span {
  padding: 11px 13px;
}

.stack-choices-soft {
  gap: 8px;
}

.stack-choices-soft .inline-choice span {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 15px;
  background: rgba(252, 252, 252, 0.98);
  box-shadow: none;
  font-size: 0.86rem;
  line-height: 1.35;
}

.stack-choices-soft .inline-choice span::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 1.5px solid rgba(23, 23, 23, 0.18);
  border-radius: 999px;
  background: #fff;
  box-sizing: border-box;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.stack-choices-soft .inline-choice input:checked + span {
  transform: none;
  border-color: rgba(216, 91, 43, 0.22);
  background: rgba(255, 248, 243, 0.94);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.04);
}

.stack-choices-soft .inline-choice input:checked + span::before {
  border-color: var(--accent-deep);
  background: radial-gradient(circle, var(--accent-deep) 0 45%, #fff 50% 100%);
  box-shadow: 0 0 0 4px rgba(255, 138, 91, 0.12);
  transform: scale(1.02);
}

.stack-choices-two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wizard-callout {
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 138, 91, 0.16);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 248, 243, 0.94), rgba(255, 255, 255, 0.96));
  color: var(--ink);
  font-weight: 600;
}

.feature-groups {
  display: grid;
  gap: 18px;
}

.feature-group-card {
  padding: 22px;
  border: 1px solid rgba(23, 23, 23, 0.07);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
}

.feature-group-card h3 {
  margin: 0 0 6px;
  color: var(--ink);
}

.feature-group-card p {
  margin: 0 0 16px;
}

.feature-table {
  display: grid;
  gap: 10px;
}

.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, 116px);
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid rgba(23, 23, 23, 0.06);
}

.feature-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.feature-name {
  color: var(--ink);
  font-weight: 600;
}

.priority-option {
  position: relative;
  display: block;
  cursor: pointer;
}

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

.priority-option span {
  display: block;
  padding: 12px 10px;
  border: 1px solid rgba(23, 23, 23, 0.07);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.priority-option input:checked + span {
  border-color: rgba(216, 91, 43, 0.18);
  background: rgba(255, 248, 243, 0.98);
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.05);
}

.reference-list {
  display: grid;
  gap: 14px;
}

.reference-item {
  padding: 18px;
  border: 1px solid rgba(23, 23, 23, 0.07);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
}

.reference-item-grid {
  display: grid;
  gap: 14px;
}

.reference-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(23, 23, 23, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.mini-button:hover,
.mini-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(216, 91, 43, 0.16);
  background: rgba(255, 248, 243, 0.98);
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.06);
}

.mini-button.danger:hover,
.mini-button.danger:focus-visible {
  border-color: rgba(214, 65, 65, 0.18);
  background: rgba(255, 245, 245, 0.96);
  color: #b94747;
}

.wizard-summary {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.wizard-summary-compact {
  gap: 12px;
  margin-bottom: 0;
}

.summary-card {
  padding: 20px 22px;
  border: 1px solid rgba(23, 23, 23, 0.06);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
}

.summary-card-compact {
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: none;
}

.summary-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.summary-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.96rem;
}

.summary-items {
  display: grid;
  gap: 12px;
}

.summary-card-compact .summary-items {
  gap: 8px;
}

.summary-item {
  display: grid;
  gap: 5px;
}

.summary-item strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.summary-item span {
  color: var(--muted);
  line-height: 1.55;
}

.wizard-review-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  max-width: 860px;
}

.wizard-contact-card {
  gap: 18px;
}

.wizard-contact-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.12rem;
}

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

.wizard-feedback {
  min-height: 0;
  margin-top: 4px;
  color: #ad4f4f;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
}

.wizard-feedback.is-success {
  color: #5d7c4a;
}

.wizard-recaptcha-disclosure {
  margin-top: 10px;
}

.wizard-actions,
.wizard-success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.wizard-success h2 {
  margin: 0;
  font-family: "Sora", "Be Vietnam Pro", sans-serif;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.wizard-success p {
  max-width: 62ch;
  margin-top: 16px;
}

.wizard-step[hidden],
.wizard-success[hidden] {
  display: none;
}

.field-error {
  margin-top: 2px;
  color: #b94747;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.45;
}

.has-error textarea,
.has-error input[type="text"],
.has-error input[type="email"],
.has-error select,
.has-error input[type="date"] {
  border-color: rgba(173, 79, 79, 0.32);
  box-shadow: 0 0 0 4px rgba(173, 79, 79, 0.1);
}

.has-error .choice-card span,
.has-error .chip-option span,
.has-error .inline-choice span {
  border-color: rgba(173, 79, 79, 0.28);
}

@media (max-width: 1000px) {
  .wizard-review-grid,
  .wizard-contact-grid,
  .field-grid.three-up,
  .field-grid.two-up {
    grid-template-columns: 1fr;
  }

  .wizard-main,
  .wizard-form,
  .wizard-block,
  .wizard-panel,
  .wizard-review-grid {
    max-width: none;
    width: 100%;
  }

  .field-group-span-2 {
    grid-column: auto;
  }

  .stack-choices-two-col {
    grid-template-columns: 1fr;
  }

  .wizard-panel {
    padding: 20px;
  }

  .wizard-block {
    padding: 20px;
  }

  .project-type-grid {
    grid-template-columns: 1fr 1fr;
  }

  .feature-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .wizard-page-shell {
    width: min(calc(100% - 20px), 1240px);
  }

  .wizard-page {
    padding-top: 12px;
  }

  .wizard-form,
  .wizard-success,
  .wizard-draft-card {
    padding: 22px;
  }

  .project-type-grid,
  .chip-grid,
  .chip-grid.compact {
    grid-template-columns: 1fr;
  }

  .wizard-actions .button,
  .wizard-success-actions .button {
    width: 100%;
  }

  .reference-top,
  .summary-card-head,
  .field-label-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .wizard-page-shell {
    width: min(calc(100% - 16px), 1240px);
  }

  .wizard-form,
  .wizard-success,
  .wizard-draft-card,
  .wizard-panel,
  .wizard-block {
    padding: 18px;
  }

  .choice-card span,
  .inline-choice span,
  .chip-option span {
    min-height: 52px;
    padding: 14px 16px;
  }
}
