/* ---------- Sign in, create account, forgot password and reset password (js/sign-in-page.js). Prefix si-. ----------
   A centred card. When the page itself is at least 760px wide (container query on .si-page, so the app sidebar is
   allowed for) the "What you get" list sits beside it; narrower, the list is left out so the form stays on the first
   screen. */

.si-page { container-type: inline-size; container-name: si; padding: 8px 0 24px; }
.si-layout { display: flex; justify-content: center; align-items: flex-start; gap: 48px; }
.si-main { flex: 0 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.si-perks { display: none; }

.si-head { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 8px 8px 0; }
.si-logo { width: 34px; height: 49px; }
.si-logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .si-logo-light { display: none; } :root:not([data-theme="light"]) .si-logo-dark { display: block; } }
:root[data-theme="dark"] .si-logo-light { display: none; }
:root[data-theme="dark"] .si-logo-dark { display: block; }
.si-title { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.25; letter-spacing: -0.02em; }
.si-title:focus { outline: none; }
.si-sub { margin: 0; max-width: 340px; font-size: 15px; line-height: 1.5; color: var(--text-muted); }
.si-sub strong { color: var(--text); overflow-wrap: anywhere; }

.si-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 16px; }

.si-switch { display: flex; padding: 4px; background: var(--surface-2); border-radius: var(--radius-lg); }
.si-switch button {
  flex: 1; min-height: 44px; border: 0; border-radius: 9px; background: transparent; color: var(--text-muted);
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.si-switch button.si-on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.si-switch button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }

.si-form { display: flex; flex-direction: column; gap: 14px; }
.si-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.si-label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.si-field input {
  width: 100%; height: 48px; box-sizing: border-box; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); color: var(--text); font: inherit; font-size: 16px; font-weight: 400;
}
.si-field input:focus { outline: 0; border-color: var(--focus-ring); box-shadow: 0 0 0 2px var(--focus-ring); }

/* Password with its show/hide button inside the field on the right (44px tap area). */
.si-pw { position: relative; }
.si-pw input { padding-right: 52px; }
.si-reveal {
  position: absolute; right: 2px; top: 2px; width: 44px; height: 44px; border: 0; border-radius: 10px;
  background: transparent; color: var(--text-muted); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.si-reveal:hover { color: var(--text); }
.si-reveal:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
/* Hide the browser's own reveal button (Edge) so there is only one eye. */
.si-pw input::-ms-reveal, .si-pw input::-ms-clear { display: none; }

.si-hint { font-size: 13px; font-weight: 400; line-height: 1.45; color: var(--text-muted); }
/* 18+ confirmation (sign-up only). The whole row is the label, so the tap target is 44 px tall and full width. */
.si-age { position: relative; min-height: 44px; }
.si-age input { position: absolute; left: 0; top: 50%; width: 22px; height: 22px; margin: -11px 0 0; accent-color: var(--brand); cursor: pointer; }
.si-age input:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.si-age label { display: flex; align-items: center; min-height: 44px; padding-left: 34px; font-size: 15px; font-weight: 400; color: var(--text); cursor: pointer; }
.si-age input[aria-invalid="true"] { outline: 2px solid var(--danger-text); outline-offset: 2px; }
.si-age-error { margin: -6px 0 0; font-size: 14px; line-height: 1.45; color: var(--danger-text); }
.si-consent { margin: 0; font-size: 13px; line-height: 1.45; color: var(--text-muted); }

.si-link {
  border: 0; background: transparent; padding: 0; color: var(--brand-text); font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; position: relative;
}
.si-link:hover { text-decoration: underline; }
.si-link::after { content: ""; position: absolute; inset: -12px -6px; } /* 44px tap area */
.si-back { align-self: center; min-height: 44px; font-size: 15px; }
.si-back::after { content: none; }

.si-message { display: block; padding: 12px 14px; border-radius: var(--radius-lg); font-size: 14px; font-weight: 400; line-height: 1.45; }
.si-message[hidden] { display: none; }
.si-message.si-error { background: var(--danger-bg); color: var(--danger-text); }
.si-message.si-warning { background: var(--warning-bg); color: var(--warning-text); }
.si-message.si-success { background: var(--success-bg); color: var(--success-text); }
.si-message.si-info { background: var(--surface-2); color: var(--text); }
.si-message .si-link { color: inherit; text-decoration: underline; font-size: inherit; }
.si-resend { display: flex; margin-top: 10px; min-height: 44px; }

.si-captcha:empty { display: none; }
.si-submit { width: 100%; min-height: 48px; font-size: 16px; }

.si-done { align-items: center; text-align: center; padding: 28px 20px 16px; margin-top: 24px; }
.si-done-icon { width: 64px; height: 64px; border-radius: 999px; background: var(--brand-tint); color: var(--brand-text); display: flex; align-items: center; justify-content: center; }
.si-done .si-hint { margin: 0; font-size: 14px; }
.si-done .si-message { align-self: stretch; text-align: left; }

/* "What you get" beside the card on a wide page. */
.si-perks h2 { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
.si-perks ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; }
.si-perk { display: flex; gap: 14px; align-items: flex-start; }
.si-perk > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.si-perk strong { font-size: 16px; }
.si-perk strong + span { font-size: 14px; line-height: 1.45; color: var(--text-muted); }
.si-perk-icon { flex: none; width: 40px; height: 40px; border-radius: 999px; background: var(--brand-tint); color: var(--brand-text); display: flex; align-items: center; justify-content: center; }

@container si (min-width: 760px) {
  .si-page { padding-top: 32px; }
  .si-layout:not(.si-single) .si-perks { display: flex; flex-direction: column; gap: 20px; flex: 0 1 360px; padding-top: 96px; }
  .si-card { padding: 24px; }
}
