/* The public website header (web/site-header.js): the same rules on the home page, the sign-in page
   and the server-rendered blog. Everything is scoped to .public-header so the blog stylesheet and
   the dashboard stylesheet cannot change it; tokens fall back to the website values. */
.public-header, .public-header *, .public-header *::before, .public-header *::after { box-sizing: border-box; }
.public-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid transparent;
  background: rgb(28 28 30 / .82);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  font-family: var(--font-text, Onest, ui-sans-serif, system-ui, sans-serif);
  line-height: 1.55;
}
.public-header a { color: inherit; text-decoration: none; }
.public-header-inner > a { display: inline-flex; align-items: center; min-height: 44px; }
.public-header :focus-visible { outline: 3px solid rgb(241 241 243 / .9); outline-offset: 3px; }
.public-header button, .public-header .button {
  min-width: 48px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-md, 12px);
  background: var(--primary, #f1f1f3);
  color: var(--primary-ink, #161618);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color .15s var(--ease, ease), color .15s var(--ease, ease);
}
.public-header button:hover, .public-header .button:hover { background: var(--primary-hover, #fff); }
.public-header .brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text, #ededf0); }
.public-header .brand-mark { width: 30px; height: 30px; flex: none; }
.public-header .brand-mark svg { display: block; width: 100%; height: 100%; }
.public-header .brand-name { font-family: var(--font-display, Unbounded, Onest, sans-serif); font-size: 18px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; white-space: nowrap; }
.public-header .brand-name small { margin-left: 3px; color: var(--muted, #8e8e96); font-family: var(--font-text, Onest, sans-serif); font-size: 13px; font-weight: 600; letter-spacing: 0; }
/* A button in the app, a link on the blog: the same pill either way. */
.public-header .language-switch {
  min-width: 0;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid var(--line-2, #414147);
  line-height: 1.2;
  border-radius: 999px;
  background: transparent;
  color: var(--text, #ededf0);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .02em;
  white-space: nowrap;
  flex: none;
}
.public-header .language-switch span { color: var(--muted, #8e8e96); font-weight: 500; }
.public-header .language-switch:hover { background: var(--panel-2, #2b2b2f); }

.public-header .public-header-inner { width: min(1200px, 100%); min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 auto; padding: max(8px, env(safe-area-inset-top)) var(--gutter, 16px) 8px; }
.public-header .public-navigation {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  margin: 0;
  padding: 10px var(--gutter, 16px) 18px;
  border-bottom: 1px solid var(--line, #313136);
  background: var(--bg-deep, #161618);
  box-shadow: 0 30px 40px -30px rgb(0 0 0 / .8);
}
.public-header .public-navigation.is-open { display: grid; gap: 2px; }
.public-header .public-navigation > a:not(.button) { min-height: 50px; display: flex; align-items: center; padding: 0 4px; border-radius: 0; border-bottom: 1px solid var(--line, #313136); background: transparent; color: var(--text, #ededf0); font-size: 17px; font-weight: 500; }
.public-header .public-navigation > a[aria-current]:not(.button) { font-weight: 650; }
.public-header .public-navigation > a[aria-current]:not(.button)::after { content: ""; width: 6px; height: 6px; margin-left: 10px; border-radius: 50%; background: currentColor; }
.public-header .public-navigation .public-nav-login { margin-top: 12px; }
.public-header .public-mobile-language { display: none; }
.public-header .public-controls { display: flex; align-items: center; gap: 6px; }
.public-header .public-blog-short { display: none; }
.public-header .burger { width: 44px; min-width: 44px; height: 44px; min-height: 44px; flex-direction: column; gap: 5px; padding: 0; border-color: var(--line-2, #414147); border-radius: 50%; background: transparent; }
.public-header .burger:hover { background: var(--panel-2, #2b2b2f); }
.public-header .burger span { width: 16px; height: 1.6px; border-radius: 2px; background: var(--text, #ededf0); transition: transform .2s var(--ease, ease), opacity .2s var(--ease, ease); }
.public-header .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.public-header .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.public-header .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

@media (min-width: 620px) {
  .public-header .public-blog-short { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; color: var(--text-2, #b6b6bd); font-size: 15px; font-weight: 500; }
  .public-header .public-blog-short:hover, .public-header .public-blog-short[aria-current] { color: var(--text, #ededf0); }
}
@media (min-width: 900px) {
  .public-header .public-header-inner { gap: 24px; }
  .public-header .public-navigation { position: static; display: flex; align-items: center; gap: 4px; margin-left: auto; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .public-header .public-navigation > a:not(.button) { min-height: 40px; padding: 0 12px; border: 0; border-radius: 10px; color: var(--text-2, #b6b6bd); font-size: 15px; }
  .public-header .public-navigation > a:not(.button):hover { background: var(--panel-2, #2b2b2f); color: var(--text, #ededf0); }
  .public-header .public-navigation > a[aria-current]:not(.button) { background: var(--panel-2, #2b2b2f); color: var(--text, #ededf0); font-weight: 500; }
  .public-header .public-navigation > a[aria-current]:not(.button)::after { content: none; }
  .public-header .public-navigation .public-nav-login { min-height: 40px; margin: 0 0 0 10px; padding: 0 16px; border-radius: 999px; font-size: 14px; }
  .public-header .public-navigation .public-nav-login[aria-current] { box-shadow: 0 0 0 2px var(--bg, #1c1c1e), 0 0 0 4px var(--line-2, #414147); }
  .public-header .public-controls { order: 3; }
  .public-header .public-blog-short, .public-header .burger { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .public-header *, .public-header *::before, .public-header *::after { transition: none !important; }
}

@media (max-width: 600px) { .public-header button, .public-header a.button, .public-header .language-switch { min-height: 44px; } }
.public-header .public-blog-short, .public-header .public-navigation > a:not(.button), .public-header .public-navigation .public-nav-login { min-height: 44px; }
