/* Home Core — Selected Work repo card (Phase 1 baseline; Phase 2 refines visuals). */
.is-style-hdc-repo-card {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 1.5rem !important;
	border: 1px solid hsl(var(--wpds-color-border, var(--border)) / 0.7);
	border-radius: var(--wpds-radius-lg, 0.75rem);
	background: hsl(var(--wpds-color-surface-card, var(--card)));
	height: 100%;
	text-align: left;
}

.is-style-hdc-repo-card > * {
	margin-block-start: 0 !important;
	margin-block-end: 0 !important;
}

.hdc-home-page__section--work > .wp-block-query.alignwide {
	margin-left: 0 !important;
	margin-right: 0 !important;
	max-width: none;
	width: 100%;
}

.hdc-home-page__section--work .wp-block-post-template {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

.hdc-home-page__section--work .wp-block-post {
	margin: 0;
}

.hdc-repo-card__meta {
	gap: 0.5rem;
	align-items: center;
	font-size: 0.875rem;
	line-height: 1.4286;
	color: hsl(var(--wpds-color-text-muted, var(--muted-foreground)));
}

.hdc-repo-card__meta > * {
	line-height: inherit;
}

.is-style-hdc-repo-card .wp-block-post-title {
	margin: 0;
}

.is-style-hdc-repo-card .wp-block-post-title + .hdc-repo-card__summary {
	margin-top: -0.5rem !important;
}

.hdc-repo-card__badge,
.hdc-repo-card__source,
.hdc-repo-card__lang,
.hdc-repo-card__updated {
	margin: 0;
}

/* Hide empty bound badges/labels (source_badge stores '' when there is no badge). */
.hdc-repo-card__badge:empty,
.hdc-repo-card__source:empty,
.hdc-repo-card__lang:empty,
.hdc-repo-card__updated:empty {
	display: none;
}

.hdc-repo-card__summary {
	margin: 0;
	flex: 1 1 auto;
	line-height: 1.5;
}

.hdc-home-page__card-copy--clamp {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

.hdc-repo-card__footer {
	align-items: center;
	border-top: 1px solid hsl(var(--wpds-color-border, var(--border)) / 0.7);
	gap: 0.5rem;
	font-size: 0.875rem;
	line-height: 1.4286;
	margin-top: auto;
	padding-top: 0.75rem;
}

.hdc-repo-card__footer .wp-block-buttons,
.hdc-repo-card__footer .wp-block-button {
	margin: 0;
}

.hdc-repo-card__footer .wp-block-button__link {
	background: transparent;
	border: 0;
	color: hsl(var(--text-accent));
	font-size: 0.875rem;
	font-weight: 700;
	min-height: 0;
	padding: 0;
}

.hdc-repo-card__footer .wp-block-button__link::after {
	content: " \2192";
}

@media (max-width: 959px) {
	.hdc-home-page__section--work .wp-block-post-template {
		grid-template-columns: 1fr;
	}
}

.hdc-home-page__section--writing > .wp-block-query.alignwide {
	margin-left: 0 !important;
	margin-right: 0 !important;
	max-width: none;
	width: 100%;
}

.hdc-home-page__section--writing .wp-block-post-template {
	display: grid;
	gap: 1rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.is-style-hdc-article-row {
	align-items: flex-start;
	background: hsl(var(--surface-1));
	border: 1px solid hsl(var(--border));
	border-radius: var(--radius-surface);
	display: flex;
	gap: 1rem;
	padding: 1rem;
	position: relative;
}

.is-style-hdc-article-row .wp-block-post-featured-image {
	flex: 0 0 7rem;
	margin: 0;
}

.is-style-hdc-article-row .wp-block-post-featured-image img {
	aspect-ratio: 1;
	border-radius: var(--radius-control);
	display: block;
	height: 7rem;
	object-fit: cover;
	width: 7rem;
}

.is-style-hdc-article-row .wp-block-post-featured-image:empty {
	display: none;
}

.is-style-hdc-article-row .hdc-home-page__post-body {
	display: grid;
	flex: 1 1 auto;
	gap: 0.35rem;
	min-width: 0;
}

.is-style-hdc-article-row .wp-block-post-excerpt {
	margin: 0;
}

.is-style-hdc-article-row .wp-block-post-excerpt__excerpt {
	margin: 0;
}

.is-style-hdc-article-row .hdc-home-page__post-meta {
	color: hsl(var(--text-subtle));
	font-size: 0.875rem;
	gap: 0.75rem;
}

@media (max-width: 639px) {
	.is-style-hdc-article-row {
		flex-direction: column;
	}
}
