/* MEU shared header/nav — jhu-nav.css */
/* Arabic mirrors the header: nav rail, toggle, panel & burger move to the left */
html[dir="rtl"] .jhu-tabs .tab span {
  direction: rtl;
  unicode-bidi: isolate
}

html[dir="rtl"] .pane-menu a:hover {
  padding-left: 0;
  padding-right: 6px
}

/* --- collapsible right-side menu --- */
.tabtoggle {
  position: fixed;
  top: 126px;
  right: 0;
  z-index: 61;
  background: var(--maroon-deep);
  color: #fff;
  border: 0;
  border-left: 4px solid var(--gold);
  cursor: pointer;
  padding: 9px 12px;
  font: 800 .66rem/1 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 7px;
  box-shadow: -3px 4px 14px rgba(74, 14, 15, .3)
}

.tabtoggle:hover {
  background: var(--maroon)
}

.jhu-tabs {
  transition: transform .3s cubic-bezier(.6, 0, .2, 1), opacity .22s
}

body:not(.tabs-off) .jhu-tabs {
  transform: translateY(38px)
}

body.tabs-off .jhu-tabs {
  transform: translateX(112%);
  opacity: 0;
  pointer-events: none
}

/* Arabic keeps the same right-side rail / toggle as English */
@media(max-width:880px) {
  .tabtoggle {
    display: none
  }
}

.jhu-top {
  position: fixed;
  top: 0px;
  left: 0;
  right: 0;
  z-index: 60;
  background: #fff;
  border-bottom: 1px solid var(--line);
  height: 88px;
  display: flex;
  align-items: center
}

.jhu-top .row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative
}

.jhu-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative
}

.jhu-brand img {
  height: 67px
}

.jhu-brand .brand-light {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease
}

.jhu-brand .est {
  color: #fff;
  font-size: .68rem;
  letter-spacing: .12em;
  line-height: 1.3;
  opacity: .85;
  border-left: 1px solid rgba(255, 255, 255, .4);
  padding-left: 14px;
  max-width: 150px
}

.jhu-tabs {
  position: fixed;
  top: 104px;
  right: 0;
  z-index: 55;
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 207px
}

.jhu-tabs .grp1,
.jhu-tabs .grp2 {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end
}

.jhu-tabs .grp2 {
  margin-top: 4px
}

.jhu-tabs .tab {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  cursor: pointer;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .06em;
  border: 0;
  text-align: left
}

.jhu-tabs .tab-main {
  background: var(--maroon-deep);
  color: #fff;
  font-size: .83rem;
  font-weight: 700;
  padding: 13px 16px;
  border-left: 4px solid var(--maroon);
  transition: .18s;
  line-height: 1.2;
  min-height: 44px;
  box-sizing: border-box
}

.jhu-tabs .tab-main:hover {
  background: var(--maroon);
  border-left-color: #F0B8A0
}

.jhu-tabs .tab-main svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  stroke: #F0B8A0;
  fill: none;
  stroke-width: 2
}

.jhu-tabs .tab-sub {
  width: 166px;
  background: rgba(255, 255, 255, .95);
  color: var(--maroon);
  font-size: .72rem;
  font-weight: 700;
  padding: 11px 16px;
  border-left: 4px solid var(--maroon);
  transition: .18s
}

.jhu-tabs .tab-sub:hover {
  background: #fff;
  border-left-color: var(--maroon-deep);
  padding-left: 22px
}

@media(max-width:880px) {
  .jhu-tabs {
    top: 16px;
    width: 62px
  }

  .jhu-tabs .tab span {
    display: none
  }

  .jhu-tabs .tab {
    justify-content: center;
    padding: 14px 0
  }

  .jhu-tabs .tab-sub {
    font-size: 0
  }

  .jhu-tabs .tab-sub::before {
    content: attr(data-i);
    font-size: .7rem
  }
}

@media(max-width:880px) {
  .jhu-brand .est {
    display: none
  }
}

/* shade + panel */
.shade {
  position: fixed;
  inset: 0;
  background: rgba(20, 12, 12, .55);
  backdrop-filter: blur(1px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s;
  z-index: 110
}

.shade.open {
  opacity: 1;
  visibility: visible
}

.sidep {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 240px;
  background: var(--maroon-deep);
  color: #fff;
  z-index: 120;
  transform: translateX(100%);
  transition: transform .36s cubic-bezier(.6, 0, .2, 1);
  overflow-y: auto;
  padding: 26px 22px 40px;
  overscroll-behavior: contain
}

/* slim scrollbar in the menu's own colours (Firefox; Chrome would let these override the rules below) */
@supports not selector(::-webkit-scrollbar) {
  .sidep {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .28) transparent
  }
}

/* slim scrollbar in the menu's own colours (Chrome, Edge, Safari) */
.sidep::-webkit-scrollbar {
  width: 6px
}

.sidep::-webkit-scrollbar-track {
  background: transparent;
  margin: 10px 0
}

.sidep::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .22);
  border-radius: 6px
}

.sidep:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .36)
}

.sidep::-webkit-scrollbar-thumb:active {
  background: #E2B04A
}

.sidep.open {
  transform: none
}

.sidep .ptitle {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #F0B8A0;
  margin: 6px 0 16px
}

.sidep .pclose {
  background: none;
  border: 1px solid rgba(255, 255, 255, .35);
  color: #fff;
  border-radius: 7px;
  padding: 9px 0;
  width: 100%;
  font-family: var(--sans);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 22px
}

.sidep .pclose:hover {
  background: rgba(255, 255, 255, .12)
}

.pane {
  display: none
}

.pane.on {
  display: block
}

/* menu pane */
.pane-menu a {
  display: block;
  color: #fff;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.18rem;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  transition: .16s
}

.pane-menu a:hover {
  color: #F0B8A0;
  padding-left: 6px
}

.pane-menu .sub {
  font-family: var(--sans);
  font-size: .82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .7);
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .08)
}

.pane-menu .grp {
  margin-top: 18px
}

.pane-menu .grp h6 {
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #F0B8A0;
  margin-bottom: 6px
}

/* menu pane: <button> entries styled like the <a> links */
.pane-menu button.navlink {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  color: #fff;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.18rem;
  padding: 11px 0;
  cursor: pointer;
  transition: .16s
}

.pane-menu button.navlink:hover {
  color: #F0B8A0;
  padding-left: 6px
}

html[dir="rtl"] .pane-menu button.navlink {
  text-align: right
}

html[dir="rtl"] .pane-menu button.navlink:hover {
  padding-left: 0;
  padding-right: 6px
}

.pane-menu .langswitch {
  color: #F0B8A0;
  font-weight: 600
}

.pane-menu .qmenu h6 {
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #F0B8A0;
  margin: 2px 0 6px
}

/* mobile-only quick-access group (mirrors the desktop tab rail) */
.mob-only {
  display: none
}

/* search pane */
.pane-search input {
  width: 100%;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 8px;
  padding: 12px 14px;
  color: #fff;
  font-size: .95rem;
  font-family: var(--sans)
}

.pane-search input::placeholder {
  color: rgba(255, 255, 255, .6)
}

.pane-search .sbtn {
  width: 100%;
  background: var(--maroon);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 11px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  font-family: var(--sans)
}

.pane-search .sbtn:hover {
  background: #a52224
}

.pane-search .cs {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #F0B8A0;
  margin: 26px 0 6px
}

.pane-search .cslist a {
  display: block;
  color: rgba(255, 255, 255, .88);
  font-size: .92rem;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .14)
}

.pane-search .cslist a:hover {
  color: #fff
}

/* news pane */
.pane-news h6 {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #F0B8A0;
  margin: 4px 0 12px
}

.pane-news h6.mt {
  margin-top: 26px
}

.pane-news .social {
  display: flex;
  gap: 14px;
  margin-top: 18px
}

.pane-news .social a {
  color: rgba(255, 255, 255, .8);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .05em
}

.pane-news .social a:hover {
  color: #fff
}

.jhu-spacer {
  height: 88px
}

/* sticky header: the logo bar always stays put; only the floating quick-nav
   rail auto-hides on scroll, replaced by the burger (full menu access) */
.jhu-top {
  transition: box-shadow .3s ease
}

body.hdr-stuck .jhu-top {
  box-shadow: 0 8px 24px -14px rgba(74, 14, 15, .4)
}

.jhu-burger {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 105;
  width: 56px;
  height: 56px;
  background: var(--maroon-deep, #4A0E0F);
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-100%);
  transition: opacity .3s ease, transform .38s cubic-bezier(.4, 0, .2, 1)
}

.jhu-burger:hover {
  background: var(--maroon, #8A1C1D)
}

.jhu-burger svg {
  width: 22px;
  height: 22px;
  stroke: #fff;
  stroke-width: 2;
  fill: none
}

body.hdr-stuck .jhu-tabs {
  transform: translateX(calc(100% + 22px)) !important;
  opacity: 0 !important;
  pointer-events: none
}

body.hdr-stuck .tabtoggle {
  opacity: 0 !important;
  pointer-events: none
}

body.hdr-stuck .jhu-burger {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0)
}

/* ---- mobile header: one hamburger, no rail ---- */
.jhu-langm {
  display: none
}

@media(max-width:880px) {

  .jhu-tabs,
  .tabtoggle {
    display: none !important
  }

  .pane-menu .mob-only {
    display: block
  }

  .jhu-top {
    height: 64px
  }

  .jhu-spacer {
    height: 64px
  }

  .jhu-top .row {
    box-sizing: border-box;
    padding-left: 14px !important;
    padding-right: 76px !important
  }

  .jhu-brand img {
    height: 34px
  }

  .jhu-burger {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
    right: 0;
    top: 0;
    height: 64px;
    width: 64px
  }

  .jhu-langm {
    display: none !important
  }

  .sidep {
    width: min(340px, 86vw);
    padding-top: 64px
  }

  .msnav-panel {
    width: min(340px, 86vw)
  }
}

/* ============================================================
   Floating quick-nav rail — refined into one cohesive panel.
   These rules intentionally sit last so they win over both the
   older blocks above and the stale copies inlined in per-page CSS.
   ============================================================ */
.jhu-tabs {
  top: 138px;
  right: 16px;
  width: 214px;
  gap: 0;
  padding: 9px;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid rgba(138, 28, 29, .12);
  border-radius: 16px;
  box-shadow: 0 16px 40px -14px rgba(74, 14, 15, .35), 0 2px 8px rgba(0, 0, 0, .06);
  max-height: calc(100vh - 160px);
  overflow-y: auto;
}

.jhu-tabs .grp1,
.jhu-tabs .grp2 {
  align-items: stretch;
  gap: 5px
}

.jhu-tabs .grp2 {
  margin-top: 7px;
  padding-top: 8px;
  border-top: 1px solid rgba(138, 28, 29, .14)
}

.jhu-tabs .tab {
  width: 100% !important;
  gap: 11px;
  border: 0;
  border-radius: 9px;
  text-align: left;
  letter-spacing: .04em;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease
}

.jhu-tabs .tab-main {
  background: var(--maroon-deep);
  color: #fff;
  font-size: .79rem;
  font-weight: 700;
  padding: 12px 14px;
  min-height: 42px;
  box-shadow: none
}

.jhu-tabs .tab-main:hover {
  background: var(--maroon);
  box-shadow: inset 3px 0 0 var(--gold)
}

.jhu-tabs .tab-main svg {
  stroke: #F0B8A0
}

.jhu-tabs .tab-sub {
  background: #fff;
  color: var(--maroon);
  font-size: .71rem;
  font-weight: 700;
  padding: 10px 14px;
  border: 1px solid rgba(138, 28, 29, .22) !important
}

.jhu-tabs .tab-sub:hover {
  background: var(--maroon);
  color: #fff;
  border-color: var(--maroon) !important;
  padding-left: 14px
}

.jhu-tabs .tab-lang {
  background: var(--gold) !important;
  color: var(--maroon-deep) !important;
  border: 0 !important;
  font-weight: 800 !important
}

.jhu-tabs .tab-lang:hover {
  background: var(--maroon-deep) !important;
  color: #fff !important
}

/* collapse / reveal — the state class lives on <html> so the inline <head>
   script can apply it before first paint (no flash / slide on refresh) */
html:not(.tabs-off) .jhu-tabs {
  transform: none
}

html.tabs-off .jhu-tabs {
  transform: translateX(calc(100% + 22px)) !important;
  opacity: 0 !important;
  pointer-events: none !important
}

html.tabs-no-anim .jhu-tabs {
  transition: none !important
}

/* hide / show toggle — a clean pill aligned to the rail */
.tabtoggle {
  top: 100px;
  right: 16px;
  border: 0;
  border-radius: 9px;
  padding: 8px 13px;
  gap: 6px;
  font: 800 .62rem/1 var(--sans);
  letter-spacing: .14em;
  background: var(--maroon-deep);
  box-shadow: 0 8px 20px -6px rgba(74, 14, 15, .4)
}

.tabtoggle:hover {
  background: var(--maroon)
}

/* ===== Arabic (RTL): mirror the whole rail to the left ===== */
/* undo the old "force header LTR" rule still inlined in per-page CSS */
html[dir="rtl"] .jhu-top,
html[dir="rtl"] .jhu-top .row {
  direction: rtl
}

html[dir="rtl"] .jhu-tabs {
  right: auto;
  left: 16px
}

html[dir="rtl"] .jhu-tabs .tab {
  text-align: right
}

html[dir="rtl"] .jhu-tabs .tab-main:hover {
  box-shadow: inset -3px 0 0 var(--gold)
}

html[dir="rtl"] .jhu-tabs .tab-sub:hover {
  padding-left: 14px;
  padding-right: 14px
}

html[dir="rtl"].tabs-off .jhu-tabs {
  transform: translateX(calc(-100% - 22px)) !important
}

html[dir="rtl"] body.hdr-stuck .jhu-tabs {
  transform: translateX(calc(-100% - 22px)) !important
}

html[dir="rtl"] .tabtoggle {
  right: auto;
  left: 16px;
  border: 0;
  box-shadow: 0 8px 20px -6px rgba(74, 14, 15, .4)
}

html[dir="rtl"] .sidep {
  right: auto;
  left: 0;
  transform: translateX(-100%)
}

html[dir="rtl"] .sidep.open {
  transform: none
}

html[dir="rtl"] .jhu-burger {
  right: auto;
  left: 0
}

/* Arabic typography — use the project's Arabic families (Tajawal / El Messiri) */
html[dir="rtl"] .jhu-tabs .tab,
html[dir="rtl"] .tabtoggle,
html[dir="rtl"] .sidep,
html[dir="rtl"] .sidep .ptitle,
html[dir="rtl"] .sidep .pclose,
html[dir="rtl"] .pane-menu .sub,
html[dir="rtl"] .pane-menu h6,
html[dir="rtl"] .pane-search input,
html[dir="rtl"] .pane-search .sbtn,
html[dir="rtl"] .pane-search .cs,
html[dir="rtl"] .pane-search .cslist a,
html[dir="rtl"] .pane-news h6,
html[dir="rtl"] .pane-news .social a {
  font-family: var(--sans-ar)
}

html[dir="rtl"] .pane-menu a,
html[dir="rtl"] .pane-menu button.navlink,
html[dir="rtl"] .pane-news .news-it p {
  font-family: var(--serif-ar)
}

@media(max-width:880px) {
  html[dir="rtl"] .jhu-burger {
    right: auto;
    left: 0
  }

  html[dir="rtl"] .jhu-top .row {
    padding-left: 76px !important;
    padding-right: 14px !important
  }
}

/* ============================================================
   Student login — header button + popup form
   ============================================================ */
.jhu-login-btn {
  position: fixed;
  top: 44px;
  right: 110px;
  transform: translateY(-50%);
  z-index: 106;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--maroon, #8A1C1D);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 11px 20px 11px 16px;
  font: 700 .78rem/1 var(--sans);
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 10px 22px -10px rgba(74, 14, 15, .5);
  transition: background .2s ease, box-shadow .2s ease, transform .2s ease
}

.jhu-login-btn:hover {
  background: var(--maroon-deep, #4A0E0F);
  box-shadow: 0 12px 26px -8px rgba(74, 14, 15, .6)
}

.jhu-login-btn svg {
  width: 17px;
  height: 17px;
  stroke: #fff;
  stroke-width: 2;
  fill: none;
  flex: none
}

.jhu-login-btn span {
  white-space: nowrap
}

@media(max-width:880px) {
  .jhu-login-btn {
    top: 32px;
    right: 72px;
    padding: 0;
    width: 44px;
    height: 44px;
    justify-content: center;
    border-radius: 50%
  }

  .jhu-login-btn span {
    display: none
  }
}

@media(max-width:400px) {
  .jhu-login-btn {
    right: 64px;
    width: 38px;
    height: 38px
  }
}

html[dir="rtl"] .jhu-login-btn {
  right: auto;
  left: 110px;
  padding: 11px 16px 11px 20px
}

@media(max-width:880px) {
  html[dir="rtl"] .jhu-login-btn {
    left: 72px;
    right: auto
  }
}

@media(max-width:400px) {
  html[dir="rtl"] .jhu-login-btn {
    left: 64px;
    right: auto
  }
}

/* logged-in state: user chip + dropdown, same slot as the login button */
.jhu-user {
  position: fixed;
  top: 44px;
  right: 110px;
  transform: translateY(-50%);
  z-index: 106
}

.jhu-user-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #fff;
  border: 1px solid rgba(138, 28, 29, .22);
  border-radius: 999px;
  padding: 6px 16px 6px 6px;
  cursor: pointer;
  box-shadow: 0 8px 20px -12px rgba(74, 14, 15, .35);
  transition: border-color .18s ease, box-shadow .18s ease
}

.jhu-user-btn:hover {
  border-color: var(--maroon, #8A1C1D)
}

.jhu-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex: none;
  background: var(--maroon, #8A1C1D);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 800 .68rem/1 var(--sans)
}

.jhu-user-name {
  font: 700 .76rem/1 var(--sans);
  color: var(--ink, #2A2122);
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.jhu-user-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 170px;
  max-width: 240px;
  background: #fff;
  border: 1px solid var(--line, #E2D5D2);
  border-radius: 12px;
  box-shadow: 0 20px 44px -16px rgba(42, 33, 34, .35);
  padding: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease
}

.jhu-user-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: none
}

.jhu-user-role {
  font: 700 .64rem/1 var(--sans);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted, #6E6463);
  padding: 8px 10px 6px
}

.jhu-user-job {
  font: 700 .78rem/1.3 var(--sans);
  color: var(--ink, #2A2122);
  padding: 0 10px 2px
}

.jhu-user-dept,
.jhu-user-email {
  font: 500 .72rem/1.3 var(--sans);
  color: var(--muted, #6E6463);
  padding: 0 10px 6px;
  overflow-wrap: break-word
}

.jhu-user-logout {
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--maroon, #8A1C1D);
  font: 700 .78rem/1 var(--sans);
  cursor: pointer
}

.jhu-user-logout:hover {
  background: var(--sand, #EFE7E4)
}

@media(max-width:880px) {
  .jhu-user {
    top: 32px;
    right: 72px
  }

  .jhu-user-name {
    display: none
  }

  .jhu-user-btn {
    padding: 4px
  }
}

html[dir="rtl"] .jhu-user {
  right: auto;
  left: 110px
}

html[dir="rtl"] .jhu-user-btn {
  padding: 6px 6px 6px 16px
}

html[dir="rtl"] .jhu-user-menu {
  right: auto;
  left: 0
}

html[dir="rtl"] .jhu-user-logout {
  text-align: right
}

@media(max-width:880px) {
  html[dir="rtl"] .jhu-user {
    left: 72px;
    right: auto
  }
}

.login-shade {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(42, 33, 34, .55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease
}

.login-shade.open {
  opacity: 1;
  pointer-events: auto
}

.login-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%) scale(.96);
  width: min(400px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--paper, #FBF8F6);
  border-radius: 18px;
  box-shadow: 0 30px 70px -20px rgba(42, 33, 34, .5);
  z-index: 201;
  padding: 34px 30px 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s cubic-bezier(.4, 0, .2, 1)
}

.login-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1)
}

.login-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--muted, #6E6463);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s ease, color .18s ease
}

.login-close:hover {
  background: var(--sand, #EFE7E4);
  color: var(--maroon, #8A1C1D)
}

html[dir="rtl"] .login-close {
  right: auto;
  left: 14px
}

.login-head {
  text-align: center;
  margin-bottom: 22px
}

.login-head img {
  height: 46px;
  margin-bottom: 14px
}

.login-head h2 {
  margin: 0 0 6px;
  font: 800 1.32rem/1.25 var(--serif, Georgia, serif);
  color: var(--ink, #2A2122)
}

.login-head p {
  margin: 0;
  font: 400 .84rem/1.4 var(--sans);
  color: var(--muted, #6E6463)
}

.login-alert {
  background: rgba(196, 58, 59, .08);
  border: 1px solid rgba(196, 58, 59, .28);
  color: #B23A3B;
  border-radius: 10px;
  padding: 10px 14px;
  font: 600 .78rem/1.4 var(--sans);
  margin-bottom: 16px
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px
}

.login-form label {
  display: flex;
  flex-direction: column;
  gap: 6px
}

.login-form label>span {
  font: 700 .68rem/1 var(--sans);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted, #6E6463)
}

.login-form input[type="text"],
.login-form input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid var(--line, #E2D5D2);
  border-radius: 10px;
  background: #fff;
  font: 400 .92rem/1.3 var(--sans);
  color: var(--ink, #2A2122);
  transition: border-color .18s ease, box-shadow .18s ease
}

.login-form input:focus {
  outline: 0;
  border-color: var(--maroon, #8A1C1D);
  box-shadow: 0 0 0 3px rgba(138, 28, 29, .14)
}

.pw-wrap {
  position: relative
}

.pw-wrap input {
  padding-right: 44px
}

html[dir="rtl"] .pw-wrap input {
  padding-right: 14px;
  padding-left: 44px
}

.pw-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--muted, #6E6463);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px
}

.pw-toggle:hover {
  background: var(--sand, #EFE7E4);
  color: var(--maroon, #8A1C1D)
}

.pw-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none
}

html[dir="rtl"] .pw-toggle {
  right: auto;
  left: 6px
}

.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: -2px
}

.login-row .remember {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 7px;
  font: 400 .78rem/1 var(--sans);
  color: var(--muted, #6E6463);
  cursor: pointer
}

.login-row .remember input {
  margin: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--maroon, #8A1C1D)
}

/* "Remember me" is a label inside .login-form, so undo the field-label caption style */
.login-row .remember>span {
  font: 400 .82rem/1.2 var(--sans);
  letter-spacing: 0;
  text-transform: none
}

.login-row .forgot {
  font: 600 .82rem/1.2 var(--sans);
  color: var(--maroon, #8A1C1D);
  text-decoration: none;
  padding: 10px 0;
  margin: -10px 0
}

.login-row .forgot:hover {
  text-decoration: underline
}

.login-submit {
  margin-top: 4px;
  width: 100%;
  padding: 13px;
  border: 0;
  border-radius: 10px;
  background: var(--gold, #C9A227);
  color: var(--maroon-deep, #4A0E0F);
  font: 800 .84rem/1 var(--sans);
  letter-spacing: .03em;
  cursor: pointer;
  transition: background .18s ease, transform .12s ease
}

.login-submit:hover {
  background: var(--maroon, #8A1C1D);
  color: #fff
}

.login-submit:active {
  transform: scale(.98)
}

.login-submit:disabled {
  opacity: .65;
  cursor: wait
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 16px;
  color: var(--muted, #6E6463);
  font: 700 .64rem/1 var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line, #E2D5D2)
}

.login-portals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center
}

.login-portals a {
  flex: 1 1 auto;
  text-align: center;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--line, #E2D5D2);
  font: 700 .72rem/1 var(--sans);
  color: var(--maroon, #8A1C1D);
  text-decoration: none;
  transition: background .18s ease, color .18s ease, border-color .18s ease
}

.login-portals a:hover {
  background: var(--maroon, #8A1C1D);
  color: #fff;
  border-color: var(--maroon, #8A1C1D)
}

@media(max-width:420px) {
  .login-modal {
    padding: 28px 20px 22px
  }

  .login-portals a {
    flex: 1 1 100%
  }
}

/* menu buttons: brand colour, darker on hover */
.jhu-tabs .tab-main,
.tabtoggle {
  background: #8b1716;
}

.jhu-tabs .tab-main:hover,
.tabtoggle:hover {
  background: #470d0e;
}

/* header, menu and panel links never underline, whatever the page's own reset */
.jhu-top a,
.jhu-tabs a,
.sidep a,
.jhu-user a,
.login-modal a {
  text-decoration: none;
}

/* the header, menu and login keep the site palette even on pages that
   redefine these variables for their own content (e.g. the study plans) */
.jhu-top,
.jhu-tabs,
.tabtoggle,
.jhu-burger,
.jhu-login-btn,
.jhu-user,
.login-modal,
.sidep {
  --maroon: #8A1C1D;
  --maroon-deep: #4A0E0F;
  --maroon-dk: #6E1516;
  --gold: #C9A227;
  --sand: #EFE7E4;
  --line: #E2D5D2;
  --ink: #2A2122;
  --muted: #6E6463;
  --paper: #FBF8F6;
}

/* larger "Menu / Hide" toggle label */
.tabtoggle,
html[dir="rtl"] .tabtoggle {
  font-size: .82rem;
  padding: 10px 16px;
  gap: 8px;
}

/* signed-in header: keep the apps (waffle) button and the user chip clear of the
   corner burger (56px desktop / 64px mobile), with a little breathing room */
body .g-header-cluster {
  inset-inline-end: 68px
}

.jhu-user {
  right: 124px
}

html[dir="rtl"] .jhu-user {
  right: auto;
  left: 124px
}

@media(max-width:880px) {
  body .g-header-cluster {
    inset-inline-end: 74px
  }

  .jhu-user {
    right: 128px
  }

  html[dir="rtl"] .jhu-user {
    right: auto;
    left: 128px
  }
}

/* signed-in header on phones: the user chip shows the initials only. The RTL padding rule
   above (6px 6px 6px 16px) outranks the mobile padding, which left a wide pill over the logo. */
@media(max-width:880px) {
  html[dir="rtl"] .jhu-user-btn {
    padding: 4px
  }
}

/* narrow phones: smaller apps button and chip, and a slightly smaller logo when signed in */
@media(max-width:420px) {
  body .g-header-cluster {
    inset-inline-end: 70px
  }

  .g-waffle-btn {
    width: 38px;
    height: 38px
  }

  .g-waffle-icon {
    width: 19px;
    height: 19px
  }

  .jhu-user {
    right: 114px
  }

  html[dir="rtl"] .jhu-user {
    right: auto;
    left: 114px
  }

  .jhu-user-avatar {
    width: 28px;
    height: 28px
  }

  .jhu-user-btn,
  html[dir="rtl"] .jhu-user-btn {
    padding: 3px
  }

  html:has(.jhu-user) .jhu-brand img {
    height: 30px
  }
}
