/* The sign-in page (/signin, spec 5.1): its layout. The bar the wordmark sits in (the wordmark itself is base.css's);
   the form column on the ground, no panel, as the homepage hero; and where the phone model fits (980 × 700 and up: the
   test phoneFits() makes), the phone beside the form, the two on one centre line in the middle of the window. Below
   that: the form alone, under the wordmark. The phone's slot takes its size from the one rule in frame.css (R150),
   which this page loads for that rule alone. Load after frame.css (which loads after controls.css). Class names carry
   si- so nothing meets the Telegram replica's (.msg, .meta, .ph, …). */

:root { --si-nav: 68px; }

/* ---------------------------------------------------------------- the bar the wordmark sits in */
.si-top-in { display: flex; align-items: center; height: var(--si-nav); }

/* ---------------------------------------------------------------- the form column */
.si { padding-top: clamp(20px, 4vh, 40px); padding-bottom: 64px; }
.si-col { width: 100%; max-width: 440px; }
.si-sub { margin-top: 14px; }
/* regions that take focus for the screen reader (the notice on load, a heading after a swap) are not controls: no ring */
.si [tabindex="-1"]:focus { outline: none; }

.si-notice { margin-top: 28px; }
.si-notice:empty { display: none; }

/* the two provider buttons fill the column; a hint or a label belongs to its own button (8 px), the next button keeps
   its distance (20 px) */
.si-providers { display: grid; gap: 20px; margin-top: 32px; }
.si-opt { display: grid; gap: 8px; }
.si-opt > a { width: 100%; }
.si-last { font-weight: 600; color: var(--body); }
/* helper and legal lines share the heading's left edge, and never end on one stranded word */
.si-col .help, .si-col .legal { text-wrap: pretty; }
.si-trust { margin-top: 24px; }
.si-legal { margin-top: 6px; }

/* below a line: the code link and the help line */
.si-more { display: grid; justify-items: start; gap: 4px; margin-top: 28px; padding-top: 16px; border-top: 1.5px solid var(--line); }

/* ---------------------------------------------------------------- invite-only (R37), and on the list */
/* the longest heading on the page: h1.title's weight and tracking, one step smaller, so it keeps to three lines in the
   440 px column (four at the house 52 px; 48 px still keeps three with room); the floor is the house h1.title's 34 px, so
   on the phone it is the house size (Minor 5, R46). Outside the desktop query on purpose: the cap holds at 1280 × 650 too */
.si-invite h1.title { font-size: clamp(34px, 4.4vw, 48px); }
.si-invite-form { display: grid; margin-top: 32px; }
.si-invite-acts { display: grid; gap: 12px; margin-top: 20px; }
.si-invite-acts > button { width: 100%; }
.si-invite-msg:not(:empty) { margin-top: 16px; }
.si-invite > .link { margin-top: 12px; }
.si-invite { padding-bottom: 18px; }
.si-listed { padding-bottom: 22px; }
.si-listed .sub { margin-top: 14px; }
.si-email { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- the phone beside the form, where it fits (its slot's
   size: one rule in frame.css, R150) */

@media (min-width: 980px) and (min-height: 700px) {
  :root { --si-nav: clamp(60px, 9vh, 84px); }
  /* the wordmark sits over the main area's top padding, so the main area is exactly the window */
  .si-top { position: absolute; left: 0; right: 0; top: 0; z-index: 1; }
  .si {
    display: grid; grid-template-columns: 440px minmax(0, 1fr); column-gap: clamp(48px, 6vw, 112px); align-items: center;
    min-height: 100vh; min-height: 100svh; padding-top: var(--si-nav); padding-bottom: var(--si-nav);
  }
  .si-sub { margin-top: 16px; }
  .si-providers { margin-top: 36px; }
}
