/* Community 5.9.2 — production guest cascade, header and CTA repair
 *
 * This layer is intentionally printed after wp_head() and after 5.9.1.
 * It owns the public/guest interaction controls that were still being repainted
 * by the historical member-only link boundary in student-commons-5.css/5.7.1.
 */

html body.nsc5-document.nsc592-guest-document .nsc590-guest-app{
  --nsc592-ink:#10231b;
  --nsc592-body:#263a32;
  --nsc592-muted:#405249;
  --nsc592-link:#005a36;
  --nsc592-link-hover:#00442a;
  --nsc592-primary:#005a36;
  --nsc592-primary-hover:#00442a;
  --nsc592-footer:#063f2c;
  --nsc592-footer-link:#f0fff7;
  --nsc592-footer-copy:#d9ebe1;
}

/* Desktop header: prevent navigation/search/auth collision at 1280–1440px. */
html body.nsc5-document.nsc592-guest-document .nsc590-guest-header-inner{
  width:min(1360px,calc(100% - 32px))!important;
  grid-template-columns:minmax(205px,230px) minmax(0,1fr) minmax(215px,250px) auto!important;
  gap:14px!important;
}
html body.nsc5-document.nsc592-guest-document .nsc590-guest-header-inner>*{min-width:0}
html body.nsc5-document.nsc592-guest-document .nsc590-guest-primary{
  min-width:0!important;
  justify-content:center!important;
  gap:clamp(11px,1.15vw,20px)!important;
  overflow:visible!important;
}
html body.nsc5-document.nsc592-guest-document .nsc590-guest-primary a{
  flex:0 0 auto;
  font-size:clamp(.78rem,.77vw,.88rem)!important;
}
html body.nsc5-document.nsc592-guest-document .nsc590-guest-search{
  width:100%!important;
  max-width:250px!important;
  justify-self:end!important;
  overflow:hidden!important;
}
html body.nsc5-document.nsc592-guest-document .nsc590-guest-search input{
  min-width:0!important;
  text-overflow:ellipsis!important;
}
html body.nsc5-document.nsc592-guest-document .nsc590-guest-auth{gap:10px!important}
html body.nsc5-document.nsc592-guest-document .nsc590-sign-in{white-space:nowrap!important}

/* Primary guest actions: direct text nodes, visited state and nested content all stay white. */
html body.nsc5-document.nsc592-guest-document .nsc590-guest-app a.nsc590-join,
html body.nsc5-document.nsc592-guest-document .nsc590-guest-app a.nsc590-join:visited,
html body.nsc5-document.nsc592-guest-document .nsc590-guest-app .nsc590-mobile-menu a.is-join,
html body.nsc5-document.nsc592-guest-document .nsc590-guest-app .nsc590-guest-mobile-nav a.is-join{
  min-width:0;
  background:var(--nsc592-primary)!important;
  border-color:var(--nsc592-primary)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  opacity:1!important;
  text-shadow:none!important;
  white-space:nowrap!important;
}
html body.nsc5-document.nsc592-guest-document .nsc590-guest-header .nsc590-join{
  min-width:150px!important;
  padding-inline:18px!important;
}
html body.nsc5-document.nsc592-guest-document .nsc590-guest-app a.nsc590-join :where(span,strong,b,small,svg),
html body.nsc5-document.nsc592-guest-document .nsc590-guest-app .nsc590-mobile-menu a.is-join :where(span,strong,b,small,svg),
html body.nsc5-document.nsc592-guest-document .nsc590-guest-app .nsc590-guest-mobile-nav a.is-join :where(span,strong,b,small,svg){
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
html body.nsc5-document.nsc592-guest-document .nsc590-guest-app a.nsc590-join:hover,
html body.nsc5-document.nsc592-guest-document .nsc590-guest-app a.nsc590-join:focus-visible{
  background:var(--nsc592-primary-hover)!important;
  border-color:var(--nsc592-primary-hover)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

/* Secondary actions stay explicit too; historical link rules must not repaint them. */
html body.nsc5-document.nsc592-guest-document .nsc590-guest-app a.nsc590-secondary,
html body.nsc5-document.nsc592-guest-document .nsc590-guest-app a.nsc590-secondary:visited{
  background:#fff!important;
  border-color:#8fa69a!important;
  color:#123b2b!important;
  -webkit-text-fill-color:#123b2b!important;
  opacity:1!important;
}
html body.nsc5-document.nsc592-guest-document .nsc590-guest-app a.nsc590-secondary:hover,
html body.nsc5-document.nsc592-guest-document .nsc590-guest-app a.nsc590-secondary:focus-visible{
  background:#e5f2eb!important;
  border-color:#005a36!important;
  color:#063f2c!important;
  -webkit-text-fill-color:#063f2c!important;
}

/* Participation/registration gates seen on public discussions and Study Circles. */
html body.nsc5-document.nsc592-guest-document .nsc590-participation-gate,
html body.nsc5-document.nsc592-guest-document .nsc590-circle-join-gate,
html body.nsc5-document.nsc592-guest-document .nsc590-rail-join{
  color:var(--nsc592-body)!important;
  -webkit-text-fill-color:currentColor!important;
}
html body.nsc5-document.nsc592-guest-document .nsc590-participation-gate h3,
html body.nsc5-document.nsc592-guest-document .nsc590-circle-join-gate strong,
html body.nsc5-document.nsc592-guest-document .nsc590-rail-join h2{
  color:var(--nsc592-ink)!important;
  -webkit-text-fill-color:var(--nsc592-ink)!important;
}

/* Footer: the previous member link selector had enough specificity to turn these dark green. */
html body.nsc5-document.nsc592-guest-document .nsc590-guest-footer{
  background:linear-gradient(135deg,#073d2d 0%,#063f2c 58%,#052f23 100%)!important;
  color:var(--nsc592-footer-copy)!important;
  -webkit-text-fill-color:currentColor!important;
}
html body.nsc5-document.nsc592-guest-document .nsc590-guest-footer .nsc5-brand-mark{
  display:grid!important;
  place-items:center!important;
  width:42px!important;
  height:42px!important;
  border:1px solid rgba(255,255,255,.32)!important;
  border-radius:12px!important;
  background:#0b6a48!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  font-weight:900!important;
}
html body.nsc5-document.nsc592-guest-document .nsc590-guest-footer strong,
html body.nsc5-document.nsc592-guest-document .nsc590-guest-footer .nsc590-footer-brand strong{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
html body.nsc5-document.nsc592-guest-document .nsc590-guest-footer p,
html body.nsc5-document.nsc592-guest-document .nsc590-guest-footer span,
html body.nsc5-document.nsc592-guest-document .nsc590-guest-footer small,
html body.nsc5-document.nsc592-guest-document .nsc590-footer-bottom{
  color:var(--nsc592-footer-copy)!important;
  -webkit-text-fill-color:var(--nsc592-footer-copy)!important;
}
html body.nsc5-document.nsc592-guest-document .nsc590-guest-app .nsc590-guest-footer a:not(.nsc590-join):not(.nsc590-secondary):not(.is-join),
html body.nsc5-document.nsc592-guest-document .nsc590-guest-app .nsc590-guest-footer a:not(.nsc590-join):not(.nsc590-secondary):not(.is-join):visited{
  color:var(--nsc592-footer-link)!important;
  -webkit-text-fill-color:var(--nsc592-footer-link)!important;
  opacity:1!important;
}
html body.nsc5-document.nsc592-guest-document .nsc590-guest-app .nsc590-guest-footer a:not(.nsc590-join):not(.nsc590-secondary):not(.is-join):hover,
html body.nsc5-document.nsc592-guest-document .nsc590-guest-app .nsc590-guest-footer a:not(.nsc590-join):not(.nsc590-secondary):not(.is-join):focus-visible{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  text-decoration:underline!important;
}

/* Public card/action links remain readable after isolating member link ownership. */
html body.nsc5-document.nsc592-guest-document .nsc590-section-head>a,
html body.nsc5-document.nsc592-guest-document .nsc590-rail-link,
html body.nsc5-document.nsc592-guest-document .nsc590-compact-list>a,
html body.nsc5-document.nsc592-guest-document .nsc590-thread-card h3>a,
html body.nsc5-document.nsc592-guest-document .nsc590-answer-grid h3>a{
  opacity:1!important;
}

/* Keep hero media visually subordinate to the actual student-content hierarchy. */
html body.nsc5-document.nsc592-guest-document .nsc591-hero-media figcaption{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

@media(max-width:1280px){
  html body.nsc5-document.nsc592-guest-document .nsc590-guest-header-inner{
    grid-template-columns:minmax(200px,220px) minmax(0,1fr) minmax(210px,240px) auto!important;
  }
  html body.nsc5-document.nsc592-guest-document .nsc590-guest-auth{display:none!important}
  html body.nsc5-document.nsc592-guest-document .nsc590-mobile-menu{display:block!important}
}
@media(max-width:1080px){
  html body.nsc5-document.nsc592-guest-document .nsc590-guest-header-inner{
    grid-template-columns:minmax(200px,1fr) minmax(210px,250px) auto!important;
  }
  html body.nsc5-document.nsc592-guest-document .nsc590-guest-primary{display:none!important}
}
@media(max-width:680px){
  html body.nsc5-document.nsc592-guest-document .nsc590-guest-header-inner{
    grid-template-columns:minmax(0,1fr) auto!important;
    width:min(100% - 24px,1360px)!important;
  }
  html body.nsc5-document.nsc592-guest-document .nsc590-guest-search{display:none!important}
  html body.nsc5-document.nsc592-guest-document .nsc590-guest-footer a{font-size:.82rem!important}
}

/* Dark guest mode. */
html[data-theme="dark"] body.nsc5-document.nsc592-guest-document .nsc590-guest-app,
body.nsc5-document.nsc592-guest-document.dark-mode .nsc590-guest-app,
body.nsc5-document.nsc592-guest-document.nsc-dark-mode .nsc590-guest-app{
  --nsc592-ink:#f5fbf7;
  --nsc592-body:#dfe9e3;
  --nsc592-muted:#c2d1c8;
  --nsc592-link:#9bf1c3;
  --nsc592-link-hover:#d0ffe6;
}
html[data-theme="dark"] body.nsc5-document.nsc592-guest-document .nsc590-guest-app a.nsc590-secondary,
body.nsc5-document.nsc592-guest-document.dark-mode .nsc590-guest-app a.nsc590-secondary{
  background:#14241c!important;
  border-color:#789184!important;
  color:#f3faf6!important;
  -webkit-text-fill-color:#f3faf6!important;
}

@media(forced-colors:active){
  html body.nsc5-document.nsc592-guest-document .nsc590-guest-app a.nsc590-join,
  html body.nsc5-document.nsc592-guest-document .nsc590-guest-footer a,
  html body.nsc5-document.nsc592-guest-document .nsc590-guest-header{forced-color-adjust:auto!important}
}
