.site-header {
  display: flex;
  width: min(var(--page-width), calc(100% - 40px));
  min-height: 64px;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.site-header .brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.site-header .brand-mark {
  display: grid;
  width: 34px;
  flex: 0 0 auto;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 6px;
  color: #fffefb;
  background: #2d3834;
  font-size: 1rem;
  font-weight: 850;
}

.site-header .brand-name {
  display: grid;
  gap: 1px;
  font-size: .95rem;
  font-weight: 850;
  line-height: 1.2;
}

.site-header .brand-name small {
  color: var(--muted);
  font-size: .65rem;
  font-weight: 550;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  display: inline-flex;
  min-height: 44px;
  padding: 10px 12px 8px;
  align-items: center;
  border-bottom: 2px solid transparent;
  color: inherit;
  font-size: .82rem;
  font-weight: 750;
  line-height: 1.4;
  text-decoration: none;
  touch-action: manipulation;
}

.site-nav a:hover { background: rgb(128 128 128 / 12%); }
.site-nav a[aria-current="page"] { border-bottom-color: #aa522f; }

@media (max-width: 799px) {
  .site-header {
    width: min(100% - 24px, var(--page-width));
    min-height: 58px;
  }
}

@media (max-width: 440px) {
  .site-header { min-height: 52px; gap: 8px; }
  .site-header .brand-name small { display: none; }
  .site-nav a { padding-inline: 9px; font-size: .78rem; }
}

@media (prefers-color-scheme: dark) {
  .site-header .brand-mark { color: #151918; background: #f0f1eb; }
  .site-nav a[aria-current="page"] { border-bottom-color: #e39568; }
}
