/* The site header (2026-10-20). Moved out of home.css so every page carries
 * the landing page's own bar: Darren asked for the top branding to match the
 * homepage on the legal pages, and the rest of the site had the older header
 * too. Loaded after styles.css by every page, before home.css on the
 * homepage. Same rules as home.css: tokens only, never white on teal.
 * The menu button is driven by site-nav.js, which every page loads.
 */

/* The bar's height, for anything else that sticks or scrolls under it
   (the guides' contents panel, jump-to-section links). */
:root {
  --topbar-h: 68px;
}

/* Pill buttons: 26px radius, 16×22 padding. The teal pill is the page's
   primary action and carries --on-accent, never white. */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  min-height: 48px;
  padding: 14px 22px;
  border-radius: 26px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 120ms ease, opacity 120ms ease;
}
.pill:hover {
  opacity: 0.92;
}
.pill:active {
  transform: translateY(1px);
}
.pill--accent {
  background: var(--accent);
  color: var(--on-accent);
}
.pill--small {
  min-height: 40px;
  padding: 11px 18px;
  font-size: 14px;
  border-radius: 22px;
}

/* ---------- header ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  /* The handoff's 94% graphite with a blur, from the bar token and its own
     glass alpha rather than a typed rgba. */
  background: color-mix(in srgb, var(--bar) 94%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bar-glass-highlight);
  color: var(--bar-foreground);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 40px;
  min-height: var(--topbar-h);
}

.topbar__brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  border-radius: 4px;
}
.topbar__brand img {
  /* The tight-cropped wordmark (img/wordmark-dark-tight.png): the original
     PNG carries wide transparent padding and rendered the mark 40px wide. */
  height: 22px;
  width: auto;
  display: block;
}

.topbar__nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  min-width: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}
.topbar__nav a,
.topbar__login {
  color: var(--bar-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  display: inline-block;
  padding: var(--space-md) 0;
}
.topbar__nav a:hover,
.topbar__login:hover {
  color: var(--bar-foreground);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  white-space: nowrap;
  flex-shrink: 0;
}

.topbar__nav-login {
  display: none;
}

.topbar__toggle {
  display: none;
  align-items: center;
  gap: var(--space-sm);
  min-height: 44px;
  padding: 0 var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--bar-glass-border);
  background: transparent;
  color: var(--bar-foreground);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* Below 1000px the nav links collapse behind the menu button. The `no-js`
   fallback keeps them visible (wrapped) when the toggle script hasn't run. */
@media (max-width: 999px) {
  .topbar__inner {
    flex-wrap: wrap;
    gap: 12px;
  }
  .topbar__toggle {
    display: inline-flex;
    order: 3;
  }
  .topbar__actions {
    order: 2;
    margin-left: auto;
    gap: 12px;
  }
  .topbar__actions .topbar__login {
    display: none;
  }
  .topbar__nav {
    order: 4;
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-bottom: var(--space-md);
    white-space: normal;
  }
  .topbar__nav.is-open,
  html.no-js .topbar__nav {
    display: flex;
  }
  .topbar__nav a {
    padding: var(--space-md) 0;
    border-top: 1px solid var(--bar-glass-highlight);
  }
  .topbar__nav-login {
    display: block;
  }
}
