/* Community 5.9.5 — Guest route action visibility + member avatar ownership.
   This layer is linked after wp_head and printed again after wp_footer. */

:root{
  --nsc595-green:#075a3a;
  --nsc595-green-hover:#00442a;
  --nsc595-ink:#10231b;
  --nsc595-text:#263a32;
  --nsc595-muted:#405249;
  --nsc595-border:#91a59b;
  --nsc595-footer:#0b4b35;
  --nsc595-footer-link:#e8f6ee;
  --nsc595-footer-muted:#dcece3;
}

/* ===== Guest action controls on shared member-era templates ===== */
html body.nsc5-document.nsc594-guest-document .nsc590-guest-app :is(a,button).nsc5-primary,
html body.nsc5-document.nsc594-guest-document .nsc590-guest-app .nsc595-protected-action,
html body.nsc5-document.nsc594-guest-document .nsc590-guest-app .nsc595-filter-submit{
  background:var(--nsc595-green)!important;
  border-color:var(--nsc595-green)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  opacity:1!important;
  visibility:visible!important;
  text-shadow:none!important;
  filter:none!important;
}
html body.nsc5-document.nsc594-guest-document .nsc590-guest-app :is(a,button).nsc5-primary *,
html body.nsc5-document.nsc594-guest-document .nsc590-guest-app .nsc595-protected-action *,
html body.nsc5-document.nsc594-guest-document .nsc590-guest-app .nsc595-filter-submit *,
html body.nsc5-document.nsc594-guest-document .nsc590-guest-app .nsc595-inverse-label{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  opacity:1!important;
  visibility:visible!important;
  text-shadow:none!important;
}
html body.nsc5-document.nsc594-guest-document .nsc590-guest-app :is(a,button).nsc5-primary:hover,
html body.nsc5-document.nsc594-guest-document .nsc590-guest-app :is(a,button).nsc5-primary:focus-visible,
html body.nsc5-document.nsc594-guest-document .nsc590-guest-app .nsc595-protected-action:hover,
html body.nsc5-document.nsc594-guest-document .nsc590-guest-app .nsc595-protected-action:focus-visible,
html body.nsc5-document.nsc594-guest-document .nsc590-guest-app .nsc595-filter-submit:hover,
html body.nsc5-document.nsc594-guest-document .nsc590-guest-app .nsc595-filter-submit:focus-visible{
  background:var(--nsc595-green-hover)!important;
  border-color:var(--nsc595-green-hover)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

/* Filter is a clear action, not a nearly-square mystery control. */
html body.nsc5-document.nsc594-guest-document .nsc590-guest-app .nsc5-filter-bar .nsc595-filter-submit{
  min-width:96px!important;
  min-height:48px!important;
  padding:0 18px!important;
  border-radius:12px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-weight:850!important;
  font-size:.88rem!important;
  line-height:1!important;
}

/* Student Life and Study Circle guest CTAs retain sensible width and readable labels. */
html body.nsc5-document.nsc594-guest-document .nsc590-guest-app .nsc5-page-actions .nsc595-protected-action,
html body.nsc5-document.nsc594-guest-document .nsc590-guest-app .nsc5-circle-membership .nsc595-protected-action{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:48px!important;
  min-width:144px!important;
  padding:10px 18px!important;
  border-radius:12px!important;
  font-weight:850!important;
  text-decoration:none!important;
}

/* Shared guest template typography: prevent lower-specificity inherited fades. */
html body.nsc5-document.nsc594-guest-document .nsc590-guest-main :where(.nsc5-page-head,.nsc5-section-head,.nsc5-circle-header,.nsc5-circle-membership,.nsc5-filter-bar,.nsc5-circle-card,.nsc5-empty){
  opacity:1!important;
  filter:none!important;
}
html body.nsc5-document.nsc594-guest-document .nsc590-guest-main :where(.nsc5-page-head h1,.nsc5-page-head h2,.nsc5-section-head h2,.nsc5-circle-header h1,.nsc5-circle-header h2,.nsc5-circle-card h3,.nsc5-empty strong){
  color:var(--nsc595-ink)!important;
  -webkit-text-fill-color:var(--nsc595-ink)!important;
  opacity:1!important;
}
html body.nsc5-document.nsc594-guest-document .nsc590-guest-main :where(.nsc5-page-head p,.nsc5-circle-header p,.nsc5-circle-membership p,.nsc5-circle-card p,.nsc5-circle-card small,.nsc5-empty p,.nsc5-filter-bar label,.nsc5-filter-bar label>span){
  color:var(--nsc595-text)!important;
  -webkit-text-fill-color:var(--nsc595-text)!important;
  opacity:1!important;
}

/* ===== Guest footer: repair ancestor opacity as well as the text itself. ===== */
html body.nsc5-document.nsc594-guest-document .nsc590-guest-footer,
html body.nsc5-document.nsc594-guest-document .nsc590-guest-footer *,
html body.nsc5-document.nsc594-guest-document .nsc590-guest-footer-inner,
html body.nsc5-document.nsc594-guest-document .nsc590-guest-footer-inner>div,
html body.nsc5-document.nsc594-guest-document .nsc590-footer-brand,
html body.nsc5-document.nsc594-guest-document .nsc590-footer-brand>div{
  opacity:1!important;
  visibility:visible!important;
  filter:none!important;
}
html body.nsc5-document.nsc594-guest-document .nsc590-guest-footer{
  background:var(--nsc595-footer)!important;
}
html body.nsc5-document.nsc594-guest-document .nsc590-guest-footer :where(strong,h2,h3),
html body.nsc5-document.nsc594-guest-document .nsc590-guest-footer .nsc5-brand-mark{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
html body.nsc5-document.nsc594-guest-document .nsc590-guest-footer :where(a,a:visited,a span,a:visited span){
  color:var(--nsc595-footer-link)!important;
  -webkit-text-fill-color:var(--nsc595-footer-link)!important;
  opacity:1!important;
  visibility:visible!important;
  text-decoration:none!important;
}
html body.nsc5-document.nsc594-guest-document .nsc590-guest-footer :where(a:hover,a:focus-visible,a:hover span,a:focus-visible span){
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  text-decoration:underline!important;
}
html body.nsc5-document.nsc594-guest-document .nsc590-guest-footer :where(.nsc590-footer-brand span,.nsc590-footer-bottom){
  color:var(--nsc595-footer-muted)!important;
  -webkit-text-fill-color:var(--nsc595-footer-muted)!important;
}

/* ===== Authenticated header avatar/picture ===== */
html body.nsc5-document.nsc594-member-document .nsc595-account-avatar{
  position:relative!important;
  display:grid!important;
  place-items:center!important;
  width:44px!important;
  min-width:44px!important;
  height:44px!important;
  padding:0!important;
  overflow:hidden!important;
  border:2px solid #075a3a!important;
  border-radius:50%!important;
  background:#075a3a!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  opacity:1!important;
  visibility:visible!important;
  font:900 .96rem/1 system-ui,-apple-system,"Segoe UI",sans-serif!important;
}
html body.nsc5-document.nsc594-member-document .nsc595-account-avatar .nsc595-avatar-fallback{
  position:relative!important;
  z-index:1!important;
  display:grid!important;
  place-items:center!important;
  width:100%!important;
  height:100%!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  opacity:1!important;
  visibility:visible!important;
  font:900 .96rem/1 system-ui,-apple-system,"Segoe UI",sans-serif!important;
}
html body.nsc5-document.nsc594-member-document .nsc595-account-avatar .nsc595-avatar-image{
  position:absolute!important;
  z-index:2!important;
  inset:0!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  margin:0!important;
  border:0!important;
  border-radius:50%!important;
  object-fit:cover!important;
  opacity:1!important;
  visibility:visible!important;
}
html body.nsc5-document.nsc594-member-document .nsc5-account-menu-initial .nsc595-avatar-fallback{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  opacity:1!important;
  visibility:visible!important;
}

/* Keep header action icons and account control distinct and visible. */
html body.nsc5-document.nsc594-member-document .nsc5-top-actions{
  opacity:1!important;
  visibility:visible!important;
}
html body.nsc5-document.nsc594-member-document .nsc5-top-actions .nsc5-icon-button{
  opacity:1!important;
  visibility:visible!important;
}

@media(max-width:720px){
  html body.nsc5-document.nsc594-guest-document .nsc590-guest-app .nsc5-filter-bar .nsc595-filter-submit,
  html body.nsc5-document.nsc594-guest-document .nsc590-guest-app .nsc5-page-actions .nsc595-protected-action,
  html body.nsc5-document.nsc594-guest-document .nsc590-guest-app .nsc5-circle-membership .nsc595-protected-action{
    width:100%!important;
  }
  html body.nsc5-document.nsc594-member-document .nsc595-account-avatar{
    width:40px!important;
    min-width:40px!important;
    height:40px!important;
  }
}

@media(forced-colors:active){
  html body.nsc5-document .nsc595-account-avatar,
  html body.nsc5-document.nsc594-guest-document .nsc590-guest-app :is(a,button).nsc5-primary,
  html body.nsc5-document.nsc594-guest-document .nsc590-guest-app .nsc595-filter-submit{
    border:1px solid ButtonText!important;
    background:ButtonFace!important;
    color:ButtonText!important;
    -webkit-text-fill-color:ButtonText!important;
    forced-color-adjust:auto!important;
  }
}

/* Member-side action ownership: prevent the same text-fill regression on shared Circle/forms. */
html body.nsc5-document.nsc594-member-document .nsc590-member-app :is(a,button).nsc5-primary,
html body.nsc5-document.nsc594-member-document .nsc590-member-app :is(a,button).nsc5-primary *{
  background:var(--nsc595-green)!important;
  border-color:var(--nsc595-green)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  opacity:1!important;
  visibility:visible!important;
}
html body.nsc5-document.nsc594-member-document .nsc590-member-app .nsc5-filter-bar button.nsc5-secondary,
html body.nsc5-document.nsc594-member-document .nsc590-member-app .nsc5-filter-bar button.nsc5-secondary *{
  background:var(--nsc595-green)!important;
  border-color:var(--nsc595-green)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  opacity:1!important;
  visibility:visible!important;
}
