.form-hero-single {
  grid-template-columns: 1fr;
}

.form-hero-compact {
  padding: 34px 0 28px;
}

.form-hero-single h1 {
  max-width: none;
  font-size: clamp(2rem, 4vw, 3.35rem);
  white-space: nowrap;
}

.registration-form {
  gap: 18px;
}

.phone-entry-row {
  position: relative;
  display: grid;
  grid-template-columns: clamp(112px, 32%, 170px) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.phone-entry-row:not(.is-enhanced) {
  grid-template-columns: clamp(112px, 32%, 170px) minmax(0, 1fr);
}

.phone-country-native,
.phone-country-trigger,
.phone-number-input {
  min-width: 0;
  min-height: 58px;
  border: 1px solid rgba(15, 81, 50, 0.18);
  border-radius: var(--radius);
  background: #fbfffb;
  color: var(--ink);
  font: inherit;
}

.phone-country-native {
  padding: 10px 8px;
}

.phone-country-picker.is-enhanced .phone-country-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.phone-country-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.phone-country-trigger {
  justify-content: space-between;
}

.phone-country-trigger:hover {
  border-color: var(--green-600);
  background: var(--white);
}

.phone-country-trigger:focus-visible,
.phone-country-option:focus-visible {
  outline: 3px solid rgba(44, 163, 92, 0.3);
  outline-offset: 2px;
}

.phone-country-trigger svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.phone-country-flag,
.phone-country-option-flag {
  display: block;
  width: 24px;
  height: 16px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(15, 81, 50, 0.12);
}

.phone-country-code {
  font-size: 0.94rem;
  font-weight: 800;
  white-space: nowrap;
}

.phone-number-input {
  width: 100%;
  padding: 13px 15px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.phone-number-input:focus,
.phone-country-search-input:focus {
  border-color: var(--green-600);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(44, 163, 92, 0.12);
}

.phone-country-panel {
  position: absolute;
  z-index: 50;
  top: auto;
  bottom: calc(100% + 8px);
  left: 0;
  display: grid;
  gap: 8px;
  width: min(390px, calc(100vw - 48px));
  max-height: min(440px, 70vh);
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(15, 81, 50, 0.18);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 18px 44px rgba(0, 38, 35, 0.2);
}

.phone-country-panel[hidden],
.phone-country-trigger[hidden] {
  display: none !important;
}

.phone-country-search-label {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
}

.phone-country-search-input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 81, 50, 0.2);
  border-radius: calc(var(--radius) * 0.7);
  background: #fbfffb;
  color: var(--ink);
  font: inherit;
  outline: none;
}

.phone-country-results {
  display: grid;
  grid-auto-rows: 46px;
  gap: 2px;
  min-height: 0;
  max-height: 238px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.phone-country-option {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.phone-country-option:hover,
.phone-country-option[aria-selected="true"] {
  background: rgba(44, 163, 92, 0.1);
}

.phone-country-option-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-country-option-code {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.phone-country-search-status {
  min-height: 1.2em;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.alert,
.registration-form,
.form-progress,
.form-step-panels {
  min-width: 0;
  max-width: 100%;
}

.alert {
  overflow-wrap: anywhere;
}

.form-progress {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  padding: 22px 28px 20px;
}

.form-progress-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.form-progress-heading strong {
  color: var(--green-700);
  white-space: nowrap;
}

.form-progress-list {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.form-progress-line {
  position: absolute;
  top: 21px;
  left: 9%;
  right: 9%;
  height: 2px;
  border-top: 2px dashed rgba(15, 81, 50, 0.24);
  pointer-events: none;
}

.form-progress-line::after {
  content: "";
  display: block;
  width: var(--progress-width, 0%);
  border-top: 2px solid var(--green-600);
  transition: width 220ms ease;
}

.form-progress-list li {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.form-progress-list button {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.form-progress-list button:disabled {
  cursor: default;
}

.form-progress-marker {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: #eaf2ec;
  color: var(--muted);
  box-shadow: 0 0 0 1px rgba(15, 81, 50, 0.16);
  font-size: 0.78rem;
  font-weight: 900;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.form-progress-label {
  display: block;
  max-width: 130px;
  color: inherit;
  font-size: 0.74rem;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
}

.form-progress-list li.is-active .form-progress-marker {
  background: var(--lime);
  color: var(--green-900);
  box-shadow: 0 0 0 5px rgba(200, 230, 40, 0.18);
  transform: translateY(-1px);
}

.form-progress-list li.is-complete .form-progress-marker {
  background: var(--green-600);
  color: var(--white);
  box-shadow: 0 0 0 1px rgba(44, 163, 92, 0.32);
}

.form-progress-list li.is-active .form-progress-label,
.form-progress-list li.is-complete .form-progress-label {
  color: var(--green-900);
  font-weight: 900;
}

.form-progress-list button:hover:not(:disabled) .form-progress-marker {
  transform: translateY(-2px);
}

.form-step-panels {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.form-card.has-open-country-picker,
.form-step-panels.has-open-country-picker {
  overflow: visible;
}

.form-step-panels > .form-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.form-step-panels [data-form-step][hidden],
.form-step-navigation[hidden],
.submit-panel[hidden] {
  display: none;
}

.form-step-navigation {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-top: 1px solid var(--line);
  background: #fbfdfb;
  padding: 18px 30px;
}

.form-step-navigation .btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
}

.form-step-navigation [data-step-next] {
  margin-left: auto;
}

.form-step-navigation .btn[hidden] {
  display: none;
}

.step-arrow {
  display: inline-grid;
  width: 1.2em;
  place-items: center;
  font-size: 1.2em;
  line-height: 1;
}

@media (max-width: 760px) {
  .form-shell {
    width: calc(100% - 28px);
    max-width: 100%;
  }

  .form-hero-compact {
    padding: 26px 0 22px;
  }

  .form-hero-single h1 {
    font-size: clamp(2rem, 9vw, 2.8rem);
    white-space: normal;
  }

  .form-progress {
    padding: 18px 14px 16px;
  }

  .form-progress-heading {
    margin-bottom: 15px;
  }

  .form-progress-line {
    top: 18px;
    left: 8%;
    right: 8%;
  }

  .form-progress-marker {
    width: 38px;
    height: 38px;
    font-size: 0.7rem;
  }

  .form-progress-label {
    max-width: 72px;
    font-size: 0.64rem;
  }

  .form-step-navigation {
    align-items: stretch;
    gap: 10px;
    padding: 14px 16px;
  }

  .form-step-navigation .btn {
    width: 100%;
    min-width: 0;
  }

  .phone-entry-row {
    grid-template-columns: clamp(112px, 32%, 170px) minmax(0, 1fr);
    gap: 6px;
  }

  .phone-country-trigger {
    padding: 8px;
  }

  .phone-country-code {
    font-size: 0.88rem;
  }
}

@media (max-width: 460px) {
  .form-progress-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .form-progress-heading strong {
    font-size: 0.72rem;
  }

  .form-progress-list {
    gap: 2px;
  }

  .form-progress-label {
    max-width: 60px;
    font-size: 0.6rem;
  }
}
