/* The header ☰ menu — the Mendip App's, rule for rule where it can be
   (its app.css "Header ☰ menu" + home-v2.css "Menu: full width under the
   header, grouped"). Loaded by the staff pages and the trainee app alike.
   Phone (no html.desktop): a full-screen grouped sheet under the header.
   html.desktop (staff side, wide screen + mouse): the App's dropdown. */

:root {
  --v2-ink: #143C50; --v2-muted: #5E7480; --v2-page: #F3F6F7; --v2-line: #DCE4E8; --v2-wash: #E6EFF3;
  --v2-font: "Poppins", -apple-system, "Segoe UI", system-ui, sans-serif;
}

/* ── The button ─────────────────────────────────────────────────────────── */
.hdr-menu { position: relative; }
.hdr-menu__btn {
  background: none; border: none; color: #fff; font-size: 1.25rem; line-height: 1;
  padding: .45rem .55rem; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.hdr-menu__btn:active { opacity: .7; }
/* Phone: the App's soft square */
html:not(.desktop) .hdr-menu__btn {
  width: 42px; height: 42px; border-radius: 10px; background: rgba(255,255,255,.12);
  display: inline-grid; place-items: center; padding: 0; font-size: 1.15rem;
}

/* ── The list: the App's dropdown (desktop) ─────────────────────────────── */
.hdr-menu__list {
  position: absolute; top: calc(100% + .35rem); right: 0; z-index: 300;
  background: #fff; border: 1px solid #dde1e7; border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12); min-width: 230px; overflow: hidden;
  max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); overflow-y: auto;
  font-family: var(--v2-font); color: #1a1a2e;
}
.hdr-menu__list[hidden] { display: none !important; }
.hdr-menu__list a, .hdr-menu__list button.hv2-out {
  display: flex; align-items: center; gap: .6rem; width: 100%; box-sizing: border-box;
  padding: .8rem .95rem; font: inherit; font-size: .9rem; color: #1a1a2e; text-decoration: none; text-align: left;
  background: none; border: 0; border-bottom: 1px solid #dde1e7; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.hdr-menu__list a:active, .hdr-menu__list a:hover, .hdr-menu__list button.hv2-out:hover { background: #e8f4fd; }
.hdr-menu__list a.is-on { font-weight: 600; }
.hdr-menu__icon { font-size: 1.05rem; color: #6b7280; display: inline-flex; }
.hdr-menu__icon svg { width: 18px; height: 18px; }
.hdr-menu__danger, .hdr-menu__danger .hdr-menu__icon { color: #842029 !important; }
.hdr-menu__badge {
  font-style: normal; font-size: .7rem; font-weight: 800; color: #fff; background: #d33;
  border-radius: 999px; padding: .05rem .4rem; margin-left: .25rem;
}
.hv2-out-form { margin: 0; }
/* Desktop: one plain list — no title bar, no headings (as the App's desktop ☰) */
html.desktop .hv2-menu__top, html.desktop .hv2-g h3 { display: none; }
html.desktop .hv2-me small { display: block; font-size: .75rem; color: #6b7280; }
html.desktop .hv2-g:last-of-type .hv2-rows a:last-child { border-bottom: 1px solid #dde1e7; }

/* ── Phone: the full-screen grouped menu (home-v2.css) ──────────────────── */
html:not(.desktop) body.hdr-menu-open { overflow: hidden; }
html:not(.desktop) .hdr-menu__list.hv2-menu {
  position: fixed; left: 0; right: 0; bottom: 0; top: 60px; max-height: none; min-width: 0;
  border: 0; border-radius: 0; box-shadow: none; background: var(--v2-page);
  padding: 16px 16px calc(28px + env(safe-area-inset-bottom, 0px)); overflow-y: auto;
  font-family: var(--v2-font); color: var(--v2-ink); z-index: 300;
}
.hv2-menu__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.hv2-menu__top h2 { margin: 0; font-weight: 900; font-size: 22px; color: #005E85; text-transform: uppercase; }
.hv2-menu__close {
  border: 1px solid var(--v2-line); background: #fff; border-radius: 10px; padding: 8px 12px;
  font: 600 13px/1 var(--v2-font); color: var(--v2-ink); display: flex; gap: 6px; align-items: center; cursor: pointer;
}
.hv2-menu__close svg { width: 16px; height: 16px; }
html:not(.desktop) .hv2-menu a.hv2-me {
  border: 0; border-radius: 12px; background: #005E85; color: #fff; padding: 12px 14px; gap: 12px; font-size: 15px; font-weight: 600;
}
html:not(.desktop) .hv2-menu a.hv2-me .hdr-menu__icon {
  width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; display: grid; place-items: center; flex: none;
}
.hv2-me__t { display: flex; flex-direction: column; min-width: 0; }
html:not(.desktop) .hv2-me small { font-size: 12px; font-weight: 400; opacity: .85; }
.hv2-g h3 { margin: 18px 4px 7px; font-weight: 900; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: #005E85; }
html:not(.desktop) .hv2-rows { background: #fff; border: 1px solid var(--v2-line); border-radius: 12px; overflow: hidden; }
html:not(.desktop) .hv2-rows a {
  border-bottom: 0; border-top: 1px solid var(--v2-line); padding: 12px 14px; gap: 12px; font-size: 14px; min-height: 48px; color: var(--v2-ink);
}
html:not(.desktop) .hv2-rows a:first-child { border-top: 0; }
html:not(.desktop) .hv2-rows a.is-on { background: var(--v2-wash); }
html:not(.desktop) .hv2-menu .hdr-menu__icon { color: #005E85; font-size: 1rem; }
html:not(.desktop) .hv2-menu .hdr-menu__icon svg { width: 19px; height: 19px; }
html:not(.desktop) .hv2-menu .hdr-menu__badge { margin-left: auto; }
html:not(.desktop) .hv2-menu .hv2-out {
  margin-top: 16px; border: 0; background: none; padding: 8px 10px; width: auto; min-height: 0;
}
html:not(.desktop) .hv2-menu .hv2-out .hdr-menu__icon { color: #a1271c !important; }

/* ── The page-loading bar (menu.js, 2026-11-05): a thin line along the very top
   while the next page is on its way. Bright on the brand header and on white.
   It eases most of the way across and waits; the new page replaces it. ────── */
.nav-bar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 5000; pointer-events: none; opacity: 0; transition: opacity .15s; }
.nav-bar.on { opacity: 1; }
.nav-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #00a8e0, #9be4ff); box-shadow: 0 0 8px rgba(0, 168, 224, .75); border-radius: 0 2px 2px 0; }
.nav-bar.on i { width: 92%; transition: width 6s cubic-bezier(.08, .7, .12, 1); }
@media (prefers-reduced-motion: reduce) { .nav-bar.on i { width: 100%; transition: none; opacity: .85; } }
@media print { .nav-bar { display: none; } }
