/* The sign-in page (signin.html) only, on top of css/site.css and css/header.css. The page header (C2: the small
   PureFlight logo and the title on a soft blue tint, README step 97), then the form, centered, then the legal line.
   Everything here is scoped to body.si, and only signin.html loads this file, so the portal and the suggestion page
   look exactly as before. The brand panel stays dark in both themes; the form side follows the system setting. */

/* ---------- tokens ---------- */
.si{
  --si-bg:#FFFFFF; --si-ink:#0E1B30; --si-ink-2:#2E3747; --si-muted:#59606B;
  --si-line:#C8CDD5; --si-line-hover:#9AA1AC; --si-hair:#E5E8EC; --si-field:#FFFFFF; --si-soft:#F4F6F9;
  --si-accent:#1F4FA3; --si-ring:rgba(31,79,163,.20);
  --si-btn:#0E1B30; --si-btn-hover:#1D3050; --si-btn-press:#070E19; --si-on-btn:#FFFFFF; --si-btn-edge:rgba(255,255,255,.10);
  --si-bad:#AE3427; --si-bad-soft:#FDF0EE; --si-bad-line:#F0CBC4; --si-bad-ring:rgba(174,52,39,.16); --si-good:#1B7446;
  /* the brand panel: one deep navy in light and dark */
  --si-panel:#0E1B30; --si-panel-ink:#F3F5F8; --si-panel-soft:#C3CDDB; --si-panel-muted:#A3AFC1; --si-panel-accent:#8FB3E3;
  background:var(--si-bg); color:var(--si-ink);
}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .si{
  --si-bg:#05080F; --si-ink:#F4F6FA; --si-ink-2:#C9CED6; --si-muted:#9AA2AE;
  --si-line:#33373F; --si-line-hover:#565C67; --si-hair:#1F2228; --si-field:#0E1626; --si-soft:#111826;
  --si-accent:#8FB3E3; --si-ring:rgba(143,179,227,.26);
  --si-btn:#E4EAF3; --si-btn-hover:#FFFFFF; --si-btn-press:#C9D3E2; --si-on-btn:#0B1626; --si-btn-edge:rgba(255,255,255,.6);
  --si-bad:#F2907F; --si-bad-soft:#221312; --si-bad-line:#4B2621; --si-bad-ring:rgba(242,144,127,.2); --si-good:#5BC98F}}
:root[data-theme="dark"] .si{
  --si-bg:#05080F; --si-ink:#F4F6FA; --si-ink-2:#C9CED6; --si-muted:#9AA2AE;
  --si-line:#33373F; --si-line-hover:#565C67; --si-hair:#1F2228; --si-field:#0E1626; --si-soft:#111826;
  --si-accent:#8FB3E3; --si-ring:rgba(143,179,227,.26);
  --si-btn:#E4EAF3; --si-btn-hover:#FFFFFF; --si-btn-press:#C9D3E2; --si-on-btn:#0B1626; --si-btn-edge:rgba(255,255,255,.6);
  --si-bad:#F2907F; --si-bad-soft:#221312; --si-bad-line:#4B2621; --si-bad-ring:rgba(242,144,127,.2); --si-good:#5BC98F}

.si :focus-visible{outline:2px solid var(--si-accent);outline-offset:3px}

/* ---------- layout: the header, the form, the legal line ---------- */
.si-shell{flex:1 0 auto;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto 1fr auto;min-height:100vh;min-height:100dvh;min-width:0}
.si-head{grid-row:1;min-width:0}
/* the header's row and title line up with the form's column under it */
.si-head .p-top-in{max-width:calc(400px + 2 * clamp(16px,5vw,24px));padding-inline:clamp(16px,5vw,24px)}
.si-main{grid-row:2;min-width:0;display:flex;flex-direction:column;padding:20px clamp(16px,5vw,24px) 40px}
.signin{width:100%;max-width:400px;margin-inline:auto;display:flex;flex-direction:column;min-width:0}
.si-foot{grid-row:3;padding:18px clamp(16px,5vw,24px) calc(22px + env(safe-area-inset-bottom,0px));text-align:center;color:var(--si-muted)}
.si-foot .p-legal{margin:0 auto;max-width:400px;font-size:12px;line-height:1.5;letter-spacing:0}
/* Privacy and Support under the legal line: quiet, but each a comfortable target */
.si-links{display:flex;flex-wrap:wrap;justify-content:center;gap:0 18px;margin-top:2px;font-size:12.5px;line-height:1.4}
.si-links a{display:inline-flex;align-items:center;min-height:32px;color:inherit;text-decoration:underline;text-decoration-thickness:1px;
  text-decoration-color:color-mix(in srgb,currentColor 40%,transparent);text-underline-offset:3px}
.si-links a:hover{color:var(--si-ink-2);text-decoration-color:currentColor}
/* Another shop's name (js/config.js) shows as plain spaced capitals in place of the wordmark. */
.si-head .p-wm{font-size:12px;font-weight:600;letter-spacing:.18em;text-transform:uppercase;text-decoration:none}

/* ---------- the form side ---------- */
.si .card h2{font-family:var(--body);font-weight:600;font-size:clamp(30px,7.6vw,34px);line-height:1.1;letter-spacing:-.032em;color:var(--si-ink);overflow-wrap:anywhere;text-wrap:balance}
/* One heading per step: "Sign in" on the email step (its card's own heading is for screen readers); on the code,
   PIN and setup steps their own heading is the one you see, and "Sign in" stays for screen readers. */
.si #emailTitle,
.si .signin:has(> #setupCard:not([hidden]),> #codeCard:not([hidden]),> #pinCard:not([hidden])) > .si-title{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.si #pageStatus{margin-top:16px}
.si #pageStatus:not(:empty) ~ .card{margin-top:6px}

.si .card{background:none;border:0;border-radius:0;padding:0;box-shadow:none;display:flex;flex-direction:column;min-width:0}
.si .card > *{margin:0}
.si .card > * + *{margin-top:12px}
.si .card > .note:first-of-type{font-size:16px;line-height:1.55;color:var(--si-muted)}
.si .card > form{margin-top:30px;display:flex;flex-direction:column;gap:16px;min-width:0}
.si .sent-to{font-weight:600;color:var(--si-ink);overflow-wrap:anywhere}

/* fields */
.si .field{gap:8px}
.si .field label{font-size:14px;font-weight:500;color:var(--si-ink-2);letter-spacing:-.005em}
.si .field input{min-height:52px;padding:12px 16px;border:1px solid var(--si-line);border-radius:12px;background:var(--si-field);color:var(--si-ink);
  font-size:16px;letter-spacing:-.005em;box-shadow:0 1px 2px rgba(15,27,45,.04);-webkit-appearance:none;appearance:none}
.si .field input:hover{border-color:var(--si-line-hover)}
.si .field input:focus,.si .field input:focus-visible{outline:none;border-color:var(--si-accent);box-shadow:0 0 0 4px var(--si-ring)}
.si .field input[aria-invalid="true"]{border-color:var(--si-bad)}
.si .field input[aria-invalid="true"]:focus{border-color:var(--si-bad);box-shadow:0 0 0 4px var(--si-bad-ring)}
/* the code (6 to 10 digits) and the PIN: one centered, spaced line that fits ten digits at 320 px */
.si #code,.si #pin{min-height:56px;font-family:var(--mono);font-size:22px;font-weight:500;letter-spacing:.3em;text-indent:.3em;text-align:center;font-variant-numeric:tabular-nums}
.si #pin{letter-spacing:.5em;text-indent:.5em}
@media (forced-colors: active){.si .field input:focus{outline:2px solid CanvasText;outline-offset:1px}}

/* buttons */
.si .row{display:flex;flex-direction:column;align-items:stretch;gap:10px}
.si .btn{min-height:48px;padding:12px 20px;border-radius:12px;font-size:15px;font-weight:500;letter-spacing:-.005em;line-height:1.2;
  border:1px solid var(--si-line);background:transparent;color:var(--si-ink);
  transition:background-color .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease,transform .08s ease}
.si .btn:hover{border-color:var(--si-line-hover);background:var(--si-soft)}
.si .btn:active:not(:disabled){transform:translateY(1px)}
.si .btn.primary{min-height:52px;border:0;background:var(--si-btn);color:var(--si-on-btn);font-size:16px;font-weight:600;
  box-shadow:inset 0 1px 0 var(--si-btn-edge),0 1px 2px rgba(7,14,25,.22),0 4px 14px -6px rgba(7,14,25,.35)}
.si .btn.primary:hover{background:var(--si-btn-hover);border:0}
.si .btn.primary:active:not(:disabled){background:var(--si-btn-press);box-shadow:inset 0 1px 2px rgba(0,0,0,.25)}
.si .btn:disabled{opacity:.42;cursor:not-allowed;transform:none}
.si .btn.primary:disabled,.si .btn.primary:disabled:hover{background:var(--si-btn);box-shadow:none}
.si .btn:not(.primary):disabled:hover{background:transparent;border-color:var(--si-line)}
.si .btn:focus-visible{outline:2px solid var(--si-accent);outline-offset:3px}
/* Busy: the button keeps its words and gains a spinner while the line under it says what's happening
   ("Sending your code…", "Checking your code…", "Checking your PIN…"); read from the page, so the script is unchanged. */
.si #emailForm:has(#emailStatus:not(:empty):not(.err)) #sendBtn:disabled,
.si #pinForm:has(#pinStatus:not(:empty):not(.err)) #pinBtn:disabled,
.si #codeForm:has(#codeStatus:not(:empty):not(.err)) #verifyBtn:disabled,
.si #codeForm:has(#codeStatus:not(:empty):not(.err):not(.ok)):has(#verifyBtn:enabled) #resendBtn:disabled{opacity:1;cursor:progress}
.si #emailForm:has(#emailStatus:not(:empty):not(.err)) #sendBtn:disabled::before,
.si #pinForm:has(#pinStatus:not(:empty):not(.err)) #pinBtn:disabled::before,
.si #codeForm:has(#codeStatus:not(:empty):not(.err)) #verifyBtn:disabled::before,
.si #codeForm:has(#codeStatus:not(:empty):not(.err):not(.ok)):has(#verifyBtn:enabled) #resendBtn:disabled::before{
  content:"";flex:0 0 auto;width:16px;height:16px;border-radius:50%;border:2px solid currentColor;border-right-color:transparent;opacity:.85;animation:si-spin .75s linear infinite}
@keyframes si-spin{to{transform:rotate(360deg)}}

/* quiet text links */
.si .btn.link{min-height:40px;padding:0 6px;margin-inline:-6px;border:0;border-radius:8px;background:none;color:var(--si-ink-2);font-size:14px;font-weight:500;
  text-decoration:underline;text-decoration-thickness:1px;text-decoration-color:color-mix(in srgb,currentColor 35%,transparent);text-underline-offset:4px}
.si .btn.link:hover{background:none;color:var(--si-ink);text-decoration-color:currentColor}
.si .btn.link:focus-visible{outline-offset:2px}
.si .row.alt,.si #pinForm > .row:last-child{flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:0 20px}

/* the email step's small print: who should use which address, then the staff way in */
.si #emailForm + .note{margin-top:22px;font-size:13.5px;line-height:1.55;color:var(--si-muted)}
.si #emailCard > .row.alt{margin-top:6px}
/* the code step: "Send a new code" under Sign in, its countdown, then the two ways out on one line */
.si #cooldownNote{margin-top:-6px;font-size:13px;color:var(--si-muted);text-align:center;font-variant-numeric:tabular-nums}
.si #codeForm > .row.alt{margin-top:-2px}
.si #pinForm > .row:last-child{margin-top:-2px}

/* the sign-in check (js/captcha.js, Cloudflare Turnstile): takes no room while it works unseen; when it needs the
   person, Cloudflare's checkbox shows here, on the form's own soft panel */
.si .si-captcha{display:flex;justify-content:center;min-width:0;max-width:100%;overflow:hidden}
.si .si-captcha:empty{display:none}
.si .si-captcha.is-asking{padding:10px 0;margin:2px 0 4px}
.si .si-captcha iframe{max-width:100%}

/* status lines */
.si .status{font-size:14px;line-height:1.5;color:var(--si-muted)}
.si .status.ok{color:var(--si-good);font-weight:500}
.si .status.err{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border:1px solid var(--si-bad-line);border-radius:12px;background:var(--si-bad-soft);
  color:var(--si-bad);font-weight:500;overflow-wrap:anywhere}
.si .status.err::before{content:"";flex:0 0 auto;width:16px;height:16px;margin-top:2px;background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0Zm0 10.75a1 1 0 1 0 0 2 1 1 0 0 0 0-2ZM8 3.5a1 1 0 0 0-1 1.06l.25 4.25a.75.75 0 0 0 1.5 0L9 4.56A1 1 0 0 0 8 3.5Z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0Zm0 10.75a1 1 0 1 0 0 2 1 1 0 0 0 0-2ZM8 3.5a1 1 0 0 0-1 1.06l.25 4.25a.75.75 0 0 0 1.5 0L9 4.56A1 1 0 0 0 8 3.5Z'/%3E%3C/svg%3E") center/contain no-repeat}

/* the setup notice */
.si .notice{margin-top:22px;padding:16px 18px;border:1px solid var(--si-hair);border-radius:14px;background:var(--si-soft);color:var(--si-ink-2);font-size:15px;line-height:1.6;overflow-wrap:anywhere}
.si .notice code{font-family:var(--mono);font-size:.88em;padding:1px 6px;border-radius:6px;background:color-mix(in srgb,var(--si-ink) 7%,transparent);color:var(--si-ink);overflow-wrap:anywhere}

/* Suggestions and feedback (suggest.html), for everyone: a quiet line under the form, not another card */
.si .suggest-cta{display:block;margin-top:36px;padding:20px 0 0;border-top:1px solid var(--si-hair);border-radius:0;background:none;
  font-size:14px;line-height:1.55;color:var(--si-muted);text-decoration:none;-webkit-tap-highlight-color:transparent}
.si .suggest-t{font-weight:500;color:var(--si-ink-2)}
.si .suggest-d{color:var(--si-muted)}
.si .suggest-go{display:inline-block;margin-left:2px;color:var(--si-accent);font-weight:500}
.si .suggest-cta:hover .suggest-t,.si .suggest-cta:hover .suggest-d{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;text-decoration-color:color-mix(in srgb,currentColor 40%,transparent)}
.si .suggest-cta:focus-visible{outline:2px solid var(--si-accent);outline-offset:4px;border-radius:4px}

/* ---------- "PureFlight is launching soon" (js/launch-soon.js; README step 95) ----------
   A dialog in the middle of a computer's screen; on a phone, a sheet up from the bottom edge. Its own soft panel, the
   form's fields and buttons, the same in light and dark (the tokens above). */
.si .ls-dlg{border:1px solid var(--si-hair);padding:0;margin:auto;width:min(460px,calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow:auto;
  border-radius:22px;background:var(--si-bg);color:var(--si-ink);
  box-shadow:0 1px 0 var(--si-hair),0 24px 60px -12px rgba(7,14,25,.45);overscroll-behavior:contain}
.si .ls-dlg::backdrop{background:rgba(7,14,25,.55);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}
.si .ls-in{display:flex;flex-direction:column;padding:12px 24px 26px;min-width:0}
.si .ls-head{display:flex;align-items:center;justify-content:space-between;margin:0 -12px 8px 0}
/* the owner's seal (img/brand/brand.svg #pf-seal, as the footers), in the page's --br-* colors: light and dark each get
   the owner's own */
.si .ls-mark{display:block;width:56px;height:56px;margin-top:6px}
.si .ls-mark .pf-seal{display:block;width:100%;height:100%}
.si .ls-x{display:grid;place-items:center;width:44px;height:44px;border:0;border-radius:12px;background:none;color:var(--si-ink-2);cursor:pointer}
.si .ls-x:hover{background:var(--si-soft);color:var(--si-ink)}
.si .ls-x:focus-visible{outline:2px solid var(--si-accent);outline-offset:-2px}
.si .ls-title{margin:6px 0 0;font-family:var(--body);font-weight:600;font-size:clamp(25px,6.4vw,30px);line-height:1.12;letter-spacing:-.028em;color:var(--si-ink);text-wrap:balance}
.si .ls-title:focus{outline:none}
.si .ls-lead{margin:10px 0 0;font-size:15.5px;line-height:1.55;color:var(--si-muted)}
.si .ls-form{display:flex;flex-direction:column;gap:14px;margin-top:22px;padding-top:20px;border-top:1px solid var(--si-hair);min-width:0}
.si .ls-form[hidden],.si .ls-thanks[hidden]{display:none}
.si .ls-form .status:empty{display:none}
.si .ls-fine{margin:0;font-size:13px;line-height:1.5;color:var(--si-muted)}
.si .ls-fine a{color:var(--si-ink-2);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;text-decoration-color:color-mix(in srgb,currentColor 40%,transparent)}
.si .ls-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.si #lsForm:has(#lsStatus:not(:empty):not(.err)) #lsNotify:disabled{opacity:1;cursor:progress}
.si #lsForm:has(#lsStatus:not(:empty):not(.err)) #lsNotify:disabled::before{
  content:"";flex:0 0 auto;width:16px;height:16px;border-radius:50%;border:2px solid currentColor;border-right-color:transparent;opacity:.85;animation:si-spin .75s linear infinite}
.si .ls-thanks{display:flex;flex-direction:column;gap:12px;margin-top:22px;padding-top:20px;border-top:1px solid var(--si-hair)}
.si .ls-thanks-title{display:flex;align-items:center;gap:10px;margin:0;font-size:17px;font-weight:600;color:var(--si-good)}
.si .ls-thanks-title:focus{outline:none}
.si .ls-tick{flex:0 0 auto;width:22px;height:22px;border-radius:50%;background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M11 0a11 11 0 1 1 0 22 11 11 0 0 1 0-22Zm4.6 6.9a1 1 0 0 0-1.4.1l-4.4 5.2-2-2a1 1 0 1 0-1.4 1.4l2.8 2.8a1 1 0 0 0 1.5-.1l5-6a1 1 0 0 0-.1-1.4Z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M11 0a11 11 0 1 1 0 22 11 11 0 0 1 0-22Zm4.6 6.9a1 1 0 0 0-1.4.1l-4.4 5.2-2-2a1 1 0 1 0-1.4 1.4l2.8 2.8a1 1 0 0 0 1.5-.1l5-6a1 1 0 0 0-.1-1.4Z'/%3E%3C/svg%3E") center/contain no-repeat}
.si .ls-thanks-text{margin:0;font-size:15.5px;line-height:1.55;color:var(--si-ink-2);overflow-wrap:anywhere}
.si .ls-to{font-weight:600;color:var(--si-ink)}
.si .ls-thanks .btn{margin-top:6px}
@media (max-width:599.98px){
  .si .ls-dlg{width:100vw;max-width:100vw;margin:auto 0 0;border-radius:22px 22px 0 0;max-height:92vh;max-height:92dvh}
  .si .ls-in{padding:10px 20px calc(22px + env(safe-area-inset-bottom,0px))}
}
@media (prefers-reduced-motion:no-preference){
  .si .ls-dlg[open]{animation:si-rise .28s cubic-bezier(.2,.7,.2,1) both}
}

/* tablets: the form in the middle of the space under the band, at every tablet width (an iPad 13" upright had it at
   the top of a tall empty page); a phone keeps it at the top, under the keyboard's reach */
@media (min-width:600px){
  .signin{margin-block:auto}
}

/* ---------- wide screens: the form in the middle of the space under the header ---------- */
@media (min-width:900px){
  .si-main{padding:48px clamp(40px,5vw,72px)}
  .si .card h2{font-size:40px}
  /* two lines here: "Staff sign-in" over "with a PIN", never broken at the hyphen */
  .si #pinTitle{max-width:7.4em;text-wrap:wrap}
}

/* ---------- motion: a gentle arrival, the flight drawn once; none when a device asks for less ---------- */
@media (prefers-reduced-motion:no-preference){
  .si .card:not([hidden]){animation:si-rise .4s cubic-bezier(.2,.7,.2,1) both}
}
@media (prefers-reduced-motion:reduce){
  .si .btn{transition:none}
  .si #emailForm:has(#emailStatus:not(:empty):not(.err)) #sendBtn:disabled::before,
  .si #pinForm:has(#pinStatus:not(:empty):not(.err)) #pinBtn:disabled::before,
  .si #codeForm:has(#codeStatus:not(:empty):not(.err)) #verifyBtn:disabled::before,
  .si #codeForm:has(#codeStatus:not(:empty):not(.err):not(.ok)):has(#verifyBtn:enabled) #resendBtn:disabled::before{animation:none}
}
@keyframes si-rise{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* ---------- print: just the words ---------- */
@media print{
  .si-foot{color:#15161A}
}
