:root {
  color-scheme: light dark;
  --page: #f8f7ef;
  --surface: #fffef8;
  --ink: #15352e;
  --muted: #4d655d;
  --accent: #145946;
  --button: #145946;
  --button-hover: #103b34;
  --button-text: #fffef8;
  --border: #788e84;
  --divider: #ccd8cd;
  --photo-surround: #d9e1d1;
  --focus: #225bb0;
  --error: #943e25;
  --error-bg: #f9ebdf;
  --status-bg: #e1ede2;
  --shadow-border:
    0px 0px 0px 1px oklch(0 0 0 / 0.06),
    0px 1px 2px -1px oklch(0 0 0 / 0.06),
    0px 2px 4px 0px oklch(0 0 0 / 0.04);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #142620;
    --surface: #1b3028;
    --ink: #f4f4e9;
    --muted: #c0d0c5;
    --accent: #a1e0bf;
    --button: #a1e0bf;
    --button-hover: #b8efd3;
    --button-text: #122f25;
    --border: #91a59a;
    --divider: #445e52;
    --photo-surround: #273c30;
    --focus: #93c1ff;
    --error: #ffbda6;
    --error-bg: #4c2e26;
    --status-bg: #29493d;
    --shadow-border: 0 0 0 1px oklch(1 0 0 / 0.08);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding-inline: clamp(1.25rem, 5vw, 5rem);
  background: var(--page);
  color: var(--ink);
  font: 1rem/1.55 "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

a {
  color: var(--accent);
  font-weight: 750;
  text-underline-offset: .2em;
}

a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .25rem 1rem;
  align-items: center;
  max-width: 87.5rem;
  min-height: 4.5rem;
  margin-inline: auto;
  border-bottom: 1px solid var(--divider);
}

.wordmark, .catalog-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: .4em;
}

.wordmark {
  color: inherit;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -.055em;
  text-decoration: none;
}

.wordmark span { margin-inline-start: .35rem; border-inline-start: 1px solid var(--divider); padding-inline-start: .65rem; color: var(--muted); font-size: .82rem; letter-spacing: 0; }

.catalog-link { font-size: .875rem; }

.auth-layout {
  width: 100%;
  max-width: 78rem;
  margin-inline: auto;
  padding-block: clamp(1.5rem, 4vw, 3.5rem);
}

.auth-content {
  width: 100%;
  max-width: 34rem;
  margin-inline: auto;
  padding: clamp(1.2rem, 3.25vw, 2.75rem);
  border: 1px solid var(--divider);
  border-radius: 1.1rem;
  background: var(--surface);
  box-shadow: var(--shadow-border);
}

.auth-role { margin: 0 0 .65rem; color: var(--accent); font-size: .83rem; font-weight: 800; }

h1 {
  margin: 0;
  font-size: clamp(2.25rem, 6vw, 3.6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}

.auth-intro {
  margin: .85rem 0 1.75rem;
  color: var(--muted);
}

.auth-photo { display: none; }

.auth-support { padding: .9rem 1rem; border-radius: .65rem; background: var(--status-bg); }
.auth-support p { margin: .25rem 0; color: var(--muted); font-size: .88rem; }
.auth-support a, .auth-alternate { display: inline-flex; align-items: center; min-height: 44px; gap: .4em; }
.auth-staff-guide { max-width: 36rem; margin: 1rem auto 0; border-radius: 1.1rem; padding: clamp(1.25rem, 4vw, 2.75rem); background: var(--status-bg); color: var(--ink); border: 1px solid var(--divider); }
.auth-staff-guide h2 { margin: 0; color: var(--ink); font-size: clamp(1.45rem, 4vw, 2.4rem); line-height: 1.1; letter-spacing: -.035em; }
.auth-staff-guide ol { display: grid; gap: .65rem; margin-block: 1.2rem; padding-inline-start: 1.4rem; }
.auth-staff-guide p { margin: 0; padding-top: .9rem; border-top: 1px solid var(--divider); color: var(--muted); }

.auth-form {
  display: grid;
  gap: 1rem;
}

.auth-field label {
  display: block;
  margin-bottom: .375rem;
  font-size: .9rem;
  font-weight: 800;
}

.auth-input { position: relative; }

.auth-input input {
  width: 100%;
  min-height: 3.25rem;
  padding: .65rem .9rem;
  border: 1px solid var(--border);
  border-radius: .6rem;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
}

.auth-input input::placeholder { color: var(--muted); opacity: 1; }
.auth-input input[aria-invalid="true"] { border-color: var(--error); }

.auth-input--password:has(.password-toggle:not([hidden])) input { padding-inline-end: 3.5rem; }

.password-toggle {
  position: absolute;
  inset-inline-end: .25rem;
  inset-block-start: 50%;
  transform: translateY(-50%);
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: .35rem;
  color: var(--accent);
  background: var(--surface);
  cursor: pointer;
}

.password-toggle:not([hidden]) { display: grid; place-items: center; }
.password-toggle:hover { background: var(--status-bg); }
.password-toggle:not([data-password-visible]) .password-icon--hide,
.password-toggle[data-password-visible] .password-icon--show { display: none; }

.auth-submit {
  min-height: 3.25rem;
  margin-top: .25rem;
  padding: .65rem 1rem;
  border: 0;
  border-radius: .6rem;
  background: var(--button);
  color: var(--button-text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.auth-submit:hover { background: var(--button-hover); }
.auth-submit:disabled { opacity: .76; cursor: wait; }

.auth-links {
  margin-top: 1.5rem;
  padding-top: .75rem;
  border-top: 1px solid var(--divider);
  color: var(--muted);
  font-size: .875rem;
}

.auth-links p { margin: 0; }
.auth-links a { display: inline-block; padding-block: .75rem; }

.helptext, .errorlist {
  margin: .4rem 0 0;
  font-size: .875rem;
}

.helptext { color: var(--muted); }
.helptext ul, .errorlist { padding-inline-start: 1.25rem; }
.helptext ul { margin-block: .5rem 0; }
.errorlist { color: var(--error); }

.form-alert, .form-status {
  padding: .75rem 1rem;
  border-radius: .6rem;
}
.form-alert { background: var(--error-bg); }
.form-alert .errorlist { margin: 0; }
.form-alert a { color: var(--error); }
.form-alert strong { color: var(--error); }
.form-status { background: var(--status-bg); }

.form-progress {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

@media (min-width: 58rem) {
  .auth-layout--illustrated, .auth-layout--staff:has(.auth-staff-guide) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    align-items: center;
    gap: clamp(1.3rem, 4vw, 3.5rem);
  }

  .auth-layout--illustrated .auth-content, .auth-layout--staff:has(.auth-staff-guide) .auth-content { margin-inline-end: 0; }
  .auth-staff-guide { width: 100%; margin: 0; }

  .auth-photo {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    overflow: hidden;
    border: 1px solid var(--divider);
    border-radius: 1.1rem;
    background: var(--status-bg);
  }

  .auth-photo-image {
    flex: 1;
    min-height: 22rem;
    background: var(--photo-surround) url("./sign-in.9c1de64b663e.webp") center 55% / cover no-repeat;
  }

  .auth-photo-caption { padding: 1.15rem 1.4rem; }
  .auth-photo-caption strong { font-size: 1.15rem; }
  .auth-photo-caption p { margin: .35rem 0 0; color: var(--muted); }
}

@media (prefers-reduced-motion: no-preference) {
  .auth-content > :is(h1, .auth-intro, .form-status) { animation: form-entrance .36s ease-out both; }
  .auth-form { animation: form-entrance .36s 100ms ease-out both; }
  .auth-links { animation: form-entrance .36s 200ms ease-out both; }
  .auth-photo { animation: photo-entrance .5s 100ms ease-out both; }
  .auth-submit { transition: background-color 150ms ease-out, scale 150ms ease-out; }
  .password-toggle { transition: scale 150ms ease-out; }
  .auth-submit:active:not(:disabled), .password-toggle:active:not(:disabled) { scale: .96; }

  @keyframes form-entrance {
    from { opacity: .65; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes photo-entrance {
    from { opacity: .65; }
    to { opacity: 1; }
  }
}

.auth-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem; }
.language-picker { position: relative; }
.language-picker summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--accent); font-weight: 750; }
.language-picker summary::after { content: "▾"; margin-inline-start: .35rem; }
.language-picker ul { position: absolute; z-index: 1; inset-inline-start: 0; margin: 0; padding: .2rem; min-width: max-content; list-style: none; border: 1px solid var(--divider); border-radius: .55rem; background: var(--surface); box-shadow: var(--shadow-border); }
.language-picker a { display: flex; align-items: center; min-height: 44px; padding-inline: .6rem; text-decoration: none; }
.language-picker a:hover, .language-picker a[aria-current] { background: var(--status-bg); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@font-face {
  font-family: "Kidy Noto Sans Ethiopic";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("./noto-sans-ethiopic.c2f1376dda86.woff2") format("woff2");
  unicode-range: U+030E, U+1200-1399, U+2D80-2DDE, U+AB01-AB2E, U+1E7E0-1E7FE;
}
:lang(am) { font-family: "Kidy Noto Sans Ethiopic", "Segoe UI", system-ui, "Noto Sans Ethiopic", "Kefa", "Nyala", sans-serif; }
