/* Styles for the shared marketing header used by /hello, /docs,
   /getting-started, /privacy, /terms and every generated blog page.
   The markup that goes with these rules is generated by Go — see package
   evstick/genheader — and the behavior lives in /site-header.js.

   Only the header's own chrome belongs here. Each page keeps its own
   :root palette and body rules (including the
   `padding-top: calc(64px + env(safe-area-inset-top))` that leaves room
   for this fixed header), so this file assumes --surface, --border,
   --text, --muted and --blue already exist. Because pages load this
   stylesheet before their inline <style>, any header rule left behind in
   a page would silently win over the one here — when changing something,
   change it here and nowhere else. */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-home {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.header-nav {
  display: none;
  align-items: center;
  gap: 28px;
  flex: 1;
  justify-content: center;
}
.header-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color .15s;
}
.header-nav a:hover { color: var(--text); }
/* The page you're already on — same treatment as hover, so the nav always
   says where you are. */
.header-nav a[aria-current="page"] { color: var(--text); }
@media (min-width: 760px) {
  .header-nav { display: flex; }
}
.nav-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.nav-toggle-btn svg { width: 18px; height: 18px; }
@media (min-width: 760px) {
  .nav-toggle-btn { display: none; }
}
.header-nav-mobile {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--border);
  padding: 6px 24px calc(10px + env(safe-area-inset-bottom));
}
.header-nav-mobile.open { display: flex; }
.header-nav-mobile a {
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.header-nav-mobile a:last-child { border-bottom: none; }
@media (min-width: 760px) {
  .header-nav-mobile { display: none !important; }
}
header img {
  height: 28px;
  width: 28px;
  border-radius: 7px;
}
header span {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
}
.lang-dropdown {
  position: relative;
  flex-shrink: 0;
}
.lang-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 8px 4px 2px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.lang-dropdown-btn .caret {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: var(--text);
}
.lang-dropdown-menu {
  position: absolute;
  top: 32px;
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  min-width: 130px;
  padding: 6px;
  z-index: 20;
}
.lang-option {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  text-align: left;
  padding: 7px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
}
.lang-option:hover { background: var(--surface2); }
.lang-option.active { font-weight: 700; }
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 999px;
  white-space: nowrap;
}
@media (max-width: 520px) {
  .header-inner { padding: 10px 16px; gap: 6px; }
  .header-right { gap: 6px; }
  .brand > .brand-home > span { display: none; }
  .cta-btn { padding: 8px 12px; font-size: 12px; }
  .lang-dropdown-btn { font-size: 13px; }
}
