.sites--reverse a {
	display: flex;
	flex-direction: column-reverse;
}

.sites-lo-footer {
	margin-bottom: 2em;
}
.sites-perf-si {
	display: none;
}
.sites-lo > .site-top .sites-perf-si {
	display: block;
}
.sites-screenshot-container {
	border-radius: 0.4em;
	box-shadow: 0 0 0 var(--card-shadow-size, 3px) var(--card-shadow-color, var(--shadow-color));
}
.sites-screenshot {
	display: block;
	width: 100%;
	height: auto;
	border-radius: .4em;
}
.sites-screenshot-youtube-sq {
	aspect-ratio: 1/1;
	object-fit: contain;
	background-color: #222;
}
.sites-screenshot-container--icon {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
}
.sites-screenshot-container--icon .avatar.sites-icon-auto {
	width: 3.333333333333em; /* 60px /18 */
	height: 3.333333333333em; /* 60px /18 */
}
.sites-site-official .sites-screenshot {
	border-color: #666;
}
@media (min-width: 30em) {
	/* 480px */
	.site-top {
		display: flex;
	}
	.site-top > .sites-data-container {
		flex-basis: 70%;
	}
	.site-top > .sites-screenshot-container {
		flex-basis: 30%;
		min-width: 9em;
		margin-top: 0;
		margin-left: 1em;
	}
}

.sites-perf-rank-same,
.sites-perf-rank-new,
.sites-perf-rank-pos,
.sites-perf-rank-neg {
	margin-left: 0.5em;
	font-style: normal;
}
.sites-perf-rank-same {
	color: #d23ed2;
	font-weight: 900;
}
.sites-perf-rank-same:before {
	content: "↔";
	line-height: 1;
}
.sites-perf-rank-new {
	font-style: italic;
	color: #e60074;
}
.sites-perf-rank-pos {
	color: green;
}
.sites-perf-rank-pos:before {
	content: "⬆";
	line-height: 1;
}
.sites-perf-rank-neg {
	color: darkred;
}
.sites-perf-rank-neg:before {
	content: "⬇";
	line-height: 1;
}

.sites-vert {
	margin-top: 2em;
	margin-bottom: 2em;
}
.elv-callout .sites-vert {
	margin-top: 1em;
	margin-bottom: 0;
}
.sites-vert .sites-screenshot-container {
	margin-top: 4px;
	margin-bottom: 4px;
}
.sites-vert .avatar {
	margin-right: 3px;
	margin-left: 0;
	width: 1em;
	height: 1em;
	object-fit: contain;
}
.sites-vert--wc .avatar {
	margin-right: 0;
}
.sites-vert > .lo-grid {
	--fl-gap-h: 1rem;
	--fl-gap-v: 1rem;
	--lo-c-minwidth: 8.5em;
	--lo-grid-repeat: auto-fill;
}
.sites-vert--md > .lo-grid,
.sites-vert--lg > .lo-grid {
	--lo-c-minwidth: 7em;
}

@media (min-width: 28.125em) {
	/* 450px /16 */
	.sites-vert--md > .lo-grid {
		--lo-c-minwidth: 8.5em; /* 136px /16 */
	}
	.sites-vert--lg > .lo-grid {
		--lo-c-minwidth: 10em; /* 160px /16 */
	}
}

.sites-site-name {
	display: block;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	font-size: 0.8888888888889em; /* 16px /18 */
}
.sites-site-name--nowrap {
	display: block;
	font-size: 0.7777777777778em; /* 14px /18 */
}
.sites-site-description {
	display: none;
	margin: 0.6428571428571em 0; /* 9px /14 */
	font-size: 0.7777777777778em; /* 14px /18 */
}
.sites-vert--md .sites-site-description,
.sites-vert--lg .sites-site-description {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
	overflow: hidden;
	width: 100%;
}
.sites-site-vert .sites-screenshot-container {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1/1;
	position: relative;
}
.sites-site-vert .sites-screenshot-container:after {
	content: "";
	position: absolute;
	inset: 0;
	opacity: .3;
	background: var(--card-background);
	z-index: -1;
	border-radius: .4em;
}

/* Borders and hovers */
.sites-site-vert a:is(:focus, :hover) {
	--card-shadow-color: rgba(234, 0, 255, 0.747);
	--card-shadow-size: 0.3333333333333em; /* 6px /18 */
}
.sites-site-vert a {
	--card-shadow-color: var(--card-primary);
}
.sites-site-vert a:is(:focus, :hover) img,
.sites-site-vert a:is(:focus, :hover) .sites-screenshot-container:after {
	opacity: .75;
}
/* End borders and hovers */

.sites-site-vert > a {
	text-decoration: none;
}
.sites-site-vert speedlify-score {
	justify-content: center;
}

.sites-site-vert {
	position: relative;
}
.sites-site-vert .sites-site-lighthouse {
	font-size: 0.6666666666667em; /* 12px /18 */
	transform: translateY(-100%);
	position: absolute;
	right: 1px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	border-radius: 1.4em 0 0.4em 0;
	background: rgba(255, 255, 255, 0.9);
	font-weight: 600;
	padding: 4px;
}
.sites-site-vert .sites-site-lighthouse .speedlify-score {
	background-color: #fff;
}

@media (prefers-color-scheme: dark) {
	.sites-site-vert .sites-site-lighthouse {
		background: rgba(0, 0, 0, 0.85);
	}
}

@supports (aspect-ratio: 1 / 1) {
	.img-gallery {
		--shadow-color: rgba(234, 0, 255, 0.747);
		display: flex;
		flex-direction: column;
		justify-content: center;
		aspect-ratio: 1 / 2;
		border-radius: 0.4em;
		border: 2px solid #ccc;
		margin-bottom: 0.3em;
		padding: 0.5em;
	}
	.img-gallery .sites-screenshot {
		border: none;
	}
	.sites-site-vert a:hover .img-gallery {
		box-shadow: 0 0 0 4px var(--shadow-color);
	}
	.sites-site-vert a:hover .img-gallery .sites-screenshot {
		box-shadow: none;
	}
}

/* Centered */
.sites--center {
	text-align: center;
}

/* Tags */
.sites-tag {
	--tag-text: #000;
	--tag-bg: #dff7ff;
	font-size: 0.6666666666667em; /* 12px /18 */
	line-height: 1.5;
	display: inline-block;
	padding: 0 0.75em;
	border-radius: 0.75em;
	background: var(--tag-bg);
	color: var(--tag-text);
}
@media (prefers-color-scheme: dark) {
	.sites-tag {
		--tag-text: #dff7ff;
		--tag-bg: #000;
	}
}

/* Featured partner */
.sites-featured {
	grid-column: 1/3;
}
.sites-featured .sites-screenshot {
	aspect-ratio: 10/4.81;
	object-fit: cover;
	object-position: top;
}
.sites-featured .sites-site-name {
	font-weight: 700;
}
.sites-vert:not(:has(.sites-featured)) .sites-site-name {
	font-weight: 700;
}
.sites-vert:has(.sites-featured)
	.sites-site-vert:not(.sites-featured)
	.avatar-indieweb {
	display: none;
}

/* Host /generator icons on author pages on screenshots */
.sites-screenshot-container {
	position: relative;
}
.sites-screenshot-container-icons {
	position: absolute;
	inset: 0;
	display: flex;
	gap: 0.25em;
	align-items: flex-end;
	justify-content: flex-start;
	padding: 0.25em;
}
.sites-screenshot-container-icons img {
	margin: 0;
	max-width: 1em;
}
