/* Round 215 — the sign-in page, matched exactly to the approved design (Portal redesign screens 9 "Sign in (phone)" and 10 "Sign in (laptop)").
   Phone < 768px: cream page, ACTS mark, centred heading, form, "Sign in with a code", footer pinned to the bottom.
   768–1023px: the same phone layout centred (max 420px), no navy panel.  >= 1024px: two halves 50 / 50 (navy panel | cream form column, max 380px).
   Tokens: navy #13233A, panel circle #1A2D49, ink #1B2A41, muted #5A6272, panel muted #C9D2DE, panel footer #9FB0C6, cream #F7F3EA, input border #E3DCCD,
   second-button border #D8D0C0, gold #C9993F (accents on navy), gold link text #8A6216 (hover #6B4B10). Fraunces 600 for headings / wordmark / verse, Inter for the rest.
   No gradients, no shadows, no emoji. */
.si-body { margin: 0; background: #F7F3EA; color: #1B2A41; font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 16px; line-height: 1.5; -webkit-text-size-adjust: 100%; }
.si-body *, .si-body *::before, .si-body *::after { box-sizing: border-box; }
.si { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }

/* ---- the navy panel (laptop only) */
.si-hero { display: none; position: relative; overflow: hidden; background: #13233A; color: #F7F3EA; }
.si-hero::before { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; background: #1A2D49; pointer-events: none; }
.si-hero-in { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 32px; height: 100%; padding: 48px; }
.si-word { display: inline-flex; flex-direction: row; align-items: baseline; gap: 10px; text-decoration: none; color: #F7F3EA; width: fit-content; }
.si-word-main { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 26px; letter-spacing: .5px; line-height: 1; color: #F7F3EA; }
.si-word-sub { font-size: 11px; font-weight: 600; letter-spacing: 1.6px; line-height: 1; color: #C9993F; }
.si-verse { margin: 0; max-width: 460px; }
.si-verse .si-verse-label { margin: 0; font-family: Inter, system-ui, sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 1.6px; line-height: 1.4; color: #C9993F; }
.si-verse blockquote { margin: 14px 0 0; }
.si-verse blockquote p { margin: 0; font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 30px; line-height: 1.3; color: #F7F3EA; }
.si-verse figcaption { margin-top: 12px; font-size: 14px; line-height: 1.4; color: #C9D2DE; }
.si-tag { margin: 0; font-size: 13px; line-height: 1.4; color: #9FB0C6; }

/* ---- the form column (phone first) */
.si-main { display: flex; justify-content: center; align-items: stretch; padding: calc(56px + env(safe-area-inset-top, 0px)) 24px calc(28px + env(safe-area-inset-bottom, 0px)); }
.si-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: stretch; }
.si-mark { flex: none; display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin: 0 auto; border-radius: 16px; background: #13233A; color: #F7F3EA; font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 18px; line-height: 1; }
.si-mark img { display: block; width: 40px; height: 40px; object-fit: contain; }
.si-eyebrow { margin: 14px 0 0; text-align: center; font-size: 12px; font-weight: 700; letter-spacing: 1.6px; color: #8A6216; }
.si-h1 { margin: 22px 0 0; text-align: center; font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 30px; line-height: 1.15; color: #13233A; }
.si-eyebrow + .si-h1 { margin-top: 8px; }
.si-lead { margin: 8px 0 0; text-align: center; font-size: 14px; line-height: 1.5; color: #5A6272; }
.si-h1 + :not(.si-lead), .si-lead + * { margin-top: 32px; }
.si-lead + .si-lead { margin-top: 12px; }
.si-nowrap { white-space: nowrap; }
.si-copy { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid #E3DCCD; text-align: center; font-size: 12px; color: #5A6272; }

.si-form { display: flex; flex-direction: column; gap: 14px; }
.si-field label, .si-labelrow label { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 600; line-height: 1.5; color: #1B2A41; }
.si-labelrow { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.si-forgot { display: inline-flex; align-items: center; min-height: 44px; margin: -13px 0; font-size: 13px; font-weight: 600; color: #8A6216; text-decoration: none; }
.si-forgot:hover, .si-foot a:hover, .si-link:hover { color: #6B4B10; }
.si-input { display: block; width: 100%; height: 50px; padding: 0 16px; border: 1px solid #E3DCCD; border-radius: 14px; background: #fff; color: #1B2A41; font: inherit; font-size: 16px; }
.si-input::placeholder { color: #6B7280; opacity: 1; }
.si-pw { position: relative; }
.si-pw .si-input { padding-right: 52px; }
.si-eye { position: absolute; top: 3px; right: 4px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 11px; background: transparent; color: #5A6272; cursor: pointer; }
.si-eye:hover { color: #13233A; }
.si-word:focus-visible, .si-input:focus-visible, .si-eye:focus-visible, .si-btn:focus-visible, .si-forgot:focus-visible, .si-link:focus-visible, .si-foot a:focus-visible, .si-keep input:focus-visible { outline: 2px solid #C9993F; outline-offset: 2px; }
.si-keep { margin: 0; }
.si-keep label { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-size: 14px; font-weight: 400; color: #1B2A41; }
.si-keep input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: #13233A; }

.si-msg { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 14px; font-weight: 600; line-height: 1.4; }
.si-msg .si-ico { flex: none; margin-top: 1px; }
.si-msg--err { color: #B42318; }
.si-msg--ok { color: #1F6B3A; }

.si-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 50px; padding: 0 22px; border-radius: 25px; font: inherit; font-size: 15px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; border: 1px solid transparent; text-align: center; }
.si-btn--navy { height: 52px; border-radius: 26px; border: 0; background: #13233A; color: #fff; font-size: 16px; }
.si-btn--navy:hover { background: #1A2D49; }
.si-btn--navy[disabled] { opacity: .7; cursor: progress; }
.si-btn--white { background: #fff; color: #1B2A41; border-color: #D8D0C0; }
.si-btn--white:hover { border-color: #13233A; }

.si-or { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: #5A6272; font-size: 12px; line-height: 1; }
.si-or::before, .si-or::after { content: ""; flex: 1; height: 1px; background: #E3DCCD; }
.si-note { margin: 10px 0 0; text-align: center; font-size: 13px; color: #5A6272; }
.si-note--box { padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid #E3DCCD; color: #1B2A41; }
.si-foot { margin: 36px 0 0; text-align: center; font-size: 13px; line-height: 1.5; color: #5A6272; }
.si-foot p { margin: 0; }
.si-link, .si-foot a { color: #8A6216; font-weight: 600; text-decoration: none; }
.si-back { display: block; margin-top: 18px; text-align: center; font-size: 13px; color: #5A6272; }
.si-back a { color: #5A6272; }

/* ---- the "Forgot?" sheet: bottom sheet on a phone, centred card on a laptop */
.si-sheet { width: min(420px, 100% - 24px); margin: auto auto 12px; padding: 22px 22px 18px; border: 0; border-radius: 20px; background: #fff; color: #1B2A41; }
.si-sheet::backdrop { background: rgba(19, 35, 58, .55); }
.si-sheet h2 { margin: 0 0 8px; font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 1.35rem; color: #13233A; }
.si-sheet p { margin: 0 0 16px; font-size: .95rem; color: #1B2A41; }
.si-sheet-actions { display: flex; flex-direction: column; gap: 10px; }

/* phone: ACTS mark, centred heading, "or" 22px, the footer line pinned to the bottom of the screen */
@media (max-width: 767px) {
  .si-card { min-height: 100%; }
  .si-foot { margin-top: auto; padding-top: 24px; }
}
/* 768–1023px: the phone layout, centred on the cream page, no navy panel */
@media (min-width: 768px) {
  .si-main { align-items: center; padding: 48px 24px; }
  .si-sheet { margin: auto; }
}
/* >= 1024px: two halves, 50 / 50 */
@media (min-width: 1024px) {
  .si { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 1fr; }
  .si-hero { display: block; min-height: 100vh; min-height: 100dvh; }
  .si-main { padding: 24px; }
  .si-card { max-width: 380px; }
  .si-mark { display: none; }
  .si-eyebrow, .si-h1, .si-lead { text-align: left; }
  .si-eyebrow { margin-top: 0; }
  .si-h1 { margin-top: 0; font-size: 34px; line-height: 1.2; }
  .si-lead { font-size: 15px; }
  .si-form { gap: 16px; }
  .si-or { margin: 24px 0; }
}
@media (prefers-reduced-motion: reduce) { .si-body * { transition: none !important; animation: none !important; } }

/* ---- the "Scan a code" page */
.si-scan-view { position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 20px; overflow: hidden; background: #13233A; }
.si-scan-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.si-scan-frame { position: absolute; inset: 14%; border: 3px solid #C9993F; border-radius: 18px; box-shadow: 0 0 0 999px rgba(19, 35, 58, .35); pointer-events: none; }
.si-scanpage .si-btn--navy { margin-top: 4px; }
