.association-wizard-page {
  --wizard-brand: var(--brand, #135d66);
  --wizard-accent: var(--accent, #e6a23c);
  --wizard-ink: var(--ink, #172326);
  --wizard-muted: var(--muted, #667579);
  --wizard-line: color-mix(in srgb, var(--wizard-brand) 16%, transparent);
  --wizard-soft: color-mix(in srgb, var(--wizard-brand) 7%, white);
  --wizard-panel: #ffffff;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 76px;
  color: var(--wizard-ink);
}

.association-wizard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: stretch;
  gap: 24px;
  margin-bottom: 24px;
}

.association-wizard-hero__copy,
.association-wizard-hero__panel,
.association-wizard-shell,
.association-wizard-success,
.association-wizard-review {
  border: 1px solid var(--wizard-line);
  border-radius: 8px;
  background: var(--wizard-panel);
  box-shadow: 0 22px 55px -38px rgba(15, 35, 40, 0.44);
}

.association-wizard-hero__copy {
  padding: 32px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--wizard-brand) 10%, white), #fff 64%),
    #fff;
}

.association-wizard-hero__copy h1 {
  max-width: 760px;
  margin: 0;
  font-size: 3rem;
  line-height: 1.04;
  letter-spacing: 0;
}

.association-wizard-hero__copy p:not(.eyebrow) {
  max-width: 680px;
  margin: 16px 0 0;
  color: var(--wizard-muted);
  font-size: 1.06rem;
  line-height: 1.72;
}

.association-wizard-hero__panel {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  padding: 22px;
  background:
    linear-gradient(150deg, color-mix(in srgb, var(--wizard-brand) 86%, #111), var(--wizard-brand)),
    var(--wizard-brand);
  color: #fff;
  isolation: isolate;
}

.association-wizard-hero__panel::before {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.association-wizard-hero__panel::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  animation: wizardFlow 2.8s ease-in-out infinite;
}

.wizard-signal {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--wizard-accent);
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--wizard-accent) 22%, transparent);
  animation: wizardPulse 2.4s ease-in-out infinite;
}

.wizard-signal--one {
  left: 36px;
  top: calc(50% - 4px);
}

.wizard-signal--two {
  left: calc(50% - 5px);
  top: calc(50% - 4px);
  animation-delay: 0.45s;
}

.wizard-signal--three {
  right: 36px;
  top: calc(50% - 4px);
  animation-delay: 0.9s;
}

.wizard-flow-card {
  position: absolute;
  left: 32px;
  top: 34px;
  z-index: 1;
  display: grid;
  gap: 2px;
  min-width: 132px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.wizard-flow-card--accent {
  left: auto;
  right: 32px;
  top: auto;
  bottom: 34px;
}

.wizard-flow-card span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
}

.wizard-flow-card strong {
  font-size: 1.02rem;
}

.association-wizard-root {
  min-height: 520px;
}

.association-wizard-loading {
  display: grid;
  place-items: center;
  min-height: 300px;
  border: 1px solid var(--wizard-line);
  border-radius: 8px;
  background: #fff;
  color: var(--wizard-muted);
  font-weight: 750;
}

.association-wizard-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  overflow: hidden;
}

.association-wizard-sidebar {
  padding: 24px;
  background:
    linear-gradient(180deg, var(--wizard-soft), #fff),
    #fff;
  border-right: 1px solid var(--wizard-line);
}

.association-wizard-sidebar h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.association-wizard-sidebar p {
  margin: 10px 0 0;
  color: var(--wizard-muted);
  font-size: 0.94rem;
}

.wizard-step-list {
  display: grid;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.wizard-step-button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  min-height: 50px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--wizard-muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.wizard-step-button:hover,
.wizard-step-button.is-active {
  border-color: var(--wizard-line);
  background: #fff;
  color: var(--wizard-ink);
}

.wizard-step-button.is-complete .wizard-step-index {
  background: var(--wizard-brand);
  color: #fff;
}

.wizard-step-index {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--wizard-brand) 10%, white);
  color: var(--wizard-brand);
  font-size: 0.9rem;
  font-weight: 850;
}

.wizard-step-label {
  align-self: center;
  overflow-wrap: anywhere;
  font-size: 0.94rem;
  font-weight: 800;
}

.association-wizard-main {
  display: grid;
  gap: 24px;
  padding: 28px;
}

.wizard-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 8px;
  background: color-mix(in srgb, var(--wizard-brand) 10%, white);
}

.wizard-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--wizard-brand), var(--wizard-accent));
  transition: width 260ms ease;
}

.wizard-step-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.wizard-step-header h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.18;
  letter-spacing: 0;
}

.wizard-step-header p {
  margin: 8px 0 0;
  color: var(--wizard-muted);
}

.wizard-step-counter {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--wizard-accent) 18%, white);
  color: color-mix(in srgb, var(--wizard-brand) 72%, black);
  font-weight: 850;
}

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

.wizard-field {
  display: grid;
  gap: 7px;
}

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

.wizard-field label,
.wizard-choice-label {
  color: var(--wizard-ink);
  font-size: 0.94rem;
  font-weight: 800;
}

.wizard-field input,
.wizard-field select,
.wizard-field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--wizard-line);
  border-radius: 8px;
  background: #fff;
  color: var(--wizard-ink);
  font: inherit;
}

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

.wizard-field input:focus,
.wizard-field select:focus,
.wizard-field textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--wizard-accent) 70%, transparent);
  outline-offset: 2px;
}

.wizard-field.has-error input,
.wizard-field.has-error select,
.wizard-field.has-error textarea {
  border-color: #c0372d;
}

.wizard-error {
  color: #a2271f;
  font-size: 0.86rem;
  font-weight: 750;
}

.wizard-field-status {
  color: var(--wizard-muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.wizard-field-status--success {
  color: color-mix(in srgb, var(--wizard-brand) 72%, #155724);
}

.wizard-field-status--error {
  color: #a2271f;
}

.wizard-field-status--warning {
  color: #7a4c00;
}

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

.wizard-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--wizard-line);
  border-radius: 8px;
  background: #fff;
  font-weight: 750;
  cursor: pointer;
}

.wizard-choice input {
  width: 18px;
  height: 18px;
  accent-color: var(--wizard-brand);
}

.wizard-choice:has(input:checked) {
  border-color: color-mix(in srgb, var(--wizard-brand) 58%, transparent);
  background: color-mix(in srgb, var(--wizard-brand) 7%, white);
}

.payment-required-fields {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--wizard-line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--wizard-brand) 4%, white);
}

.payment-required-fields--empty {
  color: var(--wizard-muted);
  font-size: 0.94rem;
  font-weight: 750;
}

.wizard-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--wizard-line);
  border-radius: 8px;
  background: #fff;
  font-weight: 750;
}

.wizard-consent input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--wizard-brand);
}

.association-wizard-review {
  display: grid;
  grid-column: 1 / -1;
  gap: 18px;
  padding: 20px;
  background: color-mix(in srgb, var(--wizard-brand) 5%, white);
}

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

.wizard-review-item {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--wizard-line);
  border-radius: 8px;
  background: #fff;
}

.wizard-review-item span {
  color: var(--wizard-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.wizard-review-item strong {
  overflow-wrap: anywhere;
}

.wizard-server-alert {
  padding: 14px 16px;
  border: 1px solid #d79d2c;
  border-radius: 8px;
  background: #fff7e5;
  color: #6e4700;
  font-weight: 750;
}

.wizard-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--wizard-line);
  padding-top: 20px;
}

.wizard-actions__group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.wizard-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.wizard-button:hover {
  transform: translateY(-1px);
}

.wizard-button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.wizard-button--primary {
  background: var(--wizard-accent);
  color: color-mix(in srgb, var(--wizard-brand) 82%, black);
  box-shadow: 0 14px 28px -18px color-mix(in srgb, var(--wizard-accent) 90%, black);
}

.wizard-button--secondary {
  border-color: var(--wizard-line);
  background: #fff;
  color: var(--wizard-brand);
}

.wizard-button--text {
  background: transparent;
  color: var(--wizard-brand);
}

.association-wizard-success {
  display: grid;
  gap: 20px;
  padding: 32px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--wizard-brand) 9%, white), #fff 72%),
    #fff;
}

.association-wizard-success h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.wizard-protocol {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--wizard-line);
  border-radius: 8px;
  background: #fff;
  color: var(--wizard-brand);
  font-size: 1.25rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.wizard-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.wizard-status-item {
  min-height: 98px;
  padding: 14px;
  border: 1px solid var(--wizard-line);
  border-radius: 8px;
  background: #fff;
}

.wizard-status-item span {
  display: block;
  color: var(--wizard-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.wizard-status-item strong {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
}

.wizard-status-item small {
  display: block;
  margin-top: 6px;
  color: var(--wizard-muted);
  line-height: 1.45;
}

@keyframes wizardFlow {
  0% {
    transform: translateX(-18%);
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateX(18%);
    opacity: 0.35;
  }
}

@keyframes wizardPulse {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.66;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@media (max-width: 980px) {
  .association-wizard-page {
    width: min(100% - 28px, 760px);
    padding-top: 28px;
  }

  .association-wizard-hero,
  .association-wizard-shell {
    grid-template-columns: 1fr;
  }

  .association-wizard-hero__panel {
    min-height: 180px;
  }

  .association-wizard-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--wizard-line);
  }

  .wizard-step-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
  }

  .wizard-step-button {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 74px;
    text-align: center;
  }
}

@media (max-width: 720px) {
  .association-wizard-page {
    width: min(100% - 20px, 620px);
  }

  .association-wizard-hero__copy,
  .association-wizard-main,
  .association-wizard-success {
    padding: 20px;
  }

  .association-wizard-hero__copy h1 {
    font-size: 2.2rem;
  }

  .wizard-step-list,
  .wizard-fields,
  .wizard-choice-grid,
  .wizard-review-grid,
  .wizard-status-grid {
    grid-template-columns: 1fr;
  }

  .wizard-step-list {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .wizard-step-list li {
    flex: 0 0 128px;
  }

  .wizard-step-header {
    flex-direction: column;
  }

  .wizard-actions {
    align-items: stretch;
  }

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

@media (prefers-reduced-motion: reduce) {
  .association-wizard-hero__panel::after,
  .wizard-signal {
    animation: none;
  }

  .wizard-button,
  .wizard-progress span {
    transition-duration: 0.001ms;
  }
}
