/* The sign-in pages (doc/SURFACES.md §30.96): login, login_verify, login_forgot,
   login_reset and change_password. Served before sign-in by GET /signin-asset/:name.
   Every page still works if this file never arrives: plain form, system font.

   Look: XKIG's field film full bleed and looping, the xkig.com sage panel with
   "Faster. Smarter. Safer." cut out of it, and the form on a frosted card. On a
   phone the film sits on top and the form is a sheet under it. */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/signin-asset/signin-sans.woff2?v=e2291e842cf5") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/signin-asset/signin-mono.woff2?v=01d285447409") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --signin-css: 1;   /* signin.js reads this: the six code boxes go live only once this file has arrived */
  --film-bg: #0C151C;
  --eyebrow: #E9F1E2;
  --scrim: rgba(6, 14, 10, .55);
  --surface: rgba(255, 255, 255, .90);
  --surface-edge: rgba(255, 255, 255, .55);
  --shadow: 0 2px 6px rgba(4, 16, 8, .2), 0 40px 90px -24px rgba(4, 16, 8, .75);
  --text: #0F2117;
  --muted: #4F6156;
  --field: #FFFFFF;
  --field-edge: rgba(15, 33, 23, .16);
  --field-hover: rgba(15, 33, 23, .32);
  --focus: #006545;
  --ring: rgba(0, 101, 69, .2);
  --btn: #006545;
  --btn-text: #FFFFFF;
  --btn-hover: #00563B;
  --link: #006545;
  --pill-bg: #EAF4EE;
  --pill-edge: #A8D5B8;
  --pill-text: #1E5C3A;
  --ok: #1E5C3A;
  --ok-bg: #EAF4EE;
  --ok-edge: #A8D5B8;
  --danger: #B42318;
  --danger-bg: #FEF3F2;
  --danger-edge: #FECDCA;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --scrim: rgba(2, 8, 5, .66);
    --surface: rgba(12, 20, 16, .86);
    --surface-edge: rgba(210, 230, 215, .12);
    --shadow: 0 2px 6px rgba(0, 0, 0, .3), 0 40px 90px -24px rgba(0, 0, 0, .85);
    --text: #E7EFE9;
    --muted: #9AAD9F;
    --field: #0B120D;
    --field-edge: rgba(210, 230, 215, .15);
    --field-hover: rgba(210, 230, 215, .3);
    --focus: #9DBB8A;
    --ring: rgba(157, 187, 138, .22);
    --btn: #9DBB8A;
    --btn-text: #0C1A10;
    --btn-hover: #B0CC9E;
    --link: #B6C995;
    --pill-bg: rgba(157, 187, 138, .12);
    --pill-edge: rgba(157, 187, 138, .35);
    --pill-text: #C8DBB8;
    --ok: #C8DBB8;
    --ok-bg: rgba(157, 187, 138, .12);
    --ok-edge: rgba(157, 187, 138, .35);
    --danger: #FF8A80;
    --danger-bg: rgba(255, 138, 128, .08);
    --danger-edge: rgba(255, 138, 128, .28);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body.signin { margin: 0; background: var(--film-bg); color: var(--text); font: 400 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }

/* ── The film: the poster (set on the element, so it paints without any script),
   then the looping film over it once signin.js starts it ── */
.film { position: fixed; inset: 0; overflow: hidden; background: var(--film-bg) var(--poster-desktop, none) center / cover no-repeat; }
.film video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.film::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--scrim) 0%, transparent 48%), linear-gradient(0deg, rgba(4, 10, 7, .55) 0%, transparent 40%); }

/* ── XKIG's line: eyebrow over the sage knockout panel ── */
.tagline { position: fixed; right: clamp(24px, 5vw, 72px); bottom: clamp(28px, 7vh, 72px); z-index: 2;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; }
.tagline .eyebrow { font: 600 12px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--eyebrow); text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
.tagline svg { display: block; width: min(640px, 52vw); height: auto; }

/* ── The card ── */
.page { position: relative; z-index: 3; min-height: 100%; display: flex; align-items: center; padding: 32px clamp(16px, 5vw, 80px); }
.card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--surface-edge); border-radius: 18px; box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  padding: 28px 32px 22px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: -.005em; margin-bottom: 32px; }
.brand svg { width: 28px; height: 28px; display: block; flex: none; }
.card h1 { margin: 0 0 22px; font-size: 26px; line-height: 1.15; font-weight: 600; letter-spacing: -.02em; }
.card h1.has-lede { margin-bottom: 6px; }
.lede { margin: 0 0 22px; color: var(--muted); font-size: 15px; }
.email-pill { display: inline-block; align-self: flex-start; background: var(--pill-bg); border: 1px solid var(--pill-edge); color: var(--pill-text);
  font: 500 13px var(--mono); padding: 4px 10px; border-radius: 999px; margin: -8px 0 22px; word-break: break-all; }

.card form { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card label { font-size: 13px; font-weight: 500; }
.field-head a { font-size: 13px; }
.helper { font-size: 12px; color: var(--muted); }
.field-input { height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--field-edge); background: var(--field);
  color: var(--text); font: 400 16px var(--sans); width: 100%; transition: border-color .15s, box-shadow .15s; }
.field-input::placeholder { color: var(--muted); opacity: .7; }
.field-input:hover { border-color: var(--field-hover); }
.field-input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 4px var(--ring); }
.btn { height: 46px; border: 0; border-radius: 10px; background: var(--btn); color: var(--btn-text); font: 600 15px var(--sans);
  cursor: pointer; transition: background .15s; margin-top: 4px; width: 100%; }
.btn:hover { background: var(--btn-hover); }
.btn:focus-visible, .card a:focus-visible, .link-btn:focus-visible, .card input[type="checkbox"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.card a, .link-btn { color: var(--link); text-decoration: none; font-weight: 500; }
.card a:hover, .link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-btn { background: none; border: 0; padding: 0; font: 500 14px var(--sans); cursor: pointer; }
.link-btn:disabled { color: var(--muted); cursor: not-allowed; text-decoration: none; }

/* The messages the pages' own scripts fill in (?error= and ?reset= / ?sent=). */
.error-msg, .ok-msg { display: none; padding: 10px 12px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; }
.error-msg { border: 1px solid var(--danger-edge); background: var(--danger-bg); color: var(--danger); }
.ok-msg { border: 1px solid var(--ok-edge); background: var(--ok-bg); color: var(--ok); }
.error-msg.visible, .ok-msg.visible { display: block; }

/* Six boxes drawn over ONE real input. Until signin.js marks it live the plain
   input shows and the boxes stay hidden, so a missing script never hides what
   you are typing. */
.otp { position: relative; }
.otp-cells { display: none; }
.otp.is-live { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.otp.is-live .otp-cells { display: contents; }
.otp.is-live input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; font-size: 16px; cursor: text; }
.otp:not(.is-live) input { font: 500 22px var(--mono); letter-spacing: .3em; text-align: center; height: 56px; }
.otp-cell { height: 56px; border-radius: 10px; border: 1px solid var(--field-edge); background: var(--field); display: grid; place-items: center;
  font: 500 24px var(--mono); color: var(--text); transition: border-color .15s, box-shadow .15s; }
.otp-cell:nth-child(3) { margin-right: 10px; }
.otp-cell.is-filled { border-color: var(--field-hover); }
.otp-cell.is-active { border-color: var(--focus); box-shadow: 0 0 0 4px var(--ring); }
.otp-cell.is-active:empty::after { content: ""; width: 2px; height: 24px; background: var(--focus); animation: signinCaret 1s steps(1) infinite; }
@keyframes signinCaret { 50% { opacity: 0; } }

.remember { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.remember input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--btn); flex: none; cursor: pointer; }
.card .remember label { font-size: 14px; font-weight: 500; cursor: pointer; line-height: 1.45; }
.remember .hint { display: block; font-size: 13px; font-weight: 400; color: var(--muted); margin-top: 2px; }

.row-links { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-top: 18px; font-size: 14px; }
.row-links form { display: inline; }
.foot { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--field-edge); color: var(--muted); font-size: 12px; }

/* ── Phone: film on top, the form as a sheet ── */
@media (max-width: 760px) {
  .film { bottom: auto; height: 52vh; background-image: var(--poster-mobile, none); }
  .film::after { background: linear-gradient(0deg, rgba(4, 10, 7, .6) 0%, transparent 55%); }
  .tagline { position: absolute; left: 20px; right: 20px; top: calc(52vh - 128px); bottom: auto; align-items: flex-start; }
  .tagline svg { width: min(340px, 100%); }
  .page { align-items: flex-end; padding: 0; }
  .card { max-width: none; border-radius: 22px 22px 0 0; border-width: 1px 0 0; padding: 20px 20px 18px; margin-top: 48vh; min-height: 52vh;
    -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--field); }
  .brand { margin-bottom: 20px; }
  .card h1 { font-size: 24px; }
  .otp.is-live { gap: 6px; }
  .otp-cell { height: 50px; font-size: 22px; }
  .otp-cell:nth-child(3) { margin-right: 6px; }
  .foot { margin-top: auto; }
}
/* Short laptop screens: the tagline steps aside rather than crowd the card. */
@media (min-width: 761px) and (max-height: 620px) { .tagline { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
