/* Keep shared Row card thumbnails steady while full titles wrap beside them. */
.wp-block-post-template .pst-card--row > .wp-block-post-featured-image {
	flex-shrink: 0;
}

.wp-block-post-template .pst-card--row > .wp-block-group {
	min-width: 0;
}

/* Editorial cards retain full titles, including long translated words. */
.wp-block-post-template .is-style-editorial-card .wp-block-post-title {
	overflow-wrap: anywhere;
}

/* Download galleries keep two readable tiles across phone viewports. */
@media (max-width: 782px) {

	.wp-block-post-template.pst-download-grid,
	.wp-block-post-template.pst-editorial-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: var(--wp--preset--spacing--40);
	}
}

/*
 * Image rows for Popular now, using the Row card pattern (patterns/card-row.php).
 * Keep the "numbered" style name for saved templates and the Popular posts
 * Query Loop variation. The presentation is image and title, without ranks.
 * List items are not blocks, so theme.json cannot reach their separators.
 */
.wp-block-post-template.is-style-numbered > li {
	display: block;
	padding-block: var(--wp--preset--spacing--20);
	border-top: 1px solid var(--wp--preset--color--line);
}

.wp-block-post-template.is-style-numbered > li:first-child {
	border-top: 0;
}

/*
 * Keep Popular thumbnails at 4.5rem, 4:3, including older saved Row cards with a
 * larger inline width. Only !important can override those stored dimensions.
 */
.wp-block-post-template.is-style-numbered .wp-block-post-featured-image {
	flex: 0 0 4.5rem;
	width: 4.5rem !important;
	height: auto !important;
	aspect-ratio: 4 / 3;
	margin: 0;
}

.wp-block-post-template.is-style-numbered .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	border-radius: var(--wp--preset--border-radius--sm);
	object-fit: cover;
}

/* Full titles use the space recovered from the rank column. */
.wp-block-post-template.is-style-numbered .wp-block-post-title {
	margin: 0;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.wp-block-post-template.is-style-numbered .wp-block-post-title a {
	color: inherit;
	text-decoration: none;
}

.wp-block-post-template.is-style-numbered .wp-block-post-title a:hover {
	color: var(--wp--preset--color--action);
}

/*
 * In a Muted band (styles/sections/section-muted.json, the homepage "Popular
 * now") each item is a white image-and-title row.
 */
.is-style-section-muted .wp-block-post-template.is-style-numbered > li {
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	border: 0;
	border-radius: var(--wp--preset--border-radius--md);
	background: var(--wp--preset--color--base);
}

/* The guides of a group, on a guide: an ordered list; the current one is plain. */
.wp-block-post-template.pst-guide-path__list {
	margin: 0;
	padding-left: 1.5em;
	list-style: decimal;
}

.pst-guide-path__list > li {
	margin-block: 0;
	padding-block: 0.125rem;
}

.pst-guide-path__list .wp-block-post-title {
	margin: 0;
	font-weight: 400;
}

.pst-guide-path__list .wp-block-post-title a {
	color: inherit;
}

.pst-guide-path__list .wp-block-post-title a[aria-current="page"] {
	font-weight: 600;
	text-decoration: none;
}

.wp-block-post-template.pst-guide-read-first__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.pst-guide-read-first__list .wp-block-post-title {
	margin: 0;
	font-size: inherit;
}
