/* Shared public/application header: compact disclosures, no reserved side rail. */
.header{position:relative;z-index:20;padding:0;background:#06111f;border-bottom:1px solid var(--line)}
.header--application{background:#183548}
.header-inner{width:min(100%,1440px);margin:auto;display:flex;align-items:center;gap:32px;padding:22px 32px;min-height:104px}
.header .brand{gap:12px}.header .brand img{width:52px;height:52px}.header .brand strong{font-weight:900;font-size:32px;letter-spacing:-.035em}.header .brand small{font-size:8px;letter-spacing:.15em}
.header .links{gap:24px;margin-left:auto}.header .links a{font-size:.875rem;font-weight:600;letter-spacing:.045em;text-transform:uppercase;padding:12px 0;white-space:nowrap}.header .links a:hover{color:var(--accent)}
.header-tools{display:flex;align-items:center;gap:12px;flex-shrink:0}.header-context{color:var(--muted);font-weight:600}
.language-selector{position:relative}.language-current,.account-menu>summary{display:flex;align-items:center;justify-content:center;gap:9px;min-height:46px;padding:8px 12px;list-style:none;cursor:pointer;color:var(--text);border:1px solid #ffffff40;border-radius:14px;background:linear-gradient(135deg,#173c531f,#06111f0a);transition:background .2s,border-color .2s,box-shadow .2s}
.language-current::-webkit-details-marker,.account-menu>summary::-webkit-details-marker{display:none}
.language-current::marker,.account-menu>summary::marker{content:''}
.language-current{font-size:.8125rem;font-weight:600;letter-spacing:.09em}.globe-glyph{width:21px;height:21px;flex-shrink:0}
.disclosure-arrow{width:6px;height:6px;flex-shrink:0;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg) translateY(-2px);transition:transform .2s;color:#bfeaff}
.language-selector[open] .disclosure-arrow,.account-menu[open]>summary .disclosure-arrow{transform:rotate(225deg) translate(-1px,-1px)}
.language-current:hover,.account-menu>summary:hover,.language-selector[open]>.language-current,.account-menu[open]>summary{border-color:#ffffff8c;background:#173c5373;box-shadow:0 3px 16px #0002}
.language-menu{position:absolute;right:0;top:calc(100% + 10px);min-width:100%;display:grid;gap:4px;padding:6px;border:1px solid #ffffff50;border-radius:14px;background:linear-gradient(145deg,#15394ff5,#061522fa);box-shadow:0 12px 32px #0005;backdrop-filter:blur(16px);z-index:43}
.language-menu a{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:8px 12px;color:var(--text);text-decoration:none;font-size:.8125rem;font-weight:600;letter-spacing:.09em;border:1px solid transparent;border-radius:9px}
.language-menu a:hover{background:#55c7ff1a}.language-menu a[aria-current]{border-color:#55c7ff66;background:#55c7ff18}.language-menu a[aria-current]::after{content:'✓';font-size:.75rem;color:var(--accent)}
.account-menu>summary{gap:8px}.account-label{font-size:.625rem;letter-spacing:.07em;text-transform:uppercase;max-width:86px;overflow-wrap:anywhere;line-height:1.2}
.account-glyph{display:block;width:23px;height:28px;position:relative;flex-shrink:0;color:inherit}
.account-glyph::before{content:'';position:absolute;width:10px;height:10px;left:6.5px;top:0;border:1.5px solid currentColor;border-radius:50%}
.account-glyph::after{content:'';position:absolute;width:22px;height:13px;left:.5px;bottom:0;border:1.5px solid currentColor;border-bottom:0;border-radius:14px 14px 0 0}
.is-authenticated .account-glyph{color:var(--accent)}
.account-drawer{position:fixed;right:12px;top:12px;bottom:12px;width:min(320px,calc(100vw - 48px));max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain;padding:28px 24px;color:#f5fbff;border:1px solid #ffffff66;border-radius:22px;background:linear-gradient(155deg,rgba(25,63,85,.97),rgba(7,26,43,.98) 60%,rgba(5,18,32,.98));backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);box-shadow:-12px 12px 48px #0005,inset 0 1px 0 #ffffff0d;z-index:41}
.account-menu[open] .account-drawer{animation:account-reveal .24s ease-out}
.drawer-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;padding-bottom:20px;border-bottom:1px solid #ffffff26;font-size:1.2rem;font-weight:600;overflow-wrap:anywhere}.drawer-heading strong{min-width:0}
.drawer-close{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:44px;height:44px;padding:0;border:1px solid #ffffff33;border-radius:50%;background:#ffffff05;color:inherit;font-size:1.8rem;line-height:1;cursor:pointer}.drawer-close:hover{background:#55c7ff1a;border-color:#ffffff80}
.account-drawer p{color:#c6d9e5;font-size:.9375rem;line-height:1.65;margin:24px 0}.account-drawer .ns-button{width:100%}.account-drawer form{margin-top:24px}
.drawer-links{display:grid;gap:6px;margin:20px 0}.drawer-links a{color:inherit;text-decoration:none;padding:12px;border:1px solid transparent;border-radius:10px}.drawer-links a:hover,.drawer-links a[aria-current]{background:#55c7ff14;border-color:#55c7ff40}
/* The hit area is 44px, while the visible closed tab is only 24px wide. */
.account-rail{position:fixed;right:0;top:50%;transform:translateY(-50%);width:44px;height:88px;z-index:42;border:0;background:transparent;color:#e9f7ff;cursor:pointer;padding:0;display:flex;align-items:center;justify-content:flex-end}
.account-rail::before{content:'';position:absolute;right:0;top:0;bottom:0;width:24px;border:1px solid #ffffff59;border-right:0;border-radius:16px 0 0 16px;background:linear-gradient(150deg,#173c5333,#06111f1a);backdrop-filter:blur(6px);transition:background .2s,border-color .2s}
.account-rail span{position:relative;width:24px;text-align:center;font-size:28px;line-height:1;font-weight:300}.account-rail:hover::before{background:#173c5380;border-color:#ffffffb3}
.account-menu[open]~.account-rail{right:calc(min(320px,100vw - 48px) + 11px)}
.account-menu[open]~.account-rail::before{background:linear-gradient(160deg,#193f55f7,#071a2bfa);border-color:#ffffff66}
@keyframes account-reveal{from{opacity:0;transform:translateX(18px)}to{opacity:1;transform:translateX(0)}}
@media(max-width:1100px){.header-inner{gap:16px;flex-wrap:wrap;padding:16px 24px}.header .links{order:3;width:100%;margin:0;justify-content:center}.header-tools{margin-left:auto}.header .links a{padding:6px 0}}
@media(max-width:540px){.header-inner{padding:12px 16px;gap:12px;min-height:112px}.header .brand img{width:36px;height:36px}.header .brand{gap:8px}.header .brand strong{font-size:26px}.header .brand small{display:none}.header-tools{gap:8px}.language-current,.account-menu>summary{padding:7px 9px;gap:6px;border-radius:12px}.account-menu>summary{display:grid;grid-template-columns:23px 6px;justify-items:center;row-gap:3px;min-width:56px}.account-label{grid-column:1/-1;grid-row:2;font-size:.52rem;max-width:66px}.account-menu>summary>.disclosure-arrow{grid-column:2;grid-row:1}.account-glyph{height:24px;width:21px}.account-glyph::before{width:9px;height:9px;left:6px}.account-glyph::after{width:21px;height:11px;left:0}.header .links{gap:16px;justify-content:flex-start;overflow-x:auto;flex-wrap:nowrap}.header .links a{font-size:.75rem}.account-drawer{padding:20px}.language-current{font-size:.75rem}.globe-glyph{width:19px;height:19px}}
@media(prefers-reduced-motion:reduce){.account-menu[open] .account-drawer{animation:none}.language-current,.account-menu>summary,.disclosure-arrow,.account-rail::before{transition:none}}
@media(forced-colors:active){.account-drawer,.language-menu,.account-rail::before{background:Canvas;border-color:CanvasText}.account-rail{color:ButtonText}}
@media print{.header{display:none}}

/* 661: shared portrait phone header; tablet/desktop rules unchanged. */
@media(max-width:767px), (max-width:1023px) and (max-height:500px) and (pointer:coarse){
 body .header .account-rail{display:none!important}
 .header-inner{padding:10px 12px;gap:10px;min-height:96px}
 .header .brand{gap:6px}
 .header .brand img{width:30px;height:30px}
 .header .brand strong{font-size:23px}
 .header .brand small{display:none}
 .header-tools{gap:6px}
 .header .language-current,.header .account-menu>summary{padding:6px 8px;border-radius:10px;box-sizing:border-box;min-height:44px}
 .account-menu{position:relative}
 .header .account-menu:not([open])>.account-drawer{display:none!important}
 body .header .drawer-close{padding:0;width:44px;height:44px;min-height:44px;border:1px solid #ffffff33;border-radius:50%;background:#ffffff05;color:inherit;font-size:1.8rem;line-height:1}
 .header :is(summary,button,a):focus-visible{outline:2px solid var(--accent,#55c7ff);outline-offset:3px}
 .header .account-menu[open] .account-drawer{animation:none}
 .header .account-menu>summary{display:grid;grid-template-columns:23px 6px;justify-items:center;gap:3px 6px;min-width:56px;min-height:46px}
 .header .account-label,.header .account-short-label{display:none!important}
 .header .account-menu>summary>.disclosure-arrow{grid-column:2;grid-row:1}
 .header .account-drawer{position:absolute;top:calc(100% + 8px);right:0;bottom:auto;width:min(320px,calc(100vw - 32px));max-height:min(65dvh,calc(100dvh - 160px));padding:14px;border-radius:14px;box-sizing:border-box;overflow-x:hidden;overflow-y:auto;animation:none}
 .header .drawer-heading{font-size:1.05rem;padding-bottom:8px;gap:8px}
 .header .account-drawer p{margin:8px 0;line-height:1.4}
 .header .drawer-links{gap:2px;margin:8px 0}
 .header .drawer-links a{min-height:44px;padding:8px;box-sizing:border-box}
 .header .account-drawer form{margin-top:12px}
 .header-inner,.header .links{min-width:0}
}

/* Public header polish 2026-10-25: scoped waves and responsive brand. */
.header--public{background-color:#06111f;background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201600%20120%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M0%2094%20Q250%2055%20530%2099%20T1100%2082%20T1600%2078%20V120%20H0Z%22%20fill%3D%22%23163e58%22%20opacity%3D%22.32%22%2F%3E%3Cpath%20d%3D%22M0%20111%20Q350%2078%20650%20109%20T1200%2091%20T1600%2099%22%20fill%3D%22none%22%20stroke%3D%22%2329769b%22%20stroke-opacity%3D%22.22%22%2F%3E%3C%2Fsvg%3E");background-size:100% 100%;background-repeat:no-repeat}
.header--public .brand{gap:12px}
.header--public .brand img{width:62px;height:62px;flex-shrink:0;object-fit:contain}
.header--public .brand strong{font-size:34px}
@media(min-width:1101px){.header--public .brand{position:relative;left:clamp(-56px,calc((1440px - 100vw)/2),0px)}}
@media(min-width:768px) and (max-width:1100px){.header--public .brand img{width:56px;height:56px}.header--public .brand strong{font-size:32px}}
@media(max-width:767px), (max-width:1023px) and (max-height:500px) and (pointer:coarse){.header--public .brand{gap:7px;left:auto}.header--public .brand img{width:36px;height:36px}.header--public .brand strong{font-size:24px}.header--public .brand small{display:none}}
@media(forced-colors:active){.header--public{background:Canvas}}
