body:has(> .site-bar) {
  display: flex;
  flex-direction: column;
}

body:has(> .site-bar) > z-proto {
  flex: 1;
  min-height: 0;
  height: auto;
}

.site-bar {
  z-index: 40;
  display: flex;
  flex-shrink: 0;
  width: 100%;
  justify-content: center;
  border-bottom: 1px solid var(--z-proto-border, hsl(240 5.9% 90%));
  background: var(--z-proto-bg, hsl(0 0% 100%));
  font-size: 12px;
  line-height: 1;
  color: var(--z-proto-muted-fg, hsl(240 3.8% 46.1%));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.site-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1920px;
  box-sizing: border-box;
  padding: 6px 16px;
}

.site-bar-cluster {
  position: relative;
  display: flex;
  align-items: center;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.site-nav a {
  display: inline-flex;
  box-sizing: border-box;
  align-items: center;
  height: 24px;
  min-height: 24px;
  border-radius: 4px;
  padding: 0 8px;
  color: inherit;
  font: 500 12px/1 inherit;
  line-height: 1;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--z-proto-fg, hsl(240 10% 3.9%));
}

.site-nav a[aria-current="page"] {
  background: hsl(240 5.9% 10%);
  color: #fff;
}

.site-bar-extras {
  position: absolute;
  top: 50%;
  left: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 3rem;
  transform: translateY(-50%);
}

.site-icon,
.theme-toggle {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  padding: 0;
  color: inherit;
  cursor: pointer;
}

.site-icon:hover,
.theme-toggle:hover {
  background: var(--z-proto-accent, hsl(240 4.8% 95.9%));
  color: var(--z-proto-fg, hsl(240 10% 3.9%));
}

.site-icon svg,
.theme-toggle svg {
  display: block;
  width: 16px;
  height: 16px;
}

html.dark .site-bar {
  background: hsl(240 5% 12%);
  border-color: hsl(240 4% 26%);
  color: hsl(240 5% 72%);
}

html.dark .site-nav a[aria-current="page"] {
  background: #fafafa;
  color: #18181b;
}

html.dark .site-icon:hover,
html.dark .theme-toggle:hover {
  background: hsl(240 4% 21%);
  color: hsl(0 0% 97%);
}

@media (max-width: 720px) {
  .site-bar-inner {
    padding: 6px 10px;
  }
}
