:root {
  --preview-bar-height: 2.75rem;
}

body.blog-preview {
  padding-top: var(--preview-bar-height);
}

body.blog-preview .preview-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2147483000;
}

/* Fixed/sticky parent navs sit below the preview bar */
body.blog-preview .site-shell--header :is(nav, header)[class*="fixed"],
body.blog-preview .site-shell--header :is(nav, header)[class*="sticky"],
body.blog-preview .blog-preview__shell :is(
  .fixed.top-0,
  .sticky.top-0,
  [class*="fixed"][class*="top-0"],
  [class*="sticky"][class*="top-0"]
) {
  top: var(--preview-bar-height) !important;
  inset-block-start: var(--preview-bar-height) !important;
}

/* Fixed headers don't take flow space — reserve their height for blog content */
body.blog-preview .site-shell--header:has([class*="fixed"]) {
  min-height: var(--shell-header-height, 4rem);
}

/* Synced shell uses parent styles — don't let blog globals override chrome */
html:has(body.blog-public),
html:has(body.blog-preview) {
  background-color: var(--shell-body-background, var(--color-paper));
}

body.blog-public,
body.blog-preview {
  font-family: var(--shell-font-body, var(--font-body));
  color: var(--shell-body-color, inherit);
  background-color: var(--shell-body-background, var(--color-paper));
  min-height: 100dvh;
}

.site-shell-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-paper-elevated);
}

.site-shell-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

.site-shell-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  margin-right: auto;
}

.site-shell-footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--color-ink-muted);
  font-size: 0.875rem;
}

.site-shell-footer p {
  margin: 0;
}

.shell-theme {
  font-family: var(--shell-font-body, var(--font-body));
  color: var(--shell-body-color, inherit);
  background-color: var(--shell-body-background, transparent);
}

:where(.site-shell, .blog-preview__shell) ul,
:where(.site-shell, .blog-preview__shell) ol {
  list-style: revert;
  margin: revert;
  padding: revert;
}

:where(.site-shell, .blog-preview__shell) img {
  max-width: none;
}

/* Blog content uses synced typography — header font for titles, body font for prose */
.blog-content-island {
  font-family: var(--shell-font-body, var(--font-body));
  color: inherit;
  background: transparent;
}
