.account-dialog [hidden] {
  display: none !important;
}

.fact b {
  white-space: pre-line;
}

.account-dialog {
  width: min(560px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  border: 0;
  border-radius: 26px;
  padding: 34px;
  color: var(--navy);
  box-shadow: 0 35px 100px #0615304d;
}

.account-dialog::backdrop {
  background: #06153099;
  backdrop-filter: blur(5px);
}

.dialog-close {
  position: absolute;
  right: 18px;
  top: 14px;
  border: 0;
  background: transparent;
  font-size: 34px;
  color: var(--muted);
  cursor: pointer;
}

.dialog-kicker {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
}

.account-dialog h2 {
  margin: 0 36px 22px 0;
  font-size: 30px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 20px;
  padding: 4px;
  border-radius: 14px;
  background: #edf2f8;
}

.auth-help {
  margin: -8px 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.auth-tabs button {
  border: 0;
  border-radius: 11px;
  padding: 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.auth-tabs button.active {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 3px 10px #0b1c3d12;
}

.account-form {
  display: grid;
  gap: 14px;
}

.personal-contact-fields {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.personal-contact-fields legend {
  padding: 0 7px;
  color: var(--navy);
  font-weight: 900;
}

.personal-contact-fields legend small,
.profile-contact-form h3 small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.personal-contact-fields label {
  display: grid;
  gap: 7px;
  color: #475569;
  font-size: 14px;
  font-weight: 800;
}

.consent-check {
  display: flex !important;
  grid-template-columns: 20px 1fr;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 9px !important;
  color: var(--muted) !important;
  font-size: 12px !important;
  line-height: 1.5;
  font-weight: 600 !important;
}

.consent-check input {
  width: 17px !important;
  height: 17px;
  margin: 1px 0 0;
  accent-color: var(--blue);
}

.profile-contact-form {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.profile-contact-form h3 {
  margin: 0;
}

.account-form > label,
.captcha-row label {
  display: grid;
  gap: 7px;
  color: #475569;
  font-size: 14px;
  font-weight: 800;
}

.account-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  outline: none;
  color: var(--navy);
  font: inherit;
}

.account-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px #1557e815;
}

.account-form input[aria-invalid="true"] {
  border-color: #c2410c;
  box-shadow: 0 0 0 3px #c2410c14;
}

.password-wrap {
  position: relative;
  display: block;
}

.password-wrap input {
  padding-right: 62px;
}

.password-wrap button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  padding: 6px 8px;
  background: #eef4ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.account-form small {
  color: var(--muted);
  font-weight: 500;
}

.account-type {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.account-type input {
  position: absolute;
  opacity: 0;
}

.account-type span {
  display: block;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.account-type input:checked + span {
  border-color: var(--blue);
  background: #eef4ff;
  color: var(--blue);
}

.captcha-row {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 10px;
  align-items: end;
}

.captcha-question {
  height: 47px;
  border: 1px dashed var(--blue);
  border-radius: 12px;
  background: #eef4ff;
  color: var(--blue);
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
}

.account-submit {
  margin-top: 2px;
  padding: 15px;
}

.text-button {
  border: 0;
  padding: 7px;
  background: transparent;
  color: var(--blue);
  font-weight: 800;
  cursor: pointer;
}

.privacy-note {
  margin: 0;
  padding: 11px 13px;
  border-radius: 10px;
  background: #f5f8fc;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.dialog-message {
  min-height: 20px;
  margin: 14px 0 0;
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
}

.dialog-message.error {
  color: #c2410c;
}

.account-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.account-stats div {
  padding: 18px;
  border-radius: 16px;
  background: var(--bg);
}

.account-stats small {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
}

.account-stats strong {
  font-size: 22px;
}

.verification-status {
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff6ed;
  color: #9a4b13;
}

.verification-status.verified {
  background: #eaf8f2;
  color: var(--green);
}

.full-button {
  width: 100%;
  margin-bottom: 12px;
}

.plan-list {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}

.plan-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}

.plan-card.current {
  border-color: var(--blue);
  background: #f5f8ff;
}

.plan-card b {
  display: block;
  margin-bottom: 4px;
}

.plan-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.plan-card em {
  display: inline-block;
  margin-top: 7px;
  color: var(--blue);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.danger {
  color: #b42318;
}

.primary:disabled,
.account-submit:disabled {
  opacity: .6;
  cursor: wait;
}

@media (max-width: 560px) {
  .account-dialog {
    padding: 26px 18px;
  }

  .account-dialog h2 {
    font-size: 25px;
  }

  .captcha-row {
    grid-template-columns: 1fr 125px;
  }

  .account-stats {
    grid-template-columns: 1fr;
  }
}
