/* Blog-card summaries only. Preserve full article content and link labels.
   Multiline ellipsis adapts to the actual card width and font on each device. */
:is(.jg-homepage-exact, .jg-domestic-services-exact, .jg-core-exact) :is(
  .home-blog-card h3,
  .article-card h3,
  .article-related-card h3,
  .featured-article-copy > h2
),
body.jimsglass-presentation.wp-theme-jims-wp .wp-site-blocks
  .wp-block-post-template .wp-block-post-title,
body.jimsglass-presentation.wp-theme-jims-wp .wp-site-blocks
  .wp-block-post-template .wp-block-post-title > a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

:is(.jg-homepage-exact, .jg-domestic-services-exact, .jg-core-exact) :is(
  .home-blog-card-body > p,
  .article-card-body > p,
  .article-related-card p,
  .featured-article-copy > p
),
body.jimsglass-presentation.wp-theme-jims-wp .wp-site-blocks
  .wp-block-post-template .wp-block-post-excerpt__excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}


/* Compact blog cards on every page using the shared card styles.
   Let the content set row height instead of retaining the old 500px minima. */
:is(.jg-homepage-exact, .jg-domestic-services-exact, .jg-core-exact) :is(
  .home-blog-card,
  .home-blog-card:last-child,
  .article-card
) {
  min-height: 0;
}

:is(.jg-homepage-exact, .jg-domestic-services-exact, .jg-core-exact) :is(
  .home-blog-card-body,
  .article-card-body
) {
  padding: 24px 24px 20px;
}

:is(.jg-homepage-exact, .jg-domestic-services-exact, .jg-core-exact) :is(
  .home-blog-card-body > p,
  .article-card-body > p
) {
  margin-bottom: 20px;
}

:is(.jg-homepage-exact, .jg-domestic-services-exact, .jg-core-exact) :is(
  .home-blog-card-footer,
  .article-card-footer
) {
  padding-top: 16px;
}

:is(.jg-homepage-exact, .jg-domestic-services-exact, .jg-core-exact)
  .article-related-card > div {
  padding: 24px 24px 20px;
}

:is(.jg-homepage-exact, .jg-domestic-services-exact, .jg-core-exact)
  .article-related-card p {
  margin-bottom: 16px;
}

/* Native WordPress archive cards also follow their content height, including
   posts without a featured image, rather than stretching to fill the row. */
body.jimsglass-presentation.wp-theme-jims-wp .wp-site-blocks
  .wp-block-post-template > .wp-block-post {
  align-self: start;
}
