:root {
  --bb-nav-paper: #f7f7f5;
  --bb-nav-paper-strong: #ffffff;
  --bb-nav-ink: #110e08;
  --bb-nav-muted: #62625d;
  --bb-nav-rule: #c9c9c1;
  --bb-nav-buy: #ccff00;
  --bb-nav-sans: "Hanken Grotesk", Arial, sans-serif;
  --bb-nav-mono: "Spline Sans Mono", ui-monospace, monospace;
}

.bb-site-header,
.bb-site-header *,
.bb-nav-menu,
.bb-nav-menu * {
  box-sizing: border-box;
  letter-spacing: 0;
}

.bb-site-header {
  position: relative;
  z-index: 80;
  width: min(1480px, calc(100% - 64px));
  margin-inline: auto;
  border-bottom: 1px solid var(--bb-nav-ink);
  background: rgba(247, 247, 245, 0.97);
  color: var(--bb-nav-ink);
  font-family: var(--bb-nav-mono);
}

.bb-nav-identity {
  min-height: 48px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--bb-nav-rule);
}

.bb-nav-date,
.bb-nav-chain {
  color: var(--bb-nav-muted);
  font-size: 10px;
  text-transform: uppercase;
}

.bb-nav-chain { justify-self: end; }

.bb-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--bb-nav-ink);
  font-family: var(--bb-nav-sans);
  font-size: 15px;
  font-weight: 850;
  text-decoration: none;
  text-transform: uppercase;
}

.bb-nav-brand b {
  min-width: 42px;
  padding: 5px 8px 4px;
  background: var(--bb-nav-buy);
  color: var(--bb-nav-ink);
  font-family: var(--bb-nav-mono);
  font-size: 10px;
  text-align: center;
}

.bb-nav-desktop {
  min-height: 50px;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
}

.bb-nav-primary {
  display: flex;
  align-items: stretch;
}

.bb-nav-primary > a,
.bb-nav-more > summary {
  min-height: 50px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  color: var(--bb-nav-muted);
  font-size: 10px;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.bb-nav-primary > a:hover,
.bb-nav-primary > a[aria-current="page"],
.bb-nav-more > summary:hover,
.bb-nav-more[open] > summary {
  border-bottom-color: var(--bb-nav-ink);
  color: var(--bb-nav-ink);
}

.bb-nav-menu {
  position: relative;
  margin: 0;
  color: var(--bb-nav-ink);
  font-family: var(--bb-nav-mono);
}

.bb-nav-menu > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  text-transform: uppercase;
}

.bb-nav-menu > summary::-webkit-details-marker { display: none; }

.bb-nav-plus {
  position: relative;
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
}

.bb-nav-plus::before,
.bb-nav-plus::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 1px;
  width: 10px;
  height: 1px;
  background: currentColor;
  transition: transform 150ms ease;
}

.bb-nav-plus::after { transform: rotate(90deg); }
.bb-nav-menu[open] .bb-nav-plus::after { transform: rotate(0); }

.bb-nav-panel {
  position: absolute;
  z-index: 120;
  top: calc(100% + 8px);
  right: 0;
  width: min(420px, calc(100vw - 32px));
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--bb-nav-ink);
  background: var(--bb-nav-paper-strong);
  box-shadow: 8px 8px 0 rgba(17, 14, 8, 0.14);
}

.bb-nav-panel a {
  min-height: 42px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  border: 1px solid var(--bb-nav-rule);
  color: var(--bb-nav-ink);
  font-size: 9px;
  text-decoration: none;
  text-transform: uppercase;
}

.bb-nav-panel a:hover,
.bb-nav-panel a:active,
.bb-nav-panel a[aria-current="page"] {
  border-color: var(--bb-nav-ink);
  background: var(--bb-nav-buy);
}

.bb-nav-mobile { display: none; }

.topbar .bb-nav-menu--compact { flex: 0 0 auto; }
.topbar .bb-nav-menu--compact > summary {
  min-height: 36px;
  padding: 0 8px;
  color: var(--bb-nav-ink);
  font-size: 9px;
}

@media (max-width: 820px) {
  .bb-site-header {
    width: 100%;
    padding: 0 16px;
  }

  .bb-nav-identity {
    min-height: 48px;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand chain"
      "date menu";
    gap: 8px 14px;
    padding: 9px 0 10px;
  }

  .bb-nav-brand { grid-area: brand; justify-self: start; font-size: 14px; }
  .bb-nav-chain { grid-area: chain; font-size: 9px; }
  .bb-nav-date { grid-area: date; font-size: 9px; }
  .bb-nav-desktop { display: none; }
  .bb-nav-mobile { grid-area: menu; justify-self: end; display: block; }
  .bb-nav-mobile > summary {
    min-height: 30px;
    color: var(--bb-nav-muted);
    font-size: 9px;
  }

  .bb-nav-mobile .bb-nav-panel {
    top: calc(100% + 9px);
    width: min(360px, calc(100vw - 32px));
  }
}

@media (max-width: 620px) {
  .bb-nav-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bb-nav-panel a { min-height: 44px; font-size: 8px; }

  .topbar .bb-nav-menu--compact > summary {
    min-width: 38px;
    padding: 0 5px;
  }

  .topbar .bb-nav-menu--compact > summary > span:first-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .topbar .bb-nav-menu--compact .bb-nav-panel {
    position: fixed;
    top: 62px;
    right: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bb-nav-plus::before,
  .bb-nav-plus::after { transition: none; }
}
