/* Sleeping Organic blog skin (site redesign wave 6, design plan 1.11, 2026-11-11). Sandbox only: loaded after the
   site palette by so-site-palette.php. Blog index, category archives, search results and single posts.
   Style only: no post content, featured image, CTA or related-post choice is changed here. */

/* ---------- Index, archives, search: cream header band over a white card grid ---------- */
.so-blog-archive { padding-top: 0; padding-bottom: 4.5rem; }
.so-blog-header {
  background: var(--so-cream);
  border-bottom: 1px solid var(--so-border);
  box-shadow: 0 0 0 100vmax var(--so-cream);
  clip-path: inset(0 -100vmax);
  margin-bottom: 3rem;
  padding: 3.25rem 0 2.75rem;
}
.so-blog-title { font-size: clamp(2rem, 3.4vw, 2.9rem); font-weight: 400; letter-spacing: -.01em; line-height: 1.12; max-width: 22ch; }
.so-blog-desc { color: var(--so-text-muted); font-size: 1.05rem; line-height: 1.6; margin-top: .7rem; max-width: 56ch; margin-left: 0; margin-right: 0; }
.so-blog-search { margin-top: 1.5rem; width: min(100%, 560px); }
.so-blog-search-input { border-radius: 6px; }
.so-blog-search-button { background: var(--so-green-dark); border-color: var(--so-green-dark); border-radius: 6px; }
.so-blog-search-button:hover, .so-blog-search-button:focus { background: var(--so-green); border-color: var(--so-green); }

.so-blog-grid { gap: 2.5rem 2rem; }
.so-blog-card { background: transparent; border: 0; border-radius: 0; overflow: visible; }
.so-blog-card:hover { box-shadow: none; transform: none; }
.so-blog-card-img { aspect-ratio: 3 / 2; background: var(--so-warm); border-radius: 6px; }
.so-blog-card-body { padding: 1rem 0 0; }
.so-blog-date { color: var(--so-text-muted); font-size: .75rem; letter-spacing: .04em; }
.so-blog-card-title { font-family: var(--so-font-display); font-size: 1.3rem; font-weight: 400; letter-spacing: -.01em; line-height: 1.25; margin: .35rem 0 .5rem; }
.so-blog-card-title a { color: var(--so-green-dark); }
.so-blog-card-title a:hover { color: var(--so-green); }
.so-blog-excerpt { color: var(--so-text-muted); font-size: .92rem; line-height: 1.6; margin: 0 0 .6rem; }
.so-blog-read-more { color: var(--so-green); font-size: .85rem; letter-spacing: 0; text-decoration: underline; text-underline-offset: 3px; }
.so-blog-card :is(a, button):focus-visible, .so-blog-pagination a:focus-visible { outline: 2px solid var(--so-green); outline-offset: 3px; }

.so-blog-pagination { margin-top: 3.5rem; }
.so-blog-pagination .nav-links { flex-wrap: wrap; gap: 8px; }
.so-blog-pagination .page-numbers { border-radius: 6px; font-size: .9rem; height: 44px; min-width: 44px; padding: 0 14px; }
.so-blog-pagination .page-numbers.current { background: var(--so-green-dark); border-color: var(--so-green-dark); }
.so-blog-pagination .page-numbers.dots { border-color: transparent; min-width: 24px; padding: 0 2px; }
.so-blog-empty { border-radius: 6px; }

/* Phones: a row per post (picture left, title right) instead of a screen per post. */
@media (max-width: 549px) {
  .so-blog-header { margin-bottom: 1.5rem; padding: 2rem 0 1.75rem; }
  .so-blog-desc { font-size: .98rem; }
  .so-blog-search { flex-direction: row; gap: 8px; }
  .so-blog-search-button { padding: 0 16px; width: auto; }
  .so-blog-grid, .so-blog-grid--related { gap: 0; grid-template-columns: 1fr; }
  .so-blog-card { align-items: start; border-bottom: 1px solid var(--so-border); column-gap: 14px; display: grid; grid-template-columns: 112px minmax(0, 1fr); padding: 1rem 0; }
  .so-blog-grid > .so-blog-card:first-child { padding-top: 0; }
  .so-blog-grid > .so-blog-card:last-child { border-bottom: 0; }
  .so-blog-card-img { aspect-ratio: 1 / 1; }
  .so-blog-card-body { padding: 0; }
  .so-blog-card-title { font-size: 1.08rem; line-height: 1.28; margin: .2rem 0 0; }
  .so-blog-card-title a { display: block; }
  .so-blog-excerpt, .so-blog-read-more { display: none; }
  .so-blog-pagination { margin-top: 2rem; }
  .so-blog-pagination .page-numbers { padding: 0 10px; }
}

/* ---------- Single post ---------- */
/* Featured image: sits in the text column at its real size. so-skin-blog.php classes it by width. */
.so-post-hero { background: transparent; display: block; margin: 0 auto; max-height: none; max-width: 800px; overflow: visible; padding: 2.5rem 30px 0; }
.so-post-hero img { border-radius: 6px; display: block; height: auto; margin: 0; max-height: 440px; max-width: 100%; object-fit: cover; width: auto; }
.so-post-hero img.so-hero-lg { aspect-ratio: 2 / 1; height: auto; max-height: none; width: 100%; }
.so-post-hero:has(img.so-hero-hide), .so-post-hero img.so-hero-hide { display: none; }

.blog-single { max-width: 800px; padding-top: 2.25rem; padding-bottom: 4.5rem; }
.so-post-header { margin-bottom: 2rem; }
.blog-single .entry-title { font-size: clamp(1.9rem, 3.4vw, 2.75rem); font-weight: 400; letter-spacing: -.01em; line-height: 1.14; margin-bottom: 1rem; }
.blog-single .entry-meta { color: var(--so-text-muted); margin-bottom: 0; padding-bottom: 1.25rem; }
.so-reading-time::before { background: var(--so-text-muted); }

/* One text column: paragraphs line up with headings, lists and tables. */
.blog-single article p, .blog-single .entry-content > p { margin-left: 0; margin-right: 0; max-width: none; }
.blog-single .entry-content { color: var(--so-text); font-size: 1.06rem; line-height: 1.75; }
.blog-single .entry-content h2 { color: var(--so-green-dark); font-size: clamp(1.5rem, 2.4vw, 1.85rem); font-weight: 400; line-height: 1.2; margin-top: 2.75rem; margin-bottom: .85rem; }
.blog-single .entry-content h3 { color: var(--so-green-dark); font-size: 1.18rem; line-height: 1.35; margin-top: 2rem; }
.blog-single .entry-content h4 { font-size: 1.02rem; margin: 1.5rem 0 .4rem; }
.blog-single .entry-content img { border-radius: 6px; }

/* Bullets and numbers back (the theme reset removes them everywhere). */
.blog-single .entry-content ul { list-style: disc; }
.blog-single .entry-content ol { list-style: decimal; }
.blog-single .entry-content ul ul { list-style: circle; }
.blog-single .entry-content :is(ul, ol) { margin: 1rem 0 1.5rem; padding-left: 1.4rem; }
.blog-single .entry-content li { padding-left: .2rem; }
.blog-single .entry-content li::marker { color: var(--so-green-light); }

.blog-single .entry-content th { background: var(--so-warm); color: var(--so-green-dark); font-size: .9rem; letter-spacing: 0; text-transform: none; }
.blog-single .entry-content :is(th, td) { border-color: var(--so-border); }
.blog-single .entry-content blockquote { background: var(--so-cream); border-left-color: var(--so-green-light); border-radius: 0 6px 6px 0; color: var(--so-text); }
.blog-single .entry-content blockquote p:last-child { margin-bottom: 0; }

/* Question and answer lists written as <dl> (20 posts): space between pairs, question in the heading green. */
.blog-single .entry-content dl { margin: 1rem 0 1.75rem; }
.blog-single .entry-content dt { color: var(--so-green-dark); font-weight: 600; line-height: 1.45; margin: 1.35rem 0 .3rem; }
.blog-single .entry-content dt:first-child { margin-top: 0; }
.blog-single .entry-content dt :is(strong, b) { font-weight: inherit; }
.blog-single .entry-content dd { margin: 0; }
.blog-single .entry-content dd + dd { margin-top: .6rem; }

/* One callout style for every product callout in a post: the two injected panels, the hand-written boxed
   callout (inline styles, hence !important) and the closing box. Warm panel, serif headline, one green button. */
.blog-single .so-seo-blog-cta,
.blog-single .so-seo-link-panel,
.blog-single .entry-content > div:is([style*="border: 2px solid"], [style*="border:2px solid"]),
.blog-single .so-post-cta {
  background: var(--so-warm) !important;
  border: 1px solid var(--so-border) !important;
  border-left: 3px solid var(--so-green-light) !important;
  border-radius: 6px !important;
  margin: 2rem 0 !important;
  padding: 1.4rem 1.6rem !important;
  text-align: left !important;
}
.blog-single .so-seo-blog-cta { margin-top: 0 !important; }
.blog-single .so-seo-blog-cta + .so-seo-link-panel { margin-top: -1rem !important; }

.blog-single .so-seo-blog-cta__headline,
.blog-single .entry-content > div:is([style*="border: 2px solid"], [style*="border:2px solid"]) > p:first-child,
.blog-single .so-post-cta h3 {
  color: var(--so-green-dark) !important;
  font-family: var(--so-font-display);
  font-size: 1.4rem !important;
  font-weight: 400 !important;
  letter-spacing: -.01em;
  line-height: 1.25;
  margin: 0 0 .5rem !important;
}
.blog-single :is(.so-seo-blog-cta, .so-seo-link-panel) p,
.blog-single .entry-content > div:is([style*="border: 2px solid"], [style*="border:2px solid"]) > p,
.blog-single .so-post-cta p { color: var(--so-text); font-size: 1rem; line-height: 1.6; margin: 0 0 1rem; max-width: 62ch; }
/* The hand-written box sets its own grey text colors inline. */
.blog-single .entry-content > div:is([style*="border: 2px solid"], [style*="border:2px solid"]) > p:not(:first-child) { color: var(--so-text) !important; }
.blog-single :is(.so-seo-blog-cta, .so-seo-link-panel) p:last-child,
.blog-single .entry-content > div:is([style*="border: 2px solid"], [style*="border:2px solid"]) > p:last-child { margin-bottom: 0 !important; }
.blog-single .so-seo-link-panel__grid { gap: 1rem 1.5rem; }
.blog-single .so-seo-link-panel__grid > p:only-child { grid-column: 1 / -1; }
.blog-single .entry-content p.so-seo-blog-cta__eyebrow, .blog-single .entry-content p.so-seo-link-panel__eyebrow { color: var(--so-honey); font-size: .78rem; font-weight: 700; letter-spacing: .06em; line-height: 1.4; margin: 0 0 .5rem; }
.blog-single :is(.so-seo-blog-cta, .so-seo-link-panel) a { color: var(--so-green-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.blog-single .entry-content > div:is([style*="border: 2px solid"], [style*="border:2px solid"]) a[style],
.blog-single .so-post-cta .so-btn-primary {
  background: var(--so-green-dark) !important;
  border-radius: 6px !important;
  color: #fff !important;
  display: inline-block;
  font-size: .98rem !important;
  font-weight: 600 !important;
  line-height: 1.3;
  min-height: 44px;
  padding: 12px 24px !important;
  text-decoration: none !important;
}
.blog-single .entry-content > div:is([style*="border: 2px solid"], [style*="border:2px solid"]) a[style]:hover,
.blog-single .so-post-cta .so-btn-primary:hover { background: var(--so-green) !important; }

.so-post-footer { margin-top: 3rem; padding-top: 0; border-top: 0; }
.so-preferred-source { border-radius: 6px; }
.so-preferred-source__btn { border-radius: 6px; min-height: 44px; }

.so-related-posts { margin-top: 3rem; padding-top: 2.5rem; }
.so-related-title { color: var(--so-green-dark); font-family: var(--so-font-display); font-size: 1.5rem; font-weight: 400; letter-spacing: -.01em; }
.so-blog-grid--related { gap: 1.5rem; }
.so-blog-grid--related .so-blog-card-title { font-size: 1.08rem; }

@media (max-width: 549px) {
  .so-post-hero { padding: 1.25rem 16px 0; }
  .so-post-hero img, .so-post-hero img.so-hero-lg { height: auto; }
  .so-post-hero img.so-hero-lg { aspect-ratio: 16 / 9; }
  .blog-single { padding-top: 1.5rem; padding-bottom: 3rem; }
  .blog-single .entry-title { font-size: 1.75rem; }
  .blog-single .entry-content { font-size: 1.02rem; line-height: 1.7; }
  .blog-single .so-seo-blog-cta, .blog-single .so-seo-link-panel,
  .blog-single .entry-content > div:is([style*="border: 2px solid"], [style*="border:2px solid"]), .blog-single .so-post-cta { padding: 1.15rem 1.15rem !important; }
  .blog-single .entry-content > div:is([style*="border: 2px solid"], [style*="border:2px solid"]) a[style], .blog-single .so-post-cta .so-btn-primary { display: block; text-align: center; }
  .so-related-title { margin-bottom: 1rem; }
}

/* ---------- Per-post pass (2026-11-12) ---------- */
/* /variations-latex/ carries its own card styles (grey cards, bold green centered heading with a rule). */
.blog-single .lv-wrap { color: var(--so-text); max-width: none; }
.blog-single .entry-content .lv-section-title { border-bottom: 0; color: var(--so-green-dark); font-size: clamp(1.5rem, 2.4vw, 1.85rem); font-weight: 400; margin: 2.75rem 0 1.25rem; padding-bottom: 0; text-align: left; }
.blog-single .lv-card { background: var(--so-warm); border: 1px solid var(--so-border); border-radius: 6px; box-shadow: none; margin-bottom: 1.25rem; }
.blog-single .lv-card { align-items: stretch; overflow: hidden; }
.blog-single .entry-content .lv-card-img img { border-radius: 0; height: 100%; margin: 0; object-fit: cover; }
.blog-single .lv-card-text { align-self: center; }
.blog-single .entry-content .lv-card-text p { margin: 0; }
.blog-single .lv-card-text p:empty { display: none; }
.blog-single .lv-card-num { background: var(--so-green-dark); margin-bottom: .6rem; }
@media (max-width: 768px) {
  .blog-single .lv-card, .blog-single .lv-card.lv-reverse { gap: 0; }
  .blog-single .lv-card-text, .blog-single .lv-reverse .lv-card-text { flex: 0 0 auto; padding: 1rem 1.15rem 1.15rem; }
}

/* Featured banners that are already wide keep their own shape (so-skin-blog.php adds the class by ratio):
   1.9 and wider everywhere, 1.7 to 1.9 on phones (where the crop is 16:9). */
.so-post-hero img.so-hero-lg.so-hero-wide { aspect-ratio: auto; }
@media (max-width: 549px) {
  .so-post-hero img.so-hero-lg:is(.so-hero-wide, .so-hero-mid) { aspect-ratio: auto; }
}
/* Tall pictures in the text (size drawings, portrait product shots stretched to the column by inline
   width:100%) stop at a readable height instead of filling a whole phone screen. */
.blog-single .entry-content img { max-height: 560px; object-fit: contain; }
@media (max-width: 549px) {
  .blog-single .entry-content img { max-height: 420px; }
}
.blog-single .entry-content .lv-card-img img { max-height: none; object-fit: cover; }
/* Picture captions (two posts) read as captions, not as the next paragraph. */
.blog-single .entry-content figure { margin: 1.75rem 0; }
.blog-single .entry-content figure img { margin-bottom: 0; }
.blog-single .entry-content figcaption { color: var(--so-text-muted); font-size: .9rem; line-height: 1.5; margin-top: .6rem; }
/* An automatic keyword link inside a callout headline keeps the headline's look. */
.blog-single .entry-content > div:is([style*="border: 2px solid"], [style*="border:2px solid"]) > p:first-child a { color: inherit; font-weight: inherit; text-decoration-thickness: 1px; }
