:root {
  color-scheme: light;
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --brand-blue: #0048ab;
  --brand-blue-dark: #00367f;
  --text: #283442;
  --muted: #5c6c7d;
}

* {
  box-sizing: border-box;
}

body {
  display: flex;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  margin: 0;
  color: var(--text);
  background: #fff;
}

.site-header {
  display: flex;
  min-height: 56px;
  align-items: center;
  padding: 8px 16px;
  color: #fff;
  background: var(--brand-blue);
  box-shadow: 0 2px 4px rgb(0 0 0 / 7.5%);
}

.site-header__name {
  display: inline-block;
  padding: 5px 0;
  font-size: 20px;
  font-weight: 400;
  line-height: 30px;
}

.ion-alert {
  position: relative;
  z-index: 2;
  padding: 12px 24px;
  border-bottom: 1px solid #f0d58a;
  color: #664d03;
  background: #fff3cd;
}

.ion-alert.is-expanded .ion-alert__panel {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  padding: 12px 24px;
  border-bottom: 1px solid #f0d58a;
  background: #fff3cd;
  box-shadow: 0 6px 12px rgb(0 0 0 / 10%);
}

.ion-alert[hidden] {
  display: none;
}

.ion-alert__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.ion-alert__toggle {
  display: grid;
  width: 28px;
  height: 24px;
  place-items: center;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.ion-alert__toggle[hidden] {
  display: none;
}

.ion-alert__toggle svg {
  display: block;
  width: 20px;
  height: 20px;
  transition: transform 120ms ease;
}

.ion-alert.is-expanded .ion-alert__toggle svg {
  transform: rotate(180deg);
}

.ion-alert strong,
.ion-alert p {
  font-size: 14px;
  line-height: 1.45;
}

.ion-alert p {
  margin: 4px 0 0;
  max-height: 2.9em;
  overflow: hidden;
  white-space: pre-line;
}

.ion-alert.is-truncated:not(.is-expanded) p {
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent);
  mask-image: linear-gradient(to bottom, #000 45%, transparent);
}

.ion-alert.is-expanded p {
  max-height: min(24dvh, 180px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.ion-alert__footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
  align-items: end;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.3;
}

.ion-alert__footer a {
  grid-column: 1;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ion-alert__footer .ion-alert__toggle {
  grid-column: 2;
}

.ion-alert__footer time {
  grid-column: 3;
  justify-self: end;
  white-space: nowrap;
}

.login-layout {
  position: relative;
  display: grid;
  flex: 1;
  min-height: 0;
  grid-template-columns: minmax(0, 1.1fr) minmax(430px, 0.9fr);
}

.brand-panel,
.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-panel {
  padding: 64px clamp(48px, 6vw, 112px);
  border-right: 1px solid #dce6f1;
  background: #f4f8fc;
}

.brand-panel__inner {
  width: min(100%, 680px);
}

.brand-panel__mark,
.brand-panel__wordmark {
  overflow: hidden;
}

/* The source SVG is 300 × 42: its first 42 units are the emblem. */
.brand-panel__mark {
  width: clamp(128px, 15vw, 184px);
  aspect-ratio: 1;
  margin-bottom: 36px;
}

.brand-panel__wordmark {
  width: min(100%, 610px);
  aspect-ratio: 258 / 42;
}

.brand-panel__mark img,
.brand-panel__wordmark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-panel__mark img {
  object-position: left center;
}

.brand-panel__wordmark img {
  object-position: right center;
}

.login-panel {
  flex-direction: column;
  justify-content: initial;
  padding: 64px clamp(40px, 6vw, 112px) 96px;
}

.login-panel__inner {
  width: min(100%, 410px);
  margin-block: auto;
  transform: translateY(-22px);
}

h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.login-panel__intro {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 10px 0 26px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.account-help {
  position: relative;
  display: inline-flex;
}

.account-help__trigger {
  display: inline-grid;
  width: 16px;
  min-height: 16px;
  height: 16px;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  color: #7b8793;
  background: transparent;
  cursor: help;
}

.account-help__trigger svg {
  display: block;
  width: 16px;
  height: 16px;
}

.account-help__trigger:hover {
  color: #7b8793;
  background: transparent;
}

.account-help__tooltip {
  position: absolute;
  z-index: 1;
  right: 0;
  top: calc(100% + 2px);
  width: max-content;
  max-width: min(260px, calc(100vw - 40px));
  padding: 4px 11px;
  border-radius: 4px;
  color: #fff;
  background: #000;
  box-shadow: 0 3px 10px rgb(0 0 0 / 15%);
  font-size: 12px;
  line-height: 1.4;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.account-help__tooltip::after {
  position: absolute;
  bottom: 100%;
  right: 6px;
  border: 6px solid transparent;
  border-bottom-color: #000;
  content: "";
}

.account-help:hover .account-help__tooltip,
.account-help:focus-within .account-help__tooltip {
  opacity: 1;
  visibility: visible;
}

.login-support {
  position: absolute;
  right: 18px;
  bottom: 14px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: right;
}

.login-support a {
  color: var(--brand-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.login-support a:hover {
  color: var(--brand-blue-dark);
}

.login-error {
  margin: 0 0 12px;
  color: #b42318;
  font-size: 14px;
  line-height: 1.45;
}

.login-panel__inner.has-login-error .login-panel__intro {
  margin-bottom: 8px;
}

.login-error[hidden] {
  display: none;
}

.login-error__message {
  margin: 0;
}

.field + .field {
  margin-top: 16px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 650;
}

.field input,
.otp-disclosure input {
  display: block;
  width: 100%;
  padding: 6px 12px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  color: #333;
  background: #fff;
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 7.5%);
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
  transition:
    border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
}

.field input:focus,
.otp-disclosure input:focus {
  border-color: #99bddb;
  outline: 0;
  box-shadow:
    inset 0 1px 2px rgb(0 0 0 / 7.5%),
    0 0 0 4px rgb(51 122 183 / 25%);
}

.field input[aria-invalid="true"],
.field input[aria-invalid="true"]:focus {
  border-color: #dc3545;
}

.field input[aria-invalid="true"]::placeholder {
  color: #6c757d;
  opacity: 1;
}

button:focus-visible {
  outline: 3px solid #74b8ef;
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.otp-disclosure {
  margin-top: 16px;
}

.otp-disclosure__trigger {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 9px;
  padding: 0;
  border: 0;
  color: #337ab7;
  background: transparent;
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
  cursor: pointer;
}

.otp-disclosure__trigger::before {
  position: relative;
  top: -1px;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(45deg);
}

.otp-disclosure.is-open .otp-disclosure__trigger::before {
  top: 1px;
  transform: rotate(225deg);
}

.otp-disclosure__panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 160ms ease,
    opacity 120ms ease;
}

.otp-disclosure.is-open .otp-disclosure__panel {
  grid-template-rows: 1fr;
  opacity: 1;
}

.otp-disclosure__panel-inner {
  min-height: 0;
  margin-inline: -5px;
  padding-inline: 5px;
  overflow: hidden;
}

.otp-disclosure__field {
  width: min(100%, 200px);
  margin-top: 12px;
}

.otp-disclosure__hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  .otp-disclosure__panel {
    transition: none;
  }
}

form button[type="submit"] {
  width: 100%;
  margin-top: 16px;
  padding: 6px 12px;
  border: 1px solid #337ab7;
  border-radius: 6px;
  color: #fff;
  background: #337ab7;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 15%),
    0 1px 1px rgb(0 0 0 / 7.5%);
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  cursor: pointer;
}

form button[type="submit"]:hover {
  border-color: #296292;
  background: #2b689c;
}

@media (max-width: 900px) {
  .ion-alert.is-expanded p {
    max-height: min(35dvh, 260px);
  }

  .login-layout {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .brand-panel {
    justify-content: flex-start;
    padding: 42px 32px;
    border-right: 0;
    border-bottom: 1px solid #dce6f1;
  }

  .brand-panel__inner {
    width: min(100%, 560px);
    margin: 0 auto;
  }

  .login-panel {
    align-items: flex-start;
    padding: 52px 32px 32px;
  }

  .login-panel__inner {
    transform: none;
  }

  .login-support {
    position: static;
    justify-self: end;
    margin: 48px 24px 28px 0;
  }
}

@media (max-width: 520px) {
  .brand-panel {
    padding: 28px 20px;
  }

  .brand-panel__mark {
    width: 72px;
    margin-bottom: 18px;
  }

  .login-panel {
    padding: 40px 24px 20px;
  }

  .login-support {
    margin-top: 14px;
  }

  h1 {
    font-size: 30px;
  }
}
