/* The image panel and the form share one edge from desktop down to mobile. */
.lm-auth {
  --auth-paper: #faf9f6;
  --auth-ink: #191b1b;
  --auth-muted: #565c59;
  --auth-green: #00664f;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--auth-paper);
  color: var(--auth-ink);
}
.lm-auth-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}
.lm-auth-art {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 3rem;
  padding: clamp(2rem, 4.3vw, 5rem);
  background: #191411;
  color: white;
}
.lm-auth-photo, .lm-auth-photo img, .lm-auth-art::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.lm-auth-photo { z-index: -2; display: block; }
.lm-auth-photo img { display: block; object-fit: cover; object-position: 58% 53%; }
.lm-auth-art::after {
  z-index: -1;
  content: "";
  pointer-events: none;
  background: linear-gradient(0deg, rgb(9 7 6 / 75%), transparent 43%),
              linear-gradient(118deg, rgb(10 7 6 / 48%), transparent 53%);
}
.lm-auth-brand { width: clamp(180px, 17vw, 264px); }
.lm-auth-brand img { display: block; width: 100%; height: auto; }
.lm-auth-art-title {
  max-width: 100%;
  margin: 0;
  font-size: clamp(3.2rem, 5.4vw, 6.35rem);
  font-weight: 660;
  letter-spacing: -.062em;
  line-height: .96;
  text-shadow: 0 2px 16px rgb(0 0 0 / 20%);
}
.lm-auth-art-title em {
  display: block;
  color: #f6ead7;
  font-family: "Baskervville", Georgia, serif;
  font-weight: 400;
  font-style: italic;
  letter-spacing: -.055em;
}
.lm-auth-form-side {
  min-width: 0;
  display: grid;
  place-items: center;
  padding: clamp(2rem, 6vh, 6rem) clamp(2rem, 5vw, 6rem);
}
.lm-auth-content { width: min(100%, 25rem); }
.lm-auth-content h1 {
  margin: 0;
  font-size: clamp(2rem, 3.2vw, 3.25rem);
  font-weight: 690;
  line-height: 1.08;
  letter-spacing: -.055em;
  text-wrap: balance;
}
.lm-auth-content h1:focus { outline: none; }
.lm-auth-intro, .lm-auth-setup > p {
  color: var(--auth-muted, var(--muted));
  line-height: 1.55;
  font-size: 1rem;
  margin: .72rem 0 0;
}
.lm-auth-content h1 + .lm-auth-form { margin-top: clamp(1.5rem, 4vh, 2.15rem); }
.lm-auth-intro + :is(.lm-auth-form, .lm-auth-submit, .lm-auth-username),
.lm-auth-saved + .lm-auth-form { margin-top: 1.35rem; }
.lm-auth-form, .lm-auth-setup { display: grid; gap: 1.05rem; }
.lm-auth-setup > p { margin: 0; }
.lm-auth-field { display: grid; gap: .5rem; min-width: 0; text-align: start; }
.lm-auth-field > :is(span, label):not(.lm-auth-input-wrap),
.lm-auth-label-row > label { font-size: .9rem; line-height: 1.4; font-weight: 650; }
.lm-auth-label-row { display: flex; align-items: center; justify-content: space-between; gap: .55rem; }
.lm-auth-field input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 3.15rem;
  padding: .68rem .95rem;
  border: 1px solid #b9bfb9;
  border-radius: .7rem;
  background: #fff;
  color: #1a201c;
  font: inherit;
  font-size: 1rem;
}
.lm-auth-field input::placeholder { color: #676e69; opacity: 1; }
.lm-pass-wrap, .lm-auth-input-wrap {
  display: flex;
  position: relative;
  align-items: center;
  min-width: 0;
}
.lm-auth-field-icon {
  position: absolute;
  display: grid;
  place-items: center;
  inset-inline-start: .9rem;
  color: #69756d;
  pointer-events: none;
}
.lm-auth-field-icon ~ input { padding-inline-start: 2.7rem; }
.lm-pass-wrap input { padding-inline-end: 6.5rem; }
.lm-show-pass {
  position: absolute;
  inset-inline-end: .2rem;
  min-height: 44px;
  min-width: 44px;
  border: 0;
  padding: .4rem .62rem;
  border-radius: .55rem;
  background: transparent;
  color: #275848;
  font-size: .85rem;
  font-weight: 650;
}
.lm-auth-forgot {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 44px;
  margin-block: -.65rem;
  padding: .4rem 0 .4rem .4rem;
  border: 0;
  background: none;
  color: var(--auth-green);
  text-align: end;
  text-decoration: none;
  font-size: .875rem;
  font-weight: 650;
}
.lm-auth-field small, .lm-auth-username small { color: var(--muted); font-size: .875rem; }
.lm-auth-submit {
  width: 100%;
  min-height: 3.2rem;
  margin-top: .25rem;
  padding: .75rem 1rem;
  border: 1px solid transparent;
  border-radius: .72rem;
  background: var(--auth-green, #00664f);
  color: white;
  font: inherit;
  font-weight: 680;
}
.lm-auth-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .2rem .65rem;
  margin-top: 1.6rem;
  border-top: 1px solid #dedfd8;
  padding-top: 1.15rem;
  color: var(--auth-muted);
  font-size: .94rem;
}
.lm-auth-switch .btn, .lm-auth-options .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 44px;
  max-width: 100%;
  border-radius: .65rem;
  padding: .55rem .85rem;
  font-size: .9rem;
  font-weight: 640;
  line-height: 1.3;
  text-decoration: none;
  text-align: center;
}
.lm-auth-switch .btn { border: 1px solid #c8d6cd; color: #124e3c; background: #edf2ed; }
.lm-auth-options { display: flex; justify-content: center; margin: .55rem 0 0; }
.lm-auth-options .btn { border: 1px solid transparent; background: transparent; color: #535d56; }
.lm-auth-error, .lm-auth-saved, .lm-auth-username {
  border-radius: .65rem;
  padding: .8rem .95rem;
  font-size: .94rem;
  line-height: 1.45;
}
.lm-auth-error { color: #902139; background: #ffedf0; }
.lm-auth-error:empty { display: none; }
.lm-auth-saved, .lm-auth-username { margin: 1rem 0; color: #12523d; background: #e5f2ea; }
.lm-auth-username { display: grid; gap: .22rem; }
.lm-auth-username strong { overflow-wrap: anywhere; user-select: all; }
.lm-auth-setup .lm-auth-username { margin: 0; }
.lm-auth-status-icon { display: inline-grid; place-items: center; width: 3rem; height: 3rem; margin-bottom: 1rem; border-radius: .8rem; background: #e0efe6; color: #106246; }
.lm-auth :is(button, a, input):focus-visible, .lm-auth-setup :is(input, button):focus-visible {
  outline: 3px solid #138366;
  outline-offset: 2px;
}
@media (hover: hover) {
  .lm-auth-submit:hover { background: #00513e; }
  .lm-show-pass:hover, .lm-auth-forgot:hover { color: #003d2d; }
  .lm-auth-switch .btn:hover, .lm-auth-options .btn:hover { background: #e3ebe2; color: #163f30; }
}
@media (max-width: 720px) {
  .lm-auth-card { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .lm-auth-art {
    min-height: clamp(8.5rem, 19svh, 12rem);
    gap: .75rem;
    padding: max(.9rem, env(safe-area-inset-top)) max(1.4rem, env(safe-area-inset-right)) 1.65rem max(1.4rem, env(safe-area-inset-left));
  }
  .lm-auth-brand { width: clamp(144px, 36vw, 195px); }
  .lm-auth-photo img { object-position: 60% 47%; }
  .lm-auth-art::after { background: linear-gradient(90deg, rgb(12 7 6 / 70%), transparent 77%); }
  .lm-auth-art-title { font-size: clamp(1.75rem, 6.4vw, 2.7rem); line-height: 1.02; }
  .lm-auth-form-side {
    z-index: 1;
    align-items: start;
    margin-top: -1rem;
    border-radius: 1.35rem 1.35rem 0 0;
    padding: 1.65rem max(1.5rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1.5rem, env(safe-area-inset-left));
    background: var(--auth-paper);
  }
  .lm-auth-content h1 { font-size: clamp(1.8rem, 6.2vw, 2.2rem); }
  .lm-auth-content h1 + .lm-auth-form { margin-top: 1.35rem; }
  .lm-auth-switch { margin-top: 1.2rem; padding-top: .85rem; }
  .lm-auth-options { margin-top: .1rem; }
}
@media (max-width: 360px) {
  .lm-auth-art, .lm-auth-form-side { padding-inline: 1.05rem; }
  .lm-auth-art { min-height: 8rem; }
  .lm-auth-label-row { flex-wrap: wrap; }
}
@media (max-height: 480px) and (max-width: 720px) and (orientation: landscape) {
  .lm-auth-art { min-height: 7rem; gap: .65rem; }
  .lm-auth-art-title { font-size: 1.8rem; }
  .lm-auth-art-title em { display: inline; }
}
