/* The site's one top menu: the fixed glass pill on the homepage, Data,
   Human Preferences and Open Source. Markup comes from
   src/components/MarketingNav.tsx (rendered into the static shells by
   `npm run build:footer`); behaviour is /basis-nav.js.
   Self-contained on purpose: no page tokens, so it looks the same on every
   page whatever that page's own stylesheet defines.
   ⚠️ Colour rules are written `.bn-wrap .x`, not `.x`: host pages carry
   `.page a { color: inherit }` rules that out-rank a single class (the first
   build shipped a dark button with invisible dark text). */
.bn-wrap { position: fixed; top: 22px; left: 50%; z-index: 50; width: min(1232px, 92vw); transform: translateX(-50%); font-family: var(--font-archivo, "Archivo"), "Helvetica Neue", sans-serif; line-height: normal; -webkit-font-smoothing: antialiased; }
.bn-wrap *, .bn-wrap *::before, .bn-wrap *::after { box-sizing: border-box; }
.bn-wrap a { text-decoration: none; border-bottom: 0; }
.bn { display: flex; align-items: center; gap: 4px; padding: 9px 9px 9px 22px; border-radius: 999px; background: rgba(255,255,255,.75); -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%); border: 1px solid rgba(23,67,94,.12); box-shadow: 0 8px 32px rgba(23,67,94,.2), inset 0 1px 1px rgba(255,255,255,.6); transition: background .3s ease, border-color .3s ease; }
.bn-wrap .bn-brand { display: flex; align-items: center; margin-right: 18px; color: #17435e; transition: color .3s ease; }
.bn-links { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.bn-wrap .bn-link { padding: 10px 14px; border-radius: 999px; font-size: 15px; font-weight: 500; color: #17435e; white-space: nowrap; transition: color .3s ease, background .25s ease; }
.bn-link:hover, .bn-burger:hover, .bn-theme:hover { background: rgba(23,67,94,.07); }
/* The page you are on. A tint only: a heavier weight widens the word and
   moves every link after it by a couple of pixels from page to page. */
.bn-link[aria-current="page"] { background: rgba(23,67,94,.11); }
.bn-gap { flex: 1; }
.bn-theme { -webkit-appearance: none; appearance: none; display: grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #17435e; cursor: var(--basis-cursor-pointer, pointer); transition: color .3s ease, background .25s ease; }
.bn-theme svg { display: block; }
.bn-theme .t-sun, [data-theme="dark"] .bn-theme .t-moon { display: none; }
[data-theme="dark"] .bn-theme .t-sun { display: block; }
.bn-wrap .bn-cta { display: inline-flex; align-items: center; height: 44px; margin-left: 6px; padding: 0 20px; border-radius: 999px; background: #0f3557; color: #fff; font-size: 15px; font-weight: 600; white-space: nowrap; box-shadow: 0 4px 14px rgba(18,41,58,.25); transition: color .3s ease, background .3s ease; }
.bn-burger { display: none; -webkit-appearance: none; appearance: none; flex: none; width: 40px; height: 40px; padding: 0; place-items: center; border: 0; border-radius: 999px; background: transparent; color: #17435e; cursor: var(--basis-cursor-pointer, pointer); transition: color .3s ease, background .25s ease; }
.bn-wrap[data-open] .bn-burger-open, .bn-wrap:not([data-open]) .bn-burger-close { display: none; }
.bn-wrap :is(a, button):focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.bn-menu { display: none; position: absolute; top: calc(100% + 10px); left: 0; right: 0; flex-direction: column; gap: 2px; padding: 12px; border-radius: 26px; background: rgba(255,255,255,.94); -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%); border: 1px solid rgba(255,255,255,.75); box-shadow: 0 18px 48px rgba(23,67,94,.25); }
.bn-wrap .bn-menu a { display: block; padding: 14px 16px; border-radius: 16px; font-size: 1.05rem; font-weight: 600; color: #17435e; }
.bn-menu a[aria-current="page"] { background: rgba(23,67,94,.08); }
.bn-wrap .bn-menu a.bn-menu-cta { margin-top: 8px; border-radius: 999px; background: #17435e; color: #fff; text-align: center; }

/* Over a dark block (a page's `data-nav="dark"`, e.g. the footer) the pill
   turns to white-on-glass. /basis-nav.js sets data-tone. */
.bn[data-tone="dark"] { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.45); }
.bn[data-tone="dark"] :is(.bn-brand, .bn-link, .bn-burger, .bn-theme) { color: #fff; }
.bn[data-tone="dark"] :is(.bn-link, .bn-burger, .bn-theme):hover, .bn[data-tone="dark"] .bn-link[aria-current="page"] { background: rgba(255,255,255,.22); }
.bn[data-tone="dark"] .bn-cta { background: rgba(255,255,255,.92); color: #0f3557; }
/* The white mark is the colour master through a filter, not a second file:
   the one image is already loaded (the menu preloads it), so the logo is whole
   in the page's first frame in dark too, with no script. */
[data-theme="dark"] .bn .basis-logo-mark, .bn[data-tone="dark"] .basis-logo-mark { filter: brightness(0) invert(1); }

[data-theme="dark"] .bn { background: rgba(18,34,48,.82); border-color: rgba(255,255,255,.16); box-shadow: 0 8px 32px rgba(0,0,0,.35), inset 0 1px 1px rgba(255,255,255,.1); }
[data-theme="dark"] .bn :is(.bn-brand, .bn-link, .bn-burger, .bn-theme) { color: #fff; }
[data-theme="dark"] .bn :is(.bn-link, .bn-burger, .bn-theme):hover, [data-theme="dark"] .bn .bn-link[aria-current="page"] { background: rgba(255,255,255,.12); }
[data-theme="dark"] .bn .bn-cta { background: rgba(255,255,255,.92); color: #0f3557; }
[data-theme="dark"] .bn-menu { background: rgba(18,34,48,.96); border-color: rgba(207,232,250,.22); box-shadow: 0 18px 48px rgba(0,0,0,.45); }
[data-theme="dark"] .bn-menu a { color: #e9f1f7; }
[data-theme="dark"] .bn-menu a[aria-current="page"] { background: rgba(255,255,255,.1); }
[data-theme="dark"] .bn-menu a.bn-menu-cta { background: #dceefa; color: #0b1b26; }

/* The four links, the switch, Log in and the button need about 940px. Below
   that the links fold into the burger; the switch stays beside it. */
@media (max-width: 940px) {
  .bn { padding: 9px 9px 9px 20px; }
  .bn-links > .bn-link, .bn-links > .bn-cta { display: none; }
  .bn-burger { display: grid; }
  .bn-wrap[data-open] .bn-menu { display: flex; }
}
@media (max-width: 640px) { .bn-wrap { top: 14px; } }

/* Moving between pages (owner, 2026-11-17: switching Home / Data / Human
   Preferences "has a flickering moment"). Each is its own document, so the
   browser holds the old page, then cross-fades to the new one's first frame
   while the menu stays where it is. Browsers without cross-document view
   transitions simply cut, as before.
   ⚠️ The name is on .bn, not .bn-wrap: .bn owns the backdrop blur, which the
   browser carries onto the named layer. Named on the wrapper, the pill loses
   its blur for the length of the fade.
   ⚠️ The fade lands on the new page's FIRST frame, so whatever the menu needs
   must be there by then: the logo images are preloaded by the menu's markup. */
@view-transition { navigation: auto; }
.bn { view-transition-name: basis-nav; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .24s; animation-timing-function: ease; }
::view-transition-group(basis-nav) { animation-duration: .24s; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
@media (prefers-reduced-motion: reduce) { .bn, .bn * { transition: none !important; } }
