/* ══════════════════════════════════════════════════════════════════════════
   RESEARCH EGYPT ACADEMY — the sign-in family's body
   (resources/views/auth/** — login, password request / reset, the 2FA
   challenge, activation + dead link — and certificate/verify, which adds
   pages/verify.css on top).

   These pages opt into the home page's design system with
   <html class="rea-body">: the five home stylesheets (layer `rea`, imported
   by site/partials/_shell-head) style the body, and this file — unlayered,
   so it wins — adds only what the home page has no component for: the
   two-column frame, the platform's form kit (x-field's .lms-field, the
   reveal toggle, the strength meter, the 2FA boxes) dressed as the home
   page's #apply form, the notes and the toasts.

   Look: paper ground, a big confident heading whose last word is orange,
   one white rounded card on a hairline, capsule buttons with the arrow
   circle (.btn--blue). Light by default; html[data-theme="dark"] is the
   home page's navy step — every colour below is a home token, so the dark
   theme follows without a second palette.

   Motion (the home page's language, CSS only): the kicker slides in, the
   title rises out of its line mask, the card and the ways rise softly.
   Keyed on html.ra-motion (set in auth/_head only when the visitor has NOT
   asked for reduced motion), and switched off again under the media query
   for safety.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── tokens this page adds (the home ones live in rea/css) ── */
.rauth {
  --ra-r-card: var(--r-lg, 34px);
  --ra-ok-soft: var(--ok-soft, #DFF3EA);
  --ra-warn-soft: var(--flag-soft, #FFE9D4);
  --ra-sky: var(--sky, #E2ECFA);
  --ra-err-soft: color-mix(in srgb, var(--c-error) 9%, var(--c-card));
}

/* the platform's icon helper prints bare <svg class="ico">; the rea reset
   makes every svg display:block / max-width:100%, so give them a size */
.rauth .ico { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }

/* ═════════════════════════════════════════════════════════════ the frame
   Desktop: the heading and the ways down the start column, the card in the
   end column. Phone: heading → card → ways, so the form is never below a
   list of links. */
.rauth__main {
  padding-block: clamp(32px, 7vh, 88px) clamp(72px, 11vh, 136px);
  display: flex; align-items: center;
}
.rauth__grid {
  display: grid; width: 100%;
  grid-template-columns: minmax(0, 1fr) minmax(0, clamp(460px, 38vw, 760px));
  grid-template-areas: "head card" "ways card";
  grid-template-rows: auto 1fr;
  column-gap: clamp(36px, 6vw, 120px); row-gap: 30px;
  align-items: start;
}
.rauth__head { grid-area: head; padding-top: clamp(8px, 2vw, 28px); }
.rauth__ways { grid-area: ways; }
.rauth__stack { grid-area: card; display: grid; gap: 18px; min-width: 0; }

.rauth__head .kicker { margin-bottom: clamp(14px, 1.6vw, 24px); }
.rauth__title.sec-title { font-size: clamp(40px, 5.2vw, 96px); }
.rauth__sub.sec-sub { margin-top: clamp(16px, 1.6vw, 24px); max-width: 560px; font-size: clamp(16px, 1.15vw, 19px); overflow-wrap: anywhere; }

/* ═════════════════════════════════════════════════════════════ the card */
.rauth__card {
  position: relative; min-width: 0;
  padding: clamp(24px, 3vw, 44px);
  border-radius: var(--ra-r-card);
  background: var(--c-card); border: 1px solid var(--c-line-2);
  box-shadow: 0 40px 100px -50px var(--c-shadow);
  display: grid; gap: 20px;
}
.rauth__card > h2, .rauth__h2 { font-family: var(--f-display); font-weight: 700; font-size: 20px; line-height: 1.35; color: var(--c-text); }
.rauth__card > p.rauth__lead { color: var(--c-muted); font-size: 15.5px; }
.rauth__form { display: grid; gap: 18px; min-width: 0; }
.rauth__fineprint { font-size: 13px; color: var(--c-muted); text-align: center; }

/* ═════════════════════════════════════════════════════════════ the ways
   The «back to the site / verify a certificate / sign in» links, as the
   home page's step rows: white pills on a hairline with the arrow circle. */
.rauth__ways { display: grid; gap: 10px; align-content: start; max-width: 560px; }
.rauth__way {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  min-height: 56px; padding: 10px 12px 10px 20px; padding-inline: 20px 12px;
  border-radius: 16px; background: var(--c-card); border: 1px solid var(--c-line);
  font-size: 15.5px; font-weight: 600; color: var(--c-text);
  transition: border-color .3s, transform .35s var(--ease), box-shadow .3s;
}
.rauth__way svg {
  width: 32px; height: 32px; padding: 8px; border-radius: 50%; flex: none;
  background: var(--c-hi-a); color: var(--c-hi-text);
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: background .3s, color .3s, transform .35s var(--ease);
}
.rauth__way:hover, .rauth__way:focus-visible { border-color: color-mix(in srgb, var(--c-hi) 40%, transparent); box-shadow: 0 16px 34px -26px var(--c-shadow); }
.rauth__way:hover svg, .rauth__way:focus-visible svg { background: var(--btn); color: #fff; transform: translateX(3px); }
[dir="rtl"] .rauth__way svg { transform: scaleX(-1); }
[dir="rtl"] .rauth__way:hover svg, [dir="rtl"] .rauth__way:focus-visible svg { transform: scaleX(-1) translateX(3px); }

/* ═════════════════════════════════════════════════════════════ fields
   x-field (App\View\Components\Field) prints
     .lms-field > label.lms-field__label + <input> [+ extras] + .lms-field__hint + .lms-field__error
   and lms-forms.js toggles .is-invalid on the wrapper. Dressed as the home
   page's .field. Label and input sit in rows 1 and 2 explicitly so the
   reveal button can share the input's cell; everything else flows below. */
.rauth .lms-field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-content: start; min-width: 0; }
.rauth .lms-field > .lms-field__label { grid-row: 1; grid-column: 1; }
.rauth .lms-field > input { grid-row: 2; grid-column: 1; }
.rauth .lms-field__label, .rauth .rauth__label {
  font-family: var(--f-label); font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--c-muted);
}
html[lang="ar"] .rauth .lms-field__label, html[lang="ar"] .rauth .rauth__label { font-size: 13.5px; text-transform: none; }
.rauth .lms-field__req { color: var(--orange-ink, #A34E00); }

.rauth .lms-field > input, .rauth .rauth__input {
  width: 100%; min-height: 54px; padding: 13px 16px;
  border-radius: var(--r-sm); border: 1px solid var(--c-line-2);
  background: var(--c-field); color: var(--c-text);
  font: inherit; font-size: 16px; line-height: 1.4;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.rauth .lms-field > input::placeholder, .rauth .rauth__input::placeholder { color: var(--c-muted); opacity: .85; }
.rauth .lms-field > input:hover, .rauth .rauth__input:hover { border-color: color-mix(in srgb, var(--c-text) 28%, transparent); }
.rauth .lms-field > input:focus, .rauth .rauth__input:focus {
  outline: none; border-color: var(--c-hi);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-hi) 14%, transparent);
}
/* an LTR value (e-mail, code, password) on an Arabic page starts at the
   page's start edge, like the home page's phone / e-mail fields */
[dir="rtl"] .rauth input[dir="ltr"] { text-align: right; }
.rauth .lms-field > input[readonly] { background: var(--c-bg-2); color: var(--c-text-2); cursor: default; }
.rauth .lms-field > input[readonly]:hover { border-color: var(--c-line-2); }

.rauth .lms-field__hint { font-size: 13px; color: var(--c-muted); line-height: 1.55; }
.rauth .lms-field__error { font-size: 13.5px; color: var(--c-error); line-height: 1.5; }
.rauth .lms-field__error:empty { display: none; }
.rauth .lms-field.is-invalid > input,
.rauth .lms-field.is-invalid > input:hover { border-color: var(--c-error); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-error) 12%, transparent); }
.rauth .lms-field.is-invalid > .lms-field__label { color: var(--c-error); }

/* the password reveal (auth/_password-input) shares the input's cell */
.rauth .lms-field:has(> .ra-reveal) > input { padding-inline-end: 56px; }
.ra-reveal {
  grid-row: 2; grid-column: 1; justify-self: end; align-self: center; margin-inline-end: 7px;
  width: 42px; height: 42px; border-radius: 50%; display: none; place-items: center;
  color: var(--c-muted); transition: background .25s, color .25s;
}
.ra-js .ra-reveal { display: grid; }
.ra-reveal:hover, .ra-reveal:focus-visible { background: var(--c-hi-a); color: var(--c-hi-text); }
.ra-reveal svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ra-reveal__lid { display: none; }
.ra-reveal__slash { stroke-dasharray: 23; stroke-dashoffset: 23; transition: stroke-dashoffset .35s var(--ease); }
.ra-reveal[aria-pressed="true"] .ra-reveal__slash { stroke-dashoffset: 0; }
.ra-reveal[aria-pressed="true"] { color: var(--c-hi-text); }
.ra-reveal.is-blink svg { animation: raBlink .32s var(--ease); }
@keyframes raBlink { 50% { transform: scaleY(.15); } }

/* caps lock: a small orange line under the field, only while it is on */
.ra-caps { font-size: 13px; font-weight: 600; color: var(--orange-ink, #A34E00); }
.ra-caps:empty { display: none; }

/* the new-password meter (auth/_strength) */
.ra-meter { display: grid; gap: 10px; margin-top: -4px; }
.ra-meter__top { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--c-muted); }
.ra-meter__val { font-weight: 700; color: var(--c-text-2); }
.ra-meter__bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ra-meter__bar i { height: 6px; border-radius: 99px; background: var(--c-line); transition: background .35s; }
.ra-meter[data-score="1"] .ra-meter__bar i:nth-child(-n+1) { background: var(--c-error); }
.ra-meter[data-score="2"] .ra-meter__bar i:nth-child(-n+2) { background: var(--orange); }
.ra-meter[data-score="3"] .ra-meter__bar i:nth-child(-n+3) { background: var(--c-hi); }
.ra-meter[data-score="4"] .ra-meter__bar i { background: var(--c-ok); }
.ra-rules { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.ra-rules li {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 9px; border-radius: 99px;
  font-size: 12.5px; color: var(--c-muted); background: var(--c-bg); border: 1px solid var(--c-line);
  transition: color .3s, background .3s, border-color .3s;
}
.ra-rules svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ra-rules svg path { opacity: 0; }
.ra-rules svg circle { fill: currentColor; stroke: none; }
.ra-rules li.is-ok { color: var(--c-ok); background: var(--ra-ok-soft); border-color: color-mix(in srgb, var(--c-ok) 30%, transparent); }
.ra-rules li.is-ok svg path { opacity: 1; }
.ra-rules li.is-ok svg circle { opacity: 0; }

/* the confirmation's match line */
.ra-match { font-size: 13px; font-weight: 600; }
.ra-match:empty { display: none; }
.ra-match.is-ok { color: var(--c-ok); }
.ra-match.is-bad { color: var(--c-error); }

/* remember me + forgot password */
.ra-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; }
.ra-row > .lms-field__error { flex-basis: 100%; }
.ra-check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; color: var(--c-text-2); }
.ra-check input {
  appearance: none; -webkit-appearance: none; flex: none; margin: 0;
  width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--c-line-2); background: var(--c-field);
  cursor: pointer; transition: background-color .2s, border-color .2s;
}
.ra-check input:checked {
  background: var(--btn) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.2l3 3 6-6.4' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
  border-color: transparent;
}
.ra-check input:focus-visible { outline: 2px solid var(--c-hi); outline-offset: 3px; }
.ra-link {
  font-size: 15px; font-weight: 600; color: var(--c-hi-text);
  border-bottom: 1px solid color-mix(in srgb, var(--orange) 70%, transparent); padding-bottom: 1px;
  transition: border-color .25s;
}
.ra-link:hover, .ra-link:focus-visible { border-bottom-color: var(--orange); }

/* ═════════════════════════════════════════════════════════════ submit
   The home page's capsule (.btn.btn--blue.btn--lg): navy pill, white arrow
   circle. While lms-forms.js holds it busy (aria-busy, after a POST really
   left) the arrow circle turns into a small spinning ring — the home
   form's «sending» state, and nothing jumps. */
/* a long label («Save my new password and sign in») wraps instead of being
   clipped by the pill's overflow on a phone */
.rauth__submit { margin-top: 4px; height: auto; min-height: var(--h); padding-block: 10px; white-space: normal; text-align: center; line-height: 1.35; }
.rauth__submit .rauth__spin { display: none; }
.rauth__submit[aria-busy="true"], .rauth__submit.is-loading { pointer-events: none; opacity: .8; }
.rauth__submit[aria-busy="true"] > svg:not(.rauth__spin), .rauth__submit.is-loading > svg:not(.rauth__spin) { display: none; }
.rauth__submit[aria-busy="true"] .rauth__spin, .rauth__submit.is-loading .rauth__spin { display: block; }
.btn--blue .rauth__spin { padding: 5px; }
.rauth__spin circle { fill: none; stroke: var(--navy); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 40 100; transform-origin: 50% 50%; animation: raSpin .9s linear infinite; }
@keyframes raSpin { to { transform: rotate(360deg); } }
.rauth .btn.btn--ghost { color: var(--c-text); }
.rauth .btn.btn--ghost:hover { color: #fff; }

/* ═════════════════════════════════════════════════════════════ notes */
.rauth .note {
  padding: 14px 16px; border-radius: var(--r-sm); border: 1px solid var(--c-line);
  font-size: 15px; line-height: 1.65; color: var(--c-text); background: var(--c-bg);
  overflow-wrap: anywhere;
}
.rauth .note--err { border-color: color-mix(in srgb, var(--c-error) 45%, transparent); background: var(--ra-err-soft); }
.rauth .note--ok { border-color: color-mix(in srgb, var(--c-ok) 35%, transparent); background: var(--ra-ok-soft); }
.rauth .note--info { border-color: color-mix(in srgb, var(--c-hi) 30%, transparent); background: var(--ra-sky); }
.rauth .note b { font-weight: 700; }
/* «you have no password yet — send me a link»: a sentence + a small pill */
.ra-note--act { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.ra-note__txt { flex: 1 1 220px; }
.ra-btn-ghost {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border-radius: 999px;
  background: var(--c-card); border: 1px solid var(--c-line-2); font-size: 14px; font-weight: 700; color: var(--c-text);
  transition: background .25s, color .25s, border-color .25s;
}
.ra-btn-ghost:hover, .ra-btn-ghost:focus-visible { background: var(--btn); border-color: transparent; color: #fff; }

/* a finished state (sent, reset done, link used / expired) */
.acct-result {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start;
  padding: 20px; border-radius: 20px; border: 1px solid var(--c-line);
  background: var(--ra-ok-soft);
}
.acct-result--warn { background: var(--ra-warn-soft); }
.acct-result__icon {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--c-card); color: var(--c-ok); border: 1px solid var(--c-line);
}
.acct-result--warn .acct-result__icon { color: var(--orange-ink, #A34E00); }
.acct-result__icon .ico { width: 22px; height: 22px; }
.acct-result h2 { font-family: var(--f-display); font-weight: 700; font-size: 18px; line-height: 1.4; margin-bottom: 4px; }
.acct-result p { color: var(--c-text-2); font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }

/* activation: who the link is for, and when it expires */
.act-facts { display: grid; gap: 0; border-radius: 16px; border: 1px solid var(--c-line); background: var(--c-bg); overflow: hidden; }
.act-facts__row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; padding: 12px 16px; }
.act-facts__row + .act-facts__row { border-top: 1px solid var(--c-line); }
.act-facts dt { font-size: 13.5px; color: var(--c-muted); }
.act-facts dd { font-weight: 600; color: var(--c-text); overflow-wrap: anywhere; }
.act-expiry { font-size: 13px; color: var(--c-muted); text-align: center; }

/* ═════════════════════════════════════════════════════════════ 2FA
   lms-auth.js owns the boxes (.otp / [data-otp] / #otp-code); pages/auth.js
   adds the ring that slides between them (.ra-otp__ring), the digit pop and
   the completion wave. Digits always read left-to-right. */
.ra-otp-form { display: grid; gap: 14px; }
.otp { position: relative; display: flex; justify-content: center; gap: clamp(6px, 1.4vw, 10px); direction: ltr; }
.otp input {
  width: clamp(40px, 11vw, 54px); height: clamp(52px, 13vw, 62px); padding: 0;
  border-radius: var(--r-sm); border: 1px solid var(--c-line-2); background: var(--c-field); color: var(--c-text);
  text-align: center; font: 700 24px/1 var(--f-display); font-variant-numeric: tabular-nums;
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.otp input:focus { outline: none; border-color: var(--c-hi); }
.otp input.is-filled { border-color: color-mix(in srgb, var(--c-hi) 45%, transparent); background: var(--c-hi-a); }
.otp.is-complete input { border-color: color-mix(in srgb, var(--c-ok) 55%, transparent); }
.otp.otp--error input { border-color: var(--c-error); background: var(--ra-err-soft); }
.ra-otp__ring {
  position: absolute; left: 0; top: 0; pointer-events: none; border-radius: var(--r-sm);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-hi) 18%, transparent);
  opacity: 0; transition: transform .35s var(--ease), opacity .2s;
}
.ra-otp__ring.is-on { opacity: 1; }
.otp input.is-pop { animation: raPop .3s var(--ease); }
.otp input.is-wave { animation: raWave .5s var(--ease); }
@keyframes raPop { 40% { transform: scale(1.08); } }
@keyframes raWave { 40% { transform: translateY(-5px); } }
.otp-error { color: var(--c-error); font-size: 13.5px; text-align: center; }
.ra-otp__status { font-size: 13px; color: var(--c-muted); text-align: center; min-height: 1.5em; }
.ra-otp__status.is-ready { color: var(--c-ok); font-weight: 600; }
.otp-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; font-size: 13.5px; color: var(--c-muted); text-align: center; }
.otp-links form { display: contents; }
.otp-links button { font-weight: 700; color: var(--c-hi-text); border-bottom: 1px solid color-mix(in srgb, var(--orange) 70%, transparent); }
.lgn__recovery { border-top: 1px solid var(--c-line); padding-top: 16px; }
.lgn__recovery > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-weight: 700; font-size: 15px; color: var(--c-text);
}
.lgn__recovery > summary::-webkit-details-marker { display: none; }
.lgn__recovery > summary::after {
  content: ''; width: 9px; height: 9px; flex: none; margin-inline-end: 6px;
  border-inline-end: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform .3s var(--ease);
}
.lgn__recovery[open] > summary::after { transform: rotate(-135deg); }
.lgn__recovery > form { margin-top: 16px; }
@media (max-width: 360px) { .otp input { width: 38px; height: 50px; font-size: 20px; } }

/* ═════════════════════════════════════════════════════════════ toasts
   lms-toast.js (flash bridge: components/toasts) — the home page's card. */
.lms-toasts {
  position: fixed; inset-block-end: 20px; inset-inline-end: 20px; z-index: 120;
  display: grid; gap: 10px; width: min(380px, calc(100vw - 32px));
}
.lms-toast {
  position: relative; overflow: hidden; display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 14px 16px 18px; padding-inline: 18px 14px; border-radius: 16px;
  background: var(--c-card); border: 1px solid var(--c-line-2); color: var(--c-text);
  box-shadow: 0 24px 60px -28px var(--c-shadow); font-size: 15px; line-height: 1.55;
  animation: raRiseIn .5s var(--ease) both;
}
.lms-toast::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--c-hi); }
.lms-toast--ok::before { background: var(--c-ok); }
.lms-toast--warn::before { background: var(--orange); }
.lms-toast--danger::before { background: var(--c-error); }
.lms-toast__msg { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.lms-toast__close { width: 28px; height: 28px; border-radius: 50%; flex: none; font-size: 18px; line-height: 1; color: var(--c-muted); }
.lms-toast__close:hover, .lms-toast__close:focus-visible { background: var(--c-hi-a); color: var(--c-text); }
.lms-toast--out { animation: raFadeOut .22s ease-in forwards; }
@keyframes raFadeOut { to { opacity: 0; transform: translateY(8px); } }

/* ═════════════════════════════════════════════════════════════ motion */
@keyframes raRiseIn { from { opacity: 0; transform: translateY(34px); } to { opacity: 1; transform: none; } }
@keyframes raLineIn { from { transform: translateY(115%) rotate(var(--ra-tilt, 2.5deg)); } to { transform: none; } }
@keyframes raKickIn { from { opacity: 0; transform: translateX(var(--ra-kx, -16px)); } to { opacity: 1; transform: none; } }
@keyframes raNudge { 0% { transform: translateX(var(--ra-nx, -10px)); } 35% { transform: translateX(calc(var(--ra-nx, -10px) * -.5)); } 65% { transform: translateX(calc(var(--ra-nx, -10px) * .25)); } 100% { transform: none; } }
[dir="rtl"] .rauth { --ra-tilt: -2.5deg; --ra-kx: 16px; --ra-nx: 10px; }

.ra-motion .rauth__head .kicker { animation: raKickIn .8s cubic-bezier(.22, 1, .36, 1) .05s both; }
.ra-motion .rauth__title .ln > span { transform-origin: 0 100%; animation: raLineIn 1.15s cubic-bezier(.16, 1, .3, 1) .12s both; }
[dir="rtl"].ra-motion .rauth__title .ln > span { transform-origin: 100% 100%; }
.ra-motion .rauth__sub { animation: raRiseIn 1s cubic-bezier(.16, 1, .3, 1) .3s both; }
.ra-motion .rauth__stack > * { animation: raRiseIn 1s cubic-bezier(.16, 1, .3, 1) both; animation-delay: .22s; }
.ra-motion .rauth__stack > * + * { animation-delay: .36s; }
.ra-motion .rauth__way { animation: raRiseIn .9s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(.42s + var(--i, 0) * .1s); }
.ra-nudge { animation: raNudge .6s cubic-bezier(.16, 1, .3, 1); }
/* lms-auth.js marks a refused 2FA code with .otp--shake for one animation */
.ra-motion .otp.otp--shake { animation: raNudge .6s cubic-bezier(.16, 1, .3, 1) .9s; }

/* ═════════════════════════════════════════════════════════════ narrow */
@media (max-width: 960px) {
  .rauth__main { align-items: flex-start; padding-top: clamp(20px, 4vh, 40px); }
  .rauth__grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "card" "ways"; grid-template-rows: none; row-gap: 26px; }
  .rauth__stack { max-width: 640px; }
  .rauth__head { padding-top: 0; }
  .rauth__ways { max-width: 640px; }
}
@media (max-width: 560px) {
  .rauth__title.sec-title { font-size: clamp(36px, 10.5vw, 48px); }
  .rauth__card { border-radius: 24px; padding: 22px 18px; gap: 18px; }
  .acct-result { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 16px; }
  .rauth__way { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .rauth *, .lms-toast { animation: none !important; transition: none !important; }
}
/* step 21 (F-mobile): 44px tap targets on phones — here because the layered fix/mobile.css loses to this unlayered file */
@media (max-width: 900px) { .ra-reveal { width: 44px; height: 44px; } .ra-link { display: inline-flex; align-items: center; min-height: 44px; } }
/* step 21: «remember me» on phones — the real checkbox becomes an invisible 44x44 target over the box,
   and the label's span draws the visible 22px box (same pattern as .field--check in fix/mobile.css) */
@media (max-width: 900px) {
  .ra-check { position: relative; min-height: 44px; padding-inline-start: 34px; gap: 0; }
  .ra-check input { position: absolute; inset-block-start: 0; inset-inline-start: -11px; width: 44px; height: 44px; margin: 0; opacity: 0; }
  .ra-check span::before { content: ""; position: absolute; inset-block-start: 11px; inset-inline-start: 0; width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--c-line-2); background: var(--c-field); transition: background-color .2s, border-color .2s; }
  .ra-check input:checked + span::before { background: var(--btn) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.2l3 3 6-6.4' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat; border-color: transparent; }
  .ra-check input:focus-visible + span::before { outline: 2px solid var(--c-hi); outline-offset: 3px; }
}
@media (prefers-reduced-motion: reduce) { .ra-check span::before { transition: none; } }
