/* Logo on the left, light/dark switch on the right, for pages without the
 * home page's header (download, invite, 404 and the legal pages).
 *
 *   <header class="topbar">
 *     <a class="topbar-brand" href="/" aria-label="Flavy">…seal and wordmark…</a>
 *     <button class="theme-toggle" data-theme-toggle …></button>
 *   </header>
 *
 * It sits over the top of the page, so the page's own centring stays as is. */
.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 1.5rem);
}
/* Keep the page's content clear of the bar. */
body:has(> .topbar) { padding-top: 4.75rem; }

.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink, #3d2817);
  text-decoration: none;
}
.topbar-brand img {
  display: block;
  width: 40px;
  height: 40px;
}
/* The outlined wordmark, painted in the text colour so it follows dark mode. */
.topbar-brand span {
  width: 62px;
  height: 30px;
  margin-top: 6px;
  background: currentColor;
  -webkit-mask: url(/assets/img/flavy-wordmark-v1.svg) center / contain no-repeat;
  mask: url(/assets/img/flavy-wordmark-v1.svg) center / contain no-repeat;
}
.topbar-brand:focus-visible {
  outline: 2px solid var(--tomato, #c8553d);
  outline-offset: 3px;
  border-radius: 6px;
}
