/* The decorative rings belong to the window, independent of the moving product stage. */
body.client-auth-enhanced:not([data-order-link="true"]):not([data-portal-authenticated="true"]) {
  isolation: isolate;
  --portal-access-type: clamp(.875rem, 1.1vw, 1rem);
}
body.client-auth-enhanced:not(.client-auth-mobile):not([data-order-link="true"]):not([data-portal-authenticated="true"])::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-radial-gradient(ellipse 66% 58% at 29% 52%, transparent 0 35px, rgba(165, 202, 151, .15) 36px, transparent 37px 44px);
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 29% 52%, #000 15%, rgba(0, 0, 0, .78) 47%, transparent 87%);
  mask-image: radial-gradient(ellipse 80% 90% at 29% 52%, #000 15%, rgba(0, 0, 0, .78) 47%, transparent 87%);
}
body.client-auth-enhanced:not(.client-auth-mobile) .portal-entry[data-nuevita-access-hero="portal"] .welcome-desktop-cluster {
  left: 43%;
}
body.client-auth-enhanced:not(.client-auth-mobile) [data-nuevita-access-hero="portal"] .welcome-desktop-orbit text {
  font-family: Inter, system-ui, sans-serif;
  font-weight: 500;
  font-size: calc(var(--portal-access-type) * var(--orbit-text-multiplier, 1.6));
}
body.client-auth-enhanced:not(.client-auth-mobile) [data-nuevita-access-hero="portal"] #access :is(
  .client-auth-qr-label, #client-auth-qr-status, .client-auth-qr-loading .nuevita-loading-label,
  #client-auth-first-time, #client-auth-passkey, #open-access, #client-auth-recovery,
  .portal-help, #client-auth-compatibility :where(summary, p, a)
) {
  font: 500 var(--portal-access-type)/1.35 Syne, Inter, system-ui, sans-serif;
  letter-spacing: .01em;
  text-align: center;
}
body.client-auth-enhanced:not(.client-auth-mobile) [data-nuevita-access-hero="portal"] #access :is(
  #client-auth-passkey, #client-auth-first-time, #open-access, #client-auth-recovery
) {
  font-weight: 600;
}
body.client-auth-enhanced:not([data-order-link="true"]):not([data-portal-authenticated="true"]) .portal-footer {
  align-self: end;
  align-items: end;
  min-height: 0;
  margin: auto 0 0;
  padding-block: 0 max(4px, env(safe-area-inset-bottom, 0px));
}
body.client-auth-enhanced:not([data-portal-authenticated="true"]) .portal-footer .nuevita-footer-items {
  --nuevita-footer-text-gap: 6px;
  align-items: flex-end;
  justify-content: flex-start;
  font-family: Inter, system-ui, sans-serif;
}
body.client-auth-enhanced:not([data-portal-authenticated="true"]) .portal-footer .nuevita-footer-social-policy {
  align-items: flex-end;
}
body.client-auth-enhanced:not([data-portal-authenticated="true"]) .portal-footer :is(.nuevita-social-link, .nuevita-social-inactive) {
  align-items: flex-end;
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
}
body.client-auth-enhanced:not([data-portal-authenticated="true"]) .portal-footer :is(.nuevita-social-link, .nuevita-social-inactive) svg {
  transform: none;
}
body.client-auth-enhanced:not([data-portal-authenticated="true"]) .portal-footer .nuevita-footer-legal {
  align-items: flex-end;
  gap: 0 8px;
}
body.client-auth-enhanced:not([data-portal-authenticated="true"]) .portal-footer :is(.nuevita-footer-copyright, .nuevita-footer-privacy) {
  padding-block: 0;
}
body.client-auth-enhanced:not([data-portal-authenticated="true"]) .portal-footer a.nuevita-footer-privacy {
  align-items: flex-end;
  min-height: 28px;
}
@media (max-width: 640px) {
  body.client-auth-enhanced:not([data-portal-authenticated="true"]) .portal-footer {
    align-self: stretch;
    margin-inline: -.75rem;
  }
  body.client-auth-enhanced:not([data-portal-authenticated="true"]) .portal-footer .nuevita-footer-items {
    display: flex;
    flex-wrap: wrap;
    line-height: 1.3;
    --nuevita-footer-text-gap: 4px;
  }
  body.client-auth-enhanced:not([data-portal-authenticated="true"]) .portal-footer .nuevita-footer-social-policy {
    display: contents;
  }
  body.client-auth-enhanced:not([data-portal-authenticated="true"]) .portal-footer :is(.nuevita-social-link, .nuevita-social-inactive) {
    width: 24px;
    min-width: 24px;
  }
  body.client-auth-enhanced:not([data-portal-authenticated="true"]) .portal-footer .nuevita-footer-copyright {
    font-size: .52rem;
    letter-spacing: .04em;
  }
  body.client-auth-enhanced:not([data-portal-authenticated="true"]) .portal-footer .nuevita-footer-legal {
    font-size: .62rem;
    letter-spacing: 0;
    padding-inline-start: 4px;
    gap: 0 6px;
  }
}

/* App-mode desktop keeps the instruction beside the title, outside #access. */
@media (min-width: 721px) and (pointer: fine) {
  .portal-entry:not([data-nuevita-access-hero]):has(#client-auth-qr:not([hidden])) {
    --portal-access-type: clamp(.875rem, 1.1vw, 1rem);
  }
  .portal-entry:not([data-nuevita-access-hero]):has(#client-auth-qr:not([hidden])) :is(
    #client-auth-qr-instructions .client-auth-qr-label,
    #access :where(#client-auth-qr-status, .client-auth-qr-loading .nuevita-loading-label,
      #client-auth-first-time, #client-auth-passkey, #open-access, #client-auth-recovery,
      .portal-help, #client-auth-compatibility summary, #client-auth-compatibility p, #client-auth-compatibility a)
  ) {
    font: var(--portal-qr-action-weight, 500) var(--portal-access-type)/1.35 Syne, Inter, system-ui, sans-serif;
    letter-spacing: .01em;
  }
  .portal-entry:not([data-nuevita-access-hero]):has(#client-auth-qr:not([hidden])) #access :is(
    #client-auth-passkey, #open-access, #client-auth-recovery, #client-auth-first-time
  ) {
    --portal-qr-action-weight: 600;
  }
}

@media (min-width: 721px) and (pointer: fine) and (max-height: 550px) {
  .portal-entry:not([data-nuevita-access-hero]):has(#client-auth-qr:not([hidden])) #access {
    row-gap: .25rem;
  }
}

@media (max-width: 540px) {
  body.client-auth-enhanced:not(.client-auth-mobile) .portal-entry[data-nuevita-access-hero="portal"] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
  }
  body.client-auth-enhanced:not(.client-auth-mobile) .portal-entry[data-nuevita-access-hero="portal"] #access {
    width: min(100%, 24rem);
    justify-self: center;
    min-width: 0;
  }
}
