/* Compact fixed navigation keeps its original space to avoid layout jumps. */
.header-space{height:var(--header)}.site-header{position:fixed;inset:0 0 auto;z-index:30;transition:height .2s,box-shadow .2s}.site-header .brand-compact{display:none}.site-header.is-compact{height:64px;box-shadow:0 5px 25px #0003}.site-header.is-compact .brand{width:44px;min-width:44px}.site-header.is-compact .brand-full{display:none}.site-header.is-compact .brand-compact{display:block;width:44px;height:44px;object-fit:contain}.site-header.is-compact nav{top:64px}.site-header nav.open{max-height:calc(100dvh - 85px);overflow-y:auto}.site-header.is-compact nav.open{max-height:calc(100dvh - 64px)}.back-to-top{position:fixed;right:24px;bottom:24px;z-index:25;width:48px;height:48px;padding:0;border:1px solid var(--gold);border-radius:50%;background:var(--surface);color:var(--gold);box-shadow:0 4px 20px #0003;font-size:25px;cursor:pointer}.back-to-top[hidden]{display:none}.back-to-top:hover{background:var(--sky)}html{scroll-padding-top:85px}body .rising-codex .codex-nav{top:64px}body .rising-codex section,body .codex-group{scroll-margin-top:150px}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@media(max-width:600px){.back-to-top{right:16px;bottom:16px}body .rising-codex section,body .codex-group{scroll-margin-top:190px}}@media(prefers-reduced-motion:reduce){.site-header{transition:none}html{scroll-behavior:auto}}

/* Compact account navigation; native disclosure remains usable without JS. */
.sidebar .account-menu{margin:0;padding:0;border:0;background:none}
.account-menu summary{display:flex;align-items:center;gap:12px;min-height:48px;cursor:pointer;list-style:none;color:var(--ink);font-weight:600}
.account-menu summary::-webkit-details-marker{display:none}
.account-menu summary::after{content:'';width:7px;height:7px;border-right:2px solid var(--gold);border-bottom:2px solid var(--gold);transform:rotate(45deg);flex-shrink:0;margin-left:auto}
.account-menu[open] summary::after{transform:rotate(225deg)}
.account-menu-current{font-size:13px;color:var(--muted);font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.account-menu-links{padding-top:14px}
@media(min-width:901px){.account-menu[open]>summary{display:none}.account-menu-links{padding-top:0}}
@media(max-width:900px){.workspace:has(.account-menu){gap:20px;padding-top:20px}.sidebar:has(.account-menu){padding:0;border:1px solid var(--line);border-radius:10px;background:var(--surface)}.account-menu summary{padding:10px 14px}.account-menu-links{padding:0 14px 14px}.account-menu-links nav{gap:4px}.account-menu-links nav a{padding:9px 10px;font-size:14px}}
.header-gold{display:flex;align-items:center;gap:9px;flex-shrink:0;padding:7px 12px;border:1px solid var(--gold-line);border-radius:10px;background:var(--page);color:var(--gold);text-decoration:none;min-height:44px}.header-gold>span:nth-child(2){display:grid;gap:1px}.header-gold strong{font-size:16px;line-height:1.2;font-variant-numeric:tabular-nums}.header-gold small{font-size:11px;line-height:1.2;color:var(--muted)}.gold-coin{font-size:23px}.gold-add{font-size:19px}.header-gold:hover,.header-gold:focus-visible{background:var(--sky);outline:2px solid var(--gold);outline-offset:2px}.site-header:has(.header-gold){gap:16px}@media(min-width:901px){.site-header:has(.header-gold) nav{gap:clamp(12px,1.3vw,25px)}.site-header:has(.header-gold) .brand{max-width:220px}}@media(max-width:600px){.site-header:has(.header-gold){gap:7px;padding-inline:10px}.site-header:has(.header-gold) .brand{width:40px;min-width:40px}.site-header:has(.header-gold) .brand-full{display:none}.site-header:has(.header-gold) .brand-compact{display:block;width:40px;height:40px}.header-gold{padding:6px 8px;gap:5px}.header-gold strong{font-size:14px}.header-gold .gold-coin,.header-gold .gold-add{display:none}.site-header:has(.header-gold) .menu-toggle{padding:8px;gap:5px}.site-header:has(.header-gold) .theme-picker summary{padding:8px;font-size:13px}}
/* One account destination per row, on desktop and mobile. */
.sidebar .account-menu-links nav{grid-template-columns:minmax(0,1fr)}.sidebar .account-menu-links a{display:flex;align-items:center;gap:12px;width:100%;box-sizing:border-box}.account-link-icon{width:21px;height:21px;flex:0 0 21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.account-menu-links a span{min-width:0}.sidebar .account-menu-links .signout{margin-top:12px}.account-menu-current{max-width:55%}
.site-header .theme-picker summary{width:40px;height:40px;min-height:40px;box-sizing:border-box;padding:8px;justify-content:center;gap:0}.site-header .theme-picker summary::after{display:none}.theme-button-icon{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.theme-button-icon circle{fill:currentColor;stroke:none}
/* Matching account controls in the desktop header. */
@media(min-width:901px){.site-header:has(.header-gold) .nav-account,.site-header .header-gold{box-sizing:border-box;width:120px;height:48px;min-height:48px;padding:6px 10px;justify-content:center;border:1px solid var(--gold);border-radius:8px;background:var(--page)}.site-header .header-gold{gap:6px}.site-header .header-gold strong{font-size:14px}}
.site-header .header-account-menu{position:relative;flex-shrink:0;margin:0;padding:0;border:0;background:none}.site-header .header-account-menu>summary{display:flex;align-items:center;justify-content:center;min-height:44px;list-style:none;cursor:pointer;font-size:16px;color:var(--ink)}.header-account-menu>summary::-webkit-details-marker{display:none}.header-account-menu>summary::after{display:none}.site-header .header-account-links{position:absolute;right:0;top:100%;width:260px;max-width:calc(100vw - 32px);padding:8px;border:1px solid var(--gold-line);border-radius:10px;background:var(--surface);box-shadow:0 12px 30px #0005;max-height:calc(100dvh - 100px);overflow-y:auto;z-index:45}.site-header .header-account-links a{display:flex;align-items:center;gap:12px;padding:10px 12px;min-height:44px;font-size:14px;white-space:normal;border-radius:6px;color:var(--muted)}.site-header .header-account-links a:hover,.site-header .header-account-links a:focus-visible,.site-header .header-account-links a[aria-current]{background:var(--sky);color:var(--gold)}.header-account-menu>summary:focus-visible{outline:2px solid var(--gold);outline-offset:3px}.site-header .header-account-links .header-account-signout{border-top:1px solid var(--line);border-radius:0;margin-top:5px;color:var(--gold)}@media(max-width:900px){.site-header .header-account-links{position:static;box-sizing:border-box;width:100%;max-width:none;max-height:none;margin-top:6px}.site-header .header-account-menu>summary{justify-content:flex-start;padding:8px 12px}}

/* Keep guest account actions together with matching button heights. */
.site-header:has(.nav-auth){--guest-action-gap:18px;gap:var(--guest-action-gap)}.site-header nav .nav-auth{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;gap:var(--guest-action-gap);flex-shrink:0}.site-header .nav-auth>a{box-sizing:border-box;height:48px;min-height:48px;justify-content:center;margin:0;flex-shrink:0}@media(max-width:600px){.site-header:has(.nav-auth){--guest-action-gap:9px}}
