/* Unirecruit navigation drawer (owner request 2026-10-08).
   <= 900px: the header nav collapses behind .nav-toggle into a right-hand drawer.
   >  900px: nothing here applies except hiding the toggle, so desktop is unchanged. */

.nav-toggle { display: none; }

@media (min-width: 901px) {
  .nav-toggle,
  .nav-backdrop,
  .site-menu-generated,
  #site-menu .nav-extra { display: none !important; }
}

@media (max-width: 900px) {
  /* Header bar: logo left, controls right, never wider than the screen. */
  .site-header {
    overflow: visible !important;
    /* backdrop-filter would make the header the containing block of the fixed drawer */
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    flex-wrap: nowrap;
  }
  .site-header.nav-open { z-index: 70; }
  .site-header .brand { margin-right: auto; }
  .site-header .resource-theme-toggle { margin-left: 0; margin-right: 0; }

  .resource-header .resource-shell { flex-direction: row !important; align-items: center !important; flex-wrap: nowrap; gap: 10px; }
  .resource-header .resource-shell > a:first-child { margin-right: auto; }
  .resource-header .resource-shell > a:not(:first-child) { display: none; }
  .resource-header .resource-theme-toggle { margin-left: 0; }
  .resource-header > .nav-toggle { position: absolute; top: 14px; right: 16px; }
  .resource-header > nav:not(#site-menu) { display: none; } /* its links are in the drawer */
  .resource-header:not(:has(.resource-shell)) { position: relative; padding-right: 76px; padding-left: 16px; }

  .nav-toggle {
    position: relative;
    z-index: 62;
    order: 99;
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    margin-left: 8px;
    padding: 0;
    border: 1px solid #e3e6f0;
    border-radius: 11px;
    background: #fff;
    color: #1b2552;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .resource-header .nav-toggle { border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .1); color: #fff; }
  .nav-toggle[aria-expanded="true"] { border-color: #e3e6f0; background: #fff; color: #1b2552; }
  .nav-toggle:focus-visible { outline: 3px solid #b8a9ff; outline-offset: 2px; }

  .nav-toggle-icon,
  .nav-toggle-icon::before,
  .nav-toggle-icon::after {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .2s ease, background-color .2s ease;
  }
  .nav-toggle-icon { position: relative; }
  .nav-toggle-icon::before,
  .nav-toggle-icon::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-icon::before { top: -6px; }
  .nav-toggle-icon::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-icon { background-color: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-icon::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-icon::after { transform: translateY(-6px) rotate(-45deg); }

  /* The drawer. Ids beat the page stylesheets' nav rules (some use !important). */
  #site-menu {
    position: fixed !important;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    z-index: 60;
    display: flex !important;
    flex: none !important;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    box-sizing: border-box;
    width: min(340px, 86vw);
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 84px 16px 28px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    background: #fff;
    box-shadow: -24px 0 60px rgba(14, 18, 47, .25);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform .26s cubic-bezier(.23, 1, .32, 1), visibility 0s linear .26s;
  }
  .nav-open #site-menu {
    transform: none;
    visibility: visible;
    transition: transform .26s cubic-bezier(.23, 1, .32, 1);
  }
  #site-menu a {
    box-sizing: border-box;
    display: block;
    flex: none !important;
    padding: 12px 14px !important;
    border-radius: 10px;
    color: #1f2850 !important;
    font-size: 1rem !important;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
    white-space: normal;
  }
  #site-menu a:hover,
  #site-menu a:focus-visible,
  #site-menu a[aria-current="page"] { background: #f2efff; color: #4f37ad !important; outline: none; }
  #site-menu .nav-signin { margin-top: 10px; border: 1px solid #d9d6f2; text-align: center; color: #4f37ad !important; }
  #site-menu .theme-toggle { flex: none; margin: 10px 14px 0; }
  #site-menu .nav-auth { flex: none; margin: 12px 0 0 !important; padding: 12px 14px !important; font-size: 1rem !important; }

  .nav-backdrop { position: fixed; inset: 0; z-index: 58; background: rgba(14, 18, 47, .55); }
  .nav-backdrop[hidden] { display: none; }

  html.nav-locked,
  html.nav-locked body { overflow: hidden; }

  body[data-theme="dark"] #site-menu { background: #101941; box-shadow: -24px 0 60px rgba(0, 0, 0, .45); }
  body[data-theme="dark"] #site-menu a { color: #e7eaff !important; }
  body[data-theme="dark"] #site-menu a:hover,
  body[data-theme="dark"] #site-menu a:focus-visible,
  body[data-theme="dark"] #site-menu a[aria-current="page"] { background: rgba(137, 112, 238, .2); color: #fff !important; }
  body[data-theme="dark"] #site-menu .nav-signin { border-color: rgba(189, 199, 245, .28); }
  body[data-theme="dark"] .nav-toggle,
  body[data-theme="dark"] .nav-toggle[aria-expanded="true"] { border-color: rgba(188, 197, 244, .22); background: #151e46; color: #f1edff; }
}

@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  #site-menu,
  .nav-open #site-menu,
  .nav-toggle-icon,
  .nav-toggle-icon::before,
  .nav-toggle-icon::after { transition: none; }
}
.site-header nav a.nav-admin,.resource-header nav a.nav-admin,#site-menu a.nav-admin{color:#6d4aff;font-weight:800}
body[data-theme="dark"] #site-menu a.nav-admin,body[data-theme="dark"] .site-header nav a.nav-admin{color:#b7a6ff}
