/* THE MY KIREB SIGN-IN POPUP (owner, 19 November 2026: "when not signed in, "my KIREB" button shows the generic
   sign in popup format"; "can you show me with the popup base looking liquid glass ?"; "approved liquid glass").
   REPRODUCED from the approved artifact, _reports/artifacts/signin-popup-approved-2026-11-19.html - its `.si`
   rules and its `[data-base="glass"]` block - in the site's own tokens: the glass is tokens.css's --lg- set, the
   one the header's My KIREB capsule reads too, so a change to the glass is made there once. Markup:
   templates/macros/signin_popup.html; behaviour: signinbox.js. Loaded by base.html only on a page that draws the
   popup. Google's and Apple's buttons are signin.css, loaded beside this while they are drawn.

   On a computer the popup is centred, 432px wide, its corners 18px; on a phone (560px and narrower) it is a sheet
   rising from the foot of the screen, full width, its top corners 22px - the artifact's two drawings. A SHORT
   SCREEN gets the sheet too (480px tall and less: a phone turned on its side), and on every screen the close mark
   stays in view while the popup's own content scrolls under it (it is held at the top, `position: sticky`). The page
   behind is dimmed by --lg-scrim and NOT blurred: the glass blurs what is behind it. The floating gear and
   WhatsApp (z-index 80) and the cookie note (85) stay under the scrim; the search overlay is 90. Every colour is
   a token. */
.si-scrim { position: fixed; inset: 0; z-index: 95; background: var(--lg-scrim); animation: si-fade .22s ease; }
.si { --si-pad-top: 38px; --si-pad-inline: 38px;
  position: fixed; z-index: 96; left: 50%; top: 50%; box-sizing: border-box; width: 432px; max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain;
  transform: translate(-50%, -50%); padding: var(--si-pad-top) var(--si-pad-inline) 30px;
  color: var(--text); font-family: var(--sans); font-weight: 300; font-size: 15px; line-height: 1.55; text-align: start;
  background: var(--lg-fill); border: 1px solid var(--lg-rim); border-radius: var(--lg-radius); box-shadow: var(--lg-lift);
  -webkit-backdrop-filter: var(--lg-blur); backdrop-filter: var(--lg-blur); animation: si-in .24s ease; }
.si:focus { outline: none; }
/* the sheen across the top, under everything the popup holds */
.si::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--lg-sheen); pointer-events: none; }
.si-head, .si-body { position: relative; }
@keyframes si-in { from { opacity: 0; transform: translate(-50%, calc(-50% + 10px)); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes si-sheet { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes si-fade { from { opacity: 0; } to { opacity: 1; } }
/* THE PAGE BEHIND HOLDS STILL while it is open, and does not move sideways: the lock hides the page's own
   scrollbar, and the room the bar took (measured by signinbox.js: --si-bar-r, or --si-bar-l where a browser draws
   it at the left; 0 where the system's bar takes no room, `data-bars="system"`) is kept in its place - on the page
   (which the sticky header is part of) and on what is fixed to the window's edge: the floating buttons, the cookie
   note, the older WhatsApp link and the settings' note. Nothing here styles a scrollbar (CLAUDE.md). */
html.si-open { overflow: hidden; padding-right: var(--si-bar-r, 0px); padding-left: var(--si-bar-l, 0px); }
html.si-open .floatstack, html.si-open body > .wafloat, html.si-open .cookiebar {
  margin-right: var(--si-bar-r, 0px); margin-left: var(--si-bar-l, 0px); }
html.si-open .geartoast { margin-left: calc((var(--si-bar-l, 0px) - var(--si-bar-r, 0px)) / 2); }
/* A PRESS WAITING for "who is signed in" (signinbox.js, at most WAIT_MS): the link says so, nothing new is drawn */
html.si-wait, html.si-wait a[data-signin], a[data-signin][aria-busy="true"] { cursor: progress; }

/* the close mark: a 44px target in the corner at the end of the line (the left, right to left), 8px from the edges,
   HELD AT THE TOP while the popup's content scrolls (`sticky` in the popup's own scroll; its margins put it in the
   corner and give back the room it would take in the flow, whatever the popup's padding; a sticky box is held
   inside the scroller's padding, so its `top` takes that padding back to stay 8px from the edge) */
.si-x { position: sticky; z-index: 2; top: calc(8px - var(--si-pad-top)); width: 44px; height: 44px; display: grid; place-items: center;
  padding: 0; margin-block: calc(8px - var(--si-pad-top)) calc(var(--si-pad-top) - 52px);
  margin-inline: auto calc(8px - var(--si-pad-inline));
  background: none; border: 0; color: var(--muted); cursor: pointer; }
.si-x svg { width: 20px; height: 20px; display: block; }
.si-x:hover, .si-x:focus-visible { color: var(--gold); }
.si-x:focus-visible { outline: 2px solid var(--gold); outline-offset: -4px; }

/* the emblem (the header's two files, one per skin: site.css .lmark-light / .lmark-dark), the title, its line */
.si-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.si-mark { height: 44px; width: auto; }
.si h2 { margin: 2px 0 0; font-family: var(--serif); font-weight: 400; font-size: 27px; line-height: 1.2; color: var(--text);
  text-wrap: balance; }
.si-lede { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; max-width: 32ch; }

/* the two steps */
.si-body { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; }
.si-body[hidden] { display: none; }
.si-sso { display: flex; flex-direction: column; gap: 12px; }
/* the site's `form` carries the enquiry panel's padding (site.css): none here */
.si-sso form { display: block; margin: 0; padding: 0; }
.si-or { display: flex; align-items: center; gap: 14px; margin: 6px 0 2px; color: var(--muted); font-size: 13px; }
.si-or::before, .si-or::after { content: ""; flex: 1; border-top: 1px solid var(--lg-sep); }
.si-form { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; }
.si label { font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.si .si-input { box-sizing: border-box; width: 100%; height: 46px; margin: 0; padding: 12px 15px; border-radius: 0;
  font-family: var(--sans); font-size: 15px; font-weight: 300; color: var(--text); background: var(--lg-input);
  border: 1px solid var(--line); transition: border-color .2s ease; }
.si .si-input::placeholder { color: var(--placeholder); }
.si .si-input:focus { outline: none; border-color: var(--gold); }
.si .si-input[aria-invalid="true"] { border-color: var(--gold); }
.si .si-code { font-size: 21px; letter-spacing: .32em; text-align: center; }
.si .btn { box-sizing: border-box; display: block; width: 100%; height: 46px; padding: 0 24px; border-radius: 0; }
.si .btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.si .btn:disabled { opacity: .6; cursor: wait; }
.si-small { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; text-align: center; }
/* AN ERROR IS TEXT THE VISITOR MUST READ: the site's darkest text colour, not the gold My KIREB's own page draws the
   same sentence in (account.css `.acct .acct-err`), which measures under 4.5:1 on the light glass
   (tests/test_the_signin_popup_holds_the_page_still_in_a_browser.py measures both skins) */
.si-err { margin: 0; color: var(--text); font-size: 13px; }
.si-sent { margin: 0; padding: 12px 14px; border: 1px solid var(--gold); font-size: 13.5px; line-height: 1.6; color: var(--text); }
.si-err[hidden], .si-sent[hidden] { display: none; }
.si-link { align-self: center; padding: 6px 0; margin: 0; background: none; border: 0; font: inherit; font-size: 13.5px;
  color: var(--gold); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.si-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Arabic letters join: no spacing pulls them apart (owner.css does the same for the body and the headings) */
:lang(ar) .si label, :lang(ar) .si .btn { letter-spacing: 0; }

/* A PHONE, OR A SHORT SCREEN: the sheet rises from the foot of the screen (the artifact's phone drawing) */
@media (max-width: 560px), (max-height: 480px) {
  .si { --si-pad-top: 30px; --si-pad-inline: 22px;
    left: 0; right: 0; top: auto; bottom: 0; width: auto; max-width: none; transform: none;
    max-height: 94vh; max-height: 94dvh;
    padding: var(--si-pad-top) var(--si-pad-inline) calc(26px + env(safe-area-inset-bottom, 0px));
    border-width: 1px 0 0; border-radius: var(--lg-sheet-radius) var(--lg-sheet-radius) 0 0; animation: si-sheet .28s ease; }
}
@media (prefers-reduced-motion: reduce) {
  .si, .si-scrim { animation: none; }
}
/* NO GLASS WHERE THERE CAN BE NONE: a browser that blurs nothing behind a box, or a visitor who asked for less
   transparency, gets the solid popup the artifact drew beside the glass (its "Solid" switch) - the site's menu
   ground - so the words never stand on the page itself. */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .si { background: var(--menu-bg); }
  .si .si-input { background: var(--input-bg); }
}
@media (prefers-reduced-transparency: reduce) {
  .si { background: var(--menu-bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .si::before { display: none; }
  .si .si-input { background: var(--input-bg); }
}
@media print {
  .si, .si-scrim { display: none; }
}
