/*
 * SAAR sign-in kit -- the "royal" look (owner, 2026-10-27; SIGNIN-KIT.md).
 *
 * THE SHARED MASTER: /SAAR/_shared/saar-signin.css (taken over from SAAR
 * Accounts, 2026-10-27). Products COPY it byte-identical, with fonts/ next to
 * it. It is NOT saar-login.css (the older sl__* login, which stays for
 * products that have not moved). Classes here are as__*; load only ONE of the
 * two on a page, because this file also styles html, body and a.
 *
 * Tokens follow the box's theme contract: prefers-color-scheme, overridden
 * by html[data-theme] (the pre-paint script in the template sets it).
 *
 * The heading face is served from this host, never from Google: a sign-in
 * page must not look broken the day another host is slow.
 * Cormorant Garamond, SIL Open Font License 1.1 (fonts.google.com).
 */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/cormorant-garamond-600-latin.woff2") format("woff2");
}
:root {
  --as-ground: #0d1330;
  --as-frame: rgba(200, 164, 92, .35);
  --as-frame-2: rgba(200, 164, 92, .15);
  --as-card: #fbf8f1;
  --as-card-border: transparent;
  --as-ink: #0d1330;
  --as-ink-2: #3d4363;
  --as-muted: #5a607c;
  --as-rule: #d9c48f;
  --as-gold: #c8a45c;
  --as-link: #0d1330;
  --as-link-hover: #8a6a2a;
  --as-input-bg: #ffffff;
  --as-input-border: #d8d3c4;
  --as-focus: #c8a45c;
  --as-focus-ring: #8a6a2a;
  --as-btn-bg: #0d1330;
  --as-btn-ink: #f4e6c2;
  --as-btn-ring: rgba(200, 164, 92, .55);
  --as-alert-bg: #fdecef;
  --as-alert-border: #f0b7c2;
  --as-alert-ink: #7a1f33;
  --as-note-bg: #f3eedf;
  --as-note-ink: #3d4363;
  --as-logo-plate: transparent;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --as-ground: #070a1c;
    --as-frame: rgba(200, 164, 92, .28);
    --as-frame-2: rgba(200, 164, 92, .12);
    --as-card: #121733;
    --as-card-border: #2a3058;
    --as-ink: #efe9da;
    --as-ink-2: #b9b4a6;
    --as-muted: #a8a49a;
    --as-rule: #5c4e2c;
    --as-link: #e3c47e;
    --as-link-hover: #f4e0ad;
    --as-input-bg: #0b0f26;
    --as-input-border: #343a63;
    --as-btn-bg: #c8a45c;
    --as-btn-ink: #0d1330;
    --as-btn-ring: transparent;
    --as-focus-ring: #e3c47e;
    --as-alert-bg: #3a1620;
    --as-alert-border: #7a2c3c;
    --as-alert-ink: #ffd4dc;
    --as-note-bg: #1b2145;
    --as-note-ink: #d6d1c3;
    --as-logo-plate: #fbf8f1;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --as-ground: #070a1c;
  --as-frame: rgba(200, 164, 92, .28);
  --as-frame-2: rgba(200, 164, 92, .12);
  --as-card: #121733;
  --as-card-border: #2a3058;
  --as-ink: #efe9da;
  --as-ink-2: #b9b4a6;
  --as-muted: #a8a49a;
  --as-rule: #5c4e2c;
  --as-link: #e3c47e;
  --as-link-hover: #f4e0ad;
  --as-input-bg: #0b0f26;
  --as-input-border: #343a63;
  --as-btn-bg: #c8a45c;
  --as-btn-ink: #0d1330;
  --as-btn-ring: transparent;
  --as-focus-ring: #e3c47e;
  --as-alert-bg: #3a1620;
  --as-alert-border: #7a2c3c;
  --as-alert-ink: #ffd4dc;
  --as-note-bg: #1b2145;
  --as-note-ink: #d6d1c3;
  --as-logo-plate: #fbf8f1;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--as-ground);
  color: var(--as-ink);
  font-family: Inter, -apple-system, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--as-link); }
a:hover { color: var(--as-link-hover); }

.as {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 16px 88px;
  overflow: hidden;
}
.as::before, .as::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 6px;
}
.as::before { inset: 28px; border: 1px solid var(--as-frame); }
.as::after { inset: 36px; border: 1px solid var(--as-frame-2); border-radius: 4px; }

.as__card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: var(--as-card);
  border: 1px solid var(--as-card-border);
  border-radius: 14px;
  padding: 44px 44px 36px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  display: flex;
  flex-direction: column;
}
.as__logo-plate {
  align-self: center;
  background: var(--as-logo-plate);
  border-radius: 12px;
  padding: 8px 14px;
}
/* The PNG has a white ground; multiply lets the card (or, in dark, the
   ivory plate) show through it instead of a white box. */
.as__logo { display: block; width: 150px; height: auto; mix-blend-mode: multiply; }

.as__rule {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 20px;
}
.as__rule::before, .as__rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--as-rule);
}
.as__rule span {
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  background: var(--as-gold);
}

.as__h {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: 34px;
  line-height: 1.1;
  text-align: center;
  letter-spacing: .2px;
}
.as__for {
  margin: 8px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--as-muted);
}
.as__for strong { color: var(--as-ink); font-weight: 600; }

.as__note, .as__alert {
  margin: 20px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.4;
}
.as__note { background: var(--as-note-bg); color: var(--as-note-ink); }
.as__alert {
  background: var(--as-alert-bg);
  border: 1px solid var(--as-alert-border);
  color: var(--as-alert-ink);
}

.as__form { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.as__field { display: flex; flex-direction: column; gap: 7px; }
.as__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.as__label { font-size: 13px; font-weight: 500; color: var(--as-ink-2); }
.as__forgot { font-size: 13px; font-weight: 500; text-decoration: none; }
.as__forgot:hover { text-decoration: underline; }
.as__input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--as-input-border);
  border-radius: 10px;
  background: var(--as-input-bg);
  color: var(--as-ink);
  padding: 0 14px;
  font: inherit;
  font-size: 15px;
}
.as__input:focus {
  outline: 2px solid var(--as-focus-ring);
  outline-offset: 1px;
  border-color: var(--as-focus-ring);
  box-shadow: 0 0 0 4px rgba(200, 164, 92, .25);
}
.as__err { margin: 0; font-size: 13px; color: var(--as-alert-ink); }

.as__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  height: 50px;
  margin-top: 8px;
  border: 0;
  border-radius: 10px;
  background: var(--as-btn-bg);
  color: var(--as-btn-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .3px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--as-btn-ring);
}
.as__btn:hover { filter: brightness(1.12); color: var(--as-btn-ink); }
.as__btn:focus-visible { outline: 2px solid var(--as-focus-ring); outline-offset: 2px; }
.as__btn--ghost {
  margin-top: 0;
  background: transparent;
  color: var(--as-ink);
  box-shadow: inset 0 0 0 1px var(--as-input-border);
}
.as__btn--ghost:hover { color: var(--as-ink); }
.as__or {
  margin: 18px 0 12px;
  text-align: center;
  font-size: 13px;
  color: var(--as-muted);
}

.as__signup { margin: 24px 0 0; text-align: center; font-size: 14px; color: var(--as-muted); }
.as__signup a { font-weight: 600; }
.as__tag {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 52px;
  margin: 0;
  text-align: center;
  font-size: 12px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--as-gold);
}

/* Password show/hide, revealed by script only. */
.as-pw { position: relative; }
.as-pw .as__input { padding-right: 46px; }
.as-pw .as__input::-ms-reveal { display: none; }
.as-pw__toggle {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  color: var(--as-muted);
}
.as-pw__toggle:hover { color: var(--as-ink); }
.as-pw__toggle:focus-visible { outline: 2px solid var(--as-focus); outline-offset: -2px; }
.as-pw__toggle[hidden], .as-pw__toggle [hidden] { display: none; }
.as-pw__toggle svg { width: 20px; height: 20px; display: block; }

/* display=popup: the "Sign in with SAAR" window (about 480 x 640). */
.as--popup { justify-content: flex-start; padding: 0; background: var(--as-card); min-height: 100vh; }
.as--popup::before, .as--popup::after { display: none; }
.as--popup .as__card {
  max-width: none;
  min-height: 100vh;
  border: 0;
  border-top: 4px solid var(--as-gold);
  border-radius: 0;
  box-shadow: none;
  padding: 32px 40px 24px;
}
.as--popup .as__logo { width: 112px; }
.as--popup .as__h { font-size: 28px; margin-top: 18px; }
.as--popup .as__form { margin-top: 20px; gap: 14px; }

@media (max-width: 520px) {
  .as { padding: 0; justify-content: flex-start; background: var(--as-card); }
  .as::before, .as::after { display: none; }
  .as__card {
    max-width: none;
    min-height: 100vh;
    min-height: 100dvh;
    border: 0;
    border-top: 3px solid var(--as-gold);
    border-radius: 0;
    box-shadow: none;
    padding: 36px 24px 28px;
  }
  .as--popup .as__card { padding: 28px 24px 20px; }
  .as__input { height: 50px; font-size: 16px; }
  .as__btn { height: 52px; font-size: 16px; }
  .as__tag { display: none; }
}
