/* The sign-in page (CORRECTIONS #134). Its own file, and the only page in this app with one.
   Three reasons: it is the one page that is NOT the shell, so it loads neither ai.css nor
   ai.js; ai.css is 700-odd lines that nine signed-in pages need and this one never will; and
   a live fix to this page is cut from the deployed sha while another branch churns ai.css, so
   a separate file has no merge surface at all.

   Everything here is a token. The rules this replaced ran on `var(--color-bg, #f6f7fb)`,
   `var(--color-border, #e3e6ee)` and `var(--color-text-muted, #5b6170)` — three custom
   properties DEFINED NOWHERE, so the page sat on hard-coded fallbacks each a shade off the
   real thing (--page is #f6f7f9, --line #e6e9ee, --ink-3 #616b7c) and no token change could
   ever reach it. A `var(--undefined, #hex)` is a literal wearing a token's clothes. */

/* ai.css is not loaded, and this page hides two elements by setting `display` on them —
   without this line the banner and the error box would show on every ordinary sign-in. */
[hidden] { display: none !important; }

.lg-body { background: var(--page); }
.lg-wrap { min-height: 100vh; min-height: 100dvh; display: flex; padding: var(--s5); box-sizing: border-box; }
/* margin:auto, never align-items:center — a centred flex child that grows taller than the
   viewport is clipped at the TOP, where the sign-in button is. */
.lg-sheetbox { margin: auto; width: 100%; max-width: 880px; display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-modal); box-shadow: var(--sh-modal); overflow: hidden; }

/* ---- the brand panel ------------------------------------------------------------------
   Three local tokens so one rule set covers all three shells. Aurora and Graphite are right
   from the base rule; Porcelain's header is #ffffff, which beside a white card is not a panel
   at all, so it takes the gradient it already spends on avatars — and its FOREGROUND with it,
   or the slate --sh-fg would sit on purple. */
.lg-panel { --panel-bg: var(--sh-header-bg, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
  --panel-fg: var(--sh-fg, #fff);
  background: var(--panel-bg); color: var(--panel-fg);
  padding: var(--s6); display: flex; flex-direction: column; gap: var(--s4); min-width: 0;
  /* a flex column stretches its children across the cross axis by default, which pulls the
     mark out to the panel's full width and squashes it */
  align-items: flex-start; }
:root[data-shell-theme='porcelain'] .lg-panel {
  --panel-bg: var(--sh-avatar-bg); --panel-fg: var(--sh-avatar-fg); }

.lg-mark { height: 40px; width: auto; display: block; }
/* the only display-size text on the gradient: white on its light corner (#667eea) is ~3.7:1,
   which passes for large text and does NOT pass for a paragraph — the prose is in the card */
.lg-title { font-size: var(--t-title); line-height: var(--lh-tight); font-weight: var(--w-semi); margin: 0; color: var(--panel-fg); }

/* ---- the sheet ------------------------------------------------------------------------- */
.lg-sheet { display: block; width: 100%; height: auto; margin: var(--s2) 0; }
.lg-shadow { fill: currentColor; fill-opacity: .14; }
.lg-paper { fill: currentColor; fill-opacity: .08; stroke: currentColor; stroke-opacity: .45; stroke-width: 3; }
.lg-batch rect { fill: currentColor; }
.lg-batch--a rect { fill-opacity: .58; }
.lg-batch--b rect { fill-opacity: .40; }
.lg-batch--c rect { fill-opacity: .26; }
/* three batches landing one after another, not twenty slots ticking in like a progress bar */
.lg-batch { animation: lg-land .5s cubic-bezier(.2, .7, .3, 1) both; }
.lg-batch--b { animation-delay: .32s; }
.lg-batch--c { animation-delay: .64s; }
@keyframes lg-land { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
/* `none`, not a shorter duration: app.css's global reduced-motion rule shortens
   animation-duration but NOT animation-delay, so a shortened animation would still pop the
   three batches in at 0 / 320 / 640 ms. */
@media (prefers-reduced-motion: reduce) { .lg-batch { animation: none; } }

.lg-steps { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; margin: 0; padding: 0; }
.lg-steps li { display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 4px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .16);
  background: color-mix(in srgb, currentColor 16%, transparent);
  font-size: var(--t-micro); color: var(--panel-fg); }
.lg-n { display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: var(--r-pill); font-weight: var(--w-bold);
  background: rgba(255, 255, 255, .22);
  background: color-mix(in srgb, currentColor 22%, transparent); }

/* ---- the card -------------------------------------------------------------------------- */
.lg-card { padding: var(--s6); display: flex; flex-direction: column; justify-content: center;
  gap: var(--s3); min-width: 0; }
.lg-h { font-size: var(--t-sub); font-weight: var(--w-semi); margin: 0; color: var(--ink); }
.lg-sub { color: var(--ink-2); font-size: var(--t-cell); line-height: var(--lh-prose); margin: 0; }
.lg-note { background: var(--info-bg); border: 1px solid var(--info-line); color: var(--info-fg);
  border-radius: var(--r-md); padding: var(--s2) var(--s3); font-size: var(--t-meta); line-height: var(--lh-prose); margin: 0; }
.lg-err { background: var(--bad-bg); border: 1px solid var(--bad-line); color: var(--bad-fg);
  border-radius: var(--r-md); padding: var(--s2) var(--s3); font-size: var(--t-meta); line-height: var(--lh-prose); margin: 0; }
/* min-height beats .cd-btn's `height: var(--h-ctl)` (36px) and clears the 44px tap floor */
.lg-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s3);
  min-height: 48px; width: 100%; font-size: var(--t-body); margin-top: var(--s1); }
/* shell-themes.css gives :focus-visible an outline-color of --sh-focus, which under Aurora is
   60% white — invisible on this white card. The one control on the page keeps a real ring. */
.lg-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lg-foot { color: var(--ink-3); font-size: var(--t-micro); line-height: var(--lh-prose); margin: var(--s1) 0 0; }

/* ---- the phone ------------------------------------------------------------------------
   768 is this app's own "a phone" line (app.css swaps to the hamburger and the dock there),
   not a number invented for this page. The panel keeps its identity and drops the rest; the
   card is top-aligned so a short viewport keeps the button as high as it can. */
@media (max-width: 768px) {
  .lg-wrap { padding: var(--s3); }
  .lg-sheetbox { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto auto; }
  .lg-panel { padding: var(--s4) var(--s5); flex-direction: row; align-items: center; gap: var(--s3); }
  .lg-sheet, .lg-steps { display: none; }
  .lg-mark { height: 32px; }
  .lg-title { font-size: var(--t-sub); }
  .lg-card { padding: var(--s5); }
}
