/* One mobile menu, matching the existing homepage bar on every page.
   All selectors are isolated from the unchanged desktop navigation themes. */
:root{--hd-mobile-bar-height:104.4px}
.hd-skip-nav{position:fixed;top:0;left:0;z-index:3000}
body .hd-mobile-header{display:none;position:sticky;top:0;z-index:900;background:#fff;color:#26292f;border-bottom:1px solid rgba(11,60,73,.08);font:16px/1.65 'Inter',sans-serif;text-transform:none;letter-spacing:normal}
body .hd-mobile-header *{box-sizing:border-box}
body .hd-mobile-bar{position:relative;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:32px;height:var(--hd-mobile-bar-height);padding:0 clamp(20px,2vw,48px);background:#fff}
body .hd-mobile-brand{display:block;flex-shrink:0;text-decoration:none;line-height:0}
body .hd-mobile-brand img{display:block;width:252px;max-width:100%;height:auto;object-fit:contain;filter:none}
body .hd-mobile-toggle{display:block;flex-shrink:0;width:44px;height:44px;margin:0;padding:0;border:0;border-radius:0;background:none;color:#2a2d33;font:26px/1 Arial,sans-serif;cursor:pointer}
body #hd-mobile-menu{position:absolute;inset:100% 0 auto;background:#fff;min-height:calc(100dvh - var(--hd-mobile-bar-height));max-height:calc(100dvh - var(--hd-mobile-bar-height));overflow-y:auto;overscroll-behavior:contain;text-align:center}
body .hd-mobile-header [hidden]{display:none!important}
body .hd-mobile-header ul,body .hd-mobile-header li{display:block;list-style:none;gap:0;margin:0;min-width:0}
body .hd-mobile-header li{padding:0;border:0}
body .hd-mobile-header li::before{content:none}
body .hd-mobile-header .hd-mobile-list{display:flex;flex-direction:column;align-items:center;gap:18px;padding:24px 24px max(96px,env(safe-area-inset-bottom))}
body .hd-mobile-header :is(a,button){-webkit-tap-highlight-color:transparent}
body .hd-mobile-list :is(a,.hd-mobile-disclosure){display:block;margin:0;padding:6px 0;max-width:100%;background:none;border:0;border-radius:0;color:#26292f;font:500 16px/1.65 'Inter',sans-serif;letter-spacing:normal;text-transform:none;text-decoration:none;white-space:normal;overflow-wrap:anywhere;cursor:pointer}
body .hd-mobile-list > li > .hd-mobile-disclosure{display:flex;align-items:center;gap:.5rem;margin-inline:auto}
body .hd-mobile-caret{flex:none;width:0;height:0;border-inline:.4375rem solid transparent;border-top:.5rem solid currentColor;color:#8b6626;transition:transform .18s}
body .hd-mobile-disclosure[aria-expanded="true"] > .hd-mobile-caret{transform:rotate(180deg)}
body .hd-mobile-header .hd-mobile-submenu{width:100%;margin-top:10px;padding:10px 0;background:#2a2d33;text-align:left}
body .hd-mobile-submenu > li > :is(a,.hd-mobile-disclosure){width:100%;padding:13px 22px;color:#fff;font-size:15px;text-align:left;border-bottom:1px solid rgba(255,255,255,.08)}
body .hd-mobile-submenu > li:last-child > :is(a,.hd-mobile-disclosure){border-bottom:0}
body .hd-mobile-submenu .hd-mobile-disclosure{display:flex;justify-content:space-between;align-items:center;gap:12px}
body .hd-mobile-submenu .hd-mobile-caret{color:#c9a96a}
body .hd-mobile-submenu .hd-mobile-submenu{margin:0 0 4px;padding:4px 0 4px 14px;background:#1b1e23}
body .hd-mobile-submenu .hd-mobile-submenu a{font-size:13.5px;padding:8px 16px}
body .hd-mobile-list .hd-mobile-call{display:block;padding:10px 20px;border-radius:999px;background:#2a2d33;color:#fff;font-size:14.5px}
body .hd-mobile-header :is(a,button):focus-visible{outline:2px solid #a8863d;outline-offset:3px}
body.hd-mobile-menu-open{overflow:hidden}
body.hd-mobile-menu-open .hd-mobile-header{position:fixed;inset:0 0 auto}
body.hd-mobile-menu-open :is(#hdc-btn,#a11y-btn,.mobile-call,.hd-cookie-banner){visibility:hidden}
@media(max-width:1320px){
  body.site-home{--hd-visible-header-height:calc(var(--hd-mobile-bar-height) + 1px)}
  body.site-home > header{display:none}
  body.site-home > .hd-mobile-header{display:block}
}
@media(max-width:920px){
  html:has(> body.site-inner){scroll-padding-top:calc(var(--hd-mobile-bar-height) + 9px)}
  body.site-inner{--hd-visible-header-height:calc(var(--hd-mobile-bar-height) + 1px)}
  body.site-inner > :is(.side,.menu){display:none}
  body.site-inner > .hd-mobile-header{display:block}
  body.site-inner .page{margin-top:0}
}
@media(max-width:860px){
  body:has(> .hd-mobile-header[data-breakpoint="860"]){--hd-visible-header-height:calc(var(--hd-mobile-bar-height) + 1px)}
  body .hd-mobile-header[data-breakpoint="860"]{display:block}
  body .learning-sidebar > :is(.practice-brand,.back-link){display:none}
  /* Preserve existing section spacing below the shared bar and its border,
     including initial URL fragments and the guide's scrollIntoView controls. */
  html:has(body > .hd-mobile-header[data-breakpoint="860"]){scroll-padding-top:calc(var(--hd-mobile-bar-height) + 1px)}
}
@media(max-width:520px){
  :root{--hd-mobile-bar-height:90px}
  body .hd-mobile-bar{padding:0 16px;gap:16px}
  body .hd-mobile-brand{flex-shrink:1;min-width:0}
  body .hd-mobile-brand img{width:216px}
}
