.site-header {
  --header-background: #000;
  --header-ink: #eee;
  --header-muted: #929298;
  --header-line: #232326;
  --header-accent: #eee;
  --header-height: 88px;
  height: var(--header-height);
  gap: 40px;
  background: var(--header-background);
  color: var(--header-ink);
}

body[data-surface] .site-header {
  --header-background: var(--bg);
  --header-ink: var(--ink);
  --header-muted: var(--muted);
  --header-line: var(--line);
  --header-accent: var(--accent);
}

body[data-surface="public"] .site-header {
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .brand { flex-shrink: 0; }
.site-header .site-navigation {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 36px;
  height: 100%;
  min-height: 0;
  padding: 0;
  margin-left: auto;
  border: 0;
  overflow: visible;
}

.site-header .site-navigation a {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0 4px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 500;
  color: var(--header-muted);
  white-space: nowrap;
}

.site-header .site-navigation a:hover,
.site-header .site-navigation a[aria-current] { color: var(--header-ink); }
.site-header .site-navigation a[aria-current] { font-weight: 650; }
.site-header .site-navigation a[aria-current]::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 2px;
  background: var(--header-accent);
}

.site-header .site-account { display: flex; align-items: center; gap: 12px; min-width: 0; padding-left: 28px; border-left: 1px solid var(--header-line); font-size: 12px; }
.site-header .site-account > span { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-header .site-account form { margin: 0; flex-shrink: 0; }
.site-header .site-account .quiet { background: transparent; border-color: transparent; color: var(--header-muted); min-height: 44px; padding: 8px; font-size: 12px; }
body[data-surface="public"] .landing-section[id] { scroll-margin-top: 112px; }

@media (max-width: 1000px) {
  .site-header { gap: 24px; }
  .site-header .site-navigation { gap: 24px; }
  .site-header .site-account { padding-left: 16px; }
  .site-header .site-account > span { max-width: 90px; }
}

@media (max-width: 700px) {
  .site-header {
    --header-height: 112px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 62px 50px;
    gap: 0;
    padding: 0 18px;
  }
  .site-header .brand { width: fit-content; align-self: center; font-size: 23px; }
  .site-header .site-navigation { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; width: 100%; margin: 0; border-top: 1px solid var(--header-line); }
  .site-header .site-navigation a { padding: 0; font-size: 13px; }
  .site-header .site-account { grid-column: 2; grid-row: 1; border: 0; padding: 0; gap: 8px; }
  body[data-surface="public"] .landing-section[id] { scroll-margin-top: 132px; }
}
