/* One recognisable site switch in every page header, including small screens. */
nav.wise-site-switch{display:inline-flex;gap:0;align-items:stretch;justify-self:end;flex-shrink:0;width:max-content;max-width:100%;border:2px solid #647b65;border-radius:999px;overflow:hidden;background:#fff;box-sizing:border-box;isolation:isolate}
nav.wise-site-switch>a.ws-option{display:flex;align-items:center;justify-content:center;min-height:44px;min-width:0;padding:10px 17px;font:750 13px/1.2 Inter,system-ui,sans-serif;text-align:center;white-space:nowrap;text-decoration:none;border:0;border-radius:0;box-sizing:border-box;letter-spacing:0}
nav.wise-site-switch>a.ws-epilepsywise{background:#f6f1fa;color:#6b4e87}
nav.wise-site-switch>a.ws-levwise{background:#f2f8ee;color:#315e41}
nav.wise-site-switch>a.ws-epilepsywise[aria-current]{background:#e9dff3;color:#59416f;box-shadow:inset 0 -3px #84649d}
nav.wise-site-switch>a.ws-levwise[aria-current]{background:#dcebd4;color:#315e41;box-shadow:inset 0 -3px #6b8c5d}
nav.wise-site-switch>a.ws-option:hover{filter:brightness(.96)}
nav.wise-site-switch>a.ws-option:focus-visible{outline:3px solid #70518e;outline-offset:-5px}
header.wise-switch-header{position:sticky!important;top:0;z-index:60;background:#fcfdf9;box-shadow:0 2px 12px #34563e08}
.wp-shell-header.wise-switch-header{display:grid;grid-template-columns:minmax(200px,1fr) auto;gap:14px 22px;align-items:center;max-width:none;padding:16px max(22px,calc((100vw - 1160px)/2));box-sizing:border-box}
.wp-shell-header.wise-switch-header>.wp-brand{grid-column:1;grid-row:1;min-width:0}
.wp-shell-header.wise-switch-header>.wise-site-switch{grid-column:2;grid-row:1}
.wp-shell-header.wise-switch-header>nav:not(.wise-site-switch){grid-column:1/-1;grid-row:2;justify-content:center;max-width:none;gap:12px 24px}
header.wise-switch-header:not(.wp-shell-header):not(.site-header):not(.topbar){display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px 22px;align-items:center;max-width:none;margin:0;padding:16px max(22px,calc((100vw - 1160px)/2));box-sizing:border-box}
header.wise-switch-header:not(.wp-shell-header):not(.site-header):not(.topbar)>a:first-child{grid-column:1;grid-row:1}
header.wise-switch-header:not(.wp-shell-header):not(.site-header):not(.topbar)>.wise-site-switch{grid-column:2;grid-row:1}
header.wise-switch-header:not(.wp-shell-header):not(.site-header):not(.topbar)>nav:not(.wise-site-switch){grid-column:1/-1;grid-row:2;justify-content:center;flex-wrap:wrap}
.wise-switch-standalone{position:sticky;top:0;z-index:60;display:flex;justify-content:flex-end;padding:12px 24px;background:#f8fbf7;border-bottom:1px solid #cedfce}
@media(max-width:767px){
 nav.wise-site-switch>a.ws-option{font-size:12px;padding:10px 16px}
 .wp-shell-header.wise-switch-header{grid-template-columns:minmax(0,1fr);padding:14px 18px;gap:12px}
 .wp-shell-header.wise-switch-header>.wp-brand{grid-column:1;grid-row:1}
 .wp-shell-header.wise-switch-header>.wise-site-switch{grid-column:1;grid-row:2;justify-self:end}
 .wp-shell-header.wise-switch-header>nav:not(.wise-site-switch){grid-column:1;grid-row:3;font-size:11px;gap:8px 15px}
 header.wise-switch-header:not(.wp-shell-header):not(.site-header):not(.topbar){grid-template-columns:minmax(0,1fr);padding:14px 18px;gap:12px}
 header.wise-switch-header:not(.wp-shell-header):not(.site-header):not(.topbar)>.wise-site-switch{grid-column:1;grid-row:2}
 header.wise-switch-header:not(.wp-shell-header):not(.site-header):not(.topbar)>nav:not(.wise-site-switch){grid-column:1;grid-row:3;gap:10px 16px}
 .wise-switch-standalone{padding:10px 16px}
}
@media print{.wise-site-switch,.wise-switch-standalone{display:none!important}header.wise-switch-header{position:static!important}}

html{scroll-padding-top:var(--wise-header-offset,180px);scroll-padding-bottom:100px}.guide-section,[id^="topic-"],[id^="guide-firstaid-"]{scroll-margin-top:var(--wise-header-offset,180px)}.clinical-review-notice{margin:20px auto;padding:14px;max-width:1050px;background:#fff8e8;border:1px solid #a58a51;color:#45371b;font:14px/1.6 system-ui}.clinical-review-notice p{margin:6px 0}.clinical-review-notice a{color:#315e41}
@media(max-width:600px){.wp-shell-header.wise-switch-header{padding:8px 12px;gap:6px}.wp-shell-header.wise-switch-header>.wise-site-switch{justify-self:start}.wp-shell-header.wise-switch-header>nav:not(.wise-site-switch){display:flex;grid-row:1;grid-column:1;justify-content:flex-end;margin-left:auto}.wp-shell-header.wise-switch-header>nav:not(.wise-site-switch)>a:not([href*="epiosos"]){display:none}.wp-shell-header .wp-brand{font-size:20px}.wp-shell-header .wp-brand img{width:28px}.wp-shell-header .wp-brand small{font-size:10px}.wp-shell-header>nav a{min-height:44px;display:inline-flex;align-items:center;max-width:105px;text-align:center;font-size:11px}.wp-bottom{gap:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));padding:5px 4px max(5px,env(safe-area-inset-bottom));min-height:64px}.wp-bottom>a{min-height:48px}.wp-bottom>a:nth-child(3),.wp-bottom>a:nth-child(5){display:none}}

/* Header clearance is applied once: root scroll padding plus a small target gap. */
.guide-section,[id^="topic-"],[id^="guide-firstaid-"]{scroll-margin-top:16px}

/* Compact reciprocal project button; visible without opening a menu. */
.wise-header-links{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:10px;min-width:0;max-width:100%;justify-self:end}
header.wise-switch-header>.wise-header-links{grid-column:2;grid-row:1}
a.wise-ocean-link{display:inline-flex!important;align-items:center;justify-content:center;gap:7px;min-height:44px;max-width:none!important;padding:10px 12px;border:1px solid #5b21b6;border-radius:6px;background:#5b21b6;color:#fff!important;font:750 13.6px/1.4 Inter,system-ui,sans-serif;white-space:nowrap;text-decoration:none!important;flex-shrink:0;box-sizing:border-box;transition:background .15s,border-color .15s}
a.wise-ocean-link:hover{background:#4c1d95;border-color:#4c1d95}
a.wise-ocean-link:focus-visible{outline:3px solid #d97706!important;outline-offset:3px!important}
a.wise-ocean-link svg{flex-shrink:0}
@media(max-width:767px){header.wise-switch-header>.wise-header-links,.levwise-header-main>.wise-header-links{grid-column:1/-1;grid-row:2;justify-self:start;justify-content:flex-start}}
@media(max-width:400px){.wise-header-links{gap:8px}.wise-header-links nav.wise-site-switch>a.ws-option{font-size:11px;padding:8px 9px}a.wise-ocean-link{font-size:12px;padding:9px}}
@media print{.wise-ocean-link{display:none!important}}

/* Ocean Project occupies its own upper-right position, apart from the site switch. */
header.wise-switch-header.wise-switch-header{display:grid;grid-template-columns:minmax(200px,1fr) auto minmax(140px,1fr);align-items:center}
header.wise-switch-header.wise-switch-header>.wise-header-links{grid-column:2;grid-row:1;justify-self:center}
header.wise-switch-header.wise-switch-header>a.wise-ocean-link{grid-column:3;grid-row:1;justify-self:end}
header.wise-switch-header.wise-switch-header>nav:not(.wise-site-switch){grid-column:1/-1;grid-row:2}
.levwise-header-main,.levwise-header-compact .levwise-header-main{grid-template-columns:minmax(230px,1fr) auto auto auto}
.levwise-header-main>.levwise-brand{grid-column:1;grid-row:1}
.levwise-header-main>.wise-header-links{grid-column:2;grid-row:1;justify-self:center}
.levwise-header-main>.levwise-sos{grid-column:3;grid-row:1}
.levwise-header-main>a.wise-ocean-link{grid-column:4;grid-row:1;justify-self:end}
@media(max-width:767px){
 header.wise-switch-header.wise-switch-header{grid-template-columns:minmax(0,1fr) auto}
 header.wise-switch-header.wise-switch-header>.wise-header-links{grid-column:1;grid-row:2;justify-self:start}
 header.wise-switch-header.wise-switch-header>a.wise-ocean-link{grid-column:2;grid-row:1}
 header.wise-switch-header.wise-switch-header>nav:not(.wise-site-switch){grid-column:1/-1;grid-row:3}
 .levwise-header-main{grid-template-columns:minmax(0,1fr) auto auto}
 .levwise-header-compact .levwise-header-main{grid-template-columns:minmax(0,1fr) auto}
 .levwise-header-main>.wise-header-links{grid-column:1;grid-row:2;justify-self:start}
 .levwise-header-main>a.wise-ocean-link{grid-column:2/-1;grid-row:1}
 .levwise-header-main>.levwise-sos{grid-column:2;grid-row:2}
 .levwise-header-main>.levwise-menu-button{grid-column:3;grid-row:2}
}
@media(max-width:600px){
 .wp-shell-header.wise-switch-header.wise-switch-header>nav:not(.wise-site-switch){grid-column:2;grid-row:2}
 header.wise-switch-header.wise-switch-header>a.wise-ocean-link{font-size:12px;padding:9px}
}

/* SOS is a direct header link with a consistent red emergency identity. */
a.wise-sos-link{display:inline-flex!important;align-items:center;justify-content:center;min-width:48px;min-height:46px;padding:10px;border:1px solid #991b1b;border-radius:11px;background:#b91c1c;color:#fff!important;font:850 13px/1 system-ui,sans-serif;text-decoration:none!important;box-sizing:border-box;white-space:nowrap}
a.wise-sos-link:hover{background:#991b1b}
a.wise-sos-link:focus-visible{outline:3px solid #d97706;outline-offset:3px}
header.wise-switch-header.wise-switch-header{grid-template-columns:minmax(0,1fr) auto auto auto}
header.wise-switch-header.wise-switch-header>a.wise-sos-link{grid-column:3;grid-row:1;justify-self:end}
header.wise-switch-header.wise-switch-header>a.wise-ocean-link{grid-column:4}
@media(max-width:767px){
 header.wise-switch-header.wise-switch-header{grid-template-columns:minmax(0,1fr) auto}
 header.wise-switch-header.wise-switch-header>a.wise-ocean-link{grid-column:2;grid-row:1}
 header.wise-switch-header.wise-switch-header>a.wise-sos-link{grid-column:2;grid-row:2}
 .wp-shell-header.wise-switch-header.wise-switch-header>nav:not(.wise-site-switch){grid-column:1/-1;grid-row:3}
}
@media print{.wise-sos-link{display:none!important}}
