/* Reserve the scrollbar space permanently so the page never shifts sideways when something locks scrolling
   (logout popup, mobile menu) or when the role-reveal animation runs. */
html{scrollbar-gutter:stable}
/* Students Home - responsive navigation.
   Desktop layout is untouched: the hamburger button is hidden and nothing below applies above 860px.
   On phones/small tablets the existing links + account items move into a dropdown opened by the hamburger.
   Rules are scoped to html.sh-nav-js (set by js/sh-nav.js) so the original layout remains if JS is unavailable. */
.sh-burger{display:none}

@media (max-width:860px){
  /* compact one-row header (same 70px height as desktop) */
  html.sh-nav-js [id^="ie3f"]{height:auto!important;min-height:70px;padding:0!important;max-height:100vh;max-height:100dvh;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;box-sizing:border-box}
  html.sh-nav-js [id^="ie3f"]>[id^="ig8b"]{flex-wrap:wrap!important;align-items:center!important;justify-content:space-between!important;height:auto!important;min-height:70px;padding:0 14px!important;box-sizing:border-box}
  html.sh-nav-js [id^="ie3f"]>[id^="ig8b"]>a:first-child{order:1;height:70px!important;width:auto!important;margin-right:auto}

  /* hamburger button */
  html.sh-nav-js .sh-burger{order:2;display:flex;flex:none;flex-direction:column;align-items:center;justify-content:center;gap:5px;width:44px;height:44px;margin:0;padding:0;border:1px solid rgba(23,77,57,.22);border-radius:10px;background:transparent;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:background-color .25s ease,border-color .25s ease}
  html.sh-nav-js .sh-burger:hover{background-color:rgba(61,95,82,.2)}
  html.sh-nav-js .sh-burger:focus-visible{outline:2px solid #f48c06;outline-offset:2px}
  html.sh-nav-js .sh-burger span{display:block;width:20px;height:2px;border-radius:2px;background:#174d39;transition:transform .25s ease,opacity .2s ease,background-color .25s ease}
  html.sh-nav-js [id^="ie3f"].sh-nav-open .sh-burger{background-color:#174d39;border-color:#174d39}
  html.sh-nav-js [id^="ie3f"].sh-nav-open .sh-burger span{background:#fff}
  html.sh-nav-js [id^="ie3f"].sh-nav-open .sh-burger span:nth-child(1){transform:translateY(7px) rotate(45deg)}
  html.sh-nav-js [id^="ie3f"].sh-nav-open .sh-burger span:nth-child(2){opacity:0}
  html.sh-nav-js [id^="ie3f"].sh-nav-open .sh-burger span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

  /* closed: both link groups are tucked away */
  html.sh-nav-js [id^="ie3f"]>[id^="ig8b"]>[id^="i51id"],
  html.sh-nav-js [id^="ie3f"]>[id^="ig8b"]>[id^="i769r"]{display:none!important}

  /* open: dropdown, stacked full-width rows */
  html.sh-nav-js [id^="ie3f"].sh-nav-open>[id^="ig8b"]>[id^="i51id"],
  html.sh-nav-js [id^="ie3f"].sh-nav-open>[id^="ig8b"]>[id^="i769r"]{display:flex!important;flex-direction:column;flex-wrap:nowrap!important;align-items:stretch!important;justify-content:flex-start!important;width:100%!important;height:auto!important;box-sizing:border-box;row-gap:2px;border-top:1px solid #e5e9e3;animation:shNavIn .22s ease backwards}
  html.sh-nav-js [id^="ie3f"].sh-nav-open>[id^="ig8b"]>[id^="i51id"]{order:3;padding:8px 0 6px!important}
  html.sh-nav-js [id^="ie3f"].sh-nav-open>[id^="ig8b"]>[id^="i769r"]{order:4;padding:6px 0 16px!important;animation-delay:.04s}

  html.sh-nav-js [id^="ig8b"]>[id^="i51id"]>a,
  html.sh-nav-js [id^="ig8b"]>[id^="i769r"]>a,
  html.sh-nav-js [id^="ig8b"]>[id^="i769r"]>[id^="ntfnav"]>a{box-sizing:border-box;width:100%!important;padding:13px 14px!important;font-size:16px!important;text-align:left;border-radius:10px}
  html.sh-nav-js [id^="ig8b"]>[id^="i769r"]>[id^="ntfnav"]{width:100%!important;height:auto!important}
  html.sh-nav-js [id^="ig8b"]>[id^="i769r"]>a.Boxs_LS{margin-top:6px;border:1px solid #174d39;color:#174d39;text-align:center}
  html.sh-nav-js [id^="ig8b"]>[id^="i769r"]>a.Boxs_LS:hover{color:#fff}

  /* notification panel sits just under the compact header; keep compact height so ~2-3 cards show with scroll */
  html.sh-nav-js [id^="ntf-panel"]{position:fixed!important;left:12px!important;right:12px!important;width:auto!important;max-width:none!important;top:78px!important;max-height:440px!important;max-height:min(440px, calc(100dvh - 96px))!important;overflow-x:hidden!important}

  /* dim page behind the open menu */
  html.sh-nav-open{overflow:hidden}
  html.sh-nav-open body::after{content:"";position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(32,41,35,.38);z-index:1500;animation:shNavFade .2s ease backwards}
}
@keyframes shNavIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
@keyframes shNavFade{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:reduce){
  html.sh-nav-js [id^="ie3f"] *,html.sh-nav-open body::after{animation:none!important;transition:none!important}
}

/* Footer "Staff sign-in" link: match the size of the other footer links (added with the 404 page). */
a.Logg[id$="-staff"]{font-size:14px}

/* Switch mode helper text: keep readable but not bold (scoped to dashboard mode switch labels) */
label:has(select[id^="switch-mode"]) { font-weight: 500 !important; }
label:has(select[id^="switch-mode"]) select { font-weight: 400; }

/* Notification panel visibility/usability fixes */
[id^="ntf-panel"].sh-open { display: flex !important; }
@media (max-width: 860px) {
  html.sh-nav-js [id^="ntf-panel"].sh-open {
    z-index: 2001 !important;
  }
  html.sh-nav-js [id^="ie3f"].sh-nav-open [id^="ig8b"] > [id^="i769r"] [id^="ntfnav"] {
    position: static;
  }
}

/* Verification badge: compact on mobile (icon only), full on desktop */
@media (max-width: 600px) {
  .sh-verified-badge .sh-verified-word { display: none !important; }
  .sh-verified-badge { padding: 2px 6px !important; gap: 0 !important; margin-left: 4px !important; }
  .sh-author-name-row { gap: 4px !important; }
}
