/* BarcaFeed shared navigation: one floating four-destination pill (Feed · Insights · Matches · Squad) shared by the Feed and Insights.
   Figma: surface/surface-page fill, 1px divider outline, fully rounded, 16px side padding, items = 20px icon over a 12px / 600 label, 8px 16px padding.
   Colours come from the shared Figma tokens (bf-tokens.css / the Feed build); the fallbacks are the dark Figma values. */
.bf-nav {
  --bf-nav-bg: var(--surface-page, #0a0a0a);
  --bf-nav-line: var(--divider, rgb(255 255 255 / .08));
  --bf-nav-muted: var(--text-muted, #a1a1a1);
  --bf-nav-text: var(--text, #ffffff);
  --bf-nav-gold: var(--bf-gold-ink, #fdc700);
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 45; transform: translateX(-50%);
  max-width: calc(100vw - 16px); box-sizing: border-box; overflow: clip;
  background: var(--bf-nav-bg); border: 1px solid var(--bf-nav-line); border-radius: 9999px;
  font-family: 'Sofia Sans', ui-sans-serif, system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}
.bf-nav ul { display: flex; margin: 0; padding: 0 clamp(4px, 2vw, 16px); list-style: none; }
.bf-nav li { min-width: 0; }
.bf-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 48px; padding: 8px clamp(10px, 3.6vw, 16px);
  color: var(--bf-nav-muted); text-decoration: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.bf-nav .bf-ico { flex: none; }
.bf-nav .bf-lbl { font-size: .75rem; line-height: 1rem; font-weight: 600; white-space: nowrap; }
.bf-nav a:focus-visible { outline: 2px solid var(--bf-nav-gold); outline-offset: -3px; border-radius: 9999px; }
/* Active destination: white label, gold icon. Exactly one link is ever current. */
.bf-nav a[aria-current="page"] { color: var(--bf-nav-text); }
.bf-nav a[aria-current="page"] .bf-ico { color: var(--bf-nav-gold); }
@media (hover: hover) and (pointer: fine) { .bf-nav a:hover { color: var(--bf-nav-text); } }

/* Content must never hide behind the pill. Feed pages: the clearance is part of the footer's own surface. Insights manages its own page padding. */
body.bf-has-nav { padding-bottom: 0; }
body.bf-has-nav #siteFooter::after { content: ''; display: block; height: calc(72px + env(safe-area-inset-bottom, 0px)); background: var(--surface-base, #171717); }
body[data-bf-nav-padding="own"] { padding-bottom: 0; }

/* Cross-document view transition: the pill stays perfectly still while pages cross-fade. */
@media (prefers-reduced-motion: no-preference) { @view-transition { navigation: auto; } }
.bf-nav { view-transition-name: bf-nav; }
::view-transition-group(root) { animation-duration: .16s; }
::view-transition-old(root), ::view-transition-new(root) { animation-timing-function: ease-out; }
@media print { .bf-nav { display: none; } }

/* Shared header for the Insights shell (Figma navbar): surface/base bar, 1px divider, 640px container, 16px gutters, 36px round controls. */
.topbar { position: sticky; top: 0; z-index: 40; display: block; padding: env(safe-area-inset-top, 0px) 0 0; background: var(--surface-base, #171717); box-shadow: inset 0 -1px 0 var(--divider, rgb(255 255 255 / .08)); }
.bf-hdr { display: flex; align-items: center; gap: 16px; width: 100%; max-width: 640px; min-width: 320px; margin: 0 auto; padding: 12px 16px; box-sizing: border-box; }
.bf-brand, .brand { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; font: 600 1rem/1.375rem 'Sofia Sans', ui-sans-serif, system-ui, sans-serif; color: var(--text, #ffffff); text-decoration: none; -webkit-font-smoothing: antialiased; touch-action: manipulation; }
.bf-logo { display: block; flex: none; width: 103px; height: 22px; background: var(--text, #ffffff); -webkit-mask: var(--logo) left center / contain no-repeat; mask: var(--logo) left center / contain no-repeat; }
.bf-logo-sec { display: block; flex: none; width: auto; height: 22px; }
/* The section logos are only drawn for the dark theme (white wordmark, coloured section name): in light mode the wordmark is inverted and the hue restored. */
html.light .bf-logo-sec { filter: invert(1) hue-rotate(180deg); }
.bf-brand:focus-visible, .brand:focus-visible { outline: 2px solid var(--bf-gold-ink, #fdc700); outline-offset: 3px; border-radius: 6px; }
.bf-hdr-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; min-width: 0; }
.bf-hdr-btn { display: flex; flex: none; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 9999px; background: var(--btn-bg, #262626); color: var(--text, #ffffff); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: background-color .15s ease-out; }
.bf-hdr-btn:focus-visible { outline: 2px solid var(--bf-gold-ink, #fdc700); outline-offset: 2px; }
.bf-ico { display: block; width: 20px; height: 20px; background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.bf-hdr-menu { position: relative; display: flex; flex: none; }
.bf-hdr-panel { position: absolute; right: 0; top: 44px; z-index: 50; width: 160px; padding: 16px; border-radius: 8px; background: var(--surface-raised, #262626); box-shadow: 0 10px 15px -3px var(--bf-shadow, rgb(0 0 0 / .45)), 0 4px 6px -4px var(--bf-shadow, rgb(0 0 0 / .45)); }
.bf-hdr-panel[hidden] { display: none; }
.bf-hdr-panel ul { display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 0; list-style: none; }
.bf-hdr-panel a { display: flex; align-items: center; color: var(--text, #ffffff); font: 600 .875rem/1.25rem 'Sofia Sans', ui-sans-serif, system-ui, sans-serif; text-decoration: none; border-radius: 4px; }
.bf-hdr-panel a:focus-visible { outline: 2px solid var(--bf-gold-ink, #fdc700); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .bf-hdr-btn:hover { background: var(--surface-raised, #262626); } .bf-hdr-panel a:hover { color: var(--text-muted, #a1a1a1); } }
@media (prefers-reduced-motion: reduce) { .bf-hdr-btn { transition: none; } }


/* Tablet and desktop variant of the same navigation (Figma menu "screen=desktop"): icon beside a 14px label, 16px 12px items, the current item is the raised pill.
   The Insights header and content use the existing 960px container. */
@media (min-width: 768px) {
  .bf-nav ul { padding: 0; }
  .bf-nav a { flex-direction: row; justify-content: center; gap: 8px; min-height: 0; padding: 12px 16px; border-radius: 9999px; }
  .bf-nav .bf-ico { width: 24px; height: 24px; }
  .bf-nav .bf-lbl { font-size: .875rem; line-height: 1.25rem; }
  .bf-nav a[aria-current="page"] { background: var(--surface-raised, #262626); }
  .bf-hdr { max-width: 960px; padding-inline: 20px; }
}
