.sienci-review-bento {
	--sienci-review-bento-card-bg: #fcfcfc;
	--sienci-review-bento-card-border: #b0b0b0;
	--sienci-review-bento-text: #1f2937;
	--sienci-review-bento-text-muted: #585e69;
	--sienci-review-bento-star: #f59e0b;
	--sienci-review-bento-star-empty: #c6c7bb;

	display: grid;
	grid-template-columns: repeat( 4, 1fr );
	/* Safe no-JS fallback: rows size to content, cards align in flat rows.
	   view.js switches this to a fixed track + per-card row-span once it can
	   measure heights — that's what lets the featured card genuinely span 2
	   columns in the middle of the grid and everything else pack densely
	   around it, in every browser (not just ones with native grid masonry). */
	grid-auto-rows: min-content;
	gap: 1.25rem;
	grid-auto-flow: dense;
	/* Without this, grid's default align-items: stretch fills each card to
	   its assigned row-span — which is exactly what view.js is trying to
	   measure, so any given span becomes somewhat self-fulfilling. Forcing
	   every card to its natural content height regardless of span keeps the
	   measurement honest. */
	align-items: start;
	min-width: 0;
	max-width: 100%;
}

.sienci-review-bento__item {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 1.5rem;
	min-width: 0;
	padding: 1.5rem;
	border-radius: 10px;
	background: var( --sienci-review-bento-card-bg );
	border: 1px solid var( --sienci-review-bento-card-border );
	box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.04 );
	box-sizing: border-box;
}

/* Our own `display: flex` above otherwise wins over the browser's default
   `[hidden] { display: none }` UA rule (author styles beat UA styles
   regardless of specificity), which would leave cards view.js has hidden
   still occupying — and overflowing past — a grid cell. */
.sienci-review-bento__item[hidden] {
	display: none;
}

.sienci-review-bento__item--featured {
	/* grid-row-end is set per-card by view.js based on measured height —
	   the bigger type and padding here are what make this tile taller. */
	grid-column: span 2;
	padding: 2rem;
}

.sienci-review-bento__item--featured .sienci-review-bento__content {
	font-size: 1.25rem;
	line-height: 1.5;
}

.sienci-review-bento__content {
	margin: 0;
	color: var( --sienci-review-bento-text );
	font-size: 0.95rem;
	line-height: 1.6;
}

.sienci-review-bento__content::before {
	content: "\201C";
}

.sienci-review-bento__content::after {
	content: "\201D";
}

.sienci-review-bento__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	min-width: 0;
}

.sienci-review-bento__byline {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
	min-width: 0;
	overflow: hidden;
}

.sienci-review-bento__author {
	font-weight: 600;
	color: var( --sienci-review-bento-text );
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sienci-review-bento__product {
	font-size: 0.85em;
	color: var( --sienci-review-bento-text-muted );
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sienci-review-bento__stars {
	display: inline-flex;
	gap: 0.1em;
	flex-shrink: 0;
	letter-spacing: 0.05em;
}

.sienci-review-bento__star {
	color: var( --sienci-review-bento-star-empty );
}

.sienci-review-bento__star--filled {
	color: var( --sienci-review-bento-star );
}

@media ( max-width: 900px ) {
	.sienci-review-bento {
		grid-template-columns: repeat( 2, 1fr );
	}

	/* At 2 columns the featured card's existing span-2 already makes it
	   full width; `order` (which grid auto-placement honours, unlike plain
	   source order) additionally pins it to lead the grid instead of
	   sitting wherever dense packing/drag order happened to land it. This
	   also applies at the ≤600px breakpoint below, since both conditions
	   are true there simultaneously. */
	.sienci-review-bento__item--featured {
		order: -1;
	}
}

@media ( max-width: 600px ) {
	.sienci-review-bento {
		grid-template-columns: 1fr;
	}

	.sienci-review-bento__item--featured {
		grid-column: span 1;
		padding: 1.5rem;
	}

	.sienci-review-bento__item--featured .sienci-review-bento__content {
		font-size: 1rem;
	}
}
