/* ==========================================================================
   Sign-in redesign (owner approved 2026-11-07) - TENANT app + website.
   Loaded AFTER portal.css / site.css. Covers the sign-in page (index.html, signed-out
   view) and, through the same .signin-page frame, the contact / terms / privacy /
   data-deletion pages' theme tokens. The signed-in app (#app) is untouched.
   Same look as the staff page (public/css/signin2.css in the staff project).

   RESPONSIVE RULE (owner, 2026-11-07): every phone width (320-480), phones in
   landscape, iPad / tablets (600-1024) and laptops, light AND dark, no sideways
   scroll, nothing cut off. clamp()/%-based; layout switches at 720px (floating card)
   and 1000px (split screen).

   Theme: follows the phone unless Light/Dark was chosen in My profile > Appearance
   ('pg.theme'); js/boot.js applies it on the sign-in view too (it used to strip it).
   ========================================================================== */

:root {
  --si-sheet: #ffffff;
  --si-page: #eef2fb;
  --si-ink: #0f172a;
  --si-ink2: #334155;
  --si-muted: #64748b;
  --si-faint: #8a97b4;
  --si-line: #e3e8f4;
  --si-field: #f6f8fd;
  --si-seg: #eef1f8;
  --si-segon: #ffffff;
  --si-link: #3256d4;
  --si-chip: #f1f4fb;
  --si-shadow: rgba(8, 14, 50, .5);
  --si-hdr: rgba(255, 255, 255, .86);
  --si-glow1: rgba(99, 132, 255, .16);
  --si-glow2: rgba(45, 212, 191, .14);
  --si-glow3: rgba(129, 140, 248, .12);
  --si-shadow2: rgba(23, 38, 99, .35);
  color-scheme: light;
}
html[data-theme="dark"] {
  --si-sheet: #0f1637;
  --si-page: #0b1230;
  --si-ink: #eef2ff;
  --si-ink2: #cdd6f6;
  --si-muted: #9aa7cf;
  --si-faint: #7f8cb8;
  --si-line: #27315f;
  --si-field: #0a1030;
  --si-seg: #0a1030;
  --si-segon: #1c2658;
  --si-link: #8fb1ff;
  --si-chip: #18214a;
  --si-shadow: rgba(0, 0, 0, .7);
  --si-hdr: rgba(10, 16, 41, .85);
  --si-glow1: rgba(59, 99, 232, .28);
  --si-glow2: rgba(16, 185, 129, .12);
  --si-glow3: rgba(99, 102, 241, .16);
  --si-shadow2: rgba(0, 0, 0, .8);
  color-scheme: dark;
}


/* the shared component tokens (inputs, code boxes, device rows, messages ...) follow the sheet */
.signin-page {
  --ink: var(--si-ink); --ink-soft: var(--si-ink2); --muted: var(--si-muted); --faint: var(--si-faint);
  --line: var(--si-line); --line-soft: var(--si-chip); --bg: var(--si-page); --card: var(--si-sheet);
  background: var(--si-page) !important; background-image: none !important; color: var(--si-ink);
  padding-top: 0 !important;
}
body:has(> .signin-page:not([hidden])), body.dark-page:has(.signin-page:not([hidden])) { background: var(--si-page); }
html[data-theme="dark"] .signin-page .input,
html[data-theme="dark"] .signin-page input,
html[data-theme="dark"] .signin-page select,
html[data-theme="dark"] .signin-page textarea { background: var(--si-field); color: var(--si-ink); border-color: var(--si-line); }
.signin-page .input, .signin-page input, .signin-page select, .signin-page textarea { color: var(--si-ink); }
.signin-page .input { background: var(--si-field); border-radius: 14px; min-height: 48px; }
.signin-page .input:focus { background: var(--si-sheet); border-color: #3b63e8; box-shadow: 0 0 0 4px rgba(59, 99, 232, .18); }
.signin-page .input::placeholder, .signin-page input::placeholder { color: var(--si-faint); }
.signin-page .input:-webkit-autofill, .signin-page .input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--si-ink); -webkit-box-shadow: 0 0 0 40px var(--si-field) inset; box-shadow: 0 0 0 40px var(--si-field) inset; caret-color: var(--si-ink);
}

/* ------------------------------ page layout ------------------------------ */
.signin-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.signin-page > .nav { display: none !important; }       /* the hero carries brand + Home now */
.signin-page .stage {
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
  flex: 1 0 auto; min-height: 0; padding: 0; background: none;
}
.signin-page .stage .shell {
  width: 100%; max-width: none; flex: 1 0 auto; display: flex; flex-direction: column;
  margin-top: -30px; position: relative; z-index: 2;
}
.signin-wordmark, html[data-in-app] .signin-wordmark, html[data-in-app] #signIn .signin-wordmark { display: none !important; }

/* ---------------------------------- hero --------------------------------- */
.si-hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fff; flex: none;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(59, 99, 232, .6), transparent 60%),
    radial-gradient(90% 70% at 0% 100%, rgba(47, 216, 166, .2), transparent 62%),
    linear-gradient(165deg, #0b1230 0%, #101c58 55%, #1d3bb3 100%);
  padding: calc(env(safe-area-inset-top, 0px) + 18px) clamp(16px, 5vw, 28px) 58px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand brand" "copy art";
  align-content: space-between; row-gap: clamp(14px, 3vh, 26px);
  min-height: 250px; min-height: clamp(250px, 35vh, 330px); min-height: clamp(250px, 35dvh, 330px);
}
.si-hero::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: -1; opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1.5px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 80%);
  mask-image: linear-gradient(180deg, #000, transparent 80%);
}
.si-brand { grid-area: brand; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 11px; min-width: 0; }
.si-logo {
  width: 42px; height: 42px; flex: none; border-radius: 23%; overflow: hidden;
  background: linear-gradient(180deg, #3b63e8 0%, #131f4d 100%);
  box-shadow: 0 10px 22px -8px rgba(0, 0, 0, .6);
}
.si-logo svg { display: block; width: 100%; height: 100%; }
.si-wm { min-width: 0; line-height: 1.1; flex: 0 1 auto; }
.si-wm b { display: block; font-size: 20px; font-weight: 800; letter-spacing: .01em; }
.si-wm b em { font-style: normal; color: #2fd8a6; }
.si-wm span {
  display: block; margin-top: 3px; font-size: 10.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255, 255, 255, .72);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.si-side { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.si-pill {
  display: none; font-size: 10.5px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase;
  padding: 6px 11px; border-radius: 99px; color: #fff;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22);
}
.si-link {
  font-size: 12.5px; font-weight: 700; color: #fff; text-decoration: none; white-space: nowrap;
  padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .26);
}
.si-link:hover { background: rgba(255, 255, 255, .2); }
.si-link.pri { background: rgba(255, 255, 255, .95); color: #1b2e78; border-color: transparent; }
/* installed app / Home Screen app: the role pill instead of the website links */
@media (display-mode: standalone) { .si-pill { display: inline-block; } .si-links { display: none; } }
:where(html[data-in-app]) .si-pill { display: inline-block; }
:where(html[data-in-app]) .si-links { display: none; }
/* Apps (Android app + iPhone Home Screen app), owner 2026-11-08: the navy hero must run edge to edge
   under the status bar. portal.css gave the sign-in page a status-bar-high top padding (+24px on
   .stage), which left a light strip above the hero that iPhone blurs into a grey "shaded" band.
   The hero already adds env(safe-area-inset-top) to its own padding, so its text stays clear. */
html[data-in-app] #signIn.signin-page { padding-top: 0 !important; background: #0b1230; }
html[data-in-app] #signIn.signin-page .stage { padding-top: 0 !important; }
@media (display-mode: standalone) {
  #signIn.signin-page { padding-top: 0 !important; background: #0b1230; }
  #signIn.signin-page .stage { padding-top: 0 !important; }
}


/* ---- App top edge (owner 2026-11-08: "shade/transparent band above StayLedger") ----
   Android app: the native status bar is a flat #0b1230 strip and the page starts under it, but the hero's
   top edge had a bright corner glow + dots, so the join showed as a band. iPhone Home Screen app:
   since iOS 26 the status bar ignores theme-color / status-bar-style and blurs whatever is under it;
   a position:fixed solid strip touching the top (>=6px high, full width) makes it a solid colour.
   So in the apps: the hero fades from #0b1230 at its top edge, dots start lower, and on iPhone .si-sbar
   paints #0b1230 behind the clock. Websites are untouched. */
.si-sbar { display: none; }
@media (display-mode: standalone) {
  .si-sbar {
    display: block; position: fixed; top: 0; left: 0; right: 0; z-index: 2147483000; pointer-events: none;
    height: 6px; height: max(6px, env(safe-area-inset-top, 0px)); background: #0b1230;
  }
}
@media (display-mode: standalone) and (min-width: 1000px) { .si-sbar { background: var(--si-page); } }
@media (display-mode: standalone) and (max-width: 999.98px) {
  .si-hero { background: linear-gradient(180deg, #0b1230 0, #0b1230 env(safe-area-inset-top, 0px), rgba(11, 18, 48, 0) calc(env(safe-area-inset-top, 0px) + 96px)), radial-gradient(120% 90% at 100% 0%, rgba(59, 99, 232, .6), transparent 60%),
    radial-gradient(90% 70% at 0% 100%, rgba(47, 216, 166, .2), transparent 62%),
    linear-gradient(165deg, #0b1230 0%, #101c58 55%, #1d3bb3 100%); }
  .si-hero::before {
    -webkit-mask-image: linear-gradient(180deg, transparent 0, transparent calc(env(safe-area-inset-top, 0px) + 10px), #000 calc(env(safe-area-inset-top, 0px) + 70px), transparent 80%);
    mask-image: linear-gradient(180deg, transparent 0, transparent calc(env(safe-area-inset-top, 0px) + 10px), #000 calc(env(safe-area-inset-top, 0px) + 70px), transparent 80%);
  }
}
@media (max-width: 999.98px) {
  html[data-in-app] .si-hero { background: linear-gradient(180deg, #0b1230 0, #0b1230 6px, rgba(11, 18, 48, 0) 100px), radial-gradient(120% 90% at 100% 0%, rgba(59, 99, 232, .6), transparent 60%),
      radial-gradient(90% 70% at 0% 100%, rgba(47, 216, 166, .2), transparent 62%),
      linear-gradient(165deg, #0b1230 0%, #101c58 55%, #1d3bb3 100%); }
  html[data-in-app] .si-hero::before {
    -webkit-mask-image: linear-gradient(180deg, transparent 0, transparent 10px, #000 70px, transparent 80%);
    mask-image: linear-gradient(180deg, transparent 0, transparent 10px, #000 70px, transparent 80%);
  }
}

.si-copy { grid-area: copy; align-self: end; min-width: 0; }
.si-hl {
  margin: 0; font-size: 24px; font-size: clamp(23px, 7vw, 30px); line-height: 1.1; font-weight: 800; letter-spacing: -.025em; color: #fff;
}
.si-hl em { font-style: normal; color: #86ecd0; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .si-hl em {
    background: linear-gradient(90deg, #86ecd0, #9bb8ff); -webkit-background-clip: text; background-clip: text;
    color: transparent; -webkit-text-fill-color: transparent;
  }
}
.si-hs { margin: 9px 0 0; font-size: 13px; font-size: clamp(12.5px, 3.6vw, 14px); line-height: 1.4; color: rgba(255, 255, 255, .8); }

.si-art {
  grid-area: art; align-self: end; position: relative; flex: none;
  --si-art: 120px; --si-art: clamp(96px, 32vw, 150px);
  width: var(--si-art); height: calc(var(--si-art) * 1.1);
}
.si-art .c {
  position: absolute; display: grid; place-items: center; background: #fff; border-radius: 18%;
  box-shadow: 0 18px 30px -14px rgba(3, 8, 40, .7);
  animation: si-bob 5s ease-in-out infinite alternate; will-change: transform;
}
.si-art .c svg { width: 62%; height: 62%; display: block; }
.si-art .c.r { background: #e6edff; }
.si-art .c.o { border-radius: 50%; }
.si-art .c.dk { background: #16256e; border: 2px solid rgba(255, 255, 255, .28); }
.si-art .c1 { left: 24%; top: 0; width: 66%; height: 58%; animation-delay: -.5s; }
.si-art .c2 { left: 42%; top: 54%; width: 50%; height: 46%; animation-delay: -2.2s; }
.si-art .c3 { left: 0; top: 62%; width: 32%; height: 29%; animation-delay: -3.1s; }
@keyframes si-bob { to { transform: translate3d(0, -6px, 0); } }

/* ------------------------------- the sheet ------------------------------- */
.signin-page .auth-card {
  position: relative; flex: 1 0 auto;
  background: var(--si-sheet); color: var(--si-ink);
  border: 0; border-radius: 30px 30px 0 0;
  padding: 22px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  padding: clamp(18px, 5vw, 26px) clamp(16px, 5.5vw, 28px) calc(24px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -20px 40px -26px var(--si-shadow);
  animation: si-sheet .5s cubic-bezier(.2, .9, .25, 1) both;
}
@keyframes si-sheet { from { opacity: 0; transform: translateY(18px); } }
.signin-page .auth-card.shake { animation: shake .3s ease-in-out; }
.signin-page .auth-card h1 { color: var(--si-ink); font-size: 23px; margin-bottom: 6px; }
.signin-page .lede { color: var(--si-muted); }
.signin-page .hint { color: var(--si-muted); }
.signin-page .hint.is-bad { color: var(--bad-700); }
.signin-page label, .signin-page .field label, .signin-page .field > label { color: var(--si-ink2); }
.signin-page a:not(.btn):not(.si-link) { color: var(--si-link); }
.signin-page a.si-link:not(.btn) { color: #fff; }
.signin-page a.si-link.pri:not(.btn) { color: #1b2e78; }
.signin-page .btn { border-radius: 15px; min-height: 50px; }
.signin-page .btn-primary, .signin-page .btn-go {
  color: #fff; border-color: transparent; background: linear-gradient(135deg, #4671f2, #1e358f);
  box-shadow: 0 16px 28px -14px rgba(47, 86, 230, .85), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.signin-page .btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, #5a82f6, #2a46a8); }
.signin-page .btn-ghost { background: var(--si-sheet); color: var(--si-ink2); border-color: var(--si-line); }
.signin-page .btn-ghost:hover:not(:disabled) { background: var(--si-chip); border-color: var(--si-faint); }
.signin-page .otp input { background: var(--si-field); color: var(--si-ink); border-color: var(--si-line); }
.signin-page .otp input:focus { background: var(--si-sheet); border-color: #3b63e8; }
.signin-page .device-row { background: var(--si-field); border-color: var(--si-line); }
.signin-page .device-name { color: var(--si-ink); }

/* or + Google */
.or { display: flex; align-items: center; gap: 11px; margin: 14px 0 12px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--si-faint); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--si-line); }
#gWrap { display: flex; justify-content: center; min-height: 44px; max-width: 100%; overflow: hidden; }
.g-native-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 48px; padding: 10px 16px; border-radius: 14px;
  background: var(--si-sheet); color: var(--si-ink); border: 1.5px solid var(--si-line);
  font: 700 15px/1.2 -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  cursor: pointer; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.g-native-btn:active { background: var(--si-chip); }
.g-native-btn:disabled { opacity: .6; }
.g-native-btn svg { flex: none; }
.g-native-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* footer (website only; hidden in the app by portal.css) */
.signin-page .ft { background: var(--si-sheet); border-top: 1px solid var(--si-line); }
.signin-page .ft .ft-legal, .signin-page .ft .ft-legal span, .signin-page .ft .ft-legal-line { color: var(--si-muted); }
.signin-page .ft .ft-contact { color: var(--si-link); }
.signin-page .nav-who span { color: var(--si-muted); }

/* the loading splash follows the theme too (no white flash in dark mode) */
html[data-theme="dark"] .boot { background: linear-gradient(135deg, #0b1230 0%, #101c58 100%); }
html[data-theme="dark"] .boot .boot-word b { color: #fff; }
html[data-theme="dark"] .boot .boot-word b em { color: #2fd8a6; }
html[data-theme="dark"] .boot .boot-word .tag { color: #9aa7cf; }

/* ----------------------- small phones (320 - 360) ----------------------- */
@media (max-width: 360px) {
  .si-wm span { display: none; }
  .si-link { padding: 7px 9px; font-size: 12px; }
  .si-hs { display: none; }
  .si-hero { min-height: 232px; }
}
@media (max-width: 420px) {
  .signin-page .auth-card { padding-left: 16px; padding-right: 16px; }
  .signin-page .auth-card h1 { font-size: 21px; }
}
@media (max-height: 520px) {
  .si-hero { min-height: 0; padding-bottom: 44px; row-gap: 10px; }
  .si-art, .si-hs { display: none; }
  .si-hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "brand" "copy"; }
}

/* ------------------- tablets / iPad portrait (720 - 1099) ------------------- */
@media (min-width: 720px) {
  .si-hero { border-radius: 0 0 40px 40px; padding-bottom: 96px; min-height: 320px; }
  .si-hl { font-size: 38px; }
  .si-hs { font-size: 16px; }
  .si-art { --si-art: 190px; }
  .si-wm b { font-size: 22px; }
  .signin-page .stage .shell { max-width: 580px; margin: -64px auto 40px; flex: none; padding: 0 20px; }
  .signin-page .auth-card { flex: none; border-radius: 28px; padding: 30px 30px 26px; box-shadow: 0 30px 70px -30px var(--si-shadow); }
  .signin-page .auth-card h1 { font-size: 25px; }
}
@media (min-width: 720px) and (max-height: 520px) {
  .signin-page .stage .shell { margin-top: -40px; }
  .si-hero { padding-bottom: 60px; min-height: 0; }
}

/* ---------------------- laptop / desktop / iPad landscape ----------------------
   Owner-approved website design (2026-11-07, replaced the half-and-half screen): the top bar of
   the public website, a calm background, ONE centred card with the logo, a trust line, and the
   one-line footer. Phones and tablets below 1000px keep the hero + sheet design above. */
.si-kick, .si-mark, .si-trust, .si-c { display: none; }
@media (min-width: 1000px) {
  .signin-page .stage {
    display: flex !important; flex-direction: column; align-items: stretch; justify-content: flex-start;
    min-height: 100vh; min-height: 100dvh; padding: 0 !important;
    background-color: var(--si-page);
    background-image: radial-gradient(900px 520px at 50% 38%, var(--si-glow1), transparent 70%),
      radial-gradient(700px 500px at 90% 100%, var(--si-glow2), transparent 70%),
      radial-gradient(600px 420px at 6% 96%, var(--si-glow3), transparent 70%);
  }
  .si-hero {
    display: flex; align-items: center; min-height: 0; height: 68px; flex: none;
    padding: 0 clamp(24px, 4vw, 56px); border-radius: 0; overflow: visible; position: relative; z-index: 3;
    background: var(--si-hdr); border-bottom: 1px solid var(--si-line); color: var(--si-ink);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  }
  .si-hero::before, .si-copy, .si-art { display: none; }
  .si-brand { flex: 1; flex-wrap: nowrap; min-width: 0; }
  .si-logo { width: 38px; height: 38px; box-shadow: 0 8px 18px -10px rgba(23, 38, 99, .6); }
  .si-wm b { font-size: 18px; color: var(--si-ink); }
  .si-wm b em { color: #2f56e6; }
  html[data-theme="dark"] .si-wm b em { color: #2fd8a6; }
  .si-wm span { font-size: 11px; color: var(--si-muted); }
  .si-links { display: flex; align-items: center; gap: 6px; }
  .signin-page .si-hero a.si-link, .signin-page .si-hero a.si-link:visited {
    color: var(--si-ink2); background: transparent; border: 1.5px solid transparent;
    font-size: 14px; font-weight: 650; padding: 8px 14px; border-radius: 11px;
  }
  .signin-page .si-hero a.si-link:hover { background: var(--si-chip); }
  .signin-page .si-hero a.si-link.pri { color: var(--si-ink); background: var(--si-sheet); border-color: var(--si-line); }
  .si-c { display: inline-flex; }
  .si-pill { color: var(--si-link); background: var(--si-chip); border-color: var(--si-line); }

  .signin-page .stage .shell, .shell {
    flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 100%; max-width: none; margin: 0 !important; padding: 12px 24px 10px;
  }
  .si-kick {
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px;
    font-size: 12.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
    color: var(--si-link); background: var(--si-chip); border-radius: 99px; padding: 7px 14px 7px 10px;
  }
  .si-kick svg, .si-trust svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .signin-page .auth-card {
    flex: none; width: 100%; max-width: 468px;
    border: 1px solid var(--si-line); border-radius: 26px; padding: 20px 34px 16px;
    box-shadow: 0 40px 80px -40px var(--si-shadow2), 0 2px 8px rgba(15, 23, 42, .05);
  }
  .si-mark { display: block; width: 42px; height: 42px; margin: 0 auto 8px; border-radius: 23%; overflow: hidden; box-shadow: 0 14px 26px -14px rgba(23, 38, 99, .7); }
  .si-mark svg { display: block; width: 100%; height: 100%; }
  .signin-page .auth-card h1 { text-align: center; font-size: 26px; }
  .signin-page .lede { text-align: center; font-size: 14.5px; }
  .si-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; margin-top: 12px; }
  .si-trust > * { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--si-muted); text-decoration: none; }
  .si-trust svg { width: 19px; height: 19px; color: #2fd8a6; }
  .signin-page .si-trust a.si-help:hover { color: var(--si-link); }
  :where(html[data-in-app]) .si-trust .si-help { display: none; }
  .signin-page { background-color: var(--si-page) !important; }
  .signin-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
  .signin-page .stage { flex: 1 0 auto; min-height: 0; }
  .signin-page .ft { flex: none; }
  .signin-page .ft { background: var(--si-hdr); border-top: 1px solid var(--si-line); }
}
/* ==== BEGIN mobile-web sign-in (generated from the >=1000px block) ==== */
/* Owner 2026-11-08: phone/tablet BROWSERS show the same website design as the laptop.
   Android app (html[data-in-app]) and iPhone Home Screen app (standalone) keep the hero + sheet. */
@media (max-width: 999.98px) {
  html.si-web:not([data-in-app]) .signin-page .stage {
    display: flex !important; flex-direction: column; align-items: stretch; justify-content: flex-start;
    min-height: 100vh; min-height: 100dvh; padding: 0 !important;
    background-color: var(--si-page);
    background-image: radial-gradient(900px 520px at 50% 38%, var(--si-glow1), transparent 70%),
      radial-gradient(700px 500px at 90% 100%, var(--si-glow2), transparent 70%),
      radial-gradient(600px 420px at 6% 96%, var(--si-glow3), transparent 70%); }
  html.si-web:not([data-in-app]) .si-hero {
    display: flex; align-items: center; min-height: 0; height: 68px; flex: none;
    padding: 0 clamp(24px, 4vw, 56px); border-radius: 0; overflow: visible; position: relative; z-index: 3;
    background: var(--si-hdr); border-bottom: 1px solid var(--si-line); color: var(--si-ink);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
  html.si-web:not([data-in-app]) .si-hero::before, html.si-web:not([data-in-app]) .si-copy, html.si-web:not([data-in-app]) .si-art { display: none; }
  html.si-web:not([data-in-app]) .si-brand { flex: 1; flex-wrap: nowrap; min-width: 0; }
  html.si-web:not([data-in-app]) .si-logo { width: 38px; height: 38px; box-shadow: 0 8px 18px -10px rgba(23, 38, 99, .6); }
  html.si-web:not([data-in-app]) .si-wm b { font-size: 18px; color: var(--si-ink); }
  html.si-web:not([data-in-app]) .si-wm b em { color: #2f56e6; }
  html.si-web:not([data-in-app])[data-theme="dark"] .si-wm b em { color: #2fd8a6; }
  html.si-web:not([data-in-app]) .si-wm span { font-size: 11px; color: var(--si-muted); }
  html.si-web:not([data-in-app]) .si-links { display: flex; align-items: center; gap: 6px; }
  html.si-web:not([data-in-app]) .signin-page .si-hero a.si-link, html.si-web:not([data-in-app]) .signin-page .si-hero a.si-link:visited {
    color: var(--si-ink2); background: transparent; border: 1.5px solid transparent;
    font-size: 14px; font-weight: 650; padding: 8px 14px; border-radius: 11px; }
  html.si-web:not([data-in-app]) .signin-page .si-hero a.si-link:hover { background: var(--si-chip); }
  html.si-web:not([data-in-app]) .signin-page .si-hero a.si-link.pri { color: var(--si-ink); background: var(--si-sheet); border-color: var(--si-line); }
  html.si-web:not([data-in-app]) .si-c { display: inline-flex; }
  html.si-web:not([data-in-app]) .si-pill { color: var(--si-link); background: var(--si-chip); border-color: var(--si-line); }
  html.si-web:not([data-in-app]) .signin-page .stage .shell, html.si-web:not([data-in-app]) .shell {
    flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 100%; max-width: none; margin: 0 !important; padding: 12px 24px 10px; }
  html.si-web:not([data-in-app]) .si-kick {
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px;
    font-size: 12.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
    color: var(--si-link); background: var(--si-chip); border-radius: 99px; padding: 7px 14px 7px 10px; }
  html.si-web:not([data-in-app]) .si-kick svg, html.si-web:not([data-in-app]) .si-trust svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  html.si-web:not([data-in-app]) .signin-page .auth-card {
    flex: none; width: 100%; max-width: 468px;
    border: 1px solid var(--si-line); border-radius: 26px; padding: 20px 34px 16px;
    box-shadow: 0 40px 80px -40px var(--si-shadow2), 0 2px 8px rgba(15, 23, 42, .05); }
  html.si-web:not([data-in-app]) .si-mark { display: block; width: 42px; height: 42px; margin: 0 auto 8px; border-radius: 23%; overflow: hidden; box-shadow: 0 14px 26px -14px rgba(23, 38, 99, .7); }
  html.si-web:not([data-in-app]) .si-mark svg { display: block; width: 100%; height: 100%; }
  html.si-web:not([data-in-app]) .signin-page .auth-card h1 { text-align: center; font-size: 26px; }
  html.si-web:not([data-in-app]) .signin-page .lede { text-align: center; font-size: 14.5px; }
  html.si-web:not([data-in-app]) .si-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; margin-top: 12px; }
  html.si-web:not([data-in-app]) .si-trust > * { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--si-muted); text-decoration: none; }
  html.si-web:not([data-in-app]) .si-trust svg { width: 19px; height: 19px; color: #2fd8a6; }
  html.si-web:not([data-in-app]) .signin-page .si-trust a.si-help:hover { color: var(--si-link); }
  html.si-web:not([data-in-app]) .signin-page { background-color: var(--si-page) !important; }
  html.si-web:not([data-in-app]) .signin-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
  html.si-web:not([data-in-app]) .signin-page .stage { flex: 1 0 auto; min-height: 0; }
  html.si-web:not([data-in-app]) .signin-page .ft { flex: none; }
  html.si-web:not([data-in-app]) .signin-page .ft { background: var(--si-hdr); border-top: 1px solid var(--si-line); }
  html.si-web:not([data-in-app]) /* phone/tablet browser sizes */
  .si-hero { height: 60px; padding: 0 14px; }
  html.si-web:not([data-in-app]) .si-logo { width: 34px; height: 34px; }
  html.si-web:not([data-in-app]) .si-wm b { font-size: 16px; }
  html.si-web:not([data-in-app]) .si-wm span { font-size: 9.5px; }
  html.si-web:not([data-in-app]) .si-links { gap: 2px; flex: none; }
  html.si-web:not([data-in-app]) .signin-page .si-hero a.si-link, html.si-web:not([data-in-app]) .signin-page .si-hero a.si-link:visited { font-size: 13px; padding: 7px 9px; }
  html.si-web:not([data-in-app]) .signin-page .stage .shell, html.si-web:not([data-in-app]) .shell { justify-content: flex-start; padding: 18px 14px 18px; }
  html.si-web:not([data-in-app]) .signin-page .auth-card { border-radius: 22px; padding: 20px 18px 16px; }
  html.si-web:not([data-in-app]) .si-trust { gap: 8px 18px; padding: 0 6px; }
  html.si-web:not([data-in-app]) .si-trust > * { font-size: 12.5px; }
  html.si-web:not([data-in-app]) .signin-page .ft { font-size: 11.5px; }
}
/* ==== END mobile-web sign-in ==== */





@media (prefers-reduced-motion: reduce) {
  .si-art .c { animation: none; }
  .signin-page .auth-card { animation: none; }
}

/* ==========================================================================
   Agreement block + green safe row + policy popup (owner 2026-11-10).
   Same on every screen: phones, tablets, the apps and the website.
   ========================================================================== */
.si-legal { margin-top: 18px; text-align: center; }
.si-legal-t { margin: 0 0 10px; font-size: 13px; color: var(--si-muted); }
.si-legal-links { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.signin-page .si-doc {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 8px 10px; border-radius: 14px;
  background: var(--si-chip); border: 1px solid var(--si-line);
  color: var(--si-link); font-size: 13px; font-weight: 700; line-height: 1.2;
  text-decoration: none; -webkit-tap-highlight-color: transparent;
  transition: transform .12s ease, background-color .15s ease, border-color .15s ease;
}
.signin-page .si-doc:hover { border-color: var(--si-link); }
.signin-page .si-doc:active { transform: scale(.97); }
.signin-page .si-doc:focus-visible { outline: 2px solid var(--si-link); outline-offset: 2px; }
.si-doc svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.si-safe {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px;
  margin-top: 14px; padding-top: 13px; border-top: 1px dashed var(--si-line);
}
.si-safe > span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: #15925f; }
html[data-theme="dark"] .si-safe > span { color: #4fe0aa; }
.si-safe svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
/* The laptop row under the card said the same two things - keep only its help link. */
.si-trust > span { display: none !important; }
/* Always side by side on one line (owner 2026-11-10); smaller text on narrow phones. */
.signin-page .si-doc span { white-space: nowrap; }
@media (max-width: 420px) {
  .si-legal-links { gap: 7px; }
  .signin-page .si-doc { font-size: 12.5px; padding: 8px 6px; gap: 5px; }
  .si-doc svg { width: 15px; height: 15px; }
}
@media (max-width: 380px) {
  .si-doc svg { display: none; }
}
@media (max-width: 340px) {
  .signin-page .si-doc { font-size: 11.5px; padding: 8px 4px; }
}

/* ---- the popup ---- */
html.lg-open, html.lg-open body { overflow: hidden !important; }
.lg-root { position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: flex-end; justify-content: center; }
.lg-scrim { position: absolute; inset: 0; background: rgba(8, 14, 40, .5); opacity: 0; transition: opacity .2s ease; }
.lg-sheet {
  position: relative; width: 100%; max-width: 640px;
  height: min(88vh, 860px); height: min(88dvh, 860px);
  display: flex; flex-direction: column;
  background: var(--si-sheet); color: var(--si-ink);
  border-radius: 24px 24px 0 0; box-shadow: 0 -18px 50px rgba(8, 14, 50, .28);
  transform: translateY(100%); transition: transform .26s cubic-bezier(.2, .8, .2, 1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.lg-root.is-in .lg-scrim { opacity: 1; }
.lg-root.is-in .lg-sheet { transform: none; }
.lg-root.is-out .lg-scrim { opacity: 0; }
.lg-root.is-out .lg-sheet { transform: translateY(100%); transition-duration: .2s; }
@media (min-width: 700px) {
  .lg-root { align-items: center; padding: 24px; }
  .lg-sheet { border-radius: 24px; height: min(86vh, 820px); transform: translateY(24px) scale(.98); opacity: 0; transition: transform .22s ease, opacity .18s ease; }
  .lg-root.is-in .lg-sheet { opacity: 1; }
  .lg-root.is-out .lg-sheet { opacity: 0; transform: translateY(16px) scale(.98); }
  .lg-grab { display: none; }
}
.lg-grab { width: 42px; height: 5px; border-radius: 9px; background: var(--si-line); margin: 9px auto 0; flex: none; }
.lg-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px 14px; border-bottom: 1px solid var(--si-line); flex: none; }
.lg-ic { width: 42px; height: 42px; border-radius: 13px; flex: none; display: grid; place-items: center; color: #fff; background: linear-gradient(160deg, #3b63e8, #16256e); box-shadow: 0 6px 14px rgba(40, 70, 190, .28); }
.lg-ic svg, .lg-x svg, .lg-switch svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lg-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lg-title { font-size: 17px; font-weight: 800; color: var(--si-ink); }
.lg-sub { font-size: 12.5px; color: var(--si-muted); }
.lg-x { width: 40px; height: 40px; flex: none; border-radius: 12px; border: 1px solid var(--si-line); background: var(--si-chip); color: var(--si-ink); display: grid; place-items: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lg-x:active { transform: scale(.94); }
.lg-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 16px 18px 20px; }
.lg-body:focus { outline: none; }
.lg-lede { margin: 0 0 14px; font-size: 14px; line-height: 1.55; color: var(--si-muted); }
.lg-sum { background: var(--si-chip); border: 1px solid var(--si-line); border-radius: 16px; padding: 13px 15px; margin-bottom: 16px; }
.lg-sum b { display: block; font-size: 13px; font-weight: 800; color: var(--si-link); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .06em; }
.lg-sum ul { margin: 0; padding-left: 18px; }
.lg-sum li { font-size: 13.5px; line-height: 1.55; margin-bottom: 4px; color: var(--si-ink); }
.lg-text { font-family: "Times New Roman", Times, "Liberation Serif", "Noto Serif", serif; color: var(--si-ink); }
.lg-text h2 { font-size: 18px; font-weight: 700; margin: 22px 0 8px; color: var(--si-ink); }
.lg-text p, .lg-text li { font-size: 16px; line-height: 1.55; color: var(--si-ink); }
.lg-text p { margin: 0 0 10px; }
.lg-text li { margin-bottom: 6px; }
.lg-text strong { font-weight: 700; }
.lg-text a { color: var(--si-link); word-break: break-word; }
.lg-text table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0 12px; display: block; overflow-x: auto; }
.lg-text th, .lg-text td { border: 1px solid var(--si-line); padding: 6px 8px; text-align: left; vertical-align: top; }
.lg-foot { display: flex; gap: 10px; padding: 12px 16px 14px; border-top: 1px solid var(--si-line); flex: none; }
.lg-done:disabled { opacity: 1; background: var(--si-seg); color: var(--si-faint); box-shadow: none; cursor: not-allowed; border-color: var(--si-line); }
.lg-done svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-right: 6px; vertical-align: -3px; }
.lg-switch { flex: 1 1 0; min-width: 0; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 14px; border: 1px solid var(--si-line); background: var(--si-chip); color: var(--si-link); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lg-switch svg { width: 18px; height: 18px; flex: none; }
.lg-switch span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-done { flex: 1 1 0; min-height: 46px; border-radius: 14px; }
.lg-switch:active, .lg-done:active { transform: scale(.97); }
.lg-load { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 60px 0; color: var(--si-muted); }
.lg-load span { width: 8px; height: 8px; border-radius: 50%; background: var(--si-link); animation: lgDot 1s infinite ease-in-out; }
.lg-load span:nth-child(2) { animation-delay: .15s; }
.lg-load span:nth-child(3) { animation-delay: .3s; }
.lg-load b { font-size: 13px; font-weight: 600; margin-left: 8px; }
@keyframes lgDot { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: none; } }
.lg-err { text-align: center; padding: 50px 10px; }
.lg-err b { display: block; font-size: 15px; margin-bottom: 6px; }
.lg-err p { color: var(--si-muted); font-size: 13.5px; margin: 0 0 14px; }
@media (prefers-reduced-motion: reduce) {
  .lg-sheet, .lg-scrim { transition: none; }
  .lg-load span { animation: none; }
}
