/* Load after style.css. Login overrides never apply to change-password. */
.auth-entry,
body.privacy-page,
#modal.privacy-modal {
  font-family: var(--sans);
  letter-spacing: 0;
  color: var(--ink);
  color-scheme: light;
}

.auth-entry {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  background: #F7FAFF;
}

.auth-entry [hidden] { display: none !important; }

.auth-entry > .auth-topbar {
  flex: 0 0 auto;
  background: var(--white);
}

.auth-entry .auth-main {
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  align-items: start;
  gap: 28px;
  width: 100%;
  max-width: 448px;
  min-width: 0;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.auth-entry .auth-heading {
  padding: 0;
  text-align: center;
}

.auth-entry .auth-heading h1 {
  max-width: none;
  margin: 0;
  font-size: 28px;
  line-height: 1.4;
}

.auth-entry .auth-context {
  justify-content: center;
  gap: 7px;
  margin: 10px 0 0;
  padding: 0;
  border: 0;
  font-size: 14px;
  line-height: 1.7;
}

.auth-entry .auth-context svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.auth-entry .auth-login {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.auth-entry .auth-login form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin: 0;
}

.auth-entry .auth-login form > * {
  min-width: 0;
  max-width: 100%;
}

.auth-entry .auth-login label {
  gap: 8px;
  color: #344256;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.auth-entry .auth-login input:not([type="checkbox"]):not([type="hidden"]) {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid #BCCADB;
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  caret-color: var(--blue);
  transition: border-color 140ms ease, background-color 140ms ease;
}

.auth-entry .auth-login input::placeholder {
  color: #637184;
  opacity: 1;
}

.auth-entry .auth-login input:not([type="checkbox"]):not(:disabled):hover {
  border-color: #7B91AD;
}

.auth-entry .auth-login input:not([type="checkbox"]):focus {
  border-color: var(--blue);
}

.auth-entry .auth-login input:not([type="checkbox"])[readonly] {
  background: #F1F5FA;
}

.auth-entry .auth-login input:not([type="checkbox"]):disabled {
  background: #EDF1F6;
  color: #637184;
  cursor: not-allowed;
  opacity: 1;
}

.auth-entry .auth-login input:not([type="checkbox"]):not([type="hidden"]):is([aria-invalid="true"], :user-invalid) {
  border-color: #AD402F;
}

.auth-entry .auth-password {
  position: relative;
  display: block;
  min-width: 0;
}

.auth-entry .auth-login .auth-password input:not([type="checkbox"]):not([type="hidden"]) {
  padding-right: 58px;
}

.auth-entry #toggle-login-password.icon {
  position: absolute;
  top: 2px;
  right: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 12px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
}

.auth-entry #toggle-login-password.icon:not(:disabled):hover {
  background: #EDF3FF;
  color: var(--blue);
}

.auth-entry #toggle-login-password.icon:not(:disabled):active {
  background: #DFE9FC;
}

.auth-entry #toggle-login-password.icon[aria-pressed="true"] {
  color: var(--blue);
}

.auth-entry #toggle-login-password.icon:focus-visible {
  outline-offset: -4px;
}

.auth-entry .privacy-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

/* Beat .login input without replacing the native checkbox. */
.auth-entry .privacy-consent input#privacy-consent[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  min-height: 18px;
  max-height: 18px;
  margin: 3px 0 0;
  padding: 0;
  border-radius: 3px;
  accent-color: var(--blue);
  cursor: pointer;
}

.auth-entry .privacy-consent input#privacy-consent:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.auth-entry .privacy-consent-copy {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.auth-entry .privacy-consent-copy label {
  display: inline;
  margin: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.auth-entry .text-link {
  display: inline-block;
  width: auto;
  min-height: 24px;
  max-width: 100%;
  margin: 0;
  padding: 0 1px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--blue);
  font: inherit;
  line-height: inherit;
  text-align: left;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: baseline;
}

.auth-entry .text-link:not(:disabled):hover {
  background: transparent;
  color: #1941A4;
  text-decoration-thickness: 2px;
}

.auth-entry .text-link:not(:disabled):active {
  color: #123582;
}

.auth-entry #login-submit.primary {
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 11px 16px;
  border: 1px solid var(--blue);
  border-radius: 6px;
  background: var(--blue);
  color: var(--white);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}

.auth-entry #login-submit.primary:not(:disabled):hover {
  border-color: #1E4CBD;
  background: #1E4CBD;
}

.auth-entry #login-submit.primary:not(:disabled):active {
  border-color: #1941A4;
  background: #1941A4;
}

.auth-entry #login-submit.primary:disabled {
  border-color: #DBE5F8;
  background: #DBE5F8;
  color: #52617B;
  cursor: not-allowed;
  opacity: 1;
}

.auth-entry #login-submit.primary[aria-busy="true"] {
  cursor: progress;
}

.auth-entry .auth-policy-state {
  margin: 0;
  color: #637184;
  font-size: 12px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.auth-entry .auth-policy-state.error,
.auth-entry .auth-policy-state[data-state="error"],
.auth-entry .auth-policy-state[role="alert"],
.auth-entry .form-error {
  color: #AD402F;
}

.auth-entry .form-error {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
}

.auth-entry .auth-policy-state:empty,
.auth-entry .form-error:empty {
  display: none;
}

.auth-entry .login-footer {
  justify-content: center;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 0;
  border: 0;
}

.auth-entry .login-footer a {
  min-height: 44px;
  color: var(--muted);
  white-space: normal;
  overflow-wrap: anywhere;
}

.auth-entry .login-footer a:hover {
  color: var(--blue);
}

.auth-entry .auth-business-contact {
  margin: 0;
  max-width: 100%;
  color: #526171;
  font-size: 13px;
  line-height: 1.8;
  text-align: center;
  overflow-wrap: anywhere;
}
.auth-entry .login-footer .auth-business-contact a {
  display: inline;
  min-height: 0;
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-entry :focus-visible,
body.privacy-page :focus-visible,
#modal.privacy-modal :focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* The standalone policy and dialog share one reading vocabulary. */
body.privacy-page {
  background: var(--white);
}

.privacy-page .privacy-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  min-height: 88px;
  padding: 22px 48px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.privacy-page .privacy-topbar .brand {
  font-size: 25px;
}

.privacy-page .privacy-topbar > a:not(.brand) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  color: var(--muted);
  font-size: 13px;
}

.privacy-page .privacy-topbar > a:not(.brand):hover {
  color: var(--blue);
}

.privacy-page .privacy-main {
  width: 100%;
  max-width: 880px;
  min-width: 0;
  margin: 0 auto;
  padding: 48px 32px 80px;
}

.privacy-page .privacy-document,
#modal.privacy-modal .privacy-document {
  width: 100%;
  max-width: 76ch;
  min-width: 0;
  margin: 0 auto;
  color: #344256;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.85;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

:is(.privacy-page, #modal.privacy-modal) .privacy-document h2 {
  margin: 36px 0 14px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.5;
  scroll-margin-top: 96px;
}

:is(.privacy-page, #modal.privacy-modal) .privacy-document h2:first-child {
  margin-top: 0;
}

:is(.privacy-page, #modal.privacy-modal) .privacy-document h3 {
  margin: 26px 0 10px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  scroll-margin-top: 96px;
}

:is(.privacy-page, #modal.privacy-modal) .privacy-document p {
  margin: 0 0 16px;
  line-height: inherit;
}

:is(.privacy-page, #modal.privacy-modal) .privacy-document :is(ul, ol) {
  margin: 10px 0 20px;
  padding-left: 1.5em;
}

:is(.privacy-page, #modal.privacy-modal) .privacy-document li + li {
  margin-top: 8px;
}

:is(.privacy-page, #modal.privacy-modal) .privacy-document strong {
  color: var(--ink);
  font-weight: 600;
}

:is(.privacy-page, #modal.privacy-modal) .privacy-document :is(.muted, .small) {
  color: var(--muted);
  font-size: 13px;
}

:is(.privacy-page, #modal.privacy-modal) .privacy-document a {
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

:is(.privacy-page, #modal.privacy-modal) .privacy-document .table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 18px 0 24px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

:is(.privacy-page, #modal.privacy-modal) .privacy-document .table-wrap:focus-visible {
  outline-offset: -2px;
}

:is(.privacy-page, #modal.privacy-modal) .privacy-document table {
  width: 100%;
  min-width: 560px;
  table-layout: fixed;
  font-family: var(--sans);
  font-size: 13px;
}

:is(.privacy-page, #modal.privacy-modal) .privacy-document :is(th, td) {
  padding: 12px 14px;
  font-family: var(--sans);
  line-height: 1.8;
  text-align: left;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
}

:is(.privacy-page, #modal.privacy-modal) .privacy-document th {
  background: #F1F5FA;
  color: #344256;
}

:is(.privacy-page, #modal.privacy-modal) .privacy-document tbody tr:hover {
  background: transparent;
}

#modal.privacy-modal {
  width: 880px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0 28px 28px;
  overflow: auto;
  overscroll-behavior: contain;
  scroll-padding-top: 96px;
  scrollbar-gutter: stable;
  border: 0;
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 18px 64px rgba(32, 42, 53, .18);
}

#modal.privacy-modal::backdrop {
  background: rgba(32, 42, 53, .32);
}

#modal.privacy-modal .modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  align-items: center;
  gap: 16px;
  min-width: 0;
  margin-bottom: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

#modal.privacy-modal .modal-head h2 {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 20px;
  line-height: 1.5;
}

#modal.privacy-modal .modal-head .icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
}

#modal.privacy-modal .modal-head .icon:not(:disabled):hover {
  background: #EDF3FF;
  color: var(--blue);
}

#modal.privacy-modal .modal-head .icon:not(:disabled):active {
  background: #DFE9FC;
}

#modal.privacy-modal .form-footer {
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

#modal.privacy-modal .form-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .auth-entry .auth-main {
    padding-top: 40px;
    padding-bottom: 48px;
  }

  .privacy-page .privacy-topbar {
    min-height: 76px;
    padding: 18px 24px;
  }

  .privacy-page .privacy-topbar .brand {
    font-size: 21px;
  }

  .privacy-page .privacy-main {
    padding: 32px 24px 56px;
  }

  #modal.privacy-modal {
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 0 20px 20px;
  }

  #modal.privacy-modal .modal-head {
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px 0;
  }

  #modal.privacy-modal .form-footer {
    justify-content: flex-start;
  }
}

@media (max-width: 380px) {
  .auth-entry .auth-main {
    gap: 24px;
    padding: 32px 20px 40px;
  }

  .auth-entry .auth-heading h1 {
    font-size: 26px;
  }

  .privacy-page .privacy-topbar {
    gap: 10px;
    padding-right: 18px;
    padding-left: 18px;
  }

  .privacy-page .privacy-topbar .brand {
    gap: 7px;
    font-size: 20px;
  }

  .privacy-page .privacy-topbar > a:not(.brand) {
    gap: 5px;
    font-size: 12px;
  }

  .privacy-page .privacy-main {
    padding-right: 20px;
    padding-left: 20px;
  }

  #modal.privacy-modal {
    padding-right: 16px;
    padding-left: 16px;
  }
}

@media (max-height: 760px) {
  .auth-entry .auth-main {
    align-content: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-entry :is(input, button, a),
  body.privacy-page :is(button, a),
  #modal.privacy-modal :is(button, a) {
    transition: none;
  }
}
