/* xtraLesson Learn UX/UI R1 — all selectors are constrained to Learn UI. */

/* L-UX-001: the canonical forms, required consents and Turnstile stay intact. */
body.xl-learner-surface .xl-r1-auth-shell {
  width: min(620px, calc(100% - 20px));
  margin: 22px auto 52px;
  padding: clamp(16px, 3vw, 28px);
  box-sizing: border-box;
  display: grid;
  gap: 14px;
  border: 1px solid #dce7f2;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 15px 50px rgba(9, 42, 88, .08);
}
body.xl-learner-surface .xl-r1-auth-shell > .xl-auth-brand {
  display: flex;
  justify-content: center;
  margin: 0 auto 4px;
}
body.xl-learner-surface .xl-r1-auth-shell > .xl-auth-brand img {
  width: min(180px, 65%);
  max-height: 58px;
  object-fit: contain;
}
body.xl-learner-surface .xl-r1-auth-modes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  padding: 4px;
  border: 1px solid #cbdcee;
  border-radius: 15px;
  background: #eef4fb;
}
body.xl-learner-surface .xl-r1-mode {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  padding: 8px 12px;
  border-radius: 11px;
  color: #194b7a;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
}
body.xl-learner-surface .xl-r1-mode.is-current {
  color: #fff;
  background: #0d59b4;
  box-shadow: 0 3px 9px rgba(13, 89, 180, .2);
}
body.xl-learner-surface .xl-r1-mode:focus-visible,
body.xl-learner-surface .xl-r1-recovery summary:focus-visible,
body.xl-learner-surface .xl-r1-profile-details summary:focus-visible {
  outline: 3px solid #ffb742;
  outline-offset: 3px;
}
body.xl-learner-surface .xl-r1-google-entry {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}
body.xl-learner-surface .xl-r1-google-entry .xl-button {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  justify-content: center;
  text-align: center;
  min-height: 52px;
  padding: 13px 18px;
  border: 2px solid #1e65bc;
  border-radius: 13px;
  color: #0d4f9e;
  background: #f5faff;
  font-weight: 850;
  font-size: 1rem;
}
body.xl-learner-surface .xl-r1-email-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #63758a;
  font-size: .82rem;
  text-align: center;
}
body.xl-learner-surface .xl-r1-email-divider::before,
body.xl-learner-surface .xl-r1-email-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #dbe4ef;
}
body.xl-learner-surface .xl-r1-auth-shell > .xl-registration-form,
body.xl-learner-surface .xl-r1-auth-shell > .xl-login-card {
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
}
body.xl-learner-surface .xl-r1-auth-shell .xl-login-card {
  border: 0;
  box-shadow: none;
  padding: 0;
}
body.xl-learner-surface .xl-r1-auth-shell .xl-login-card .xl-auth-links span,
body.xl-learner-surface .xl-r1-auth-shell .xl-registration-form > .xl-auth-links {
  display: none;
}
body.xl-learner-surface .xl-r1-auth-shell .xl-auth-heading { margin-top: 0; }
body.xl-learner-surface .xl-r1-auth-shell .xl-auth-heading h1 {
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  line-height: 1.2;
}
body.xl-learner-surface .xl-r1-auth-shell .xl-form {
  margin-top: 0;
  gap: .8rem;
}
body.xl-learner-surface .xl-r1-profile-details,
body.xl-learner-surface .xl-r1-recovery {
  border: 1px solid #d9e5f3;
  border-radius: 12px;
  background: #f8fbff;
  padding: 10px 13px;
}
body.xl-learner-surface .xl-r1-profile-details summary,
body.xl-learner-surface .xl-r1-recovery summary {
  cursor: pointer;
  color: #194b7a;
  font-size: .87rem;
  font-weight: 800;
  line-height: 1.4;
}
body.xl-learner-surface .xl-r1-profile-details[open] .xl-grid,
body.xl-learner-surface .xl-r1-recovery[open] .xl-email-resend-form {
  margin-top: 12px;
}
body.xl-learner-surface .xl-r1-auth-shell .xl-check {
  grid-template-columns: auto minmax(0, 1fr) !important;
}
body.xl-learner-surface .xl-r1-auth-shell .xl-el-registration-challenge {
  min-width: 0;
  max-width: 100%;
}

/* L-UX-003: legacy blocked cards normalize without modifying Core access. */
body.xl-learner-surface .xl-course-grid-rich {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
}
body.xl-learner-surface .xl-course-card-rich .xl-course-card-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px 10px;
  min-width: 0;
}
body.xl-learner-surface .xl-course-card-rich .xl-course-card-topline .xl-course-code {
  flex: 0 0 auto;
  min-width: max-content;
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
  white-space: nowrap;
}
body.xl-learner-surface .xl-course-card-rich .xl-course-card-topline .xl-course-code bdi {
  white-space: nowrap;
}
body.xl-learner-surface .xl-course-card-rich .xl-course-card-topline .xl-course-card-status {
  flex: 0 1 auto;
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: break-word;
  text-align: center;
  line-height: 1.3;
}
body.xl-learner-surface .xl-course-card-rich .xl-course-card-body {
  min-width: 0;
}
body.xl-learner-surface .xl-course-card-rich .xl-course-card-action {
  width: 100%;
  margin-top: auto;
}
body.xl-learner-surface .xl-course-card-rich .xl-course-card-action .xl-button {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
}

/* L-UX-004: Web C5 navigation, official APK and honest store status. */
body.xl-learner-surface .xl-learner-footer:not(.xl-r1-footer) {
  display: none !important;
}
body.xl-learner-surface .xl-r1-footer {
  color: #f2f8ff;
  background: #092c59;
  padding: 46px max(18px, calc((100vw - 1200px) / 2)) 20px;
}
body.xl-learner-surface .xl-r1-footer .xl-learner-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  width: 100%;
  padding: 0;
  margin: 0;
}
body.xl-learner-surface .xl-r1-footer .xl-learner-footer-column h2,
body.xl-learner-surface .xl-r1-footer h2 {
  color: #c5e3ff;
  font-size: .9rem;
  font-weight: 850;
  margin: 0 0 12px;
}
body.xl-learner-surface .xl-r1-footer .xl-learner-footer-column ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
body.xl-learner-surface .xl-r1-footer .xl-learner-footer-column li {
  margin: 0 0 10px;
}
body.xl-learner-surface .xl-r1-footer a {
  color: #f2f8ff;
  text-decoration: none;
}
body.xl-learner-surface .xl-r1-footer a:hover {
  text-decoration: underline;
}
body.xl-learner-surface .xl-r1-footer a:focus-visible {
  outline: 3px solid #ffb742;
  outline-offset: 3px;
}
body.xl-learner-surface .xl-r1-footer-extras {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 26px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.22);
}
body.xl-learner-surface .xl-r1-social-links,
body.xl-learner-surface .xl-r1-app-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
body.xl-learner-surface .xl-r1-social-links a {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body.xl-learner-surface .xl-r1-social-links svg {
  width: 19px;
  height: 19px;
}
body.xl-learner-surface .xl-r1-footer-apps p {
  margin: 0 0 10px;
  color: #c6dcf2;
  font-size: .85rem;
}
body.xl-learner-surface .xl-r1-app-links > a,
body.xl-learner-surface .xl-r1-store-pending {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 39px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 9px;
  font-size: .78rem;
  font-weight: 750;
}
body.xl-learner-surface .xl-r1-app-links > .xl-r1-android {
  color: #072f64;
  background: #c5e3ff;
  border-color: #c5e3ff;
}
body.xl-learner-surface .xl-r1-store-pending {
  color: #c6d6e6;
  background: rgba(255,255,255,.08);
  cursor: default;
}
body.xl-learner-surface .xl-r1-store-pending small {
  color: #fff;
  font-size: .7rem;
}
body.xl-learner-surface .xl-r1-footer-bottom {
  margin-top: 28px;
  padding-top: 17px;
  border-top: 1px solid rgba(255,255,255,.2);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: #c6dcf2;
  font-size: .78rem;
}
@media (max-width: 800px) {
  body.xl-learner-surface .xl-r1-footer .xl-learner-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  body.xl-learner-surface .xl-r1-auth-shell {
    width: 100%;
    margin-top: 10px;
    padding: 15px 13px;
    border-radius: 16px;
  }
  body.xl-learner-surface .xl-r1-footer {
    padding: 34px 20px 19px;
  }
  body.xl-learner-surface .xl-r1-footer .xl-learner-footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  body.xl-learner-surface .xl-r1-app-links {
    align-items: stretch;
  }
  body.xl-learner-surface .xl-r1-app-links > a,
  body.xl-learner-surface .xl-r1-store-pending {
    width: 100%;
    justify-content: center;
  }
}
