/*
 * Learning Deck — adaptador de premontaje para las superficies de acceso.
 * Este archivo se carga exclusivamente en Login, Recovery y Reset. No modifica
 * el contrato de los formularios, no oculta campos y no contiene recursos externos.
 */

main:has(> #section-login[data-section-id="login"]) {
  --ld-paper: #ffffff;
  --ld-paper-soft: #f5f7fb;
  --ld-ink: #0f172a;
  --ld-muted: #5d6c80;
  --ld-line: #d5deea;
  --ld-accent: #2563eb;
  --ld-accent-strong: #1d4ed8;
  --ld-focus: #1644a5;
  position: relative;
  display: grid;
  box-sizing: border-box;
  min-height: 100svh;
  min-height: 100dvh;
  padding-block:
    env(safe-area-inset-top, 0px)
    env(safe-area-inset-bottom, 0px);
  overflow-x: hidden;
  isolation: isolate;
  background:
    linear-gradient(rgba(71, 85, 105, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(71, 85, 105, 0.032) 1px, transparent 1px),
    radial-gradient(circle at 50% 48%, rgba(37, 99, 235, 0.07), transparent 34%),
    #fcfcfb;
  background-size: 72px 72px, 72px 72px, auto, auto;
  color: var(--ld-ink);
}

/*
 * El tema activo pinta el canvas raiz en verde. Safari puede exponer ese color
 * en sus areas seguras, al rotar o cuando aplica zoom de pagina. Neutralizamos
 * solamente el documento cuya firma exacta corresponde al Login.
 */
html.ld-login-ready,
html:has(body main > #section-login[data-section-id="login"]),
body:has(main > #section-login[data-section-id="login"]) {
  min-width: 0;
  min-height: 100svh;
  background: #fcfcfb !important;
  color-scheme: light;
}

body:has(> main > #section-login[data-section-id="login"]) {
  margin: 0;
}

body:has(> main > #section-login[data-section-id="login"]) > main {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
}

main > #section-login[data-section-id="login"],
main > #section-login[data-section-id="login"] *,
main > #section-login[data-section-id="login"] *::before,
main > #section-login[data-section-id="login"] *::after {
  box-sizing: border-box;
}

/* Solo se oculta el Footer que sigue inmediatamente al Login confirmado. */
main > #section-login[data-section-id="login"] + #section-footer[data-section-id="footer"] {
  display: none !important;
}

/* El encabezado minimal de Kajabi no forma parte del Login aprobado. */
body:has(main > #section-login[data-section-id="login"]) #section-header[data-section-id="header"] {
  display: none !important;
}

main:has(> #section-login[data-section-id="login"])::before,
main:has(> #section-login[data-section-id="login"])::after {
  position: fixed;
  z-index: -1;
  background: rgba(71, 85, 105, 0.07);
  content: "";
  pointer-events: none;
}

main:has(> #section-login[data-section-id="login"])::before {
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
}

main:has(> #section-login[data-section-id="login"])::after {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}

main > #section-login[data-section-id="login"] {
  position: relative;
  z-index: 1;
  align-self: center;
  justify-self: center;
  width: min(calc(100% - 40px), 620px);
  min-width: 0;
  margin: clamp(56px, 8vh, 96px) auto;
  padding: clamp(34px, 4vw, 48px);
  border: 1px solid var(--ld-line);
  border-radius: 20px;
  background:
    linear-gradient(var(--ld-accent), var(--ld-accent)) 44px 0 / 76px 3px no-repeat,
    rgba(255, 255, 255, 0.99);
  box-shadow:
    0 38px 100px rgba(20, 39, 68, 0.15),
    0 10px 28px rgba(20, 39, 68, 0.07),
    inset 0 1px 0 #ffffff;
  color: var(--ld-ink);
}

main > #section-login[data-section-id="login"]::before,
main > #section-login[data-section-id="login"]::after {
  position: absolute;
  z-index: -2;
  left: 50%;
  width: calc(100% - 22px);
  height: calc(100% - 8px);
  border: 1px solid #d9e2ee;
  border-radius: 20px;
  background: rgba(250, 252, 255, 0.96);
  content: "";
  pointer-events: none;
  will-change: transform, opacity;
}

main > #section-login[data-section-id="login"]::before {
  top: 10px;
  transform: translateX(-50%) translate(-14px, 14px) rotate(-0.55deg);
  animation: ld-sheet-back 30s ease-in-out infinite alternate;
}

main > #section-login[data-section-id="login"]::after {
  top: 5px;
  width: calc(100% - 10px);
  transform: translateX(-50%) translate(11px, 8px) rotate(0.38deg);
  animation: ld-sheet-middle 26s ease-in-out infinite alternate;
}

html.ld-login-ready main > #section-login[data-section-id="login"] {
  margin-bottom: clamp(132px, 15vh, 164px);
}

main > #section-login[data-section-id="login"] > *:not(.ld-access-meta) {
  position: relative;
  z-index: 1;
}

/* Neutraliza solamente restricciones visuales comunes de la seccion Login. */
main > #section-login[data-section-id="login"] > section,
main > #section-login[data-section-id="login"] .sizer {
  height: auto !important;
  min-height: 0 !important;
}

main > #section-login[data-section-id="login"] .section__overlay {
  opacity: 0 !important;
  background: transparent !important;
}

main > #section-login[data-section-id="login"] .container,
main > #section-login[data-section-id="login"] .sizer,
main > #section-login[data-section-id="login"] .row,
main > #section-login[data-section-id="login"] [class*="col-"] {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 0;
}

main > #section-login[data-section-id="login"] .auth__content,
main > #section-login[data-section-id="login"] form#new_member_session {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: var(--ld-ink);
  background: transparent;
  box-shadow: none;
}

main > #section-login[data-section-id="login"] h1,
main > #section-login[data-section-id="login"] .auth__title,
main > #section-login[data-section-id="login"] .auth__heading {
  max-width: 470px;
  margin: 0 0 12px;
  color: var(--ld-ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(38px, 4vw, 52px);
  font-weight: 650;
  letter-spacing: -0.052em;
  line-height: 0.98;
  text-wrap: balance;
}

main > #section-login[data-section-id="login"] p,
main > #section-login[data-section-id="login"] .auth__subtitle,
main > #section-login[data-section-id="login"] .auth__text {
  color: var(--ld-muted);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

main > #section-login[data-section-id="login"] .auth__intro {
  margin-bottom: 28px;
}

main > #section-login[data-section-id="login"] .auth__intro > p:first-child {
  margin: 0 0 14px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

main > #section-login[data-section-id="login"] .auth__intro > p:last-child {
  max-width: 430px;
  margin: 0;
}

main > #section-login[data-section-id="login"] .auth__label,
main > #section-login[data-section-id="login"] label:not(.sr-only) {
  color: var(--ld-ink) !important;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

main > #section-login[data-section-id="login"] .auth__label {
  display: block;
  margin-bottom: 8px;
}

main > #section-login[data-section-id="login"] .form-group,
main > #section-login[data-section-id="login"] .auth__field-group {
  min-width: 0;
  margin-bottom: 17px;
}

main > #section-login[data-section-id="login"] .form-control.auth__field,
main > #section-login[data-section-id="login"] #member_email,
main > #section-login[data-section-id="login"] #member_password {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 56px;
  padding: 0 16px;
  border: 1px solid #d6dee8;
  border-radius: 12px;
  outline: none;
  background: var(--ld-paper-soft);
  color: #172033;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

main > #section-login[data-section-id="login"] #member_password {
  padding-right: 60px;
}

main > #section-login[data-section-id="login"] .form-control.auth__field::placeholder,
main > #section-login[data-section-id="login"] #member_email::placeholder,
main > #section-login[data-section-id="login"] #member_password::placeholder {
  color: #8b98aa;
  opacity: 1;
}

main > #section-login[data-section-id="login"] .form-control.auth__field:focus-visible,
main > #section-login[data-section-id="login"] #member_email:focus-visible,
main > #section-login[data-section-id="login"] #member_password:focus-visible {
  border-color: var(--ld-accent) !important;
  outline: 3px solid var(--ld-focus) !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16) !important;
  background: #ffffff !important;
}

main > #section-login[data-section-id="login"] .form-control.auth__field:-webkit-autofill,
main > #section-login[data-section-id="login"] .form-control.auth__field:-webkit-autofill:hover,
main > #section-login[data-section-id="login"] .form-control.auth__field:-webkit-autofill:focus {
  -webkit-text-fill-color: #172033;
  caret-color: #172033;
  box-shadow: inset 0 0 0 1000px var(--ld-paper-soft);
}

main > #section-login[data-section-id="login"] .form-control.auth__field:-webkit-autofill:focus {
  border-color: var(--ld-accent);
  box-shadow:
    inset 0 0 0 1000px #ffffff,
    0 0 0 4px rgba(37, 99, 235, 0.16);
}

main > #section-login[data-section-id="login"] [aria-invalid="true"],
main > #section-login[data-section-id="login"] .field_with_errors .form-control,
main > #section-login[data-section-id="login"] .has-error .form-control {
  border-color: #b42318;
  box-shadow: inset 3px 0 0 #b42318;
}

main > #section-login[data-section-id="login"] .auth__error,
main > #section-login[data-section-id="login"] .form-error,
main > #section-login[data-section-id="login"] .help-block {
  color: #9f1c13;
  font-size: 12px;
  line-height: 1.45;
}

.ld-password-control {
  position: relative;
  min-width: 0;
}

.ld-password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transform: translateY(-50%);
  transition:
    color 180ms ease,
    background-color 180ms ease;
}

.ld-password-toggle:hover {
  background: rgba(37, 99, 235, 0.07);
  color: var(--ld-accent-strong);
}

.ld-password-toggle:focus-visible {
  outline: 3px solid var(--ld-focus);
  outline-offset: 2px;
}

.ld-password-toggle svg {
  width: 20px;
  height: 20px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.ld-password-toggle__slash {
  opacity: 0;
  transition: opacity 180ms ease;
}

.ld-password-toggle.is-visible .ld-password-toggle__slash {
  opacity: 1;
}

main > #section-login[data-section-id="login"] #form-button.form-btn,
main > #section-login[data-section-id="login"] button[type="submit"],
main > #section-login[data-section-id="login"] input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  margin-top: 8px;
  padding: 0 20px;
  border: 1px solid var(--ld-accent-strong);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--ld-accent-strong), var(--ld-accent));
  box-shadow:
    0 12px 24px rgba(37, 99, 235, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

main > #section-login[data-section-id="login"] #form-button.form-btn:focus-visible,
main > #section-login[data-section-id="login"] button[type="submit"]:focus-visible,
main > #section-login[data-section-id="login"] input[type="submit"]:focus-visible {
  outline: 3px solid var(--ld-focus);
  outline-offset: 3px;
}

main > #section-login[data-section-id="login"] .auth__link,
main > #section-login[data-section-id="login"] a[href="/password/new"] {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #1e293b;
  font-size: 12px;
  font-weight: 600;
  text-underline-offset: 4px;
}

main > #section-login[data-section-id="login"] a[href="/password/new"]:focus-visible {
  border-radius: 4px;
  outline: 3px solid var(--ld-focus);
  outline-offset: 2px;
}

main > #section-login[data-section-id="login"] label:has(#member_remember_me) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 9px;
  color: var(--ld-ink) !important;
}

main > #section-login[data-section-id="login"] #member_remember_me {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--ld-accent);
}

main > #section-login[data-section-id="login"] #member_remember_me:focus-visible {
  outline: 3px solid var(--ld-focus);
  outline-offset: 3px;
}

main > #section-login[data-section-id="login"] .auth__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 14px;
}

main > #section-login[data-section-id="login"] .auth__actions label {
  margin: 0;
}

main > #section-login[data-section-id="login"] .auth__actions > .form-group,
main > #section-login[data-section-id="login"] .auth__actions > .auth__link {
  margin: 0;
}

main > #section-login[data-section-id="login"] .auth__actions > .auth__link {
  text-align: right;
}

.ld-access-meta {
  position: absolute;
  z-index: 3;
  top: calc(100% + 24px);
  left: 50%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  width: min(calc(100vw - 40px), 680px);
  min-width: 0;
  min-height: 64px;
  padding: 8px 18px;
  border-top: 1px solid #dce4ef;
  color: #53657b;
  transform: translateX(-50%);
}

.ld-collaborators {
  display: flex;
  grid-column: 2;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 0;
  height: 48px;
  pointer-events: none;
}

.ld-isotype {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 52px;
  height: 46px;
  opacity: 0.84;
  line-height: 0;
  transform-origin: center;
  will-change: transform, opacity;
  animation: ld-isotype-signature 18s ease-in-out infinite;
}

.ld-isotype img {
  display: block;
  max-width: 100%;
  object-fit: contain;
}

.ld-isotype--odm img {
  width: 36px;
  height: 42px;
}

.ld-isotype--agro {
  animation-delay: -6s;
}

.ld-isotype--agro img {
  width: 34px;
  height: 42px;
}

.ld-isotype--hc {
  animation-delay: -12s;
}

.ld-isotype--hc img {
  width: 42px;
  height: 31px;
}

.ld-support {
  display: inline-flex;
  grid-column: 3;
  align-items: center;
  justify-self: end;
  gap: 7px;
  min-width: 112px;
  min-height: 44px;
  padding-left: 14px;
  border-left: 1px solid #dbe4ef;
  color: #42536a;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    color 220ms ease,
    transform 220ms ease;
}

.ld-support:hover {
  color: var(--ld-accent-strong);
}

.ld-support:focus-visible {
  border-radius: 8px;
  outline: 3px solid var(--ld-focus);
  outline-offset: 2px;
}

.ld-support__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  transform-origin: center;
  will-change: transform;
  animation: ld-support-idle 14s ease-in-out infinite;
  transition: transform 160ms ease;
}

.ld-support__mark {
  display: block;
  width: 34px;
  height: 34px;
  overflow: visible;
}

.ld-support__headset,
.ld-support__face,
.ld-support__torso {
  transform-box: fill-box;
  transform-origin: center;
  will-change: transform;
}

.ld-support__copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.ld-support__label,
.ld-support__channel {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ld-support__label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ld-support__label::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ld-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  content: "";
}

.ld-support__channel {
  color: #15803d;
  letter-spacing: 0.045em;
}

/*
 * Password Recovery y Password Reset conservan sus formularios nativos.
 * JavaScript agrega estas clases solo cuando reconoce las firmas exactas de
 * los campos Kajabi; Login mantiene su alcance independiente.
 */
html.ld-password-ready,
html.ld-password-ready body {
  min-width: 0;
  min-height: 100svh;
  background: #fcfcfb !important;
  color-scheme: light;
}

html.ld-password-ready body {
  margin: 0;
}

html.ld-password-ready body > main {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
}

html.ld-password-ready main {
  --ld-paper: #ffffff;
  --ld-paper-soft: #f5f7fb;
  --ld-ink: #0f172a;
  --ld-muted: #5d6c80;
  --ld-line: #d5deea;
  --ld-accent: #2563eb;
  --ld-accent-strong: #1d4ed8;
  --ld-focus: #1644a5;
  position: relative;
  display: grid;
  box-sizing: border-box;
  min-height: 100svh;
  min-height: 100dvh;
  padding:
    env(safe-area-inset-top, 0px)
    env(safe-area-inset-right, 0px)
    env(safe-area-inset-bottom, 0px)
    env(safe-area-inset-left, 0px);
  overflow-x: hidden;
  isolation: isolate;
  background:
    linear-gradient(rgba(71, 85, 105, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(71, 85, 105, 0.032) 1px, transparent 1px),
    radial-gradient(circle at 50% 44%, rgba(37, 99, 235, 0.07), transparent 34%),
    #fcfcfb;
  background-size: 72px 72px, 72px 72px, auto, auto;
  color: var(--ld-ink);
}

html.ld-password-ready main::before,
html.ld-password-ready main::after {
  position: fixed;
  z-index: -1;
  background: rgba(71, 85, 105, 0.07);
  content: "";
  pointer-events: none;
}

html.ld-password-ready main::before {
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
}

html.ld-password-ready main::after {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}

html.ld-password-ready #section-header[data-section-id="header"],
html.ld-password-ready #section-footer[data-section-id="footer"] {
  display: none !important;
}

html.ld-password-ready main > .ld-password-surface,
html.ld-password-ready main > .ld-password-surface *,
html.ld-password-ready main > .ld-password-surface *::before,
html.ld-password-ready main > .ld-password-surface *::after {
  box-sizing: border-box;
}

html.ld-password-ready main > .ld-password-surface {
  position: relative;
  z-index: 1;
  align-self: center;
  justify-self: center;
  width: min(calc(100% - 40px), 560px);
  min-width: 0;
  margin: clamp(54px, 8vh, 92px) auto clamp(138px, 16vh, 170px);
  padding: clamp(34px, 4vw, 46px);
  border: 1px solid var(--ld-line);
  border-radius: 20px;
  background:
    linear-gradient(var(--ld-accent), var(--ld-accent)) 44px 0 / 76px 3px no-repeat,
    rgba(255, 255, 255, 0.99);
  box-shadow:
    0 38px 100px rgba(20, 39, 68, 0.15),
    0 10px 28px rgba(20, 39, 68, 0.07),
    inset 0 1px 0 #ffffff;
  color: var(--ld-ink);
}

html.ld-password-ready main > .ld-password-surface::before,
html.ld-password-ready main > .ld-password-surface::after {
  position: absolute;
  z-index: -2;
  left: 50%;
  width: calc(100% - 22px);
  height: calc(100% - 8px);
  border: 1px solid #d9e2ee;
  border-radius: 20px;
  background: rgba(250, 252, 255, 0.96);
  content: "";
  pointer-events: none;
  will-change: transform, opacity;
}

html.ld-password-ready main > .ld-password-surface::before {
  top: 10px;
  transform: translateX(-50%) translate(-14px, 14px) rotate(-0.55deg);
  animation: ld-sheet-back 30s ease-in-out infinite alternate;
}

html.ld-password-ready main > .ld-password-surface::after {
  top: 5px;
  width: calc(100% - 10px);
  transform: translateX(-50%) translate(11px, 8px) rotate(0.38deg);
  animation: ld-sheet-middle 26s ease-in-out infinite alternate;
}

html.ld-password-ready main > .ld-password-surface > *:not(.ld-access-meta) {
  position: relative;
  z-index: 1;
}

html.ld-password-ready .ld-password-surface,
html.ld-password-ready .ld-password-surface .sizer {
  height: auto !important;
  min-height: 0 !important;
}

html.ld-password-ready .ld-password-surface .container,
html.ld-password-ready .ld-password-surface .sizer,
html.ld-password-ready .ld-password-surface .row,
html.ld-password-ready .ld-password-surface [class*="col-"] {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 0;
}

html.ld-password-ready .ld-password-surface .auth__content,
html.ld-password-ready .ld-password-surface .ld-password-form {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: var(--ld-ink);
  background: transparent;
  box-shadow: none;
  text-align: left;
}

html.ld-password-ready .ld-password-surface h1,
html.ld-password-ready .ld-password-surface .auth__title {
  max-width: 450px;
  margin: 0 0 12px;
  color: var(--ld-ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(38px, 4vw, 48px);
  font-weight: 650;
  letter-spacing: -0.052em;
  line-height: 1;
  text-wrap: balance;
}

html.ld-password-ready .ld-password-surface p,
html.ld-password-ready .ld-password-surface .auth__text {
  color: var(--ld-muted);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

html.ld-password-ready .ld-password-surface .auth__intro {
  margin-bottom: 28px;
}

html.ld-password-ready .ld-password-surface .auth__intro > p:first-child {
  margin: 0 0 14px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

html.ld-password-ready .ld-password-surface .auth__intro > p:last-child {
  max-width: 430px;
  margin: 0;
}

html.ld-password-ready .ld-password-surface .auth__label,
html.ld-password-ready .ld-password-surface label:not(.sr-only) {
  display: block;
  margin-bottom: 8px;
  color: var(--ld-ink) !important;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

html.ld-password-ready .ld-password-surface .form-group,
html.ld-password-ready .ld-password-surface .auth__group {
  min-width: 0;
  margin-bottom: 17px;
}

html.ld-password-ready .ld-password-surface .form-control.auth__field,
html.ld-password-ready .ld-password-surface #member_email,
html.ld-password-ready .ld-password-surface #member_password,
html.ld-password-ready .ld-password-surface #member_password_confirmation {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 56px;
  padding: 0 16px;
  border: 1px solid #d6dee8;
  border-radius: 12px;
  outline: none;
  background: var(--ld-paper-soft);
  color: #172033;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

html.ld-password-ready .ld-password-surface .ld-password-control > #member_password,
html.ld-password-ready .ld-password-surface .ld-password-control > #member_password_confirmation {
  padding-right: 60px;
}

html.ld-password-ready .ld-password-surface .form-control.auth__field::placeholder {
  color: #8b98aa;
  opacity: 1;
}

html.ld-password-ready .ld-password-surface .form-control.auth__field:focus-visible {
  border-color: var(--ld-accent) !important;
  outline: 3px solid var(--ld-focus) !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16) !important;
  background: #ffffff !important;
}

html.ld-password-ready .ld-password-surface [aria-invalid="true"],
html.ld-password-ready .ld-password-surface .field_with_errors .form-control,
html.ld-password-ready .ld-password-surface .auth__group--error .form-control {
  border-color: #b42318;
  box-shadow: inset 3px 0 0 #b42318;
}

html.ld-password-ready .ld-password-surface .auth__message,
html.ld-password-ready .ld-password-surface .form-error,
html.ld-password-ready .ld-password-surface .help-block {
  display: block;
  margin: 8px 0 0;
  color: #9f1c13;
  font-size: 12px;
  line-height: 1.45;
}

html.ld-password-ready .ld-password-surface .alert {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #f1b7b2;
  border-radius: 10px;
  background: #fff5f4;
}

html.ld-password-ready .ld-password-surface #form-button.form-btn,
html.ld-password-ready .ld-password-surface button[type="submit"],
html.ld-password-ready .ld-password-surface input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  margin-top: 8px;
  padding: 0 20px;
  border: 1px solid var(--ld-accent-strong);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--ld-accent-strong), var(--ld-accent));
  box-shadow:
    0 12px 24px rgba(37, 99, 235, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

html.ld-password-ready .ld-password-surface #form-button.form-btn:focus-visible,
html.ld-password-ready .ld-password-surface button[type="submit"]:focus-visible,
html.ld-password-ready .ld-password-surface input[type="submit"]:focus-visible,
html.ld-password-ready .ld-password-surface .auth__link a:focus-visible {
  border-radius: 5px;
  outline: 3px solid var(--ld-focus);
  outline-offset: 3px;
}

html.ld-password-ready .ld-password-surface .auth__link {
  display: flex;
  justify-content: center;
  min-height: 44px;
  margin-top: 14px;
  text-align: center;
}

html.ld-password-ready .ld-password-surface .auth__link a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #1e293b;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-underline-offset: 4px;
}

html.ld-password-ready .ld-password-surface .ld-access-meta {
  top: calc(100% + 24px);
}

@media (hover: hover) and (pointer: fine) {
  main > #section-login[data-section-id="login"] #form-button.form-btn:hover,
  main > #section-login[data-section-id="login"] button[type="submit"]:hover,
  main > #section-login[data-section-id="login"] input[type="submit"]:hover {
    background: linear-gradient(135deg, #1e40af, var(--ld-accent-strong));
    box-shadow:
      0 15px 30px rgba(37, 99, 235, 0.24),
      inset 0 1px 0 rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
  }

  html.ld-password-ready .ld-password-surface #form-button.form-btn:hover,
  html.ld-password-ready .ld-password-surface button[type="submit"]:hover,
  html.ld-password-ready .ld-password-surface input[type="submit"]:hover {
    background: linear-gradient(135deg, #1e40af, var(--ld-accent-strong));
    box-shadow:
      0 15px 30px rgba(37, 99, 235, 0.24),
      inset 0 1px 0 rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
  }

  .ld-support:hover .ld-support__headset {
    animation: ld-support-headset 920ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .ld-support:hover .ld-support__face {
    animation: ld-support-face 920ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .ld-support:hover .ld-support__torso {
    animation: ld-support-torso 920ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }
}

.ld-support:focus-visible .ld-support__headset {
  animation: ld-support-headset 920ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ld-support:focus-visible .ld-support__face {
  animation: ld-support-face 920ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ld-support:focus-visible .ld-support__torso {
  animation: ld-support-torso 920ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes ld-sheet-back {
  from {
    opacity: 0.82;
    transform: translateX(-50%) translate(-14px, 14px) rotate(-0.55deg);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translate(-10px, 17px) rotate(-0.2deg);
  }
}

@keyframes ld-sheet-middle {
  from {
    opacity: 0.88;
    transform: translateX(-50%) translate(11px, 8px) rotate(0.38deg);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translate(8px, 11px) rotate(0.1deg);
  }
}

@keyframes ld-isotype-signature {
  0%,
  100% {
    opacity: 0.76;
    transform: translate3d(0, 1px, 0) scale(0.98);
  }
  50% {
    opacity: 0.9;
    transform: translate3d(0, -1px, 0) scale(1.02);
  }
}

@keyframes ld-support-idle {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(0, -1px, 0) rotate(1.2deg);
  }
}

@keyframes ld-support-headset {
  0% {
    transform: rotate(0deg) scale(1);
  }
  45% {
    transform: rotate(-4deg) scale(1.05);
  }
  100% {
    transform: rotate(0deg) scale(1);
  }
}

@keyframes ld-support-face {
  0%,
  100% {
    transform: translateY(0);
  }
  48% {
    transform: translateY(-5px);
  }
}

@keyframes ld-support-torso {
  0%,
  100% {
    transform: scale(1);
  }
  48% {
    transform: scale(1.035);
  }
}

@media (max-width: 680px) {
  main:has(> #section-login[data-section-id="login"]) {
    background-size: 48px 48px, 48px 48px, auto, auto;
  }

  html.ld-password-ready main {
    background-size: 48px 48px, 48px 48px, auto, auto;
  }

  main > #section-login[data-section-id="login"] {
    width: min(calc(100% - 24px), 620px);
    margin-top: 38px;
    padding: 28px clamp(18px, 6vw, 26px) 30px;
    border-radius: 17px;
  }

  html.ld-password-ready main > .ld-password-surface {
    width: min(calc(100% - 24px), 560px);
    margin-top: 38px;
    margin-bottom: 132px;
    padding: 28px clamp(18px, 6vw, 26px) 30px;
    border-radius: 17px;
  }

  html.ld-login-ready main > #section-login[data-section-id="login"] {
    margin-bottom: 132px;
  }

  main > #section-login[data-section-id="login"]::before {
    display: none;
  }

  html.ld-password-ready main > .ld-password-surface::before {
    display: none;
  }

  main > #section-login[data-section-id="login"]::after {
    top: 7px;
    width: calc(100% - 12px);
    transform: translateX(-50%) translate(0, 8px);
    animation-duration: 30s;
  }

  html.ld-password-ready main > .ld-password-surface::after {
    top: 7px;
    width: calc(100% - 12px);
    transform: translateX(-50%) translate(0, 8px);
    animation-duration: 30s;
  }

  main > #section-login[data-section-id="login"] h1,
  main > #section-login[data-section-id="login"] .auth__title,
  main > #section-login[data-section-id="login"] .auth__heading {
    font-size: clamp(36px, 10vw, 44px);
  }

  html.ld-password-ready .ld-password-surface h1,
  html.ld-password-ready .ld-password-surface .auth__title {
    font-size: clamp(35px, 9.4vw, 42px);
  }

  .ld-access-meta {
    top: calc(100% + 18px);
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    width: min(calc(100vw - 24px), 520px);
    min-height: 70px;
    padding: 8px 10px;
  }

  .ld-collaborators {
    grid-column: 1;
    justify-self: end;
    gap: 8px;
  }

  .ld-isotype {
    width: 46px;
  }

  .ld-support {
    grid-column: 2;
    justify-self: start;
    min-width: 104px;
    padding-left: 10px;
  }
}

@media (max-width: 359px) {
  main > #section-login[data-section-id="login"] .auth__actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }

  main > #section-login[data-section-id="login"] .auth__actions > .auth__link,
  main > #section-login[data-section-id="login"] .auth__actions > a {
    align-self: flex-end;
  }

  main > #section-login[data-section-id="login"] {
    width: calc(100% - 16px);
    margin-top: 24px;
    padding: 24px 14px 26px;
    border-radius: 15px;
  }

  html.ld-password-ready main > .ld-password-surface {
    width: calc(100% - 16px);
    margin-top: 24px;
    margin-bottom: 126px;
    padding: 24px 14px 26px;
    border-radius: 15px;
  }

  html.ld-login-ready main > #section-login[data-section-id="login"] {
    margin-bottom: 126px;
  }

  main > #section-login[data-section-id="login"] h1,
  main > #section-login[data-section-id="login"] .auth__title,
  main > #section-login[data-section-id="login"] .auth__heading {
    font-size: clamp(34px, 11vw, 39px);
  }

  html.ld-password-ready .ld-password-surface h1,
  html.ld-password-ready .ld-password-surface .auth__title {
    font-size: clamp(33px, 10.8vw, 38px);
  }

  main > #section-login[data-section-id="login"] .form-control.auth__field,
  main > #section-login[data-section-id="login"] #member_email,
  main > #section-login[data-section-id="login"] #member_password,
  main > #section-login[data-section-id="login"] #form-button.form-btn,
  main > #section-login[data-section-id="login"] button[type="submit"],
  main > #section-login[data-section-id="login"] input[type="submit"] {
    min-height: 52px;
  }

  html.ld-password-ready .ld-password-surface .form-control.auth__field,
  html.ld-password-ready .ld-password-surface #member_email,
  html.ld-password-ready .ld-password-surface #member_password,
  html.ld-password-ready .ld-password-surface #member_password_confirmation,
  html.ld-password-ready .ld-password-surface #form-button.form-btn,
  html.ld-password-ready .ld-password-surface button[type="submit"],
  html.ld-password-ready .ld-password-surface input[type="submit"] {
    min-height: 52px;
  }

  .ld-access-meta {
    gap: 7px;
    width: calc(100vw - 16px);
    padding-right: 6px;
    padding-left: 6px;
  }

  .ld-collaborators {
    gap: 5px;
  }

  .ld-isotype {
    width: 42px;
  }

  .ld-isotype--odm img {
    width: 33px;
    height: 39px;
  }

  .ld-isotype--agro img {
    width: 31px;
    height: 39px;
  }

  .ld-isotype--hc img {
    width: 39px;
    height: 29px;
  }

  .ld-support {
    gap: 5px;
    min-width: 96px;
    padding-left: 7px;
  }

  .ld-support__icon,
  .ld-support__mark {
    width: 32px;
    height: 32px;
  }

  .ld-support__label,
  .ld-support__channel {
    font-size: 8px;
  }
}

/*
 * Safari conserva el desplazamiento al girar. En paisaje corto compactamos
 * el stack y lo anclamos arriba para que el inicio siga siendo recuperable.
 */
@media (orientation: landscape) and (max-height: 600px) {
  main:has(> #section-login[data-section-id="login"]) {
    align-content: start;
  }

  html.ld-password-ready main {
    align-content: start;
  }

  main > #section-login[data-section-id="login"] {
    align-self: start;
    margin-top: 16px;
    padding-top: 24px;
    padding-bottom: 28px;
  }

  html.ld-login-ready main > #section-login[data-section-id="login"] {
    margin-bottom: 108px;
  }

  html.ld-password-ready main > .ld-password-surface {
    align-self: start;
    margin-top: 16px;
    margin-bottom: 108px;
    padding-top: 24px;
    padding-bottom: 28px;
  }

  .ld-access-meta {
    top: calc(100% + 16px);
  }

  main > #section-login[data-section-id="login"] .auth__intro {
    margin-bottom: 20px;
  }

  html.ld-password-ready .ld-password-surface .auth__intro {
    margin-bottom: 20px;
  }
}

@media (update: slow) {
  main > #section-login[data-section-id="login"]::before,
  main > #section-login[data-section-id="login"]::after,
  html.ld-password-ready main > .ld-password-surface::before,
  html.ld-password-ready main > .ld-password-surface::after,
  .ld-isotype,
  .ld-support__icon {
    animation: none;
    will-change: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  main > #section-login[data-section-id="login"]::before,
  main > #section-login[data-section-id="login"]::after,
  html.ld-password-ready main > .ld-password-surface::before,
  html.ld-password-ready main > .ld-password-surface::after,
  .ld-isotype,
  .ld-support__icon,
  .ld-support__headset,
  .ld-support__face,
  .ld-support__torso {
    animation: none !important;
    transform: none;
    will-change: auto;
  }

  main > #section-login[data-section-id="login"] *,
  main > #section-login[data-section-id="login"] *::before,
  main > #section-login[data-section-id="login"] *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  html.ld-password-ready .ld-password-surface *,
  html.ld-password-ready .ld-password-surface *::before,
  html.ld-password-ready .ld-password-surface *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  main > #section-login[data-section-id="login"],
  main > #section-login[data-section-id="login"]::before,
  main > #section-login[data-section-id="login"]::after,
  html.ld-password-ready main > .ld-password-surface,
  html.ld-password-ready main > .ld-password-surface::before,
  html.ld-password-ready main > .ld-password-surface::after,
  .ld-access-meta {
    border-color: CanvasText;
    background: Canvas;
    box-shadow: none;
  }

  main > #section-login[data-section-id="login"] #form-button.form-btn,
  main > #section-login[data-section-id="login"] button[type="submit"],
  main > #section-login[data-section-id="login"] input[type="submit"] {
    border: 2px solid ButtonText;
    background: ButtonFace;
    color: ButtonText;
  }

  html.ld-password-ready .ld-password-surface #form-button.form-btn,
  html.ld-password-ready .ld-password-surface button[type="submit"],
  html.ld-password-ready .ld-password-surface input[type="submit"] {
    border: 2px solid ButtonText;
    background: ButtonFace;
    color: ButtonText;
  }
}
