/* ==========================================================================
   B34-06 (slice 59, YogendranJ 2026-11-09): the sign-in page on the redesign.
   Mock: https://claude.ai/artifact/YQ1GDmG3pRSgSxkdce7E9a
   Design System tokens only (ds-tokens.css), light and dark. On a desktop, what Social Connect does on the left and
   the form in a card on the right; on a phone one column, the form first. The island (islands/login.tsx) keeps its
   sul-signin__* classes; they are restyled here under body.sc-auth, so the legacy's rules for them do not apply.
   ========================================================================== */

body.sc-auth {
  margin: 0;
  background: var(--ds-bg);
  color: var(--ds-fg);
  font: var(--text-body);
}
.sc-auth .sul-appmain { padding: 0; }
.sc-auth .sul-shell { max-width: none; margin: 0; padding: 0; }

.sc-auth__page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---- The left half: what Social Connect does ---- */
.sc-auth__promo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--ds-space-40);
  padding: var(--ds-space-48) var(--ds-space-64);
  border-inline-end: thin solid var(--ds-brand-subtle-border);
  background: var(--ds-brand-subtle);
}
.sc-auth__brand { display: inline-flex; align-items: center; gap: var(--ds-space-8); color: var(--ds-fg); text-decoration: none; font: var(--text-h4); font-family: var(--font-display); }
.sc-auth__brand img { inline-size: var(--ds-space-32); block-size: var(--ds-space-32); }
.sc-auth__brand span { color: var(--ds-fg-secondary); font-weight: 500; }
.sc-auth__pitch { display: flex; flex-direction: column; gap: var(--ds-space-24); max-inline-size: calc(var(--ds-space-96) * 5); }
.sc-auth__headline { margin: 0; font: var(--text-h1); color: var(--ds-fg); }
.sc-auth__points { display: flex; flex-direction: column; gap: var(--ds-space-12); margin: 0; padding: 0; list-style: none; color: var(--ds-fg-secondary); font: var(--text-body-lg); }
.sc-auth__points li { display: flex; align-items: flex-start; gap: var(--ds-space-12); }
.sc-auth__points svg { flex: none; inline-size: var(--ds-space-24); block-size: var(--ds-space-24); color: var(--ds-success); }
.sc-auth__marks { display: flex; gap: var(--ds-space-8); margin: 0; padding: 0; list-style: none; }
.sc-auth__marks li {
  display: grid; place-items: center;
  inline-size: calc(var(--ds-space-40) + var(--ds-space-4)); block-size: calc(var(--ds-space-40) + var(--ds-space-4));
  border-radius: var(--ds-radius-lg); background: var(--ds-surface); box-shadow: var(--ds-shadow-sm);
}
.sc-auth__marks svg,
.sc-auth__marks img { inline-size: var(--ds-space-24); block-size: var(--ds-space-24); }
.sc-auth__legal { margin: 0; color: var(--ds-fg-secondary); font: var(--text-caption); }
.sc-auth__legal a { color: var(--ds-fg-brand); }

/* ---- The right half: the form ---- */
.sc-auth__promo { order: -1; }
.sc-auth__main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--ds-space-32) var(--ds-space-24); }
.sc-auth__col { display: flex; flex-direction: column; gap: var(--ds-space-16); inline-size: 100%; max-inline-size: calc(var(--ds-space-96) * 4 + var(--ds-space-40)); }
.sc-auth__col > .sc-auth__brand { align-self: center; margin-bottom: var(--ds-space-8); }
.sc-auth__promo .sc-auth__legal { margin-top: auto; }
.sc-auth__pitch { margin-top: auto; }
.sc-auth__marks { flex-wrap: wrap; }
.sc-auth__marks .sc-auth__more { inline-size: auto; padding-inline: var(--ds-space-12); color: var(--ds-fg-secondary); font: var(--text-label); font-weight: 600; }
/* One screen tall: no scroll when everything fits (the page has no header or footer of its own). */
.sc-auth .sul-appmain, .sc-auth main { margin: 0; min-height: 0; }

.sc-auth .sc-auth__card {
  max-width: none;
  margin: 0;
  padding: var(--ds-space-32);
  border: thin solid var(--ds-border);
  border-radius: var(--ds-radius-xl);
  background: var(--ds-surface);
  box-shadow: var(--ds-shadow-md);
}
.sc-auth .sul-signin__title { margin: 0 0 var(--ds-space-4); font: var(--text-h3); font-family: var(--font-display); font-weight: 700; color: var(--ds-fg); }
.sc-auth .sul-signin__lede { margin: 0 0 var(--ds-space-20); color: var(--ds-fg-secondary); font: var(--text-body); }

.sc-auth .sul-signin__seg {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ds-space-4);
  margin-bottom: var(--ds-space-20); padding: var(--ds-space-4);
  border: 0; border-radius: var(--ds-radius-full); background: var(--ds-surface-sunken);
}
.sc-auth .sul-signin__seg-option {
  min-height: var(--ds-space-40); border-radius: var(--ds-radius-full);
  color: var(--ds-fg-secondary); font: var(--text-label); font-weight: 600;
}
.sc-auth .sul-signin__seg-option[aria-selected="true"] { background: var(--ds-surface-raised); color: var(--ds-fg); box-shadow: var(--ds-shadow-sm); }
.sc-auth .sul-signin__seg-option:focus-visible { outline: var(--ds-space-2) solid var(--ds-focus-ring); outline-offset: var(--ds-space-2); }

.sc-auth .sul-signin__field { margin-bottom: var(--ds-space-20); }
.sc-auth .sul-signin__field .sul-field__label { display: block; margin-bottom: var(--ds-space-8); color: var(--ds-fg); font: var(--text-label); font-weight: 600; }
.sc-auth .sul-signin__help { margin: var(--ds-space-8) 0 0; color: var(--ds-fg-secondary); font: var(--text-caption); }

/* Country code and number: two controls side by side, each with its own border (the mock), one height. */
.sc-auth .sul-signin__phone { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--ds-space-8); min-height: 0; overflow: visible; border: 0; background: none; }
.sc-auth .sul-signin__phone:focus-within { outline: 0; }
.sc-auth .sul-signin__phone select,
.sc-auth .sul-signin__phone input,
.sc-auth .sul-signin__input {
  box-sizing: border-box;
  min-height: var(--ds-space-48);
  padding: 0 var(--ds-space-12);
  border: thin solid var(--ds-border-strong);
  border-radius: var(--ds-radius-md);
  background-color: var(--ds-surface);
  color: var(--ds-fg);
  font: var(--text-body);
}
/* The country code draws the app's chevron (B34-05's rule), 12 from the right with room for it. */
.sc-auth .sul-signin__phone select {
  appearance: none;
  padding-inline-end: calc(var(--ds-space-32) + var(--ds-space-4));
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ds-fg-secondary) 50%),
    linear-gradient(135deg, var(--ds-fg-secondary) 50%, transparent 50%);
  background-position:
    calc(100% - var(--ds-space-12) - var(--ds-space-8)) 50%,
    calc(100% - var(--ds-space-12) - var(--ds-space-2) - var(--ds-space-2)) 50%;
  background-size: var(--ds-space-4) var(--ds-space-4), var(--ds-space-4) var(--ds-space-4);
  background-repeat: no-repeat;
  cursor: pointer;
}
.sc-auth .sul-signin__phone select:focus-visible,
.sc-auth .sul-signin__phone input:focus-visible,
.sc-auth .sul-signin__input:focus-visible,
.sc-auth .sul-signin__captcha-answer:focus-visible {
  outline: var(--ds-space-2) solid var(--ds-focus-ring);
  outline-offset: var(--ds-space-2);
}

/* The picture check: picture | new picture + listen | the answer, one row. */
.sc-auth .sul-signin__captcha { gap: var(--ds-space-8); height: calc(var(--ds-space-48) + var(--ds-space-12)); }
.sc-auth .sul-signin__captcha-image { border: thin solid var(--ds-border); border-radius: var(--ds-radius-md); background: var(--ds-surface-sunken); }
.sc-auth .sul-signin__captcha-actions { gap: var(--ds-space-4); }
.sc-auth .sul-signin__icon-button {
  min-width: var(--ds-space-40); padding: 0 var(--ds-space-8);
  border: thin solid var(--ds-border); border-radius: var(--ds-radius-md);
  background: var(--ds-surface); color: var(--ds-fg-secondary);
}
.sc-auth .sul-signin__icon-button:hover { background: var(--ds-surface-sunken); color: var(--ds-fg); }
.sc-auth .sul-signin__icon-button:focus-visible { outline: var(--ds-space-2) solid var(--ds-focus-ring); outline-offset: var(--ds-space-2); }
.sc-auth .sul-signin__nth { margin: 0 var(--ds-space-2); padding: 0 var(--ds-space-4); border-radius: var(--ds-radius-md); background: var(--ds-fg); color: var(--ds-surface); font: var(--text-caption); font-weight: 600; }
.sc-auth .sul-signin__captcha-answer {
  width: calc(var(--ds-space-48) + var(--ds-space-16));
  border: var(--ds-space-2) solid var(--ds-action-primary);
  border-radius: var(--ds-radius-md);
  background: var(--ds-brand-subtle);
  color: var(--ds-fg);
  font: var(--text-h3);
  text-align: center;
  text-transform: uppercase;
}

.sc-auth .sul-field__error { margin: 0 0 var(--ds-space-12); color: var(--ds-danger); font: var(--text-body-sm); font-weight: 500; }

.sc-auth .sul-signin__submit {
  display: inline-flex; align-items: center; justify-content: center;
  inline-size: 100%; min-height: calc(var(--ds-space-48) + var(--ds-space-4));
  border: 0; border-radius: var(--ds-radius-md);
  background: var(--ds-action-primary); color: var(--ds-on-action-primary);
  font: var(--text-body); font-weight: 600; cursor: pointer;
}
.sc-auth .sul-signin__submit:hover:not(:disabled) { background: var(--ds-action-primary-hover); }
.sc-auth .sul-signin__submit:disabled { opacity: 0.55; cursor: not-allowed; }
.sc-auth .sul-signin__submit:focus-visible { outline: var(--ds-space-2) solid var(--ds-focus-ring); outline-offset: var(--ds-space-2); }

/* The code step. */
.sc-auth .sul-signin__sent { gap: var(--ds-space-8); margin-bottom: var(--ds-space-20); padding: var(--ds-space-12) var(--ds-space-16); border-radius: var(--ds-radius-md); background: var(--ds-surface-sunken); color: var(--ds-fg-secondary); font: var(--text-body-sm); }
.sc-auth .sul-signin__sent strong { color: var(--ds-fg); }
.sc-auth .sul-signin__link { color: var(--ds-fg-brand); font: var(--text-body-sm); font-weight: 600; }
.sc-auth .sul-signin__link:disabled { color: var(--ds-fg-secondary); }
.sc-auth .sul-signin__link:focus-visible { outline: var(--ds-space-2) solid var(--ds-focus-ring); outline-offset: var(--ds-space-2); }
.sc-auth .sul-otp-boxes { gap: var(--ds-space-12); }
.sc-auth .sul-otp-boxes__digit {
  height: calc(var(--ds-space-48) + var(--ds-space-16));
  border: thin solid var(--ds-border-strong); border-radius: var(--ds-radius-md);
  background: var(--ds-surface); color: var(--ds-fg); font: var(--text-h3); text-align: center;
}
.sc-auth .sul-otp-boxes__digit:focus-visible { border-color: var(--ds-action-primary); outline: var(--ds-space-2) solid var(--ds-focus-ring); outline-offset: var(--ds-space-2); }
.sc-auth .sul-signin__row { margin-top: var(--ds-space-16); color: var(--ds-fg-secondary); font: var(--text-body-sm); }
.sc-auth .sul-devnotice { margin-bottom: var(--ds-space-20); padding: var(--ds-space-8) var(--ds-space-12); border-radius: var(--ds-radius-md); background: var(--ds-warning-subtle); color: var(--ds-fg); font: var(--text-body-sm); }

/* Under the card. */
.sc-auth .sul-signin-terms { margin: 0; text-align: center; color: var(--ds-fg-secondary); font: var(--text-caption); }
.sc-auth .sul-signin-terms a { color: var(--ds-fg-brand); }

/* ---- Below a desktop: one column, the form first, the promise after it ---- */
@media (max-width: 1023.98px) {
  .sc-auth__page { grid-template-columns: minmax(0, 1fr); }
  .sc-auth__col > .sc-auth__brand { align-self: flex-start; }
  .sc-auth__pitch { margin-top: 0; }
  .sc-auth__main { order: 1; justify-content: flex-start; padding: var(--ds-space-20) var(--ds-space-16) var(--ds-space-32); }
  .sc-auth__promo { order: 2; gap: var(--ds-space-24); padding: var(--ds-space-32) var(--ds-space-16); border-inline-end: 0; border-top: thin solid var(--ds-brand-subtle-border); }
  .sc-auth__headline { font: var(--text-h3); font-family: var(--font-display); font-weight: 700; }
  .sc-auth__points { font: var(--text-body); }
}
@media (max-width: 479.98px) {
  .sc-auth .sc-auth__card { padding: var(--ds-space-20); }
  .sc-auth .sul-otp-boxes { gap: var(--ds-space-8); }
}

/* B34-06 (his look, 2026-11-09): Send code and Verify and continue show a spinner while they work, at full colour (a
   busy button is not a disabled one); Verify keeps it until the next page opens. */
.sc-auth .sul-signin__submit { gap: var(--ds-space-8); }
.sc-auth .sul-signin__submit[aria-busy="true"]:disabled { opacity: 1; cursor: progress; }
.sc-auth .sul-signin__spinner {
  inline-size: var(--ds-space-16);
  block-size: var(--ds-space-16);
  border: var(--ds-space-2) solid currentColor;
  border-inline-end-color: transparent;
  border-radius: var(--ds-radius-full);
  animation: sc-auth-spin calc(var(--ds-duration-slow) * 2) linear infinite;
}
@keyframes sc-auth-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .sc-auth .sul-signin__spinner { animation-duration: calc(var(--ds-duration-slow) * 6); }
}
