.grs {
	--grs-accent: #1a73e8;
	--grs-card: #fff;
	--grs-border: #e3e6ea;
	--grs-text: #1f2328;
	--grs-muted: #667085;
	--grs-star: #fbbc04;
	--grs-star-off: #d5d9de;
	--grs-gap: 16px;
	--grs-cols: 3;
	--grs-lines: 5;
	container-type: inline-size;
	color: var(--grs-text);
	font-size: 15px;
	line-height: 1.5;
	margin: 1.5em 0;
}
.grs--dark {
	--grs-card: #1e2227;
	--grs-border: #343a42;
	--grs-text: #f1f3f5;
	--grs-muted: #a3acb8;
	--grs-star-off: #4b525c;
}
.grs *,
.grs *::before {
	box-sizing: border-box;
}

/* Header */
.grs-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 20px;
	margin-bottom: 18px;
}
.grs-summary {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}
.grs-g {
	flex: none;
	display: block;
}
.grs-name {
	font-weight: 600;
	font-size: 1.1em;
	line-height: 1.3;
}
.grs-score {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
}
.grs-score strong {
	font-size: 1.15em;
}
.grs-score a {
	color: var(--grs-muted);
	font-size: .9em;
	text-decoration: none;
}
.grs-score a:hover {
	text-decoration: underline;
}
.grs a.grs-btn {
	display: inline-block;
	padding: 9px 18px;
	border-radius: 999px;
	background: var(--grs-accent);
	color: #fff;
	font-weight: 600;
	font-size: .93em;
	line-height: 1.4;
	text-decoration: none;
	transition: filter .15s;
}
.grs a.grs-btn:hover,
.grs a.grs-btn:focus-visible {
	filter: brightness(.9);
	color: #fff;
}

/* Stars: one element, fractional fill */
.grs-stars {
	display: inline-block;
	font-family: Arial, sans-serif;
	font-size: 18px;
	line-height: 1;
	letter-spacing: 0;
}
.grs-stars::before {
	content: "★★★★★";
	background: linear-gradient(90deg, var(--grs-star) calc(var(--r, 5) * 20%), var(--grs-star-off) 0);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

/* Cards */
.grs-body {
	--c: var(--grs-cols);
	position: relative;
}
.grs .grs-track {
	display: flex;
	flex-wrap: wrap;
	gap: var(--grs-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}
.grs .grs-card {
	flex: 0 0 calc((100% - (var(--c) - 1) * var(--grs-gap)) / var(--c) - .1px);
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	padding: 18px;
	background: var(--grs-card);
	border: 1px solid var(--grs-border);
	border-radius: 12px;
	list-style: none;
}
.grs-author {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
}
.grs-avatar {
	position: relative;
	flex: none;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	overflow: hidden;
	background: var(--grs-accent);
	color: #fff;
	font-weight: 600;
}
.grs .grs-avatar img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
	border-radius: 0;
}
.grs-who {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	line-height: 1.3;
}
.grs .grs-author-name {
	color: inherit;
	font-weight: 600;
	text-decoration: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.grs-date {
	color: var(--grs-muted);
	font-size: .85em;
}
.grs .grs-text {
	margin: 0;
	white-space: pre-line;
	overflow-wrap: anywhere;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--grs-lines);
	line-clamp: var(--grs-lines);
	overflow: hidden;
}
.grs .grs-text.is-open {
	-webkit-line-clamp: none;
	line-clamp: none;
}
.grs .grs-more {
	margin: -4px 0 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	color: var(--grs-accent);
	font: inherit;
	font-size: .9em;
	font-weight: 600;
	cursor: pointer;
}
.grs .grs-more:hover {
	text-decoration: underline;
	background: none;
	color: var(--grs-accent);
}
.grs [hidden] {
	display: none !important;
}

/* Slider */
.grs--slider .grs-track {
	flex-wrap: nowrap;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.grs--slider .grs-track::-webkit-scrollbar {
	display: none;
}
.grs--slider .grs-card {
	scroll-snap-align: start;
}
.grs .grs-nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	margin: 0;
	padding: 0 0 3px;
	transform: translateY(-50%);
	border: 1px solid var(--grs-border);
	border-radius: 50%;
	background: var(--grs-card);
	color: var(--grs-text);
	box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
	font: 400 24px/1 Arial, sans-serif;
	cursor: pointer;
	transition: opacity .15s;
}
.grs .grs-prev {
	left: -12px;
}
.grs .grs-next {
	right: -12px;
}
.grs .grs-nav:disabled {
	opacity: 0;
	pointer-events: none;
}
.grs .grs-nav:hover {
	border-color: var(--grs-accent);
	background: var(--grs-card);
	color: var(--grs-accent);
}
.grs :focus-visible {
	outline: 2px solid var(--grs-accent);
	outline-offset: 2px;
}

/* Dots under the slider */
.grs-dots {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin-top: 8px;
}
.grs .grs-dot {
	width: 22px;
	height: 22px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 6px;
	border: 0;
	border-radius: 50%;
	background: var(--grs-star-off);
	background-clip: content-box;
	box-shadow: none;
	cursor: pointer;
}
.grs .grs-dot.is-active {
	background-color: var(--grs-accent);
}

/* Summary to the left of the reviews (falls back to the top when there is no room) */
@container (min-width: 761px) {
	.grs--side .grs-in {
		display: flex;
		align-items: center;
		gap: 28px;
	}
	.grs--side .grs-head {
		flex: 0 0 230px;
		flex-direction: column;
		align-items: flex-start;
		margin: 0;
	}
	.grs--side .grs-main {
		flex: 1;
		min-width: 0;
	}
}

.grs-notice {
	padding: 10px 14px;
	border: 1px dashed #c3c4c7;
	font-size: 14px;
}

/* Responsive to the space the block actually gets (works in sidebars too) */
@container (max-width: 900px) {
	.grs-body {
		--c: min(var(--grs-cols), 2);
	}
}
@container (max-width: 580px) {
	.grs-body {
		--c: 1;
	}
	.grs .grs-prev {
		left: -6px;
	}
	.grs .grs-next {
		right: -6px;
	}
}
