/*
 * happymonday/reviews + reviews-item — a wall of review cards (rating + quote +
 * author) in alternating two-tone surfaces. Ported verbatim from the prototype
 * .hm-testi* rules (variant-b/style.css §15), driven by tokens (band / two
 * alternating card surfaces / stars). No hardcoded hex.
 */

/* Section band is provided by the theme's shared .hm-has-band rule. */
/* Head flips light on a dark band (band-luminance auto-contrast). */
.hm-reviews.hm-has-band.is-dark .hm-testi__title {
	color: var(--hm-bg-1);
}

.hm-testi__head {
	text-align: center;
	margin-bottom: var(--hm-sp-3);
}
.hm-testi__title {
	font-family: var(--hm-font-head);
	font-size: var(--hm-fs-2xl);
}
.hm-testi__note {
	font-size: var(--hm-fs-sm);
	color: var(--hm-text-muted);
	font-style: italic;
}

.hm-reviews__empty {
	text-align: center;
	color: var(--hm-text-muted);
	font-style: italic;
}

.hm-testi__grid {
	display: grid;
	grid-template-columns: repeat(var(--hm-reviews-cols, 3), 1fr);
	gap: var(--hm-sp-2);
	align-items: stretch; /* equal-height rows so the wall reads evenly */
}

.hm-testi__card {
	background: var(--hm-paper);
	border: 1px solid var(--hm-line);
	border-radius: var(--hm-radius-lg);
	padding: var(--hm-sp-3) var(--hm-sp-2) var(--hm-sp-2);
	box-shadow: 0 8px 24px var(--hm-shadow-soft);
	position: relative;
}

/* Alternating A/B surfaces (A = odd, B = even). */
.hm-testi__grid > .hm-testi__card:nth-child(odd) {
	background: var(--hm-reviews-a, var(--hm-paper));
}
.hm-testi__grid > .hm-testi__card:nth-child(even) {
	background: var(--hm-reviews-b, var(--hm-bg-2-soft));
}

/* a soft script/italic opening quote mark, editorial not scrapbook */
.hm-testi__card::before {
	content: "\201C";
	position: absolute;
	top: 0.2rem;
	left: 1.1rem;
	font-family: var(--hm-font-head);
	font-style: italic;
	font-size: 3.2rem;
	line-height: 1;
	color: var(--hm-cta-1);
	pointer-events: none;
}

.hm-testi__stars {
	color: var(--hm-reviews-stars, var(--hm-accent-1));
	font-family: var(--hm-font-script);
	font-size: var(--hm-fs-lg);
	margin: 0;
}
.hm-testi__body {
	color: var(--hm-text);
	margin: 0;
}
.hm-testi__who {
	display: flex;
	flex-direction: column;
	margin-top: var(--hm-sp-1);
}
.hm-testi__name {
	font-family: var(--hm-font-head);
	font-weight: var(--hm-head-weight);
}
.hm-testi__handle {
	font-size: var(--hm-fs-sm);
	color: var(--hm-ink);
	font-family: var(--hm-font-script);
}

/* Optional avatar sits beside the author name. */
.hm-testi__figcap {
	display: flex;
	align-items: center;
	gap: var(--hm-sp-1);
	margin-top: var(--hm-sp-1);
}
.hm-testi__avatar {
	width: 2.6rem;
	height: 2.6rem;
	border-radius: 50%;
	object-fit: cover;
	flex: none;
}
.hm-testi__figcap .hm-testi__who {
	margin-top: 0;
}

/* Per-parity auto-contrast: flip a dark card's text/handle to a light tone. */
.hm-reviews--a-dark .hm-testi__grid > .hm-testi__card:nth-child(odd) .hm-testi__body,
.hm-reviews--a-dark .hm-testi__grid > .hm-testi__card:nth-child(odd) .hm-testi__name,
.hm-reviews--a-dark .hm-testi__grid > .hm-testi__card:nth-child(odd) .hm-testi__handle,
.hm-reviews--b-dark .hm-testi__grid > .hm-testi__card:nth-child(even) .hm-testi__body,
.hm-reviews--b-dark .hm-testi__grid > .hm-testi__card:nth-child(even) .hm-testi__name,
.hm-reviews--b-dark .hm-testi__grid > .hm-testi__card:nth-child(even) .hm-testi__handle {
	color: var(--hm-bg-1);
}

/* Mobile: 2 columns then 1 (theme's global mobile breakpoint + a narrow step). */
@media (max-width: 820px) {
	.hm-testi__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 560px) {
	.hm-testi__grid {
		grid-template-columns: 1fr;
	}
}
