/* Compact shared header; leaves all other styles untouched. */
.compact-header{display:flex;align-items:center;gap:24px;padding-block:10px;max-width:1440px}
.compact-header .mast{flex:0 0 auto;padding:0;margin:0;align-items:center}
.compact-header .brand img{width:180px;height:auto}
.compact-header nav.wrap{flex:1;min-width:0;max-width:none;margin:0;padding:0;gap:4px 14px;align-items:center}
.compact-header nav a{white-space:nowrap;font-size:14px}
.compact-header nav .navjoin{padding:7px 12px}
.compact-header nav .navactions{flex:0 0 auto;margin-inline-start:auto;gap:8px}
@media(max-width:850px){.compact-header{flex-wrap:wrap;gap:6px 16px}.compact-header .brand img{width:150px}.compact-header nav.wrap{flex:1 0 100%;gap:2px 14px}.compact-header nav .navactions{flex:1 1 auto}}
@media(max-width:480px){.compact-header nav.wrap{gap:2px 12px}.compact-header nav .navactions{flex:1 0 100%}}
.mh-status{color:#fff;background:#344c63;padding-block:6px 10px;font-size:13px;border-top:1px solid #ffffff35}.mh-status a{color:#ffeb3b}.mh-line{display:flex;flex-wrap:wrap;align-items:center;gap:4px 18px;margin:3px 0}.mh-line strong{font-size:14px}.mh-online{display:flex;flex-wrap:wrap;gap:3px 12px;line-height:1.5}.mh-status a:hover{text-decoration:underline}
/* Explicit scoped overrides for legacy site styles. */
header .compact-header nav a.mh-profile-button{background:#ffeb3b!important;color:#111!important;border-color:#ffeb3b!important}
header .compact-header nav a.mh-logout-button{background:#b91c1c!important;color:#fff!important;border-color:#b91c1c!important}
header .mh-status.wrap{box-sizing:border-box;width:100%;max-width:1440px;margin:0 auto;padding:4px 24px 12px;background:transparent;color:#fff;border:0}
header .mh-status .mh-line{display:flex!important;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:6px 20px;margin:4px 0;line-height:1.5}
header .mh-status .mh-line:empty{display:none!important}
header .mh-status .mh-line>*,header .mh-status .mh-online>a{display:inline-block;margin:0;white-space:normal}
header .mh-status a,header .mh-status a:visited{color:#ffeb3b!important;text-decoration:none}
header .mh-status a:hover{text-decoration:underline}
header .mh-status .mh-online{display:flex!important;flex-wrap:wrap;justify-content:flex-end;gap:6px 16px}
@media(max-width:850px){header .mh-status.wrap{padding-inline:16px}header .mh-status .mh-line,header .mh-status .mh-online{justify-content:flex-start}}
/* Compact two-row header */
header .compact-header{padding-block:6px;gap:18px}
header .mh-status.mh-neat{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;gap:8px 18px;padding:0 24px 8px;line-height:1.35}
.mh-neat .mh-left,.mh-neat .mh-right{display:flex;flex-direction:column;gap:3px;min-width:0;overflow-wrap:anywhere}
.mh-neat .mh-right{text-align:right;align-items:flex-end}
header .mh-neat .mh-online{gap:3px 12px;line-height:1.35;max-height:3em;overflow:auto}
header .compact-header nav a.mh-mail{position:relative;display:inline-flex;align-items:center;justify-content:center;color:#ffeb3b;padding:7px;min-width:40px;text-decoration:none}
.mh-mail-count{position:absolute;top:0;right:0;background:#b91c1c;color:white;border-radius:20px;padding:1px 5px;font-size:11px;font-weight:bold}.mh-mail[data-unread="0"] .mh-mail-count{display:none}
.mh-mail:not([data-unread="0"]) svg{animation:mh-mail-pulse 1.4s ease-in-out infinite}@keyframes mh-mail-pulse{50%{opacity:.35}}@media(prefers-reduced-motion:reduce){.mh-mail svg{animation:none!important}}
@media(max-width:850px){header .compact-header{gap:4px 12px}header .mh-status.mh-neat{padding-inline:16px;grid-template-columns:1fr 1fr}.mh-neat .mh-right{grid-column:2;grid-row:1}header .mh-neat .mh-online{justify-content:flex-end}}

/* Welcome and admin link above the navigation. */
header .compact-header .mh-nav-stack{flex:1;min-width:0;display:flex;flex-direction:column;gap:5px}
header .compact-header .mh-welcome{display:flex;align-items:center;flex-wrap:wrap;gap:4px 18px;color:#fff;font-size:13px;line-height:1.4}
header .compact-header .mh-welcome a,header .compact-header .mh-welcome a:visited{color:#ffeb3b;text-decoration:none}
header .compact-header .mh-welcome a:hover{text-decoration:underline}
header .compact-header .mh-nav-stack nav.wrap{flex:initial;width:100%;box-sizing:border-box}
@media(max-width:850px){header .compact-header .mh-nav-stack{flex:1 0 100%}}
/* Messenger: quiet blue when read, yellow when unread. */
header .compact-header nav a.mh-mail[data-unread="0"]{background:#344c63!important;color:#fff!important;border-color:#ffffff40!important;border-radius:6px}
header .compact-header nav a.mh-mail:not([data-unread="0"]){background:#ffeb3b!important;color:#344c63!important;border-color:#ffeb3b!important;border-radius:6px}

/* Unread-only envelope beside welcome name. */
header .compact-header .mh-welcome a.mh-mail{position:relative;display:inline-flex;align-items:center;justify-content:center;color:#ffeb3b;padding:4px 9px;margin-inline-start:-10px;min-width:32px;text-decoration:none}
header .compact-header .mh-welcome a.mh-mail[data-unread="0"]{display:none!important}
header .compact-header .mh-welcome .mh-mail-count{top:-3px;right:-3px}
