/* The shared site shell (header extras and the one footer), loaded by Astro pages and imported reference pages.
   Reference pages use --e- tokens; Astro pages use the unprefixed ones. Each rule reads the --e- token first. */
.site-foot,.nav,.e-nav{--sh-ink:var(--e-ink,var(--ink));--sh-muted:var(--e-muted,var(--muted));--sh-faint:var(--e-faint,var(--faint));--sh-rule:var(--e-rule,var(--rule));--sh-focus:var(--e-focus,var(--focus))}

/* Header: search link, language link, English marker */
.nav .nav-search,:root:root .e-nav .nav-search{display:inline-flex;align-items:center;gap:7px}
.nav-search svg{flex:none}
.nav .en-tag,.e-nav .en-tag{color:var(--sh-muted);font-size:.86em}
.shell-lang{display:inline-flex;gap:6px;align-items:center;font-size:inherit;color:var(--sh-muted)}
.shell-lang>span[aria-hidden]{opacity:.5}
.shell-lang .lang-current{color:var(--sh-ink);font-weight:650;text-decoration:underline;text-underline-offset:4px;text-decoration-thickness:1.5px}
:root:root .e-nav .shell-lang a,.nav .shell-lang a{color:var(--sh-muted);text-decoration:none;padding:0}
.shell-lang a::after{display:none}
.shell-lang a:hover{color:var(--sh-ink);text-decoration:underline;text-underline-offset:4px}
@media (min-width:901px){
  .nav-search span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .nav-search{padding-inline:2px}
}
/* Between the phone menu and a wide window the header holds nine items: tighten the spacing, not the words. */
@media (min-width:901px) and (max-width:1240px){
  .nav,:root:root .e-nav{gap:clamp(12px,1.35vw,18px);font-size:13.5px}
  .nav .meta,:root:root .e-nav .e-meta{gap:12px;padding-left:12px}
  .mast-in .wordmark img,:root:root .e-wordmark img{width:132px;height:auto}
}

/* Footer: who, then any number of link groups, then image credits across the full width */
.site-foot .sf-g{display:flex;flex-wrap:wrap;gap:32px clamp(24px,3vw,48px);align-items:flex-start}
.site-foot p{margin:0}
.site-foot .sf-who{flex:1.6 1 260px;max-width:380px;color:var(--sh-muted)}
.site-foot .sf-who img{height:20px;width:auto;margin-bottom:16px}
.site-foot .sf-who p+p{margin-top:6px}
.site-foot .sf-col{flex:1 1 150px;display:flex;flex-direction:column;gap:6px;align-items:flex-start}
.site-foot b{display:block;font-weight:500;color:var(--sh-ink);margin-bottom:6px}
.site-foot a{color:var(--sh-muted);text-decoration:none}
.site-foot a:hover{color:var(--sh-ink);text-decoration:underline;text-underline-offset:4px}
.site-foot a:focus-visible{outline:3px solid var(--sh-focus);outline-offset:4px;border-radius:2px}
.site-foot .sf-colophon{flex:1 1 100%;max-width:60rem;color:var(--sh-muted);border-top:1px solid var(--sh-rule);padding-top:20px}
.site-foot .sf-colophon p+p{margin-top:4px}
@media (max-width:640px){
  .site-foot .sf-who{flex-basis:100%;max-width:none}
  .site-foot .sf-col{flex:1 1 40%}
  .site-foot .sf-col a{padding-block:4px}
}
/* Wordmark in the footer follows the theme on both page families */
.site-foot .on-dark{display:none}
:root[data-theme="dark"] .site-foot .on-light{display:none}
:root[data-theme="dark"] .site-foot .on-dark{display:block}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .site-foot .on-light{display:none}
  :root:not([data-theme="light"]) .site-foot .on-dark{display:block}
}
.e-nav .nav-sep{background:var(--e-rule)}
.research-menu>summary .en-tag{margin-left:-5px}
:root:root .site-foot .sf-who p+p,:root:root .site-foot .sf-colophon p+p{margin-top:6px}
