/* V5.10.0: shared public header, account controls stay outside the mobile menu. */
body > header.site-header-523 { position:sticky; top:0; z-index:40; background:var(--diuk-c-081522,#081522); overflow:visible; }
body > header.site-header-523 > .nav { display:grid; grid-template-columns:minmax(0,auto) minmax(0,1fr) auto; align-items:center; justify-content:stretch; gap:12px 20px; max-width:1440px; padding:12px 24px; }
body > header.site-header-523 > .nav > a { grid-column:1; grid-row:1; width:auto; min-width:0; max-width:290px; }
body > header.site-header-523 > .nav .brandimg { display:block; width:100%; max-width:290px; height:auto; }
body > header.site-header-523 > .nav > .navlinks { grid-column:2; grid-row:1; display:flex; flex-wrap:wrap; justify-content:flex-end; width:auto; min-width:0; gap:4px; }
body > header.site-header-523 > .nav > .navlinks > a { width:auto; font-size:15px; padding:8px 7px; min-height:44px; height:auto; }
body > header.site-header-523 .nav > .account570-strip { grid-column:3; grid-row:1; position:relative; display:flex; align-items:center; justify-content:flex-end; min-width:0; }
body > header.site-header-523 .account569 { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap; margin:0; }
body > header.site-header-523 .account569 .btn { font-size:14px; min-height:44px; padding:8px 12px; white-space:nowrap; }
body > header.site-header-523 .account569-profile { display:flex; flex-direction:row; align-items:center; gap:7px; min-height:44px; white-space:nowrap; }
body > header.site-header-523 .account569-avatar { width:40px; height:40px; flex:none; }
body > header.site-header-523 .account569-avatar svg { width:28px; height:28px; }
body > header.site-header-523 .account571-fallback { padding:0; }
body > header.site-header-523 .menu-toggle[hidden],body > header.site-header-523 .navlinks[hidden] { display:none!important; }
body > header.site-header-523 a:focus-visible,body > header.site-header-523 button:focus-visible { outline:3px solid var(--diuk-c-8bdcff,#8bdcff); outline-offset:3px; }
@media(max-width:1100px){
 body > header.site-header-523 > .nav { grid-template-columns:minmax(0,1fr) auto; padding:10px 16px; gap:8px 12px; }
 body > header.site-header-523 > .nav > a {grid-row:1;grid-column:1;max-width:265px;}
 body > header.site-header-523 > .nav > .menu-toggle:not([hidden]) {grid-row:1;grid-column:2;display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:86px;padding:8px 12px;}
 body > header.site-header-523 > .nav > .account570-strip {grid-row:2;grid-column:1/-1;}
 body > header.site-header-523 > .nav > .navlinks {grid-row:3;grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:6px;max-height:45vh;overflow-y:auto;}
 body > header.site-header-523 > .nav > .navlinks > a {width:100%;border-radius:6px;background:var(--diuk-c-102237,#102237);white-space:normal;}
 body > header.site-header-523 .account569 {gap:8px;}
 body > header.site-header-523 .account569 .btn {font-size:14px;min-height:44px;}
}
@media(max-width:370px){body > header.site-header-523 > .nav {padding:8px 12px;}body > header.site-header-523 .account569 .btn {padding-inline:9px;}body > header.site-header-523 .account569 .f560-mod-tools>summary{font-size:12px;padding:8px;} }

@media(min-width:1101px){body > header.site-header-523 > .nav:not(:has(> .account570-strip)){grid-template-columns:minmax(0,auto) minmax(0,1fr);}}

/* V5.12.0: compact mobile-only header. Existing desktop header is unchanged. */
.diuk512-account-toggle,.diuk512-menu-account,.diuk512-status,.diuk512-signout,.diuk512-mobile-label{display:none!important}
@media(max-width:1100px){
 body > header.site-header-523 > .nav{grid-template-columns:minmax(0,1fr) auto auto;gap:8px;padding:10px 14px;position:relative;}
 body > header.site-header-523 > .nav > a{grid-column:1;grid-row:1;max-width:265px;min-width:0;align-self:center;}
 body > header.site-header-523 > .nav .brandimg{width:100%;max-width:265px;height:auto;}
 body > header.site-header-523 > .nav > .menu-toggle:not([hidden]){grid-column:3;grid-row:1;min-width:44px;min-height:44px;padding:8px 9px;white-space:nowrap;font-size:13px;}
 body > header.site-header-523 > .nav > .account570-strip{grid-column:2;grid-row:1;position:static;min-width:0;display:flex;align-items:center;}
 body > header.site-header-523 .diuk512-account-toggle{display:inline-flex!important;position:relative;align-items:center;justify-content:center;gap:5px;min-height:44px;min-width:44px;padding:7px 9px;border:1px solid var(--diuk-c-45647c,#45647c);border-radius:10px;background:var(--diuk-c-142638,#142638);color:var(--diuk-c-eef7ff,#eef7ff);font:inherit;font-size:13px;font-weight:700;white-space:nowrap;cursor:pointer;box-sizing:border-box;}
 body > header.site-header-523 .diuk512-account-toggle.diuk512-guest{background:var(--diuk-c-00658f,#00658f);border-color:var(--diuk-c-1594c4,#1594c4);color:#fff;}
 .diuk512-account-toggle svg{width:19px;height:19px;flex:none;}
 .diuk512-account-toggle .account569-avatar{width:26px!important;height:26px!important;}
 .diuk512-account-toggle .account569-avatar svg{width:20px!important;height:20px!important;}
 .diuk512-count{position:absolute;right:-5px;top:-6px;background:#b91c1c;color:#fff;border:1px solid #fff5;border-radius:99px;padding:2px 5px;font-size:11px;line-height:1.2;}
 .diuk512-count[hidden]{display:none!important;}
 body > header.site-header-523 > .nav > .navlinks{grid-column:1/-1;grid-row:2;max-height:min(70vh,440px);overflow:auto;grid-template-columns:1fr;}
 body > header.site-header-523 .diuk512-menu-account{display:flex!important;align-items:center;min-height:44px;width:100%;padding:10px;border-radius:8px;border:1px solid var(--diuk-c-45647c,#45647c);background:var(--diuk-c-142638,#142638);color:var(--diuk-c-eef7ff,#eef7ff);font:inherit;font-weight:700;text-align:left;cursor:pointer;}
 body > header.site-header-523 .account570-strip > .account569{display:none!important;}
 body > header.site-header-523 .account570-strip.diuk512-open > .account569{display:flex!important;position:fixed;top:calc(var(--diuk-mobile-overlay-top,64px) + 8px);right:14px;left:14px;max-width:380px;width:auto;margin:0 0 0 auto;z-index:60;flex-direction:column;align-items:stretch;gap:10px;padding:14px;border:1px solid var(--diuk-c-45647c,#45647c);border-radius:12px;background:var(--diuk-c-101e2d,#101e2d);box-shadow:0 10px 28px #0007;max-height:calc(100vh - var(--diuk-mobile-overlay-top,64px) - 20px);max-height:calc(100dvh - var(--diuk-mobile-overlay-top,64px) - 20px - env(safe-area-inset-bottom));overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;box-sizing:border-box;}
 body > header.site-header-523 .account570-strip .account569 > .btn,body > header.site-header-523 .account570-strip .account569 > .account569-profile{width:100%;justify-content:flex-start;box-sizing:border-box;min-height:44px;text-align:left;}
 body > header.site-header-523 .account570-strip .account569 > .account569-profile{order:1;}
 body > header.site-header-523 .account570-strip .account569 > .f582-notifications{order:2;}
 body > header.site-header-523 .account570-strip .account569 > .f560-mod-tools{order:3;}
 body > header.site-header-523 .account570-strip .account569 > .diuk512-signout{display:block!important;order:4;margin:0;padding:0;background:none;border:0;}
 body > header.site-header-523 .diuk512-signout .btn{width:100%;text-align:left;justify-content:flex-start;}
 body > header.site-header-523 .account570-strip .account569 .f582-notifications>summary,body > header.site-header-523 .account570-strip .account569 .f560-mod-tools>summary{width:100%;justify-content:flex-start;gap:9px;box-sizing:border-box;}
 body > header.site-header-523 .account570-strip .account569 .f582-notifications>summary .diuk512-mobile-label{display:inline!important;font-size:14px;font-weight:700;}
 body > header.site-header-523 .account570-strip .account569 .f582-notice-panel,body > header.site-header-523 .account570-strip .account569 .f560-mod-panel{position:static;width:100%;max-width:100%;margin-top:8px;box-shadow:none;box-sizing:border-box;}
 body > header.site-header-523 .account570-strip .account569 .diuk512-status{display:block!important;order:-1;font-size:14px;line-height:1.5;margin:0;}
 body > header.site-header-523 .account570-strip .account569 .diuk512-status strong{display:block;}
 body > header.site-header-523 .account570-strip .account569 .f582-count{right:8px;top:8px;}
}
@media(max-width:360px){body > header.site-header-523 > .nav{padding:8px;gap:6px;}body > header.site-header-523 .diuk512-account-toggle{padding:6px 7px;font-size:12px;}body > header.site-header-523 > .nav > .menu-toggle:not([hidden]){padding:6px 7px;font-size:12px;} }

.diuk512-contact-bell{display:none!important}@media(max-width:1100px){body > header.site-header-523 .account570-strip .account569 .diuk512-contact-bell{display:block!important;order:2;}}
/* Keep the mobile links closed on the first paint, before navigation.js initialises. */
@media(max-width:1100px){
 body > header.site-header-523 > .nav:has(> .menu-toggle[hidden]) > .navlinks{display:none!important;}
}

/* Reserve the mobile menu's space and suppress a full-menu flash on first paint. */
@media(max-width:1100px){
 body > header.site-header-523 > .nav > .menu-toggle[hidden]{grid-column:3;grid-row:1;display:inline-flex!important;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:8px 9px;white-space:nowrap;font-size:13px;}
 body > header.site-header-523 > .nav:has(> .menu-toggle[aria-expanded="false"]) > .navlinks{display:none!important;}
}
@media(max-width:360px){body > header.site-header-523 > .nav > .menu-toggle[hidden]{padding:6px 7px;font-size:12px;}}
/* Mark the active My Profile destination without highlighting Forum. */
body > header.site-header-523 .account569-profile[aria-current="page"] .account569-avatar,
body > header.site-header-523 .diuk512-account-toggle.diuk512-profile-active .account569-avatar {
 border-color:var(--diuk-c-38bdf8,#38bdf8);
 outline:2px solid var(--diuk-c-38bdf8,#38bdf8);
 outline-offset:2px;
}

/* V6.0.5: keep the sticky site header and logo visible while a mobile overlay freezes the page.
   The body is temporarily fixed at a negative scroll offset; pin the header to the
   viewport for the duration of that lock, then let it return to sticky positioning. */
html.diuk-mobile-overlay-open body > header.site-header-523 {
  position:fixed;
  top:0;
  right:0;
  left:0;
  width:100%;
  box-sizing:border-box;
}

/* V5.13.0: mobile navigation opens as a connected panel and locks page scroll. */
.diuk-mobile-overlay-backdrop[hidden] { display:none !important; }
.diuk-mobile-overlay-backdrop {
  appearance:none;
  position:fixed;
  top:var(--diuk-mobile-overlay-top,64px);
  right:0;
  bottom:0;
  left:0;
  z-index:39;
  display:block;
  width:100%;
  margin:0;
  padding:0;
  border:0;
  border-radius:0;
  background:rgba(3,10,18,.52);
  opacity:0;
  cursor:default;
  transition:opacity .16s ease;
  -webkit-tap-highlight-color:transparent;
}
.diuk-mobile-overlay-backdrop.is-visible { opacity:1; }
@media(max-width:1100px){
  body > header.site-header-523 > .nav > .navlinks:not([hidden]) {
    position:fixed !important;
    top:var(--diuk-mobile-overlay-top,64px);
    right:0;
    left:0;
    z-index:42;
    display:grid !important;
    grid-template-columns:minmax(0,1fr);
    grid-auto-rows:minmax(44px,auto);
    gap:7px;
    width:100%;
    max-height:calc(100vh - var(--diuk-mobile-overlay-top,64px));
    max-height:calc(100dvh - var(--diuk-mobile-overlay-top,64px) - env(safe-area-inset-bottom));
    margin:0;
    padding:12px 14px max(16px,env(safe-area-inset-bottom));
    overflow-x:hidden;
    overflow-y:auto;
    overscroll-behavior-y:contain;
    -webkit-overflow-scrolling:touch;
    touch-action:pan-y;
    box-sizing:border-box;
    border:0;
    border-top:1px solid var(--diuk-c-29445f,#29445f);
    border-bottom:1px solid var(--diuk-c-29445f,#29445f);
    border-radius:0 0 16px 16px;
    background:var(--diuk-c-081522,#081522);
    box-shadow:0 18px 32px rgba(0,0,0,.32);
  }
  body > header.site-header-523 > .nav > .navlinks:not([hidden]) > a,
  body > header.site-header-523 > .nav > .navlinks:not([hidden]) > button {
    width:100%;
    min-height:46px;
    height:auto;
    margin:0;
    padding:11px 13px;
    border:1px solid var(--diuk-c-29445f,#29445f);
    border-radius:9px;
    background:var(--diuk-c-102237,#102237);
    box-sizing:border-box;
    text-align:left;
  }
  body > header.site-header-523 > .nav > .navlinks:not([hidden]) > a[aria-current="page"] {
    border-color:var(--diuk-c-38bdf8,#38bdf8);
    background:var(--diuk-c-142638,#142638);
  }
  body > header.site-header-523 > .nav > .navlinks:not([hidden]) > .diuk512-menu-account {
    margin-top:4px;
  }
}
@media(prefers-reduced-motion:reduce){.diuk-mobile-overlay-backdrop{transition:none;}}


/* V5.14.0: keep the moderator tools disclosure inside the mobile account panel.
   The desktop popover positioning must not leak into the fixed mobile overlay. */
@media(max-width:1100px){
 body > header.site-header-523 .account570-strip.diuk512-open > .account569 .f560-mod-tools{
  display:block!important;position:relative!important;flex:0 0 auto!important;width:100%!important;min-width:0!important;max-width:100%!important;margin:0!important;
 }
 body > header.site-header-523 .account570-strip.diuk512-open > .account569 .f560-mod-tools>summary{
  display:flex!important;width:100%!important;min-height:46px!important;box-sizing:border-box!important;
 }
 body > header.site-header-523 .account570-strip.diuk512-open > .account569 .f560-mod-tools>.f560-mod-panel{
  display:block!important;position:static!important;inset:auto!important;float:none!important;
  width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;
  margin:8px 0 0!important;padding:12px!important;box-sizing:border-box!important;
  overflow:visible!important;transform:none!important;
  border:1px solid var(--diuk-c-45647c,#45647c)!important;border-radius:10px!important;
  background:var(--diuk-c-101e2d,#101e2d)!important;box-shadow:none!important;
 }
 body > header.site-header-523 .account570-strip.diuk512-open > .account569 .f560-mod-tools>.f560-mod-panel>*{
  max-width:100%;box-sizing:border-box;
 }
 body > header.site-header-523 .account570-strip.diuk512-open > .account569{
  height:auto!important;min-height:0!important;align-items:stretch!important;align-content:flex-start!important;
 }
}

/* V6.0.7: mobile moderator shortcuts must not participate in desktop header sizing.
   The shared public header emits this list for the compact account panel. On desktop
   it was being displayed as unstyled inline links, expanding the account grid column
   and forcing the main navigation into a narrow vertical stack. */
@media (min-width:1101px) {
  body > header.site-header-523 .account570-strip .account569 .diuk512-mobile-mod-actions {
    display:none !important;
  }
}
