/* Ensure rich text headings are visually distinct. */
.page-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 1.5rem 0 0.75rem;
}

.page-content h2 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 1.25rem 0 0.75rem;
}

.page-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 1rem 0 0.5rem;
}

.page-content h4 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0.75rem 0 0.5rem;
}

.page-content h5,
.page-content h6 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0.75rem 0 0.5rem;
}

nav.navbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

body {
  scroll-padding-top: 5rem;
}

.pinned-post-carousel {
  --pinned-carousel-height: 360px;
  clear: both;
  isolation: isolate;
  margin: 1.25rem auto 3rem;
  max-width: 960px;
}

.pinned-post-slides {
  height: var(--pinned-carousel-height);
  overflow: hidden;
  position: relative;
}

.pinned-post-slide {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  display: block;
  left: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  top: 0;
  transform: translateX(100%);
  transition:
    transform 360ms ease,
    opacity 360ms ease;
  height: 100%;
  width: 100%;
}

.pinned-post-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.pinned-post-layout {
  display: grid;
  grid-template-columns: minmax(220px, 40%) 1fr;
  gap: 1rem;
  height: 100%;
}

.pinned-post-image {
  background: #f5f5f5;
  min-height: 0;
  overflow: hidden;
}

.pinned-post-image,
.pinned-post-image img {
  display: block;
  height: 100%;
  width: 100%;
}

.pinned-post-image img {
  object-fit: cover;
}

.pinned-post-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  padding: 2rem;
}

.pinned-post-content .subtitle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  margin-bottom: 1rem;
}

.pinned-post-summary {
  line-height: 1.6;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}


.pinned-post-layout {
  display: grid;
  grid-template-columns: minmax(220px, 40%) 1fr;
  height: 100%;
}

.pinned-post-image {
  background: #f5f5f5;
  min-height: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.pinned-post-image,
.pinned-post-image img {
  display: block;
  height: 100%;
  width: 100%;
}

.pinned-post-image img {
  object-fit: contain;
  max-width: 100%;
  max-height: 100%;
  background: #f5f5f5;
}

.pinned-post-image img.is-fallback,
.post-image-fallback {
  background: #f5f5f5;
  object-fit: contain;
  padding: 2rem;
}

.pinned-post-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  padding: 2rem;
}

.pinned-post-content .subtitle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  margin-bottom: 1rem;
}

.pinned-post-content .title {
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.pinned-post-summary {
  line-height: 1.6;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.pinned-post-controls {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 0.75rem;
}

.pinned-post-control {
  height: 2rem;
  padding-left: 0;
  padding-right: 0;
  width: 2rem;
}

.pinned-post-indicators {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.pinned-post-indicator {
  background: #cfcfcf;
  border-radius: 999px;
  display: block;
  height: 0.625rem;
  width: 0.625rem;
}

.pinned-post-indicator.is-active {
  background: #363636;
}

@media screen and (max-width: 768px) {
  .pinned-post-carousel {
    --pinned-carousel-height: 560px;
  }

  .pinned-post-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 42% minmax(0, 58%);
  }

  .pinned-post-image {
    min-height: 0;
  }

  .pinned-post-content {
    padding: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pinned-post-slide {
    transition: none;
  }
}
