.register-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100%;
  padding: 44px 120px;
}

.register-sign-in {
  position: absolute;
  top: 42px;
  right: 65px;
  font-size: 14px;
  line-height: 20px;
  text-decoration: underline;
  text-decoration-skip-ink: none;
  text-underline-position: from-font;
  white-space: nowrap;
}

.register-panel__content,
.register-form,
.register-heading {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.register-panel__content {
  gap: 16px;
  max-width: 490px;
}

/* Matches the desktop validation artboard: two invalid fields add one 20px
   error row each, while the form remains anchored at the designed y-position. */
.register-page--validation .register-panel {
  align-items: flex-start;
  padding-top: 194px;
}

.register-heading {
  gap: 10px;
}

.register-heading h1 {
  margin: 0;
  color: var(--frame-border);
  font-family: var(--font-serif);
  font-size: 60px;
  font-weight: 200;
  line-height: 66px;
  letter-spacing: -1.2px;
}

.register-heading p,
.register-legal {
  margin: 0;
  color: var(--text-secondary);
}

.register-heading p {
  font-size: 16px;
  line-height: 24px;
}

.register-form {
  gap: 16px;
}

.register-form__row {
  display: flex;
  gap: 16px;
  width: 100%;
}

.register-form__row > .form-field {
  flex: 1 1 0;
  min-width: 0;
}

.register-form .input-field__error {
  color: #4d231e;
  font-size: 14px;
  line-height: 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.form-field label {
  color: var(--frame-border);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.form-field select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  outline: none;
  padding: 9px 12px;
  background: #fff;
  color: var(--frame-border);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 20px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form-field select {
  appearance: none;
  padding-right: 32px;
  background-image: linear-gradient(45deg, transparent 50%, #50564d 50%), linear-gradient(135deg, #50564d 50%, transparent 50%);
  background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

.form-field select:has(option:checked[value=""]) {
  color: var(--text-secondary);
  opacity: 1;
}

.form-field select:focus {
  border-color: var(--control-primary);
  box-shadow: 0 0 0 3px rgb(107 114 104 / 14%);
}

.form-field select[aria-invalid="true"] {
  border-color: var(--border-destructive);
  box-shadow: 0 1px 2px rgb(16 24 40 / 5%);
}

.form-field__error {
  margin: 0;
  color: #4d231e;
  font-size: 14px;
  line-height: 20px;
}

.conditional-field[hidden] {
  display: none;
}

.register-legal {
  font-size: 12px;
  line-height: 16px;
}

.register-legal a {
  color: inherit;
}

.form-alert {
  border: 1px solid #dfb7b2;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff7f6;
  color: #7d2d26;
  font-size: 13px;
  line-height: 18px;
}

@media (max-width: 1200px) {
  .register-panel {
    padding-right: clamp(40px, 8vw, 120px);
    padding-left: clamp(40px, 8vw, 120px);
  }

  .register-sign-in {
    right: 40px;
  }
}

@media (max-width: 900px) {
  .register-panel {
    min-height: 100vh;
    padding: 104px 24px 48px;
  }

  .register-sign-in {
    top: 28px;
    right: 24px;
  }

  .register-page--validation .register-panel {
    align-items: center;
    padding-top: 104px;
  }
}

@media (max-width: 520px) {
  .register-heading h1 {
    font-size: 48px;
    line-height: 54px;
    letter-spacing: -0.96px;
  }

  .register-form__row {
    flex-direction: column;
  }

  .register-sign-in {
    right: 50%;
    transform: translateX(50%);
  }
}
