/* SPL Management: Insights post grid (pages/insights.html and the "Related insights" loops on the service pages).
   spl.css v0.1.0 has no post-grid classes, so these live here until they are merged. Enqueue after spl.css, e.g.
   wp_enqueue_style('spl-insights', get_stylesheet_directory_uri() . '/pages/insights-extra.css', ['spl'], SPL_VERSION);
   Uses only --spl- tokens from tokens.css. */

/* Grid: 1 column, 2 from 700px, 3 from 960px (the core grid layout on post-template also applies when its styles load). */
.wp-block-post-template.spl-post-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--spl-gutter); }
.wp-block-post-template.spl-post-grid > li { margin: 0; }
@media (min-width: 700px) { .wp-block-post-template.spl-post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .wp-block-post-template.spl-post-grid { grid-template-columns: repeat(3, 1fr); } }

/* Card: same surface, hairline, and hover rules as .spl-card; the title link is stretched over the card. */
.spl-post-card {
  position: relative; height: 100%; display: flex; flex-direction: column; gap: var(--spl-space-2);
  border: 1px solid var(--spl-line); background: var(--spl-surface); border-radius: var(--spl-radius); padding: var(--spl-space-4);
  transition: border-color var(--spl-dur-state) var(--spl-ease-state);
}
.spl-post-card:hover, .spl-post-card:focus-within { border-color: var(--spl-steel-600); }
.spl-post-card:focus-within { border-color: var(--spl-focus); }
.spl-post-card__media { margin: calc(-1 * var(--spl-space-4)) calc(-1 * var(--spl-space-4)) var(--spl-space-2); }
.spl-post-card__media img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--spl-radius) var(--spl-radius) 0 0; }
.spl-post-card__media a { display: block; }
.spl-post-card__terms { margin: 0; }
.spl-post-card__terms a { color: inherit; text-decoration: none; position: relative; z-index: 1; }
.spl-post-card__terms .wp-block-post-terms__separator { margin: 0 4px; }
.spl-post-card__title { margin: 0; font-size: var(--spl-text-h3); }
.spl-post-card__title a { color: inherit; text-decoration: none; }
.spl-post-card__title a::after { content: ""; position: absolute; inset: 0; }
.spl-post-card__title a:focus-visible { outline-offset: 1px; }
.spl-post-card__date { margin: auto 0 0; }

/* Pagination: 44px targets, hairline top, brand type. */
.wp-block-query-pagination.spl-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: var(--spl-space-2); margin-top: var(--spl-space-6); padding-top: var(--spl-space-3); border-top: 1px solid var(--spl-line); }
.spl-pagination a, .spl-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; text-decoration: none; font-family: var(--spl-font-head); font-weight: 600; font-size: var(--spl-text-ui); color: var(--spl-ink-soft); }
.spl-pagination a:hover { color: var(--spl-link); }
.spl-pagination .page-numbers.current { color: var(--spl-ink); border-bottom: 2px solid var(--spl-accent); }
.spl-pagination .page-numbers.dots { min-width: 0; }
