/* Round 10 site-wide "no empty space" rule (owner, 2026-10-22).
   1. Chip and link rows: chips grow to share the row, so a wrapped chip never sits alone
      next to a blank gap (owner's screenshots: renew hero chips, closing CTA points).
   2. Card grids: a half-filled last row fills up. A lone last card spans the row and lays
      out side by side; two leftover cards in a 3-up grid share the row. */

/* ---------- 1. Chip and link rows ---------- */
.page5-chips li,
.cta5-points li,
.cta8-trust li,
.page5-linkrow ul > li,
.flex.flex-wrap.gap-3 > a.rounded-lg,
.flex.flex-wrap.gap-2 > a.rounded-full { flex: 1 1 auto; justify-content: center; text-align: center; }
.page5-linkrow ul > li > a { width: 100%; justify-content: center; }

/* ---------- 2. Card grids ---------- */
/* Blog index, tag archives and related guides: 2 columns from 768px, 3 from 1280px. */
@media (min-width: 768px) and (max-width: 1279px) {
  .grid.md\:grid-cols-2.xl\:grid-cols-3 > :nth-child(2n+1):last-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (min-width: 1280px) {
  .grid.md\:grid-cols-2.xl\:grid-cols-3 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .grid.md\:grid-cols-2.xl\:grid-cols-3 > * { grid-column: span 2; }
  .grid.md\:grid-cols-2.xl\:grid-cols-3 > :nth-child(3n+1):last-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .grid.md\:grid-cols-2.xl\:grid-cols-3 > :nth-child(3n+1):nth-last-child(2),
  .grid.md\:grid-cols-2.xl\:grid-cols-3 > :nth-child(3n+2):last-child { grid-column: span 3; }
}
/* News cards: 2 columns from 641px, 3 from 1024px. */
@media (min-width: 641px) and (max-width: 1023px) {
  .news-grid > :nth-child(2n+1):last-child { grid-column: 1 / -1; }
  .news-grid > :nth-child(2n+1):last-child > .news-card-link { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); height: 100%; }
}
@media (min-width: 1024px) {
  .news-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .news-grid > * { grid-column: span 2; }
  .news-grid > :nth-child(3n+1):last-child { grid-column: 1 / -1; }
  .news-grid > :nth-child(3n+1):last-child > .news-card-link { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); height: 100%; }
  .news-grid > :nth-child(3n+1):nth-last-child(2), .news-grid > :nth-child(3n+2):last-child { grid-column: span 3; }
}
