/* Shared header presentation. Variant B is isolated from legacy page skins. */
.brand-letter { display:inline-block; font:inherit; color:inherit; transform-origin:50% 85%; }
#account-header .brand strong:has(.brand-letter) { display:inline-block; overflow:clip; vertical-align:middle; padding-block:.12em; margin-block:-.12em; }
html body #account-header.app-header {
  position:relative; inset:auto; z-index:30; display:block; width:100%; max-width:none;
  min-height:0; height:auto; margin:0; padding:0; border:0; border-radius:0;
  box-sizing:border-box; color:#fffaf2; background:linear-gradient(110deg,#081726,#0e2438);
  box-shadow:0 6px 24px #142b4209; font-family:'Segoe UI',system-ui,sans-serif;
}
html body #account-header.app-header .app-header-inner {
  position:relative; display:grid; grid-template-columns:minmax(0,1fr) auto;
  align-items:center; gap:6px 12px; max-width:1152px; margin:auto; padding:8px 16px 6px; box-sizing:border-box;
}
html body #account-header.app-header .brand {
  grid-column:1; grid-row:1; display:inline-flex; align-items:center; gap:8px;
  min-height:44px; min-width:0; width:max-content; max-width:100%; margin:0; padding:0;
  color:#fffaf2; text-decoration:none; border:0; background:none; box-shadow:none;
}
html body #account-header.app-header .brand-mark {display:block;width:30px;height:30px;flex:0 0 30px;margin:0;object-fit:contain}
html body #account-header.app-header .brand-copy {display:block}
html body #account-header.app-header .brand strong {font:800 22px/1 'Segoe UI',system-ui,sans-serif;letter-spacing:-.8px;color:inherit;white-space:nowrap;text-shadow:none}
html body #account-header.app-header .brand-copy small {display:none}
html body #account-header.app-header .topbar-nav {
  grid-column:1/-1; grid-row:2; display:grid!important; grid-template-columns:repeat(3,minmax(0,1fr));
  align-items:stretch; gap:6px; width:auto!important; max-width:none; min-width:0; margin:0; padding:2px;
  border:1px solid #ffffff0d; border-radius:13px; background:#ffffff06; overflow:visible;
}
html body #account-header.app-header :where(.topbar-nav>a,.topbar-nav>button,.account-menu-trigger,.account-login) {
  display:inline-flex; align-items:center; justify-content:center; gap:7px; flex:none;
  width:auto; min-width:44px; max-width:100%; min-height:44px; height:auto; margin:0; padding:9px 7px;
  border:0; border-radius:10px; background:none; box-shadow:none; color:inherit;
  font:600 14px/1.3 'Segoe UI',system-ui,sans-serif; text-decoration:none; letter-spacing:normal;
  text-transform:none; white-space:nowrap; overflow-wrap:normal; text-shadow:none; cursor:pointer;
}
html body #account-header.app-header :is(a,button)::before,
html body #account-header.app-header :is(a,button)::after {content:none}
html body #account-header.app-header :is(a,button)>span {
  display:inline; padding:0; border:0; border-radius:0; box-shadow:none; background:none;
  min-height:0; font:inherit; color:inherit; letter-spacing:inherit;
}
html body #account-header.app-header :is(a,button)>span::before {content:none}
html body #account-header.app-header .account-nav-compact {display:none}
html body #account-header.app-header :is(a,button):has(>.app-nav-ink) {position:relative}
html body #account-header.app-header .app-nav-ink {
  position:absolute;left:calc(50% - 8px);bottom:3px;width:16px;height:2px;
  border-radius:2px;background:#ffc674;transform-origin:left center;pointer-events:none;
}
@media(forced-colors:active) {
  html body #account-header.app-header .app-nav-ink {background:Highlight;forced-color-adjust:none}
}
html body #account-header.app-header svg {display:block;width:20px;height:20px;flex:0 0 20px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
html body #account-header.app-header .topbar-nav> :is(a,button) svg,
html body #account-header.app-header .account-menu-trigger>svg {width:18px;height:18px;flex-basis:18px}
html body #account-header.app-header .topbar-nav> [aria-current=page],
html body #account-header.app-header .account-menu-trigger.is-current,
html body #account-header.app-header .account-menu-trigger[aria-expanded=true] {background:#21384b;color:#ffe3bc;box-shadow:inset 0 0 0 1px #ffb04a2e}
html body #account-header.app-header .topbar-nav> [aria-current=page] svg,
html body #account-header.app-header .account-menu-trigger.is-current>svg {color:#ffab53}
html body #account-header.app-header .account-tools {display:contents}
html body #account-header.app-header .account-wallet,
html body #account-header.app-header .account-login {
  grid-column:2; grid-row:1; justify-self:end; display:inline-flex; align-items:center; gap:7px;
  min-height:44px; min-width:0; max-width:100%; margin:0; padding:8px 10px; box-sizing:border-box;
  border:1px solid #ffe19a26; border-radius:11px; background:#ffe19a0b; color:#ffe19a;
  font:650 13px/1.25 'Segoe UI',system-ui,sans-serif; text-decoration:none; white-space:nowrap; box-shadow:none;
}
html body #account-header.app-header .account-wallet svg {width:18px;height:18px;flex-basis:18px}
html body #account-header.app-header .account-wallet .account-wallet__copy {display:block;min-width:0;white-space:normal}
html body #account-header.app-header .account-wallet__copy small {display:block;font-size:10px;font-weight:500;color:#e5cc91;line-height:1.2;letter-spacing:.02em}
html body #account-header.app-header .account-wallet__copy strong {font:700 14px/1.25 'Segoe UI',system-ui,sans-serif;color:inherit;font-variant-numeric:tabular-nums;white-space:nowrap}
html body #account-header.app-header .account-login {border-color:#ffffff1e;background:#ffffff08;color:inherit;padding:8px 12px;font-size:13px;font-weight:600}
html body #account-header.app-header .account-login svg {width:18px;height:18px;flex-basis:18px}
html body #account-header.app-header .account-wallet[aria-current=page] {border-color:#ffe19a70}
html body #account-header.app-header .account-menu {min-width:0}
html body #account-header.app-header .account-menu-trigger {width:100%;font-weight:500}
html body #account-header.app-header .account-menu-trigger .account-chevron {width:12px;height:12px;flex-basis:12px}
html body #account-header.app-header .account-menu-panel {
  position:absolute; right:16px; top:calc(100% + 8px); z-index:1; width:270px; max-width:calc(100vw - 32px);
  padding:8px; box-sizing:border-box; background:#fffaf2; color:#102a42; border:1px solid #ded8cc;
  border-radius:16px; box-shadow:0 14px 40px #0a1d3033;
}
html body #account-header.app-header .account-menu-panel :is(a,button) {
  display:flex; align-items:center; justify-content:flex-start; gap:12px; text-align:left;
  width:100%; min-width:0; min-height:48px; height:auto; margin:0; padding:10px 12px; box-sizing:border-box;
  border:0; border-radius:9px; background:none; box-shadow:none; text-decoration:none;
  color:#102a42; font:500 14px/1.5 'Segoe UI',system-ui,sans-serif; letter-spacing:normal; cursor:pointer;
}
html body #account-header.app-header .account-menu-rule {border-top:1px solid #ded8cc;margin:5px}
html body #account-header.app-header .account-menu-panel .account-logout {color:#8e4137}
html body #account-header.app-header .account-logout-label {display:inline}
html body #account-header.app-header [hidden] {display:none!important}
/* Legacy skins suppress outlines; retain keyboard focus without marking headings. */
html body #account-header.app-header :is(a,button):focus-visible {outline:3px solid #ffcf45!important;outline-offset:3px;box-shadow:none!important}
@media(min-width:801px) {
  html body #account-header.app-header .app-header-inner {grid-template-columns:minmax(0,1fr) auto auto;gap:22px;padding:12px 16px}
  html body #account-header.app-header .brand-mark {width:34px;height:34px;flex-basis:34px}
  html body #account-header.app-header .brand strong {font-size:23px}
  html body #account-header.app-header .topbar-nav {grid-column:2;grid-row:1;display:flex!important;gap:4px;padding:0;border:0;background:none}
  html body #account-header.app-header :is(.topbar-nav>a,.topbar-nav>button,.account-menu-trigger) {padding-inline:15px}
  html body #account-header.app-header :is(.account-wallet,.account-login) {grid-column:3;font-size:14px}
  html body #account-header.app-header .account-menu-panel {right:170px}
}
@media(max-width:360px) {
  html body #account-header.app-header .app-header-inner {padding-inline:12px}
  html body #account-header.app-header .brand {gap:6px}
  html body #account-header.app-header .brand strong {font-size:20px}
  html body #account-header.app-header .brand-mark {width:26px;height:26px;flex-basis:26px}
  html body #account-header.app-header .account-wallet {padding:8px}
  html body #account-header.app-header .account-wallet__copy strong {font-size:13px}
  html body #account-header.app-header :is(.topbar-nav>a,.topbar-nav>button,.account-menu-trigger) {font-size:13px;gap:6px}
  html body #account-header.app-header .account-login {font-size:12px;padding-inline:10px}
}
/* Public documents and student links retain the simple logo + navigation row. */
html body #account-header.app-header:not([data-header-variant=b]) {padding:14px max(20px,calc((100% - 1120px)/2));display:flex;align-items:center;justify-content:space-between;gap:18px}
html body #account-header.app-header:not([data-header-variant=b]) .app-header-inner {display:contents}
html body #account-header.app-header:not([data-header-variant=b]) .topbar-nav {display:flex!important;flex-wrap:wrap;justify-content:flex-end;border:0;background:none;padding:0}
html body #account-header.app-header:not([data-header-variant=b]) .topbar-nav :is(a,button) {border:1px solid #ffffff24;padding:10px 14px}
html body #account-header.app-header:not([data-header-variant=b]) .topbar-nav .student-header-help {border:0;background:none;padding:0;font-weight:400}
@media(max-width:800px) {
  html body #account-header.app-header:not([data-header-variant=b]) {padding:7px 16px;flex-wrap:wrap;gap:0 10px}
  html body #account-header.app-header:not([data-header-variant=b]) .brand strong {font-size:20px}
  html body #account-header.app-header:not([data-header-variant=b]) .brand-mark {width:29px;height:29px;flex-basis:29px}
  html body #account-header.app-header:not([data-header-variant=b]) .topbar-nav .student-header-help {font-size:12px;gap:7px}
  html body #account-header.app-header:not([data-header-variant=b]) .topbar-nav .student-header-help svg {width:16px;height:16px;flex-basis:16px}
}
@media(hover:hover) and (pointer:fine) {
  html body #account-header.app-header :is(.topbar-nav>a,.topbar-nav>button,.account-menu-trigger,.account-login):hover {background:#ffffff12}
  html body #account-header.app-header .account-wallet:hover {background:#ffe19a16}
  html body #account-header.app-header .account-menu-panel :is(a,button):hover {background:#102a4208}
}
@media(prefers-reduced-motion:no-preference) {
  html body #account-header.app-header :is(a,button) {transition:background-color 160ms ease,border-color 160ms ease,box-shadow 160ms ease}
  html body #account-header.app-header .account-chevron { transition: rotate 310ms cubic-bezier(.22,.72,.18,1); }
  html body #account-header.app-header [aria-expanded=true] .account-chevron { rotate: 180deg; }
  html body #account-header.app-header .account-menu-panel:not([hidden]) {
    transform-origin: top right;
    animation: izi-menu-open 260ms cubic-bezier(.22,.72,.18,1);
  }
  @keyframes izi-menu-open {
    from { opacity: .84; translate: 0 -5px; scale: .985; }
    to { opacity: 1; translate: 0 0; scale: 1; }
  }
}
@media(prefers-reduced-motion:reduce) {
  html body #account-header.app-header :is(a,button) {transition:none;animation:none;transform:none}
}
