.wpds-archive-tile {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 1px solid color-mix(in srgb, currentColor 12%, transparent);
	border-radius: 8px;
	overflow: hidden;
	transition: border-color 120ms ease, box-shadow 120ms ease;
}

.wpds-archive-tile:hover {
	border-color: color-mix(in srgb, currentColor 40%, transparent);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.06);
}

/*
 * Thumbnail container reserves space and shows a placeholder pattern when the
 * featured image is absent. Real images are centered within the area with
 * breathing room, since component screenshots are natural-sized artifacts that
 * vary widely in dimensions.
 */
.wpds-archive-tile__thumb {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 3;
	margin: 0 !important;
	padding: 0 !important;
	display: grid;
	place-items: center;
	overflow: hidden;
	/* Empty state: diagonal-stripe placeholder. */
	background:
		linear-gradient(135deg, transparent 49%, rgba(0, 0, 0, 0.06) 49%, rgba(0, 0, 0, 0.06) 51%, transparent 51%) 0 0 / 16px 16px,
		color-mix(in srgb, currentColor 4%, transparent);
}

.wpds-archive-tile__thumb:has(img) {
	background: color-mix(in srgb, currentColor 4%, transparent);
}

.wpds-archive-tile__thumb .wp-block-post-featured-image {
	margin: 0;
	max-width: 80%;
	max-height: 80%;
}

.wpds-archive-tile__thumb img {
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	display: block;
}

.wpds-archive-tile__title {
	margin: 0.5rem 1rem 0.125rem !important;
	font-size: 1rem;
	font-weight: 600;
}

.wpds-archive-tile__title a {
	color: inherit;
	text-decoration: none;
}

/*
 * Whole-card clickability: the title's link stretches via a positioned
 * pseudo-element so the entire card is one tap/click target.
 */
.wpds-archive-tile__title a::after {
	content: '';
	position: absolute;
	inset: 0;
}

.wpds-archive-tile__excerpt {
	margin: 0 1rem 0.75rem !important;
	color: color-mix(in srgb, currentColor 70%, transparent);
	font-size: 0.875rem;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	/* Reserve two lines so cards with terse excerpts align with neighbors. */
	min-height: 2.5em;
}
