.secure-login:not(.saeiv-login) {
  --portal-bg: #f7f9fc;
  --portal-paper: #fff;
  --portal-navy: #0d2c54;
  --portal-ink: #0d2c54;
  --portal-muted: #526174;
  --portal-line: #dbe3ed;
  --portal-soft: #eef2f7;
  background: var(--portal-bg);
  color: var(--portal-ink);
  display: block;
  padding: 0;
}

.dark .secure-login:not(.saeiv-login) {
  --portal-bg: #101827;
  --portal-paper: #182235;
  --portal-ink: #e9f1ff;
  --portal-muted: #b5c4d7;
  --portal-line: #536480;
  --portal-soft: #101827;
}

.secure-login:not(.saeiv-login) > .secure-shell {
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  grid-template-columns: minmax(0, 1fr);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.portal-access {
  grid-row: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  padding: clamp(1rem, 4vw, 3.5rem);
  gap: 1.75rem;
}

.portal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

.portal-language {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .25rem;
  padding: .25rem;
  background: var(--portal-soft);
  border: 1px solid var(--portal-line);
  border-radius: .625rem;
}

.portal-language button {
  min-height: 44px;
  padding-inline: .75rem;
  background: transparent;
  color: var(--portal-muted);
  border-radius: .375rem;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
}

.portal-language button[aria-pressed='true'] {
  color: var(--portal-ink);
  background: var(--portal-paper);
  box-shadow: 0 1px 3px #0d2c5420;
}

.portal-access .secure-link { color: var(--portal-ink); background: transparent; }

body .portal-access .secure-card {
  width: min(100%, 440px);
  justify-self: center;
  padding: clamp(1rem, 5vw, 2.25rem);
  border: 1px solid var(--portal-line);
  border-radius: 1rem;
  background: var(--portal-paper);
  color: var(--portal-ink);
  box-shadow: 0 8px 30px #0d2c5410;
}

body .portal-access .secure-brand { margin-block-end: 1.625rem; }
.portal-access .secure-brand img { height: 66px; width: auto; max-width: 100%; }
.dark .portal-access .secure-brand img { background: #fff; border-radius: .5rem; }
body .portal-access .secure-support { display: none; }
body .portal-access .secure-intro { color: var(--portal-muted); }
body .portal-access .secure-intro { margin-block-end: 1.5rem; }
body .portal-access .secure-field input {
  border-color: var(--portal-line);
  color: var(--portal-ink);
  background: var(--portal-paper);
  font-size: 1rem;
}
body .portal-access .secure-password input { padding-inline-end: 3.25rem; }
body .portal-access .secure-password > .secure-link {
  bottom: .125rem;
  display: grid;
  place-items: center;
  color: var(--portal-ink);
}
.portal-access .password-toggle-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.portal-access :focus-visible { outline-color: var(--portal-ink); }
.saeiv-login [data-password] svg { display: none; }
.portal-recovery { text-align: end; }
.portal-recovery button { font-size: .8rem; font-weight: 700; }
body .portal-access .secure-primary,
body .portal-access .secure-primary:hover:not(:disabled) {
  background: var(--portal-navy);
  color: #fff;
  border-color: var(--portal-navy);
}
.portal-footer { text-align: center; color: var(--portal-muted); font-size: .8rem; }
.portal-dialog {
  width: min(420px, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  padding: 1.5rem;
  color: var(--portal-ink);
  background: var(--portal-paper);
  border: 1px solid var(--portal-line);
  border-radius: 1rem;
}
.portal-dialog::backdrop { background: #0819329c; }
.portal-dialog h2 { margin-block: 0 .75rem; font-size: 1.25rem; }
.portal-dialog p { line-height: 1.65; }

body .secure-login:not(.saeiv-login) .secure-story { display: none; }

@media (min-width: 1000px) {
  .secure-login:not(.saeiv-login) > .secure-shell {
    grid-template-columns: minmax(0, 52fr) minmax(0, 48fr);
  }
  body .secure-login:not(.saeiv-login) .secure-story {
    display: flex;
    grid-row: 1;
    grid-column: 2;
    padding: clamp(2rem, 4vw, 4rem);
    background:
      radial-gradient(ellipse at top right, #66ace039, transparent 55%),
      repeating-linear-gradient(0deg, #fff1 0 1px, transparent 1px 48px),
      repeating-linear-gradient(90deg, #fff1 0 1px, transparent 1px 48px),
      var(--portal-navy);
    color: #fff;
  }
  .portal-story-header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    padding-block-end: 1.5rem;
    border-block-end: 1px solid #ffffff2e;
    color: #c7def9;
    font-size: .8rem;
  }
  .portal-story-copy { margin-block: auto; padding-block: 2.75rem; max-width: 35rem; }
  .portal-story-copy h2 { margin-block: 0 1rem; font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.3; text-wrap: balance; }
  .portal-story-copy p, .portal-pillars dd { color: #dce8f6; line-height: 1.65; }
  .portal-accent {
    width: 5rem;
    height: .25rem;
    margin-block: 1.75rem;
    border-radius: 1rem;
    background: linear-gradient(90deg, #e52822 0 68%, transparent 68% 74%, #66ace0 74%);
  }
  .portal-pillars { margin: 0; }
  .portal-pillars div { padding-block: .85rem; border-block-start: 1px solid #ffffff2e; }
  .portal-pillars dt { font-weight: 700; }
  .portal-pillars dd { margin: .25rem 0 0; font-size: .85rem; }
}
