.scbam-wizard {
  --scbam-accent: var(--e-global-color-primary, #1e3a8a);
  --scbam-accent-contrast: #ffffff;
  --scbam-lime: #C2F32C;
  --scbam-lime-ink: #1a2e05;
  --scbam-text: var(--e-global-color-text, #1f2937);
  --scbam-muted: color-mix(in srgb, var(--scbam-text) 60%, transparent);
  --scbam-border: color-mix(in srgb, var(--scbam-text) 22%, transparent);
  --scbam-surface: var(--e-global-color-ffffff, #ffffff);
  --scbam-radius: 10px;
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  color: var(--scbam-text);
  font-family: var(--e-global-typography-text-font-family, inherit);
  font-size: 1rem;
  line-height: 1.5;
  border: 0;
  padding: 0;
}
.scbam-wizard [hidden] { display: none !important; }

/* Progress stepper */
.scbam-stepper {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem;
}
.scbam-stepper-item {
  position: relative;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  text-align: center;
  min-width: 0;
}
/* Connector line from the previous node to this one. */
.scbam-stepper-item::before {
  content: "";
  position: absolute;
  top: 19px;
  right: 50%;
  left: -50%;
  height: 3px;
  background: var(--scbam-border);
  z-index: 0;
  transition: background 0.25s ease;
}
.scbam-stepper-item:first-child::before { display: none; }
.scbam-stepper-item.is-active::before,
.scbam-stepper-item.is-complete::before { background: var(--scbam-lime); }
.scbam-stepper-dot {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--scbam-surface);
  border: 2px solid var(--scbam-border);
  color: var(--scbam-muted);
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.scbam-stepper-dot svg { width: 19px; height: 19px; }
.scbam-stepper-item.is-active .scbam-stepper-dot {
  border-color: var(--scbam-lime);
  color: var(--scbam-text);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--scbam-lime) 32%, transparent);
}
.scbam-stepper-item.is-complete .scbam-stepper-dot {
  background: var(--scbam-lime);
  border-color: var(--scbam-lime);
  color: var(--scbam-lime-ink);
}
.scbam-stepper-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--scbam-muted);
  transition: color 0.25s ease;
}
.scbam-stepper-item.is-active .scbam-stepper-label,
.scbam-stepper-item.is-complete .scbam-stepper-label { color: var(--scbam-text); }
.scbam-title {
  margin: 0 0 1.25rem;
  font-family: var(--e-global-typography-primary-font-family, inherit);
  font-size: 1.35rem;
  font-weight: 700;
}
.scbam-title:focus {
  outline: 2px solid var(--scbam-accent);
  outline-offset: 4px;
  border-radius: 4px;
}
.scbam-required-note {
  margin: -0.8rem 0 1rem;
  color: var(--scbam-muted);
  font-size: 0.82rem;
}

/* Fields */
.scbam-field { display: block; margin-bottom: 1rem; }
.scbam-field > span,
.scbam-field-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: var(--scbam-text);
}
.scbam-field input,
.scbam-field textarea,
.scbam-combo-input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--scbam-border);
  border-radius: var(--scbam-radius);
  background: var(--scbam-surface);
  color: inherit;
  font: inherit;
  line-height: 1.4;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.scbam-field input::placeholder,
.scbam-combo-input::placeholder { color: var(--scbam-muted); }
.scbam-wizard .scbam-field input:focus,
.scbam-wizard .scbam-field textarea:focus,
.scbam-wizard .scbam-combo-input:focus {
  border: 2px solid #52661a !important;
  outline: 3px solid rgba(194, 243, 44, 0.55) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 1px #52661a, 0 0 0 5px rgba(194, 243, 44, 0.2) !important;
}
.scbam-field input[aria-invalid="true"],
.scbam-field textarea[aria-invalid="true"],
.scbam-combo-input[aria-invalid="true"] {
  border: 1px solid #b91c1c !important;
  outline: 3px solid color-mix(in srgb, #b91c1c 18%, transparent) !important;
  outline-offset: 2px !important;
  box-shadow: inset 0 0 0 1px #b91c1c !important;
}
.scbam-field input:disabled,
.scbam-combo-input:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  background: color-mix(in srgb, var(--scbam-text) 5%, var(--scbam-surface));
}
.scbam-field textarea { resize: vertical; min-height: 3.2rem; }
.scbam-hint {
  display: block;
  margin-top: 0.35rem;
  color: var(--scbam-muted);
  font-size: 0.8rem;
  line-height: 1.4;
}
.scbam-field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

/* Searchable combobox */
.scbam-combo { position: relative; }
.scbam-combo-input { background-image: none; }
.scbam-combo-list {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 0.25rem;
  list-style: none;
  max-height: 240px;
  overflow-y: auto;
  background: var(--scbam-surface);
  border: 1px solid var(--scbam-border);
  border-radius: var(--scbam-radius);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--scbam-text) 18%, transparent);
}
.scbam-combo-option {
  padding: 0.5rem 0.65rem;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.92rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.scbam-combo-option:hover,
.scbam-combo-option.is-active {
  background: color-mix(in srgb, var(--scbam-accent) 12%, transparent);
}
.scbam-combo-empty {
  padding: 0.5rem 0.65rem;
  color: var(--scbam-muted);
  font-size: 0.9rem;
}

.scbam-consent input {
  width: 19px;
  height: 19px;
  min-width: 19px;
  margin: 0;
  accent-color: var(--scbam-accent);
}
/* Consent */
.scbam-consent {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.9rem;
  margin: 0.75rem 0 1rem;
}
.scbam-consent input { margin-top: 0.12rem; flex: 0 0 auto; }
.scbam-consent input[aria-invalid="true"] {
  outline: 3px solid color-mix(in srgb, #b91c1c 22%, transparent);
  outline-offset: 2px;
}
.scbam-consent a {
  color: var(--scbam-text);
  text-decoration: underline;
  font-weight: 600;
}
.scbam-newsletter {
  padding: 0.7rem 0.8rem;
  border-radius: var(--scbam-radius);
  background: color-mix(in srgb, var(--scbam-lime) 13%, transparent);
}

/* Actions / buttons */
.scbam-actions { display: flex; justify-content: space-between; gap: 0.6rem; margin-top: 1.25rem; }
.scbam-next, .scbam-submit, .scbam-back {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.75rem 1.6rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease, background 0.15s ease;
  min-height: 46px;
}
.scbam-wizard .scbam-next,
.scbam-wizard .scbam-submit {
  background: var(--scbam-lime) !important;
  color: #111111 !important;
  border: 2px solid var(--scbam-lime) !important;
  margin-left: auto;
}
.scbam-next:hover, .scbam-submit:hover { filter: brightness(1.08); }
.scbam-next:focus-visible, .scbam-submit:focus-visible, .scbam-back:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--scbam-accent) 42%, transparent);
  outline-offset: 3px;
}
.scbam-wizard .scbam-back,
.scbam-wizard .scbam-back:hover,
.scbam-wizard .scbam-back:focus,
.scbam-wizard .scbam-back:active {
  background: #ffffff !important;
  background-image: none !important;
  color: #52661a !important;
  border: 2px solid #52661a !important;
  padding: calc(0.75rem - 1px) calc(1.6rem - 1px);
  box-shadow: none !important;
  filter: none !important;
}
.scbam-wizard .scbam-back:hover { background: rgba(194, 243, 44, 0.12) !important; }
.scbam-next[disabled], .scbam-submit[disabled], .scbam-back[disabled] { opacity: 0.6; cursor: default; }

/* Feedback */
.scbam-error {
  color: #b91c1c;
  font-size: 0.9rem;
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.75rem;
  border-left: 3px solid #b91c1c;
  border-radius: 6px;
  background: color-mix(in srgb, #b91c1c 7%, transparent);
}
.scbam-error:focus { outline: 2px solid #b91c1c; outline-offset: 2px; }

/* Result */
.scbam-result { padding: 0.35rem 0 0; }
.scbam-result-card {
  padding: 1.5rem;
  border: 1px solid var(--scbam-border);
  border-radius: calc(var(--scbam-radius) + 4px);
  background: linear-gradient(145deg, color-mix(in srgb, var(--scbam-lime) 8%, var(--scbam-surface)), var(--scbam-surface) 58%);
  box-shadow: 0 14px 34px color-mix(in srgb, var(--scbam-text) 9%, transparent);
}
.scbam-step-3:focus { outline: none; }
.scbam-step-3 .scbam-result-card,
.scbam-step-3 .scbam-result-card * { color: #111111 !important; }
.scbam-result-status { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-bottom: 0.8rem; color: var(--scbam-muted); font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.scbam-result-icon { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; border-radius: 999px; background: var(--scbam-lime); color: var(--scbam-lime-ink); font-size: 0.82rem; font-weight: 800; }
.scbam-cost { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--scbam-border); color: var(--scbam-text); }
.scbam-cost-label { color: var(--scbam-muted); font-size: 0.9rem; font-weight: 600; }
.scbam-cost-value { font-size: clamp(1.9rem, 7vw, 2.55rem); line-height: 1.15; letter-spacing: -0.035em; }
.scbam-meta { list-style: none; padding: 1rem 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; text-align: left; }
.scbam-meta li { display: flex; flex-direction: column; gap: 0.12rem; min-width: 0; margin: 0; padding: 0.7rem 0.75rem; border-radius: 8px; background: color-mix(in srgb, var(--scbam-text) 4%, transparent); color: var(--scbam-muted); font-size: 0.78rem; }
.scbam-meta li b { color: var(--scbam-text); }
.scbam-disclaimer { margin: 0; padding: 0.8rem 0.9rem; border-left: 3px solid var(--scbam-lime); border-radius: 7px; background: color-mix(in srgb, var(--scbam-lime) 9%, transparent); font-size: 0.78rem; line-height: 1.5; color: var(--scbam-muted); }
.scbam-result-card-fallback { display: flex; align-items: center; justify-content: center; gap: 0.75rem; text-align: left; }
.scbam-fallback { margin: 0; font-size: 1rem; font-weight: 600; }

/* Calendly consultation call to action */
.scbam-consultation {
  margin-top: 0.75rem;
  padding: 0;
  background: transparent;
}
.scbam-consultation-button { display: flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; min-height: 46px; margin: 0; padding: 0.7rem 1rem; box-sizing: border-box; border: 2px solid var(--scbam-lime); border-radius: 999px; background: var(--scbam-lime); color: #111111; font-weight: 700; text-align: center; text-decoration: none; transition: filter 0.15s ease, transform 0.15s ease; }
.scbam-consultation-button:hover { color: var(--scbam-lime-ink); filter: brightness(1.04); transform: translateY(-1px); }
.scbam-consultation-button:focus-visible { outline: 3px solid color-mix(in srgb, var(--scbam-accent-contrast) 60%, transparent); outline-offset: 3px; }
.scbam-consultation-button svg { width: 18px; height: 18px; }

/* Loading overlay + centered spinner */
.scbam-wizard.is-loading { cursor: progress; }
.scbam-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--scbam-surface) 78%, transparent);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  border-radius: var(--scbam-radius);
}
/* The class rule above would otherwise defeat the [hidden] attribute
   (author display:flex beats the UA [hidden]{display:none}). */
.scbam-overlay[hidden] { display: none; }
.scbam-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}
.scbam-spinner-ring {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 4px solid color-mix(in srgb, var(--scbam-text) 14%, transparent);
  border-top-color: var(--scbam-lime);
  animation: scbam-spin 0.7s linear infinite;
}
.scbam-spinner-text {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--scbam-text);
}
@keyframes scbam-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .scbam-spinner-ring { animation-duration: 2.4s; }
  .scbam-wizard { scroll-behavior: auto; }
}

@media (max-width: 520px) {
  .scbam-wizard { font-size: 16px; }
  .scbam-stepper { margin-bottom: 1.25rem; }
  .scbam-stepper-dot { width: 36px; height: 36px; }
  .scbam-stepper-item::before { top: 17px; }
  .scbam-stepper-label { font-size: 0.72rem; }
  .scbam-title { font-size: 1.2rem; }
  .scbam-field-row { grid-template-columns: 1fr; gap: 0; }
  .scbam-field input,
  .scbam-field textarea,
  .scbam-combo-input { min-height: 48px; font-size: 16px; }
  .scbam-actions { flex-wrap: wrap; }
  .scbam-next, .scbam-submit, .scbam-back { flex: 1 1 100%; width: 100%; }
  .scbam-submit { order: 1; }
  .scbam-back { order: 2; }
  .scbam-result-card { padding: 1.15rem; }
  .scbam-meta { grid-template-columns: 1fr; gap: 0.5rem; }
}
