@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/instrument-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/instrument-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--eh-color-canvas, #F1EEE7);
  color: var(--eh-color-text, #272422);
  font: var(--eh-font-regular) 1rem/1.5 var(--eh-font-family);
  color-scheme: light;
}

::selection { background: var(--eh-color-action); color: var(--eh-color-on-action); }

input, button { font: inherit; }

:where(input, button):focus-visible {
  outline: 2px solid var(--eh-color-focus);
  outline-offset: 3px;
}

.login-shell { min-height: 100vh; min-height: 100svh; }

.login-art {
  position: relative;
  height: clamp(10rem, 60.35vw, 18rem);
  overflow: hidden;
  background: var(--eh-color-navigation);
  container-type: size;
}

.login-art img {
  position: absolute;
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  inset: 0 auto auto 0;
  top: min(0px, calc((100% - 60.35cqw) / 2));
}

.login-panel {
  display: grid;
  align-content: center;
  justify-items: center;
  min-width: 0;
  padding: clamp(1.6rem, 6vw, 3rem) clamp(1.25rem, 6vw, 4rem) max(1.75rem, env(safe-area-inset-bottom));
}

.login-content { width: min(100%, 24rem); min-width: 0; }

.logo {
  display: inline-flex;
  align-items: center;
  min-height: 3.5rem;
  border-radius: 0.5rem;
  padding: 0.62rem 0.9rem;
  background: var(--eh-color-navigation);
  margin-bottom: clamp(1.3rem, 3.6vh, 2.35rem);
}

.logo img { display: block; width: 6.9rem; height: auto; }
.logo-fb { color: var(--eh-color-on-navigation); font-weight: var(--eh-font-semibold); }
.logo-fb small { margin-left: 0.35rem; font-size: 0.8em; font-weight: var(--eh-font-medium); }

.login-heading { margin-bottom: 1.65rem; }
.login-heading h1 {
  margin: 0;
  font-size: clamp(1.9rem, 2.8vw, 2.65rem);
  line-height: 1.08;
  letter-spacing: -0.038em;
  font-weight: var(--eh-font-semibold);
  text-wrap: balance;
}
.login-heading p { margin: 0.55rem 0 0; color: var(--eh-color-text-muted); }

.fg { margin: 0 0 1.05rem; }
.fg label { display: block; margin-bottom: 0.38rem; font-size: 0.875rem; font-weight: var(--eh-font-semibold); }
.fg input {
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 0.82rem;
  border: 1px solid var(--eh-color-control-border);
  border-radius: 0.5rem;
  background: var(--eh-color-surface);
  color: var(--eh-color-text);
  caret-color: var(--eh-color-action);
}
.fg input::placeholder { color: var(--eh-color-text-muted); opacity: 1; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 3.1rem; }
.pw-eye {
  position: absolute;
  inset: 2px 2px 2px auto;
  width: 2.75rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: var(--eh-color-action);
  cursor: pointer;
}
.pw-eye:hover { background: var(--eh-color-canvas); }
.pw-eye svg, .login-footer svg { fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.pw-eye svg { width: 1.2rem; height: 1.2rem; }

.btn {
  display: block;
  width: 100%;
  min-height: 3rem;
  padding: 0.68rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  background: var(--eh-color-action);
  color: var(--eh-color-on-action);
  font-weight: var(--eh-font-semibold);
  cursor: pointer;
}
.btn:hover:not(:disabled) { background: var(--eh-color-action-hover); }
.btn:disabled { opacity: 0.74; cursor: wait; }

.forgot {
  min-height: 2.75rem;
  margin-top: 0.32rem;
  padding: 0;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  color: var(--eh-color-action);
  font-size: 0.875rem;
  font-weight: var(--eh-font-semibold);
  text-decoration: underline;
  text-underline-offset: 0.19em;
  cursor: pointer;
}
.forgot:hover { color: var(--eh-color-action-hover); }

.reset-box {
  display: none;
  padding: 1rem;
  border: 1px solid var(--eh-color-divider);
  border-radius: 0.65rem;
  background: var(--eh-color-surface);
  margin-top: 0.5rem;
}
.reset-box p { margin: 0 0 0.85rem; color: var(--eh-color-text-muted); font-size: 0.875rem; }
.reset-box .field-hint { margin: 0 0 0.45rem; }
.token-display {
  padding: 0.65rem;
  margin-bottom: 0.8rem;
  border: 1px dashed var(--eh-color-control-border);
  border-radius: 0.45rem;
  color: var(--eh-color-action);
  font-weight: var(--eh-font-bold);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.err {
  display: none;
  padding: 0.7rem 0.8rem;
  margin-bottom: 1rem;
  border: 1px solid var(--eh-color-error);
  border-radius: 0.5rem;
  color: var(--eh-color-error);
  background: var(--eh-color-surface);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

.login-footer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: clamp(0.8rem, 2.4vh, 1.4rem);
  padding-top: 1rem;
  border-top: 1px solid var(--eh-color-divider);
  color: var(--eh-color-text-muted);
  font-size: 0.78rem;
}
.login-footer svg { width: 1rem; height: 1rem; flex: none; }

@media (max-width: 899px) and (max-height: 690px), (orientation: portrait) and (max-height: 690px) {
  .login-art { height: clamp(6.5rem, 25svh, 10rem); }
  .login-panel { padding-top: 1.15rem; }
  .logo { margin-bottom: 0.95rem; min-height: 2.8rem; padding-block: 0.42rem; }
  .logo img { width: 5.85rem; }
  .login-heading { margin-bottom: 1.15rem; }
  .login-heading h1 { font-size: clamp(1.55rem, 7.25vw, 1.9rem); }
  .fg { margin-bottom: 0.78rem; }
}

@media (min-width: 900px) and (orientation: landscape) {
  .login-shell { display: grid; grid-template-columns: 58% minmax(0, 1fr); }
  .login-art { height: auto; }
  .login-art img {
    width: 172.72%;
    --desktop-image-width: max(172.72%, 177.69cqh);
    width: var(--desktop-image-width);
    left: calc((100% - var(--desktop-image-width) * 0.579) / 2);
    top: 50%;
    transform: translateY(-50%);
  }
  .login-panel { padding: clamp(2rem, 7vh, 5rem) clamp(1.65rem, 4vw, 5.25rem); }
}
