/* Floating pill header — blog pages only (article + index).
   Replaces the full-width site-header bar with a centered pill, matching
   the editorial direction already applied to the rest of these pages.
   Scoped entirely to body.blog-article / body.blog-index. */

body.blog-article .site-header,
body.blog-index .site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  border-bottom: none;
  backdrop-filter: none;
  padding: 1.75rem 0 0;
}

body.blog-article .site-header .shell,
body.blog-index .site-header .shell {
  width: fit-content;
  max-width: calc(100% - 32px);
  min-height: 0;
  margin: 0 auto;
  padding: 8px 10px 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: 0 1px 3px rgba(20, 16, 8, 0.05);
  gap: 1rem;
  /* Override Tailwind's inline justify-between — the pill is fit-content,
     so space-between (or an auto margin) stretches it and leaves a dead
     gap. Everything just sits left-to-right with normal gap spacing. */
  justify-content: flex-start;
}

body.blog-article .site-header .site-logo,
body.blog-index .site-header .site-logo {
  height: 20px;
}

/* Current page name, right of the logo — widens the pill naturally and
   gives it an anchor beyond pure nav. Scrolling down drops it (width
   only — nothing here changes height). */
.site-header .pill-page-name {
  display: inline-block;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
  vertical-align: middle;
  transition: max-width 0.3s ease, opacity 0.3s ease;
}

.site-header.is-compact .pill-page-name {
  max-width: 0;
  padding-left: 0;
  border-left: none;
  opacity: 0;
}

@media (max-width: 640px) {
  .site-header .pill-page-name {
    max-width: 38vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header .pill-page-name {
    transition: none;
  }
}

/* The "Get Early Access" CTA is dropped from this pill to match the
   minimal look — it's still present on every post via the bottom CTA. */
body.blog-article .site-header .header-cta,
body.blog-index .site-header .header-cta {
  display: none;
}

/* Docs link + theme toggle become plain nav items inside the shared
   pill, not individually bordered chips. */
body.blog-article .site-header .chip,
body.blog-index .site-header .chip {
  border: none;
  background: transparent;
  padding: 6px 4px;
  color: var(--muted);
  font-size: 0.92rem;
  gap: 6px;
}

body.blog-article .site-header .chip:hover,
body.blog-index .site-header .chip:hover {
  color: var(--ink);
  background: transparent;
}

body.blog-article .site-header .chip-icon svg,
body.blog-index .site-header .chip-icon svg {
  width: 16px;
  height: 16px;
}
