/* Optional Highlands student sign-in. Public Know Your Path content is never gated. */
#authGate[hidden],
#authAccountPill[hidden],
[data-auth-open][hidden] { display: none !important; }

body.auth-modal-open { overflow: hidden; }

#authGate {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 22px;
  overflow: auto;
  background: rgba(5, 24, 44, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #15314e;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Arial, sans-serif;
}

.auth-stage {
  position: relative;
  width: min(940px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  max-height: min(760px, calc(100dvh - 44px));
  display: grid;
  grid-template-columns: minmax(320px, 410px) minmax(0, 1fr);
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 34px 100px rgba(0, 17, 38, .38);
}

.auth-close-button {
  position: absolute;
  z-index: 5;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 50%;
  background: rgba(9, 36, 69, .72);
  color: #fff;
  font: inherit;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.auth-close-button:hover { background: rgba(9, 36, 69, .92); }
.auth-close-button:focus-visible { outline: 3px solid rgba(244,181,23,.55); outline-offset: 3px; }

.auth-panel { min-width: 0; }
.auth-panel-left {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #ffffff, #f5f8fb);
  border-right: 1px solid rgba(17, 58, 99, .08);
}
.auth-left-inner { width: 100%; padding: 48px 38px 34px; }
.auth-logo { display: block; width: min(245px, 78%); height: auto; margin: 0 0 27px; }
.auth-title { margin: 0; color: #112d55; font-size: clamp(2rem, 3vw, 3rem); font-weight: 900; line-height: 1; letter-spacing: -.05em; }
.auth-subtitle { margin: 17px 0 0; color: #5b6d80; font-size: 1rem; line-height: 1.55; }
.auth-accent { width: 46px; height: 4px; margin-top: 20px; border-radius: 999px; background: linear-gradient(90deg,#f4b517,#f7cc54); }
.auth-google-button {
  width: 100%; min-height: 58px; margin-top: 28px; display: flex; align-items: center; justify-content: center; gap: 13px;
  border: 1px solid #d8e0e8; border-radius: 15px; background: #fff; color: #173754; font: inherit; font-size: 1rem; font-weight: 850;
  cursor: pointer; box-shadow: 0 9px 22px rgba(16,58,99,.08); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.auth-google-button:hover:not(:disabled) { transform: translateY(-1px); border-color: #b8c9d9; box-shadow: 0 13px 28px rgba(16,58,99,.13); }
.auth-google-button:focus-visible { outline: 3px solid rgba(15,135,211,.2); outline-offset: 3px; }
.auth-google-button:disabled { opacity: .72; cursor: not-allowed; transform: none; box-shadow: none; }
.auth-google-button svg { width: 21px; height: 21px; flex: 0 0 21px; }
.auth-domain-note { margin-top: 18px; display: flex; align-items: center; gap: 8px; color: #47647e; font-size: .86rem; font-weight: 750; }
.auth-domain-note svg { width: 18px; height: 18px; color: #0f87d3; flex: 0 0 18px; }
.auth-status { min-height: 1.25em; margin: 13px 0 0; color: #65788b; font-size: .79rem; line-height: 1.45; }
.auth-status[data-tone="error"] { color: #a13333; }
.auth-security-note { margin: 14px 0 0; color: #8190a0; font-size: .72rem; line-height: 1.45; }
.auth-legal-links { margin-top: 20px; display: flex; gap: 9px; flex-wrap: wrap; color: #91a0ae; font-size: .78rem; }
.auth-legal-link { color: #55718a; text-decoration: none; font-weight: 750; }
.auth-legal-link:hover { color: #0d73b9; }

.auth-panel-right {
  position: relative;
  min-height: 590px;
  display: grid;
  place-items: center;
  padding: 42px;
  overflow: hidden;
  background: linear-gradient(145deg,#092849,#123f6d 56%,#0a2a50);
}
.auth-right-bg { position: absolute; inset: 0; background: radial-gradient(circle at 50% 0%,rgba(101,166,255,.35),transparent 28%),linear-gradient(125deg,transparent 0 18%,rgba(61,132,231,.16) 18% 31%,transparent 31% 100%); }
.auth-hero-card { position: relative; z-index: 1; text-align: center; color: #fff; }
.auth-hero-shine { position: absolute; inset: -90px; pointer-events: none; background: radial-gradient(circle,rgba(255,255,255,.07),transparent 52%); }
.auth-hero-logo { position: relative; width: min(145px, 34%); height: auto; filter: drop-shadow(0 10px 24px rgba(0,0,0,.25)); }
.auth-hero-kicker { position: relative; margin-top: 18px; color: #f4b517; font-size: .8rem; font-weight: 900; letter-spacing: .2em; text-transform: uppercase; }
.auth-hero-title { position: relative; margin-top: 15px; font-size: clamp(2.7rem, 5vw, 4.7rem); font-weight: 900; line-height: .98; letter-spacing: -.055em; }
.auth-hero-copy { position: relative; max-width: 30rem; margin: 18px auto 0; color: rgba(240,247,255,.9); font-size: 1.08rem; line-height: 1.5; }
.auth-hero-accent { position: relative; width: 62px; height: 5px; margin: 24px auto 0; border-radius: 999px; background: #f4b517; }
.auth-hero-footer { position: relative; margin: 22px 0 0; color: rgba(221,234,249,.74); font-size: .88rem; }

.student-signin-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #123f6d;
  border-radius: 11px;
  background: #123f6d;
  color: #fff;
  font: inherit;
  font-size: .82rem;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease;
}
.student-signin-button:hover { transform: translateY(-1px); background: #0d73b9; border-color: #0d73b9; }
.student-signin-button:focus-visible { outline: 3px solid rgba(15,135,211,.18); outline-offset: 2px; }

#authAccountPill {
  position: fixed; z-index: 2147482000; left: 16px; bottom: 16px; display: flex; align-items: center; gap: 9px;
  max-width: min(340px, calc(100vw - 32px)); padding: 8px 9px 8px 8px; border: 1px solid rgba(16,58,99,.14); border-radius: 999px;
  background: rgba(255,255,255,.95); box-shadow: 0 10px 30px rgba(16,58,99,.15); color: #173754; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
}
.auth-account-avatar { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 50%; background: #123f6d; color: #fff; font-size: .68rem; font-weight: 900; }
.auth-account-copy { min-width: 0; text-align: left; line-height: 1.12; }
.auth-account-copy strong,.auth-account-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-account-copy strong { max-width: 175px; font-size: .72rem; }
.auth-account-copy small { margin-top: 3px; color: #708396; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.auth-signout { min-height: 32px; padding: 0 10px; border: 0; border-left: 1px solid #dde6ee; background: transparent; color: #536d84; font: inherit; font-size: .68rem; font-weight: 800; cursor: pointer; }
.auth-signout:hover { color: #0d73b9; }

.public-student-signin {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 28px 30px;
  border: 1px solid rgba(16,58,99,.12);
  border-radius: 22px;
  background: linear-gradient(135deg,#ffffff,#f1f7fc);
  box-shadow: 0 14px 38px rgba(16,58,99,.08);
}
.public-student-signin-copy { display: flex; align-items: center; gap: 16px; min-width: 0; }
.public-student-signin-icon { width: 52px; height: 52px; flex: 0 0 52px; display: grid; place-items: center; border-radius: 16px; background: #123f6d; color: #fff; font-weight: 900; font-size: 1.15rem; }
.public-student-signin .kicker { display: block; margin-bottom: 5px; }
.public-student-signin h2 { margin: 0; color: #123f6d; font-size: clamp(1.35rem,2vw,1.8rem); }
.public-student-signin p { margin: 7px 0 0; color: #5b7084; line-height: 1.5; }
body.auth-authenticated .public-student-signin { display: none; }
body:not(.auth-authenticated) #studentDashboardPreview .student-welcome-bar,
body:not(.auth-authenticated) #studentDashboardPreview .home-credits-snapshot,
body:not(.auth-authenticated) #studentDashboardPreview .dashboard-preview-grid { display: none !important; }

body.dark .student-signin-button { background: #f4b517; border-color: #f4b517; color: #102f50; }
body.dark .public-student-signin { border-color: rgba(255,255,255,.1); background: linear-gradient(135deg,#102e4b,#153a5d); box-shadow: none; }
body.dark .public-student-signin h2 { color: #fff; }
body.dark .public-student-signin p { color: #c6d4e2; }

@media (max-width: 920px) {
  .auth-stage { width: min(560px,100%); display: block; }
  .auth-panel-right { display: none; }
  .auth-panel-left { border-right: 0; }
  .auth-close-button { background: #123f6d; }
  .public-student-signin { grid-template-columns: 1fr; }
  .public-student-signin .button { width: 100%; }
}

@media (max-width: 680px) {
  #authGate { padding: 10px; place-items: end center; }
  .auth-stage { max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); border-radius: 24px 24px 18px 18px; }
  .auth-left-inner { padding: 42px 22px 24px; }
  .auth-logo { width: min(215px,70%); margin-bottom: 23px; }
  .auth-title { font-size: 2.15rem; }
  .auth-subtitle { font-size: .95rem; }
  .auth-google-button { min-height: 56px; margin-top: 25px; }
  .student-signin-button { min-height: 38px; padding: 0 10px; font-size: .75rem; }
  .public-student-signin { padding: 23px 20px; gap: 18px; }
  .public-student-signin-copy { align-items: flex-start; }
  .public-student-signin-icon { width: 44px; height: 44px; flex-basis: 44px; border-radius: 13px; }
  #authAccountPill { left: 10px; right: 10px; bottom: 10px; max-width: none; }
}

@media (max-width: 440px) {
  .student-signin-button .student-signin-long { display: none; }
  .student-signin-button::after { content: 'Sign In'; }
}

.mobile-student-signin {
  color: #0d73b9;
  font-weight: 900;
}
body.dark .mobile-student-signin { color: #f4c43c; }
@media (max-width: 680px) {
  .site-header .header-actions > .student-signin-button { display: none !important; }
}
