/* Only opted-in tenants receive these overrides. Existing login CSS is untouched. */
.tenant-login.tenant-layout-custom {
  isolation:isolate; overflow:hidden; background-image:none;
  background-color:var(--login-secondary,#0b2f59);
}
.tenant-layout-custom:before {
  content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background-image:linear-gradient(90deg,rgba(2,31,71,.28),rgba(2,31,71,.20),rgba(2,31,71,.36)),var(--login-hero);
  background-size:cover;background-repeat:no-repeat;
  background-position:calc(var(--ld-background-x)*1%) calc(var(--ld-background-y)*1%);
  transform:scale(var(--ld-background-zoom));
  transform-origin:calc(var(--ld-background-x)*1%) calc(var(--ld-background-y)*1%);
}
@media (min-width:1050px) and (min-height:650px) {
  .tenant-login.tenant-layout-custom {display:block}
  .tenant-layout-custom .tenant-login-identity,.tenant-layout-custom .tenant-login-school,.tenant-layout-custom .tenant-login-formside {display:contents;transform:none}
  .tenant-layout-custom .tenant-login-overlay {display:none}
  .tenant-layout-custom .tenant-login-logo,.tenant-layout-custom .tenant-login-logo-fallback,.tenant-layout-custom .tenant-login-name,.tenant-layout-custom .tenant-login-tagline,.tenant-layout-custom .tenant-login-card {position:absolute;margin:0;z-index:2;box-sizing:border-box;overflow-wrap:anywhere}
  .tenant-layout-custom .tenant-login-logo,.tenant-layout-custom .tenant-login-logo-fallback {
    left:calc(var(--ld-logo-x)*1%);top:calc(var(--ld-logo-y)*1%);width:calc(var(--ld-logo-w)*1%);height:calc(var(--ld-logo-size)*1%);object-fit:contain;
  }
  .tenant-layout-custom .tenant-login-name {left:calc(var(--ld-name-x)*1%);top:max(0px,min(calc(var(--ld-name-y)*1%),calc(100% - var(--ld-fit-height,0px) - 8px)));width:calc(var(--ld-name-w)*1%);font-size:var(--ld-fit-font,clamp(20px,calc(var(--ld-name-size)*1vw),72px));color:white;max-height:none;overflow:visible;white-space:normal}
  .tenant-layout-custom .tenant-login-tagline {left:calc(var(--ld-tagline-x)*1%);top:max(0px,min(calc(var(--ld-tagline-y)*1%),calc(100% - var(--ld-fit-height,0px) - 8px)));width:calc(var(--ld-tagline-w)*1%);font-size:var(--ld-fit-font,clamp(12px,calc(var(--ld-tagline-size)*1vw),42px));color:white;max-height:none;overflow:visible;white-space:normal}
  .tenant-layout-custom .tenant-login-card {z-index:4;width:clamp(320px,calc(var(--ld-card-w)*1%),70%);left:min(calc(var(--ld-card-x)*1%),calc(100% - clamp(320px,calc(var(--ld-card-w)*1%),70%) - 8px));top:calc(var(--ld-card-y)*1%);max-height:calc(100% - var(--ld-card-y)*1% - 12px);overflow:auto;overscroll-behavior:contain}
}
/* Compact screens fall back to a single accessible card with the mobile brand. */
@media (max-width:1049px), (max-height:649px) {
  html:has(.tenant-layout-custom),body:has(.tenant-layout-custom){height:auto;overflow:auto!important}
  .tenant-login.tenant-layout-custom{position:relative;inset:auto;width:100%;height:auto;min-height:100dvh;padding:16px;display:flex;align-items:center;justify-content:center}
  .tenant-layout-custom:after,.tenant-layout-custom .tenant-login-identity{display:none}
  .tenant-layout-custom .tenant-login-formside{height:auto;min-height:0;width:100%;padding:0;overflow:visible;display:flex;justify-content:center}
  .tenant-layout-custom .tenant-login-card{width:min(470px,100%);margin:0;padding:24px;max-height:none;overflow:visible}
  .tenant-layout-custom .tenant-mobile-brand{display:flex;align-items:center;gap:12px;padding-bottom:16px;margin-bottom:18px;border-bottom:1px solid #dbe5f0;overflow-wrap:anywhere}
  .tenant-layout-custom .tenant-mobile-brand img,.tenant-layout-custom .tenant-mobile-brand>span{width:56px;height:56px;object-fit:contain;flex:none}
  .tenant-layout-custom .tenant-mobile-brand small{display:block}
}
.tenant-layout-preview .tenant-login-card>*{pointer-events:none}

/* Independently configurable text styles. No rule applies until its property is present. */
.tenant-layout-custom[style*="--ld-type-name-color:"] .tenant-login-name {color:var(--ld-type-name-color) !important;}
.tenant-layout-custom[style*="--ld-type-name-mobile_color:"] .tenant-mobile-brand [data-ld-style="name"] {color:var(--ld-type-name-mobile_color) !important;}
.tenant-layout-custom[style*="--ld-type-name-mobile_size:"] .tenant-mobile-brand [data-ld-style="name"] {font-size:var(--ld-type-name-mobile_size) !important;}
.tenant-layout-custom[style*="--ld-type-tagline-color:"] .tenant-login-tagline {color:var(--ld-type-tagline-color) !important;}
.tenant-layout-custom[style*="--ld-type-tagline-mobile_color:"] .tenant-mobile-brand [data-ld-style="tagline"] {color:var(--ld-type-tagline-mobile_color) !important;}
.tenant-layout-custom[style*="--ld-type-tagline-mobile_size:"] .tenant-mobile-brand [data-ld-style="tagline"] {font-size:var(--ld-type-tagline-mobile_size) !important;}
.tenant-layout-custom[style*="--ld-type-eyebrow-color:"] [data-ld-style="eyebrow"] {color:var(--ld-type-eyebrow-color) !important;}
.tenant-layout-custom[style*="--ld-type-eyebrow-size:"] [data-ld-style="eyebrow"] {font-size:var(--ld-type-eyebrow-size) !important;}
.tenant-layout-custom[style*="--ld-type-heading-color:"] [data-ld-style="heading"] {color:var(--ld-type-heading-color) !important;}
.tenant-layout-custom[style*="--ld-type-heading-size:"] [data-ld-style="heading"] {font-size:var(--ld-type-heading-size) !important;}
.tenant-layout-custom[style*="--ld-type-message-color:"] [data-ld-style="message"] {color:var(--ld-type-message-color) !important;}
.tenant-layout-custom[style*="--ld-type-message-size:"] [data-ld-style="message"] {font-size:var(--ld-type-message-size) !important;}
.tenant-layout-custom[style*="--ld-type-username_label-color:"] [data-ld-style="username_label"] {color:var(--ld-type-username_label-color) !important;}
.tenant-layout-custom[style*="--ld-type-username_label-size:"] [data-ld-style="username_label"] {font-size:var(--ld-type-username_label-size) !important;}
.tenant-layout-custom[style*="--ld-type-username_placeholder-color:"] [data-ld-style="username_placeholder"]::placeholder {color:var(--ld-type-username_placeholder-color) !important;}
.tenant-layout-custom[style*="--ld-type-username_placeholder-size:"] [data-ld-style="username_placeholder"]::placeholder {font-size:var(--ld-type-username_placeholder-size) !important;}
.tenant-layout-custom[style*="--ld-type-password_label-color:"] [data-ld-style="password_label"] {color:var(--ld-type-password_label-color) !important;}
.tenant-layout-custom[style*="--ld-type-password_label-size:"] [data-ld-style="password_label"] {font-size:var(--ld-type-password_label-size) !important;}
.tenant-layout-custom[style*="--ld-type-password_placeholder-color:"] [data-ld-style="password_placeholder"]::placeholder {color:var(--ld-type-password_placeholder-color) !important;}
.tenant-layout-custom[style*="--ld-type-password_placeholder-size:"] [data-ld-style="password_placeholder"]::placeholder {font-size:var(--ld-type-password_placeholder-size) !important;}
.tenant-layout-custom[style*="--ld-type-signin-color:"] [data-ld-style="signin"] {color:var(--ld-type-signin-color) !important;}
.tenant-layout-custom[style*="--ld-type-signin-size:"] [data-ld-style="signin"] {font-size:var(--ld-type-signin-size) !important;}
.tenant-layout-custom[style*="--ld-type-apply-color:"] [data-ld-style="apply"] {color:var(--ld-type-apply-color) !important;}
.tenant-layout-custom[style*="--ld-type-apply-size:"] [data-ld-style="apply"] {font-size:var(--ld-type-apply-size) !important;}
.tenant-layout-custom[style*="--ld-type-application_hint-color:"] [data-ld-style="application_hint"] {color:var(--ld-type-application_hint-color) !important;}
.tenant-layout-custom[style*="--ld-type-application_hint-size:"] [data-ld-style="application_hint"] {font-size:var(--ld-type-application_hint-size) !important;}
.tenant-layout-custom[style*="--ld-type-support-color:"] [data-ld-style="support"] {color:var(--ld-type-support-color) !important;}
.tenant-layout-custom[style*="--ld-type-support-size:"] [data-ld-style="support"] {font-size:var(--ld-type-support-size) !important;}
.tenant-layout-custom .tenant-signin {height:auto;min-height:46px;padding-top:10px!important;padding-bottom:10px!important;white-space:normal;overflow-wrap:anywhere;}
.tenant-layout-custom .tenant-login-card a.btn {white-space:normal;overflow-wrap:anywhere;}
.tenant-layout-custom .tenant-mobile-brand > div {min-width:0;}
/* Empty optional motto behaves the same in preview and published layout. */
.tenant-layout-custom .tenant-login-tagline:empty,.tenant-layout-custom .tenant-mobile-brand small:empty{display:none!important}

.tenant-layout-custom[style*="--ld-type-name-family:"] [data-ld-style="name"] {font-family:var(--ld-type-name-family) !important;}
.tenant-layout-custom[style*="--ld-type-name-weight:"] [data-ld-style="name"] {font-weight:var(--ld-type-name-weight) !important;}
.tenant-layout-custom[style*="--ld-type-name-italic:"] [data-ld-style="name"] {font-style:var(--ld-type-name-italic) !important;}
.tenant-layout-custom[style*="--ld-type-name-align:"] [data-ld-style="name"] {text-align:var(--ld-type-name-align) !important;display:block;}
.tenant-layout-custom[style*="--ld-type-tagline-family:"] [data-ld-style="tagline"] {font-family:var(--ld-type-tagline-family) !important;}
.tenant-layout-custom[style*="--ld-type-tagline-weight:"] [data-ld-style="tagline"] {font-weight:var(--ld-type-tagline-weight) !important;}
.tenant-layout-custom[style*="--ld-type-tagline-italic:"] [data-ld-style="tagline"] {font-style:var(--ld-type-tagline-italic) !important;}
.tenant-layout-custom[style*="--ld-type-tagline-align:"] [data-ld-style="tagline"] {text-align:var(--ld-type-tagline-align) !important;display:block;}
.tenant-layout-custom[style*="--ld-type-eyebrow-family:"] [data-ld-style="eyebrow"] {font-family:var(--ld-type-eyebrow-family) !important;}
.tenant-layout-custom[style*="--ld-type-eyebrow-weight:"] [data-ld-style="eyebrow"] {font-weight:var(--ld-type-eyebrow-weight) !important;}
.tenant-layout-custom[style*="--ld-type-eyebrow-italic:"] [data-ld-style="eyebrow"] {font-style:var(--ld-type-eyebrow-italic) !important;}
.tenant-layout-custom[style*="--ld-type-eyebrow-align:"] [data-ld-style="eyebrow"] {text-align:var(--ld-type-eyebrow-align) !important;display:block;}
.tenant-layout-custom[style*="--ld-type-heading-family:"] [data-ld-style="heading"] {font-family:var(--ld-type-heading-family) !important;}
.tenant-layout-custom[style*="--ld-type-heading-weight:"] [data-ld-style="heading"] {font-weight:var(--ld-type-heading-weight) !important;}
.tenant-layout-custom[style*="--ld-type-heading-italic:"] [data-ld-style="heading"] {font-style:var(--ld-type-heading-italic) !important;}
.tenant-layout-custom[style*="--ld-type-heading-align:"] [data-ld-style="heading"] {text-align:var(--ld-type-heading-align) !important;}
.tenant-layout-custom[style*="--ld-type-message-family:"] [data-ld-style="message"] {font-family:var(--ld-type-message-family) !important;}
.tenant-layout-custom[style*="--ld-type-message-weight:"] [data-ld-style="message"] {font-weight:var(--ld-type-message-weight) !important;}
.tenant-layout-custom[style*="--ld-type-message-italic:"] [data-ld-style="message"] {font-style:var(--ld-type-message-italic) !important;}
.tenant-layout-custom[style*="--ld-type-message-align:"] [data-ld-style="message"] {text-align:var(--ld-type-message-align) !important;}
.tenant-layout-custom[style*="--ld-type-username_label-family:"] [data-ld-style="username_label"] {font-family:var(--ld-type-username_label-family) !important;}
.tenant-layout-custom[style*="--ld-type-username_label-weight:"] [data-ld-style="username_label"] {font-weight:var(--ld-type-username_label-weight) !important;}
.tenant-layout-custom[style*="--ld-type-username_label-italic:"] [data-ld-style="username_label"] {font-style:var(--ld-type-username_label-italic) !important;}
.tenant-layout-custom[style*="--ld-type-username_label-align:"] [data-ld-style="username_label"] {text-align:var(--ld-type-username_label-align) !important;}
.tenant-layout-custom[style*="--ld-type-username_placeholder-family:"] [data-ld-style="username_placeholder"]::placeholder {font-family:var(--ld-type-username_placeholder-family) !important;}
.tenant-layout-custom[style*="--ld-type-username_placeholder-weight:"] [data-ld-style="username_placeholder"]::placeholder {font-weight:var(--ld-type-username_placeholder-weight) !important;}
.tenant-layout-custom[style*="--ld-type-username_placeholder-italic:"] [data-ld-style="username_placeholder"]::placeholder {font-style:var(--ld-type-username_placeholder-italic) !important;}
.tenant-layout-custom[style*="--ld-type-username_placeholder-align:"] [data-ld-style="username_placeholder"] {text-align:var(--ld-type-username_placeholder-align) !important;}
.tenant-layout-custom[style*="--ld-type-password_label-family:"] [data-ld-style="password_label"] {font-family:var(--ld-type-password_label-family) !important;}
.tenant-layout-custom[style*="--ld-type-password_label-weight:"] [data-ld-style="password_label"] {font-weight:var(--ld-type-password_label-weight) !important;}
.tenant-layout-custom[style*="--ld-type-password_label-italic:"] [data-ld-style="password_label"] {font-style:var(--ld-type-password_label-italic) !important;}
.tenant-layout-custom[style*="--ld-type-password_label-align:"] [data-ld-style="password_label"] {text-align:var(--ld-type-password_label-align) !important;}
.tenant-layout-custom[style*="--ld-type-password_placeholder-family:"] [data-ld-style="password_placeholder"]::placeholder {font-family:var(--ld-type-password_placeholder-family) !important;}
.tenant-layout-custom[style*="--ld-type-password_placeholder-weight:"] [data-ld-style="password_placeholder"]::placeholder {font-weight:var(--ld-type-password_placeholder-weight) !important;}
.tenant-layout-custom[style*="--ld-type-password_placeholder-italic:"] [data-ld-style="password_placeholder"]::placeholder {font-style:var(--ld-type-password_placeholder-italic) !important;}
.tenant-layout-custom[style*="--ld-type-password_placeholder-align:"] [data-ld-style="password_placeholder"] {text-align:var(--ld-type-password_placeholder-align) !important;}
.tenant-layout-custom[style*="--ld-type-signin-family:"] [data-ld-style="signin"] {font-family:var(--ld-type-signin-family) !important;}
.tenant-layout-custom[style*="--ld-type-signin-weight:"] [data-ld-style="signin"] {font-weight:var(--ld-type-signin-weight) !important;}
.tenant-layout-custom[style*="--ld-type-signin-italic:"] [data-ld-style="signin"] {font-style:var(--ld-type-signin-italic) !important;}
.tenant-layout-custom[style*="--ld-type-signin-align:"] [data-ld-style="signin"] {text-align:var(--ld-type-signin-align) !important;display:block;}
.tenant-layout-custom[style*="--ld-type-apply-family:"] [data-ld-style="apply"] {font-family:var(--ld-type-apply-family) !important;}
.tenant-layout-custom[style*="--ld-type-apply-weight:"] [data-ld-style="apply"] {font-weight:var(--ld-type-apply-weight) !important;}
.tenant-layout-custom[style*="--ld-type-apply-italic:"] [data-ld-style="apply"] {font-style:var(--ld-type-apply-italic) !important;}
.tenant-layout-custom[style*="--ld-type-apply-align:"] [data-ld-style="apply"] {text-align:var(--ld-type-apply-align) !important;display:block;}
.tenant-layout-custom[style*="--ld-type-application_hint-family:"] [data-ld-style="application_hint"] {font-family:var(--ld-type-application_hint-family) !important;}
.tenant-layout-custom[style*="--ld-type-application_hint-weight:"] [data-ld-style="application_hint"] {font-weight:var(--ld-type-application_hint-weight) !important;}
.tenant-layout-custom[style*="--ld-type-application_hint-italic:"] [data-ld-style="application_hint"] {font-style:var(--ld-type-application_hint-italic) !important;}
.tenant-layout-custom[style*="--ld-type-application_hint-align:"] [data-ld-style="application_hint"] {text-align:var(--ld-type-application_hint-align) !important;display:block;}
.tenant-layout-custom[style*="--ld-type-support-family:"] [data-ld-style="support"] {font-family:var(--ld-type-support-family) !important;}
.tenant-layout-custom[style*="--ld-type-support-weight:"] [data-ld-style="support"] {font-weight:var(--ld-type-support-weight) !important;}
.tenant-layout-custom[style*="--ld-type-support-italic:"] [data-ld-style="support"] {font-style:var(--ld-type-support-italic) !important;}
.tenant-layout-custom[style*="--ld-type-support-align:"] [data-ld-style="support"] {text-align:var(--ld-type-support-align) !important;display:block;}
