/* Shared shell and primitives. Loaded after each page's own sheet, so the
   shell's geometry and the readability floors win where they must. */
:root{--bar-h:96px}

/* the header sits on the same rail as .wrap, at every width */
.bar{padding-left:max(clamp(16px,4vw,44px),calc((100vw - min(1280px,92vw)) / 2)) !important;
  padding-right:max(clamp(16px,4vw,44px),calc((100vw - min(1280px,92vw)) / 2)) !important;
  background:linear-gradient(180deg,rgba(15,12,8,.985),rgba(15,12,8,.94) 72%,rgba(15,12,8,.86)) !important;
  border-bottom:1px solid rgba(233,185,95,.12)}
.bar nav.primary{margin-left:auto}
.bar nav.primary a[aria-current="page"]{color:var(--sand-hi);border-bottom-color:var(--sand)}

/* the sections menu */
.nav-toggle{display:grid;place-items:center;width:34px;height:34px;padding:0;
  background:none;border:1px solid var(--line);border-radius:1px;cursor:pointer;
  color:var(--paper-2);transition:border-color .2s,color .2s}
.nav-toggle:hover,.nav-toggle[aria-expanded="true"]{border-color:var(--sand);color:var(--sand)}
.nav-toggle .bars{display:flex;flex-direction:column;gap:4px}
.nav-toggle .bars i{display:block;width:15px;height:1px;background:currentColor}
.sections{position:absolute;top:100%;left:0;right:0;z-index:1;
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:2px 20px;
  padding:16px max(clamp(16px,4vw,44px),calc((100vw - min(1280px,92vw)) / 2)) 18px;
  background:var(--ink-2);border-bottom:1px solid var(--line);
  box-shadow:0 18px 34px -22px rgba(0,0,0,.9)}
.sections[hidden]{display:none}
.sections a{font-family:var(--mono);font-size:10.5px;letter-spacing:.18em;
  text-transform:uppercase;color:var(--paper-2);padding:7px 0 6px;
  border-bottom:1px solid transparent}
.sections a:hover{color:var(--sand-hi);border-bottom-color:var(--line)}
@media (max-width:760px){.sections{grid-template-columns:1fr 1fr;padding:12px 14px 14px}}

/* one footer on every page, on the same rail */
footer .footer-meta{display:flex;flex-wrap:wrap;gap:12px 26px;justify-content:space-between;
  align-items:baseline}
.footer-nav{display:flex;flex-wrap:wrap;gap:6px 18px}
.footer-nav a{font-family:var(--mono);font-size:10.5px;letter-spacing:.14em;
  text-transform:uppercase;color:var(--paper-2);border-bottom:1px solid transparent}
.footer-nav a:hover{color:var(--sand-hi);border-bottom-color:var(--line)}

/* focus is visible everywhere; pages that never set a ring get this one */
:focus-visible{outline:2px solid var(--sand);outline-offset:3px}

/* anchors clear the fixed bar */
section[id],article[id],[id^="claim-"],[id^="head-"]{scroll-margin-top:calc(var(--bar-h) + 12px)}

/* a readable measure, applied only where a page has not chosen one */
main p:not([class]),main li:not([class]),main dd{max-width:62ch}

/* the hero fits the fold at laptop height, and the lede is not justified */
.hero{padding-top:max(100px,11vh) !important}
.hero-title{font-size:clamp(44px,8vw,124px) !important}
.hero-sub{gap:10px}
.hero-lede{text-align:left;text-align-last:left}
.hero .stage{margin:clamp(6px,2vh,22px) auto}

/* the bar starts at the very top on every page, with one padding set */
.bar{padding-block:14px !important;min-height:0}
.flagline{top:0}
.bar .sub{white-space:nowrap;overflow:visible;max-width:none}
html body .bar{height:76px !important;padding-top:0 !important;padding-bottom:0 !important;
  align-items:center;box-sizing:border-box}

/* the close sits centred, and the page ends without a long fall */
.close{padding-top:clamp(40px,7vh,72px) !important;padding-bottom:clamp(28px,4.5vh,48px) !important;text-align:center}
footer{margin-top:0 !important}
