:root { --roots-entry-styles-ready: 1; }
* { box-sizing: border-box; }
body { margin: 0; font-family: "Heebo", Arial, sans-serif; -webkit-font-smoothing: antialiased; color: #172342; background: #f3f5f8; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
.hidden, [hidden] { display: none !important; }
:focus-visible { outline: 3px solid #3454cc; outline-offset: 3px; }
#platform-load-error { position: fixed; inset: 0; z-index: 300; display: grid; place-content: center; justify-items: center; gap: 8px; background: #f3f5f8; }
#platform-load-error p { margin: 0; }
.button { border: 0; padding: 10px 18px; border-radius: 6px; font-weight: bold; }
.button-primary { color: #fff; background: #3d5cc8; }
.auth-gate { min-height: 100dvh; display: grid; align-items: safe center; justify-items: center; padding: 24px; }
.auth-panel {
  width: min(480px, 100%);
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(47, 65, 114, .12);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(30, 43, 82, .12);
}

.course-entry-brand {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 32px;
  border-bottom: 1px solid #e7ebf2;
  color: #64748b;
  font-size: 13px;
}
.course-entry-brand a { color: #233258; font-size: 21px; text-decoration: none; }
.auth-form {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 34px 38px 36px;
  overflow: visible;
  border-right: 0;
  background: #fff;
}

.auth-tabs {
  display: flex;
  justify-content: center;
  padding: 0;
  margin: 13px 0 0;
  border: 0;
  background: transparent;
}

.auth-tabs button {
  min-height: 30px;
  padding: 3px 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #465fb8;
  font-size: 10px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.auth-tabs button.active {
  display: none;
}

.auth-inline-link,
.auth-back-link {
  width: max-content;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: #465fb8;
  font: 600 10px/1.5 "Rubik", "Heebo", sans-serif;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

#forgot-password-link {
  align-self: flex-start;
  margin: -1px 0 2px;
}

.auth-back-link {
  margin-bottom: 19px;
  color: #667188;
  text-decoration: none;
}

.auth-status {
  padding: 10px 12px;
  margin: 8px 0 12px !important;
  border: 1px solid #cfe3d8;
  border-radius: 6px;
  background: #f3faf6;
  color: #35664a !important;
  font-size: 11px !important;
  font-weight: 600;
  line-height: 1.65 !important;
}

.auth-reset-actions {
  display: flex;
  justify-content: center;
  min-height: 28px;
  margin-top: 12px;
}

.auth-mobile-brand {
  display: none;
}

.auth-form-intro .overline {
  color: #3d5dc9;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.auth-form h1 {
  margin: 5px 0 7px;
  color: #1d2947;
  font: 650 25px/1.35 "Rubik", "Heebo", sans-serif;
  letter-spacing: 0;
}

.auth-form-intro > p,
.auth-form > p:not(.auth-error):not(.auth-reassurance) {
  margin: 0;
  color: #626c83;
  font-size: 11px;
  line-height: 1.65;
}

.auth-fields {
  display: grid;
  gap: 12px;
  padding: 18px 0 5px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  margin: 0;
  color: #3f4a64;
  font-size: 11px;
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #cfd6e8;
  border-radius: 6px;
  outline: 0;
  background: #fff;
  color: #1e2944;
  direction: rtl;
  font-size: 13px;
  text-align: right;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.auth-form input[type="email"],
.auth-form input[type="password"] {
  direction: ltr;
  text-align: left;
}

.auth-form input::placeholder { color: #929aae; opacity: 1; }
.auth-form input:focus { border-color: #4d6ee7; box-shadow: 0 0 0 4px rgba(77, 110, 231, .14); }
.auth-form .auth-error { min-height: 20px; margin: 5px 0 7px; color: #a93232; font-size: 12px; font-weight: 600; }

.auth-submit {
  width: 100%;
  min-height: 48px;
  border-radius: 6px;
  font-size: 12px;
  box-shadow: 0 7px 16px rgba(61, 92, 200, .16);
}

.auth-submit.button-primary { background: #3d5cc8; }
.auth-submit.button-primary:hover { background: #304eaf; }

.google-signin { display: grid; gap: 10px; justify-items: stretch; margin-block: 16px; }
.google-signin-button { display: flex; justify-content: center; min-height: 40px; }
.google-signin-status:empty { display: none; }
.google-signin-status { margin: 0; font-size: 14px; }
.google-signin-divider { text-align: center; font-size: 13px; margin: 4px 0; opacity: .75; }
.google-link-fields { display: grid; gap: 12px; }
.google-link-fields label { display: grid; gap: 8px; }
.google-signin[aria-busy="true"] .google-signin-button { pointer-events: none; opacity: .6; }
.google-link-active > .auth-fields,
.google-link-active > .auth-submit,
.google-link-active > .auth-inline-link,
.google-link-active > .auth-tabs,
.google-link-active > label,
.google-link-active .google-signin-button,
.google-link-active .google-signin-divider { display: none; }
#course-catalog { width: min(100% - 32px, 780px); margin: 40px auto; background: white; border: 1px solid #dfe3ed; border-radius: 8px; }
#course-catalog header { flex-wrap: wrap; }
#course-catalog header strong { color: #233258; font-size: 21px; }
#course-catalog header span { margin-inline-end: auto; }
#course-catalog header button { background: white; color: #304eaf; border: 1px solid #cfd6e8; border-radius: 6px; padding: 8px 12px; }
.catalog-content { padding: 12px 32px 32px; }
.catalog-content h1 { font-size: 26px; }
.catalog-content h2 { font-size: 19px; margin-top: 30px; }
.catalog-content ul { padding: 0; list-style: none; }
.catalog-content li + li { margin-top: 8px; }
.catalog-content a { display: grid; gap: 6px; padding: 14px 18px; border: 1px solid #dfe3ed; border-radius: 6px; color: #263e80; text-decoration: none; }
.catalog-content a:hover { background: #f3f6ff; border-color: #9aabdc; }
.catalog-content a span { color: #505c72; }
#catalog-status:empty { display: none; }
@media (max-width: 520px) {
  .auth-gate { padding: 10px; }
  .auth-form, .catalog-content { padding: 24px 20px; }
  .course-entry-brand { padding: 18px 20px; }
  #course-catalog { margin: 12px auto; }
}
#join-form { gap: 10px; }
#join-form input[type="checkbox"] { width: 18px; height: 18px; }
#join-form .existing-toggle { display: flex; align-items: center; }
#join-back { align-self: start; border: none; background: none; color: #304eaf; }
#join-class-summary { padding: 14px; border-radius: 6px; background: #f3f5fa; }
#join-class-summary h2 { margin: 0; font-size: 18px; }
#join-class-summary p { margin: 4px 0; }
/* Keep the provider-rendered sign-in control centered above password entry. */
.google-signin {
  margin-block: 18px 0;
  padding-block: 16px 0;
  border-top: 1px solid #dce3ef;
  text-align: center;
  justify-items: center;
}
.google-signin .google-signin-title {
  margin: 0;
  font: 700 20px/1.4 Arial, sans-serif;
  color: #1d2947;
}
.google-availability { margin: 0; color: #4a5871; font-size: 14px; }
.google-availability:empty { display: none; }
.google-signin-button { max-width: 100%; }
.google-signin .google-link-fields { width: 100%; text-align: start; }
.google-signin .google-signin-divider { margin: 5px 0 0; font-size: 13px; color: #56657c; }
.google-signin [data-google-retry], .google-signin [data-google-reload] { font-size: 13px; }
.google-signin { grid-template-columns: minmax(0, 1fr); }
.google-control-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
  min-height: 76px;
}
.google-link-active .google-control-slot { display: none; }
#login-form:has([data-auth-mode="login"].active) > .auth-form-intro {
  display: none;
}
#login-form:has([data-auth-mode="login"].active) > .auth-form-intro + .google-signin {
  margin-block-start: 0;
  padding-block-start: 0;
  border-top: 0;
}
