/* ---------- The sign-in page (sessions/new) ----------
   A FILE OF ITS OWN, named to sort after chrome.css so its rules win without
   raising specificity. Only sessions/new wears .signin: the password, claim
   and audit cards keep .login-wrap and are untouched by anything here.

   Split in two, after a 21st.dev sign-in component: the form on the page
   ground at left, a main-street photograph at right with three cards on it
   saying what the portal holds. Ported to ERB and the tokens in base.css
   rather than installed - the original is React and Tailwind, and this app
   has neither. */
/* Stacked over chrome.css's fixed .login-ribbon, as .login-wrap is. */
.signin {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100dvh;
}
@media (min-width: 768px) { .signin { flex-direction: row; } }
/* The ribbon runs in the open ground beside the form. A phone has none: the
   form is the whole page, so the ribbon could only cross its labels. */
@media (max-width: 767px) { .login-ribbon { display: none; } }

.signin-form { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.signin-inner { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 22px; }
.signin-inner .login-logo { align-self: flex-start; }
.signin h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); line-height: 1.1; }
.signin-sub { color: var(--muted); margin: -10px 0 0; }
.signin .login-flash { margin: 0; }

.signin form { display: flex; flex-direction: column; gap: 18px; }
.signin-field label { display: block; margin-bottom: 6px; }
.signin-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.signin-label-row label { margin: 0; }
.signin-label-row a { font-size: .88rem; }

/* Roomier than base.css's fields and on the card colour, because on this page
   they are the whole page rather than one control among many. */
.signin input[type="email"],
.signin input[type="password"],
.signin input[type="text"] {
  padding: 14px 16px; font-size: .97rem; border-radius: var(--radius-sm); background: var(--card);
}
.signin input[type="email"]:focus,
.signin input[type="password"]:focus,
.signin input[type="text"]:focus { background: var(--blue-soft); }
.signin input[type="submit"] { margin-top: 4px; padding: 14px 26px; border-radius: var(--radius-sm); }

/* The eye sits inside the field, so the field leaves room for it. The input
   is type=text while the password shows, hence the third selector above. */
.signin-password { position: relative; }
.signin .signin-password input { padding-right: 52px; }
.signin-eye {
  position: absolute; top: 0; bottom: 0; right: 6px; width: 40px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; cursor: pointer; color: var(--muted-2);
  transition: color var(--ease);
}
.signin-eye:hover { color: var(--blue); }
.signin-eye svg { width: 20px; height: 20px; }
.signin-eye[aria-pressed="false"] .signin-eye-hide,
.signin-eye[aria-pressed="true"] .signin-eye-show { display: none; }
/* Edge draws an eye of its own in a password field, which would sit beside
   this one. Hidden only once ours is live, so a reader without JavaScript,
   whose eye never un-hides, keeps Edge's. A rule of its own, because other
   browsers drop any rule that names this pseudo-element. */
.signin-password:has(.signin-eye:not([hidden])) input::-ms-reveal { display: none; }

/* The sign-in providers, under the password form. Outline buttons the height
   of the dark Sign in above them, so the password stays the primary action
   and these read as the other way through the same door. */
.signin-sso { display: flex; flex-direction: column; gap: 12px; }
.signin-or {
  display: flex; align-items: center; gap: 14px; margin: 0 0 6px;
  font-size: .82rem; color: var(--muted-2);
}
.signin-or::before, .signin-or::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.signin-sso-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  padding: 14px 26px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--card); color: var(--navy); cursor: pointer;
  font-family: var(--font-head); font-weight: 500; font-size: .875rem; line-height: 1.4;
  transition: border-color var(--ease), background var(--ease);
}
.signin-sso-btn:hover { border-color: var(--blue); background: var(--blue-soft); }
.signin-sso-btn svg { flex: none; width: 18px; height: 18px; }
/* A passkey block that shows owns the "or" (sessions/new), so the QR and
   provider blocks after it drop theirs and close up, as they do after QR. */
.signin .signin-passkey:not([hidden]) ~ .signin-sso { margin-top: -10px; }
.signin .signin-passkey:not([hidden]) ~ .signin-sso .signin-or { display: none; }
.signin-sso-note { margin: 2px 0 0; text-align: center; font-size: .8rem; line-height: 1.5; color: var(--muted-2); }

/* The agreement box on signups/new: the box beside its sentence, not above. */
.signin-agree { display: flex; align-items: flex-start; gap: 10px; font-size: .88rem; line-height: 1.5; color: var(--muted); }
.signin-agree input { flex: none; margin-top: 3px; }

/* signups/sent: the "Open Gmail" buttons at the form's own width and corners
   rather than outcome.css's pills, and the address in the page's ink. */
.signin .webmail-links { margin: 0; }
.signin .webmail-links .btn { flex: 1; padding: 14px 26px; border-radius: var(--radius-sm); }
.signin-sub strong { color: var(--navy); font-weight: 600; }
.signin-note { font-size: .93rem; color: var(--muted); margin: 0; }

.signin-new { text-align: center; font-size: .93rem; color: var(--muted); margin: 0; }
.signin .login-demo { margin-top: 0; }

/* ---------- The photograph and its cards ----------
   Desktop only. The photo is inset from the edge and rounded, so it reads as
   a picture on the page rather than half the page painted over. The cards are
   solid card colour, not glass: text on a busy street scene needs a ground of
   its own to stay readable. */
.signin-hero { display: none; }
/* A background rather than an <img>, and set only inside the media query, so
   a phone - which never shows the photo - never downloads it either.

   The file is "Southwest corner of 1st and Broadway-Downtown Little Falls,
   MN" by Myotus, CC BY-SA 4.0, from
   https://commons.wikimedia.org/wiki/File:Southwest_corner_of_1st_and_Broadway-Downtown_Little_Falls,_MN.jpg
   downloaded 2026-11-11 and cropped from the 4032px original to the
   storefronts, 1540x1400. The licence requires the credit, which
   .signin-credit prints on the photo; the crop is under the same licence.

   The photo has 44% of the page, not half: the form is what the page is for. */
@media (min-width: 768px) {
  .signin-hero { display: block; flex: 0 0 44%; position: relative; }
  .signin-photo { background: url("/assets/signin-main-street-ec143061.jpg") center / cover; }
}
.signin-photo {
  position: absolute; inset: 16px; border-radius: 20px;
  animation: signin-slide .8s cubic-bezier(.2, .8, .2, 1) .3s both;
}
.signin-credit {
  position: absolute; left: 28px; bottom: 28px; margin: 0; padding: 3px 9px; border-radius: 999px;
  background: rgba(9, 9, 11, .6); color: #fff; font-size: .72rem; line-height: 1.5;
}
.signin-credit a { color: inherit; }
/* 96px up, not 40: the "Questions? Ask us" bubble is fixed in the page's
   bottom right corner, and at 40px it covered the last card. */
.signin-cards {
  position: absolute; left: 0; right: 0; bottom: 96px; padding: 0 40px;
  display: flex; gap: 16px; justify-content: center;
}
.signin-card {
  display: flex; align-items: flex-start; gap: 12px; width: 256px; padding: 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg);
  font-size: .88rem; line-height: 1.45; color: var(--muted);
  animation: signin-card .6s cubic-bezier(.2, .8, .2, 1) calc(var(--d, 0) * 100ms) both;
}
.signin-card p { margin: 0; }
.signin-card .signin-card-title { font-family: var(--font-head); font-weight: 700; font-size: .97rem; color: var(--navy); margin-bottom: 2px; }
.signin-card-ico {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue-soft); border: 1px solid var(--blue-line); color: var(--blue);
}
.signin-card-ico svg { width: 20px; height: 20px; }
/* One card on a narrow photo, two from 1400px, all three from 2000px: the
   photo's column, .signin-hero, is 44% of the page, two whole cards with
   their gap and padding need 608px of it, and three need 880px. */
.signin-card:nth-child(n+2) { display: none; }
@media (min-width: 1400px) { .signin-card:nth-child(2) { display: flex; } }
@media (min-width: 2000px) { .signin-card:nth-child(3) { display: flex; } }

/* ---------- Arrival ----------
   The photo slides in and its cards fade up, staggered by their --d (a tenth
   of a second each). The form does not: it is there at first paint, because
   on a phone its words are the page's largest paint and a fade held that back
   most of a second. `both` holds the start state through the delay and the
   end state after, so nothing flashes in before its turn. */
@keyframes signin-slide {
  from { opacity: 0; filter: blur(4px); transform: translateX(30px); }
  to   { opacity: 1; filter: blur(0); transform: translateX(0); }
}
@keyframes signin-card {
  from { opacity: 0; filter: blur(4px); transform: translateY(16px) scale(.96); }
  to   { opacity: 1; filter: blur(0); transform: translateY(0) scale(1); }
}

/* base.css shortens every animation under reduced motion, but not its delay,
   so the stagger would still hold the photo's cards invisible for a second.
   Here the arrival is simply off. */
@media (prefers-reduced-motion: reduce) {
  .signin-photo, .signin-card { animation: none; }
}
