/* Authentication layout only: no account, storage or authentication changes. */
#authenticationOverlay { overflow-y:auto; padding:24px; align-items:center; }
#authenticationOverlay .authentication-desktop-shell {
  width:min(1100px,100%); min-height:0; max-height:none;
  grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);
  margin:auto; box-sizing:border-box;
}
#authenticationOverlay #authenticationCard {
  width:100%; min-width:0; padding:32px; box-sizing:border-box;
  overflow:visible; align-self:center;
}
#authenticationOverlay #authenticationCard > .authentication-brand,
#authenticationOverlay #authenticationCard > .authentication-view { width:100%; min-width:0; }
#authenticationOverlay .authentication-story { padding:36px; }
#authenticationOverlay .authentication-story-copy { margin-top:32px; }
#authenticationOverlay .authentication-story-copy h1 { font-size:clamp(30px,3.2vw,42px); }
#authenticationOverlay .authentication-story-visual { margin-top:24px; }
#authenticationOverlay .authentication-story-signature { padding-top:20px; }
#authenticationOverlay #authenticationCard .authentication-form,
#authenticationOverlay #authenticationCard .authentication-password-field { width:100%; min-width:0; }
#authenticationOverlay #authenticationCard .authentication-form input {
  width:100%; min-width:0; max-width:100%; box-sizing:border-box; min-height:48px;
}
#authenticationOverlay #authenticationCard .authentication-submit,
#authenticationOverlay #authenticationCard .authentication-quick-demo { width:100%; min-height:48px; }
#authenticationOverlay #authenticationCard .authentication-heading { margin-bottom:20px; }
#authenticationOverlay #authenticationCard #loginView {
  display:block; height:auto; min-height:0; max-height:none;
}
#authenticationOverlay #authenticationCard #loginView[hidden] { display:none; }
#authenticationOverlay #authenticationCard #loginView > .authentication-heading {
  height:auto; min-height:0; flex:none; margin-bottom:20px;
}
#authenticationOverlay #authenticationCard .authentication-profile-context { min-height:0; }
#authenticationOverlay #authenticationCard .authentication-heading h1 { font-size:26px; line-height:1.25; }
#authenticationOverlay #authenticationCard .authentication-brand { margin-bottom:24px; }
#authenticationOverlay #authenticationCard .authentication-status:empty { display:none; }
#authenticationOverlay #authenticationCard .authentication-label-row { flex-wrap:wrap; gap:4px 12px; }
#authenticationOverlay .authentication-desktop-status { flex-wrap:wrap; }

/* Reset the desktop grid as well as the hidden story at intermediate widths. */
@media(max-width:1000px) {
  #authenticationOverlay { padding:24px 20px; }
  #authenticationOverlay .authentication-desktop-shell {
    display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:auto;
    width:min(440px,100%); min-height:0; max-height:none; overflow:visible;
    border:0; border-radius:24px; background:transparent; box-shadow:none; backdrop-filter:none;
  }
  #authenticationOverlay .authentication-story { display:none; }
  #authenticationOverlay #authenticationCard {
    display:block; width:100%; max-width:none; padding:28px;
    border:1px solid rgba(255,255,255,.85); border-radius:24px;
    background:linear-gradient(150deg,#ffffffed,var(--auth-surface,#f8f5fc));
    box-shadow:0 16px 48px #44316612;
  }
  #authenticationOverlay #authenticationCard .authentication-brand-lockup {
    display:flex; flex-direction:row; justify-content:center; align-items:center;
    gap:12px; width:100%; margin-bottom:22px;
  }
  #authenticationOverlay .authentication-logo { width:48px; height:48px; border-radius:14px; }
  #authenticationOverlay .authentication-brand-copy { text-align:left; }
  #authenticationOverlay .authentication-wordmark { font-size:27px; line-height:1.2; }
  #authenticationOverlay #authenticationBrandLine,
  #authenticationOverlay .authentication-mobile-signature { display:none; }
  #authenticationOverlay #authenticationCard .authentication-heading h1 { font-size:24px; }
  #authenticationOverlay #authenticationCard .authentication-form input { font-size:16px; }
  #authenticationOverlay .authentication-desktop-status {
    display:flex; grid-column:1; justify-content:center; padding:14px 8px;
    min-height:0; border:0; background:transparent; text-align:center;
  }
  #authenticationOverlay .authentication-desktop-status span { display:none; }
}
@media(max-width:480px) {
  #authenticationOverlay { padding:max(16px,env(safe-area-inset-top)) 12px max(16px,env(safe-area-inset-bottom)); }
  #authenticationOverlay #authenticationCard { padding:24px 20px; }
}
@media(max-height:620px) {
  #authenticationOverlay { align-items:start; }
  #authenticationOverlay .authentication-desktop-shell { margin:0 auto; }
}
