.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  z-index: 100;
  background: oklch(96.8% 0.012 75 / 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ink-ghost);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 24px;
}

/* ── Nav (shared across Zibaldoni / NotMonday / Insieme) ── */
.site-header__nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-header__nav-link {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink-faint);
  transition: color 0.15s ease;
}

.site-header__nav-link:hover {
  color: var(--ink);
}

.site-header__nav-link--active {
  color: var(--ink);
  pointer-events: none;
}

.site-header__nav-sep {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--ink-ghost);
  user-select: none;
  line-height: 1;
}

.site-header__logo {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--ink);
  letter-spacing: 0.02em;
  text-decoration: none;
  user-select: none;
}

/* ── Back button (editor mode) ── */

.site-header__back {
  position: absolute;
  left: 24px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease;
}

.site-header__back:hover {
  color: var(--ink);
}

/* ── New entry button ── */

.site-header__new-entry {
  position: absolute;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-mid);
  text-decoration: none;
  border: 1px solid var(--ink-ghost);
  border-radius: 2px;
  padding: 7px 14px;
  background: transparent;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

/* In-page variant — action button rendered inside a page body, not the header */
.site-header__new-entry--page {
  position: static;
}

/* Homepage placements */
.draft-toggle-row .site-header__new-entry--page { margin-left: auto; }
.mobile-toggle-bar .site-header__new-entry--mobilebar {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 10px;
}

/* Insieme version tag */
.insieme-version {
  position: absolute;
  right: 24px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.site-header__new-entry-plus {
  font-size: 15px;
  line-height: 1;
  margin-top: -1px;
}

.site-header__new-entry.author-yar:hover {
  background: var(--yar-bg);
  border-color: oklch(72% 0.07 240);
  color: var(--yar);
}

.site-header__new-entry.author-mar:hover {
  background: var(--mar-bg);
  border-color: oklch(72% 0.08 42);
  color: var(--mar);
}

/* ── Admin bar offset (desktop only — header is non-fixed on mobile) ── */

.admin-bar .site-header {
  top: 32px;
}

/* ── Mobile: header is not fixed — it scrolls with the page ── */

@media (max-width: 820px) {
  .site-header {
    position: static;
  }
  /* Header now flows in-document, so pages don't need fixed-header top padding */
  body .homepage-mobile {
    padding-top: 0;
  }
  /* Homepage toggle bar no longer sticky — relative keeps it a positioning
     context for the absolute ghost icon + new-entry button (overrides read-only mobile.css).
     The admin-bar selector must out-specify mobile.css's `.admin-bar .mobile-toggle-bar{top:110}`. */
  body .mobile-toggle-bar {
    position: relative;
    top: auto;
  }
  body.admin-bar .mobile-toggle-bar {
    top: auto;
  }
}
