/* WordPress-specific adjustments. Keep the original design untouched. */

/* Offset the sticky header below the WP admin bar when logged in. */
body.admin-bar header.sticky {
  top: 32px;
}
@media screen and (max-width: 782px) {
  body.admin-bar header.sticky {
    top: 46px;
  }
}

/* Mobile nav toggle state (replicates the React open state). */
#sh-mobile-nav.sh-open {
  display: block;
}

/* Form success message, replicating the React confirmation card. */
.sh-form-success {
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 2rem;
  text-align: center;
}
.sh-form-success h3 {
  font-family: var(--font-serif), serif;
  font-size: 1.5rem;
  line-height: 2rem;
}
.sh-form-success p {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--muted-foreground);
}

/* Blog archive pagination (paginate_links output), styled to the design system. */
.sh-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}
.sh-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background: var(--card);
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    background-color 150ms,
    color 150ms;
}
.sh-pagination a.page-numbers:hover {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}
.sh-pagination .page-numbers.current {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}
.sh-pagination .page-numbers.dots {
  border: none;
  background: transparent;
  color: var(--muted-foreground);
}

/*
 * Typography for user-authored posts written in the block editor.
 * :where() keeps specificity at zero and [class] exclusions ensure the
 * imported pre-styled story HTML is never affected.
 */
.sh-entry :where(p:not([class])) {
  margin-top: 1.25rem;
  line-height: 1.625;
  color: color-mix(in oklab, var(--foreground) 90%, transparent);
}
.sh-entry :where(h2:not([class])) {
  margin-top: 3rem;
  font-family: var(--font-serif), serif;
  font-size: 1.875rem;
  line-height: 1.25;
  text-wrap: balance;
}
.sh-entry :where(h3:not([class])) {
  margin-top: 2rem;
  font-family: var(--font-serif), serif;
  font-size: 1.375rem;
  line-height: 1.35;
}
.sh-entry :where(ul:not([class])) {
  margin-top: 1.25rem;
  padding-left: 1.5rem;
  list-style: disc;
}
.sh-entry :where(ol:not([class])) {
  margin-top: 1.25rem;
  padding-left: 1.5rem;
  list-style: decimal;
}
.sh-entry :where(li:not([class])) {
  margin-top: 0.5rem;
  line-height: 1.625;
}
.sh-entry :where(a:not([class])) {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.sh-entry :where(blockquote:not([class])) {
  margin-top: 1.5rem;
  border-left: 3px solid var(--primary);
  padding-left: 1.25rem;
  font-style: italic;
  color: var(--muted-foreground);
}
.sh-entry :where(img:not([class])) {
  margin-top: 2rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  height: auto;
  max-width: 100%;
}
