/* The signed-out screens (spec 01 RE-ARC-63): a plain page, no card. A centred column holds the company's mark and name,
   the heading, the form and the links for the ways round; the foot has the way back to the site and the language, and at the
   very bottom the copyright with the platform's privacy policy and terms. The company's colours show in its mark and its
   buttons; on the central sign-in, the platform's own. Buttons are pills, as on the website. */
body.lre-door-page { background: #fff; }
.dark body.lre-door-page { background: var(--color-base-950); }

.lre-door { display: flex; min-height: 100vh; color: var(--color-base-700); }
.dark .lre-door { color: var(--color-base-300); }
.lre-door__side { display: flex; flex: 1 1 0; flex-direction: column; min-width: 0; padding: clamp(2rem, 9vh, 5.5rem) 1.5rem 1.75rem; }
.lre-door__main { width: 100%; max-width: 28rem; margin-inline: auto; }
/* The picture takes the page's far half without setting its height: the form does. */
.lre-door__pic { position: relative; display: none; flex: 1 1 0; overflow: hidden; }
.lre-door__pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 1024px) {
  .lre-door--picture .lre-door__pic { display: block; }
}

/* The company's mark and name, centred above the heading. */
.lre-door__brand { display: flex; align-items: center; justify-content: center; gap: 0.75rem; min-height: 2.5rem; margin-bottom: 1.75rem; }
.lre-door__mark {
  display: grid; flex: none; place-items: center; width: 2.5rem; height: 2.5rem; overflow: hidden; border-radius: 0.625rem;
  background: var(--color-chrome-highlight, #c8ad65); color: var(--color-chrome-bar, #2a1747);
}
.lre-door__mark img { width: 100%; height: 100%; object-fit: contain; }
.lre-door__mark--tile { background: #fff; border: 1px solid var(--color-base-200); }
.lre-door__mark--tile img { padding: 0.1875rem; }
.lre-door__name { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; color: var(--color-base-900); overflow-wrap: anywhere; }
.dark .lre-door__name { color: var(--color-base-50); }
.lre-door__logo { width: auto; max-width: 100%; height: 2.5rem; }

.lre-door__title {
  margin: 0 0 1.75rem; text-align: center; text-wrap: balance; font-size: 1.75rem; font-weight: 700; line-height: 1.2;
  letter-spacing: -0.02em; color: var(--color-base-900);
}
.dark .lre-door__title { color: var(--color-base-50); }
.lre-door__title:has(+ .lre-door__hint) { margin-bottom: 0.5rem; }
.lre-door__hint { margin: 0 0 1.75rem; text-align: center; text-wrap: balance; color: var(--color-base-600); }
.dark .lre-door__hint { color: var(--color-base-400); }
.lre-door__plain { margin: 0 0 1.5rem; text-align: center; text-wrap: balance; }

/* Links: bold and underlined, in the company's colour. */
.lre-door__link, .lre-door .lre-quiet, .lre-door .lre-quiet:hover {
  color: var(--color-primary-600) !important; font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
}
.dark .lre-door__link, .dark .lre-door .lre-quiet, .dark .lre-door .lre-quiet:hover { color: var(--color-primary-300) !important; }
.lre-door__link:hover, .lre-door .lre-quiet:hover { text-decoration-thickness: 2px; }
/* What is only a way round (forgot the password, use a recovery code, back to sign in) is a link under the main action. */
.lre-door .lre-quiet, .lre-door .lre-quiet:hover {
  height: auto; padding: 0.5rem 0.25rem; border: 0 !important; background: none !important; box-shadow: none !important; white-space: normal;
}
.lre-door__actions { display: grid; gap: 0.25rem; margin-top: 0.5rem; }
.lre-door__way { margin: 1.25rem 0 0; text-align: center; }
.lre-door__way--muted { color: var(--color-base-600); }
.dark .lre-door__way--muted { color: var(--color-base-400); }

/* The main action and the single sign-on buttons: pills. */
.lre-door .lre-door__btn {
  height: 3rem; padding-inline: 1.25rem; border: 0; border-radius: 9999px; background: var(--color-primary-600);
  color: var(--lre-on-primary, #fff); font-size: 0.9375rem; font-weight: 600; box-shadow: none;
}
.lre-door .lre-door__btn:hover { background: var(--color-primary-600); filter: brightness(1.15); }
.lre-door .lre-door__btn:focus-visible, .lre-door__social:focus-visible, .lre-door__row:focus-visible {
  outline: 2px solid var(--color-primary-600); outline-offset: 3px;
}
.dark .lre-door .lre-door__btn:focus-visible, .dark .lre-door__social:focus-visible, .dark .lre-door__row:focus-visible { outline-color: var(--color-primary-300); }

.lre-door__sso { display: grid; gap: 0.75rem; }
.lre-door__social {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 0.75rem; width: 100%; height: 3rem; padding-inline: 3rem;
  border: 1px solid var(--color-base-900); border-radius: 9999px; background: none; color: var(--color-base-900); font: inherit;
  font-size: 0.9375rem; font-weight: 600; text-decoration: none; cursor: pointer;
}
.dark .lre-door__social { border-color: var(--color-base-100); color: var(--color-base-100); }
.lre-door__social svg { position: absolute; inset-inline-start: 1rem; width: 1.25rem; height: 1.25rem; }
.lre-door__social:hover:not(:disabled) { background: var(--color-base-100); }
.dark .lre-door__social:hover:not(:disabled) { background: var(--color-base-800); }
/* Switched off until single sign-on is built (spec 03 RE-IAM-13). */
.lre-door__social:disabled { border-color: var(--color-base-200); color: var(--color-base-400); cursor: not-allowed; }
.dark .lre-door__social:disabled { border-color: var(--color-base-800); color: var(--color-base-500); }
.lre-door__social:disabled svg { opacity: 0.5; }
.lre-door__soon {
  position: absolute; inset-inline-end: 0.875rem; padding: 0.25rem 0.5625rem; border-radius: 9999px; background: var(--color-base-100);
  color: var(--color-base-600); font-size: 0.71875rem; font-style: normal; font-weight: 600; line-height: 1;
}
.dark .lre-door__soon { background: var(--color-base-800); color: var(--color-base-400); }
.lre-door__or { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; color: var(--color-base-600); font-size: 0.875rem; }
.dark .lre-door__or { color: var(--color-base-400); }
.lre-door__or::before, .lre-door__or::after { content: ""; flex: 1; height: 1px; background: var(--color-base-200); }
.dark .lre-door__or::before, .dark .lre-door__or::after { background: var(--color-base-800); }

/* The fields are the library's; here they take the page's size and a darker edge. */
.lre-door .form-field label, .lre-door .form-field > div > label {
  margin-bottom: 0.375rem; color: var(--color-base-900); font-size: 0.9375rem; font-weight: 600; white-space: normal;
}
.lre-door .form-field label span[class*="text-red"] { display: none; }  /* every field here is needed: no stars */
.dark .lre-door .form-field label { color: var(--color-base-50); }
.lre-door .form-field { margin-bottom: 1.25rem; }
.lre-door .form-field input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), .lre-door .form-field select {
  height: 3rem; padding-inline: 1rem; border: 1px solid var(--color-base-500); border-radius: 0.375rem; background: #fff;
  color: var(--color-base-900); font-size: 1rem; font-weight: 400; box-shadow: none;
}
.dark .lre-door .form-field input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), .dark .lre-door .form-field select {
  background: var(--color-base-900); color: var(--color-base-50);
}
.lre-door .form-field input:focus { outline: 2px solid var(--color-primary-600); outline-offset: 0; border-color: var(--color-primary-600); }
.dark .lre-door .form-field input:focus { outline-color: var(--color-primary-300); border-color: var(--color-primary-300); }
.lre-door .form-field input[readonly] { border-color: var(--color-base-200); background: var(--color-base-100); color: var(--color-base-600); }
.dark .lre-door .form-field input[readonly] { border-color: var(--color-base-800); background: var(--color-base-800); color: var(--color-base-400); }
.lre-door .form-field ul { margin: 0.375rem 0 0; padding: 0; list-style: none; }
.lre-door .form-field li, .lre-door .form-field .leading-relaxed { margin-top: 0.375rem; font-size: 0.8125rem; color: var(--color-base-600); }
.dark .lre-door .form-field li, .dark .lre-door .form-field .leading-relaxed { color: var(--color-base-400); }

/* The six digits, and the recovery code: large and centred (the form sets the number pad and the autofill). */
.lre-door #second-factor-check-form input[name="token"], .lre-door #second-factor-fresh-form input[name="token"],
.lre-door #second-factor-setup-form input[name="token"] {
  height: 3.5rem; padding-inline-start: 0.5em; font-size: 1.5rem; font-variant-numeric: tabular-nums; letter-spacing: 0.5em; text-align: center;
}

/* Setting up the authenticator app: the code on a white tile (it must stay dark on light to scan), its key under it. */
.lre-door__qr { display: grid; place-items: center; width: fit-content; margin: 0.25rem auto 0.75rem; padding: 0.625rem; border-radius: 0.625rem; background: #fff; }
.lre-door__qr img { display: block; max-width: 100%; height: auto; }
.lre-door__key {
  margin: 0 0 1.5rem; text-align: center; overflow-wrap: anywhere; color: var(--color-base-600); font: 500 0.875rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.08em;
}
.dark .lre-door__key { color: var(--color-base-400); }
.lre-door__codes {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 1rem; margin: 0 0 1.5rem; padding: 1rem; list-style: none;
  border-radius: 0.5rem; background: var(--color-base-100); text-align: center; font: 500 0.9375rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.dark .lre-door__codes { background: var(--color-base-800); }

/* A choice (a company, an app): a row with a hairline edge. */
.lre-door__rows { display: grid; gap: 0.75rem; }
.lre-door__row {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem 1.25rem; border: 1px solid var(--color-base-500); border-radius: 0.875rem;
  color: var(--color-base-900); text-decoration: none;
}
.dark .lre-door__row { color: var(--color-base-50); }
.lre-door__row:hover { border-color: var(--color-base-900); }
.dark .lre-door__row:hover { border-color: var(--color-base-100); }
.lre-door__row > span:not(.material-symbols-outlined) { flex: 1; min-width: 0; }
.lre-door__row b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.lre-door__row small { display: block; color: var(--color-base-600); font-size: 0.84375rem; }
.dark .lre-door__row small { color: var(--color-base-400); }
.lre-door__row > span.lre-door__plan { flex: none; color: var(--color-base-600); font-size: 0.8125rem; }  /* RE-IAM-18 */
.dark .lre-door__row > span.lre-door__plan { color: var(--color-base-400); }
.lre-door__row-icon { color: var(--color-primary-600); }
.dark .lre-door__row-icon { color: var(--color-primary-300); }
[dir="rtl"] .lre-door__row > .material-symbols-outlined:last-child, [dir="rtl"] .lre-door__back .material-symbols-outlined { transform: scaleX(-1); }

/* The foot: the way back and the language, then the copyright with the platform's privacy policy and terms at the bottom. */
.lre-door__foot { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; margin-top: auto; padding-top: 2.5rem; font-size: 0.8125rem; color: var(--color-base-600); }
.dark .lre-door__foot { color: var(--color-base-400); }
.lre-door__ways, .lre-door__legal { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.5rem 1.25rem; margin: 0; }
.lre-door__foot a { color: var(--color-primary-600); font-weight: 600; text-decoration: none; }
.dark .lre-door__foot a { color: var(--color-primary-300); }
.lre-door__foot a:hover { text-decoration: underline; text-underline-offset: 3px; }
.lre-door__back { display: inline-flex; align-items: center; gap: 0.375rem; }
.lre-door__langs { display: inline-flex; gap: 0.75rem; }
.lre-door__langs form { display: contents; }
.lre-door__langs button { padding: 0; border: 0; background: none; color: var(--color-primary-600); font: inherit; font-weight: 600; cursor: pointer; }
.dark .lre-door__langs button { color: var(--color-primary-300); }
.lre-door__langs button:hover { text-decoration: underline; text-underline-offset: 3px; }
.lre-door__langs button.is-on { color: var(--color-base-900); cursor: default; text-decoration: none; }
.dark .lre-door__langs button.is-on { color: var(--color-base-50); }
