/*
 * Shared site header for pages that do not load landing.css: docs (docs/build-shell.mjs), privacy, terms, data.
 * Same markup and look as the landing header (assets/landing.css § Header, 2026-11-07 shared menu). Every rule is
 * scoped to .site-header and the tokens live on it, so the page's own stylesheet is untouched and cannot leak in
 * (docs.css and the legal pages style .wrap, .brand and a globally). No theme toggle here: these pages follow the
 * system theme (prefers-color-scheme), so the header does too. Behaviour: assets/site-header.js.
 */
/* Inter, same face and file as landing.css (the docs and legal pages do not load landing.css). */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('fonts/inter-latin-wght-normal.woff2') format('woff2-variations'), url('fonts/inter-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.site-header {
  --sh-canvas: #f4f6fb;
  --sh-surface: #ffffff;
  --sh-strong: #e8edf6;
  --sh-ink: #0f172a;
  --sh-muted: #5b6b82;
  --sh-line: rgba(100, 116, 139, 0.32);
  --sh-line-soft: rgba(100, 116, 139, 0.16);
  --sh-hover: rgba(100, 116, 139, 0.12);
  --sh-focus: #3b82f6;
  --sh-ease: cubic-bezier(0.22, 1, 0.36, 1);
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--sh-canvas) 86%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--sh-line-soft);
  color: var(--sh-ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
@media (prefers-color-scheme: dark) {
  .site-header {
    --sh-canvas: #0b1220;
    --sh-surface: #111a2e;
    --sh-strong: #1b2740;
    --sh-ink: #e2e8f0;
    --sh-muted: #94a3b8;
    --sh-line: rgba(148, 163, 184, 0.3);
    --sh-line-soft: rgba(148, 163, 184, 0.2);
    --sh-hover: rgba(148, 163, 184, 0.16);
  }
}
.site-header .wrap {
  width: min(100% - 32px, 1232px);
  max-width: none;
  max-inline-size: none;
  margin-inline: auto;
  padding: 0;
}
@media (min-width: 768px) {
  .site-header .wrap { width: min(100% - 48px, 1232px); }
}
.site-header .header-row { display: flex; align-items: center; gap: 24px; height: 64px; }
.site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  color: var(--sh-ink);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.site-header .brand-wordmark { width: auto; height: 31px; inline-size: auto; block-size: 31px; flex: none; }
.site-header .brand-mark, .site-header .brand-name { display: none; }
.site-header a:focus-visible, .site-header button:focus-visible {
  outline: 2px solid var(--sh-focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.site-header .nav { display: none; gap: 2px; margin-inline-start: 8px; }
.site-header .nav a, .site-header .header-login {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--sh-muted);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: color 150ms var(--sh-ease), background-color 150ms var(--sh-ease);
}
.site-header .nav a:hover, .site-header .header-login:hover { color: var(--sh-ink); background: var(--sh-hover); }
.site-header .nav a[aria-current="page"] { color: var(--sh-ink); }
.site-header .header-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.site-header .header-login { display: none; align-items: center; min-height: 36px; padding: 0 10px; }

.site-header .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--sh-line);
  border-radius: 12px;
  background: var(--sh-surface);
  color: var(--sh-ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms var(--sh-ease);
}
.site-header .btn:hover { background: var(--sh-strong); }
.site-header .btn-sm { min-height: 36px; padding: 0 14px; border-radius: 10px; font-size: 14px; }
.site-header .header-chrome { display: none; }

.site-header .icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--sh-muted);
  cursor: pointer;
  transition: background-color 150ms var(--sh-ease), color 150ms var(--sh-ease);
}
.site-header .icon-btn:hover { background: var(--sh-hover); color: var(--sh-ink); }
.site-header .icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.site-header .menu-btn .icon-close { display: none; }
.site-header .menu-btn[aria-expanded="true"] .icon-close { display: block; }
.site-header .menu-btn[aria-expanded="true"] .icon-menu { display: none; }

.site-header .mobile-menu { border-top: 1px solid var(--sh-line-soft); padding: 8px 0 16px; }
.site-header .mobile-menu[hidden] { display: none; }
.site-header .mobile-menu .wrap { display: grid; gap: 2px; }
.site-header .mobile-menu a:not(.btn) {
  display: block;
  padding: 12px 8px;
  font-size: 16px;
  line-height: 1.6;
  border-radius: 8px;
  color: var(--sh-ink);
  font-weight: 500;
  text-decoration: none;
}
.site-header .mobile-menu a:not(.btn):hover { background: var(--sh-hover); }
.site-header .mobile-menu a[aria-current="page"] { font-weight: 600; }
.site-header .mobile-menu .btn { margin-top: 8px; }

.site-header .social-links[hidden] { display: none !important; }
.site-header .social-links--header { display: none; }
.site-header .social-links--header .social-link {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--sh-muted);
  text-decoration: none;
}
.site-header .social-links--header .social-link:hover { color: var(--sh-ink); background: var(--sh-hover); }

@media (min-width: 960px) {
  .site-header .header-chrome, .site-header .header-login { display: inline-flex; }
  .site-header .social-links--header { display: flex; align-items: center; gap: 0; }
}
/* Same breakpoint as landing.css: the seven links fit next to Log in, Add to Chrome and six social icons. */
@media (min-width: 1280px) {
  .site-header .nav { display: flex; }
  .site-header .menu-btn, .site-header .mobile-menu { display: none !important; }
}
@media (pointer: coarse) {
  .site-header .icon-btn { width: 44px; height: 44px; }
}
