/*
 * WPScorix comparison pages (single-compare.php) and hub (archive-compare.php).
 * Matches the review boxes: white cards, rounded-2xl, gray-200 borders, green accent.
 * Score colours come from the Schema Reviews tone classes (spr-tone-chip / spr-tone-text).
 */

.wps-cmp {
	--cmp-border: #e5e7eb;
	--cmp-muted: #64748b;
	--cmp-ink: #0f172a;
	--cmp-accent: #16a34a;
	--cmp-accent-soft: #f0fdf4;
	--cmp-a: #2563eb;
	--cmp-b: #9333ea;
	--cmp-radius: 1rem;
	color: var(--cmp-ink);
}

.wps-cmp *,
.wps-cmp *::before,
.wps-cmp *::after {
	box-sizing: border-box;
}

.wps-cmp__article {
	max-width: 1040px;
	margin: 0 auto;
}

/* Hero */
.wps-cmp-hero {
	margin: 0 0 1.5rem;
}

.wps-cmp-hero--hub {
	max-width: 760px;
	margin: 0 auto 2rem;
	text-align: center;
}

.wps-cmp-crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-bottom: 0.75rem;
	font-size: 0.85rem;
	color: var(--cmp-muted);
}

.wps-cmp-crumbs a {
	color: var(--cmp-muted);
	text-decoration: none;
}

.wps-cmp-crumbs a:hover {
	color: var(--cmp-accent);
}

.wps-cmp-hero__title {
	margin: 0 0 0.6rem;
	font-size: clamp(1.75rem, 3.5vw, 2.6rem);
	line-height: 1.15;
	font-weight: 900;
	letter-spacing: -0.02em;
}

.wps-cmp-hero__lead {
	margin: 0;
	font-size: 1.1rem;
	color: var(--cmp-muted);
}

.wps-cmp-hero__meta,
.wps-cmp-hero__disclosure {
	margin: 0 0 0.35rem;
	font-size: 0.9rem;
	color: var(--cmp-muted);
}

.wps-cmp-hero__meta a {
	color: var(--cmp-ink);
	font-weight: 600;
}

.wps-cmp-hero__disclosure {
	font-size: 0.8rem;
}

.wps-cmp-eyebrow {
	margin: 0 0 0.35rem;
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--cmp-muted);
}

/* The two items */
.wps-cmp-duo {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: stretch;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.wps-cmp-duo__item {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem 1.25rem;
	background: #fff;
	border: 1px solid var(--cmp-border);
	border-top: 4px solid var(--cmp-a);
	border-radius: var(--cmp-radius);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.wps-cmp-duo__item:last-child {
	border-top-color: var(--cmp-b);
}

.wps-cmp-duo__item.is-winner {
	box-shadow: 0 0 0 2px var(--cmp-accent);
}

.wps-cmp-duo__vs {
	align-self: center;
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 999px;
	background: var(--cmp-ink);
	color: #fff;
	font-weight: 900;
	font-size: 0.9rem;
	text-transform: uppercase;
}

.wps-cmp-duo__name {
	margin: 0 0 0.3rem;
	font-size: 1.2rem;
	font-weight: 800;
	line-height: 1.2;
}

.wps-cmp-duo__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: 0.4rem 0 0;
}

.wps-cmp-logo {
	flex-shrink: 0;
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 0.75rem;
	background: #f1f5f9;
}

.wps-cmp-logo--sm {
	width: 44px;
	height: 44px;
	border-radius: 0.6rem;
}

.wps-cmp-logo--initials {
	display: grid;
	place-items: center;
	font-weight: 900;
	color: var(--cmp-muted);
}

/* Scores and badges */
.wps-cmp-score {
	display: inline-flex;
	align-items: baseline;
	gap: 0.1rem;
	padding: 0.25rem 0.6rem;
	border-radius: 0.55rem;
	font-weight: 900;
	line-height: 1;
}

.wps-cmp-score strong {
	font-size: 1.2rem;
}

.wps-cmp-score small {
	font-size: 0.75rem;
	opacity: 0.75;
}

.wps-cmp-score--none {
	font-size: 0.8rem;
	color: var(--cmp-muted);
	background: #f8fafc;
	border: 1px solid var(--cmp-border);
}

.wps-cmp-score-label {
	margin-left: 0.45rem;
	font-size: 0.8rem;
	font-weight: 800;
}

.wps-cmp-badge {
	display: inline-flex;
	padding: 0.15rem 0.55rem;
	border: 1px solid var(--cmp-border);
	border-radius: 999px;
	background: #f8fafc;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #334155;
}

.wps-cmp-badge--choice {
	background: #fef3c7;
	border-color: #fcd34d;
	color: #92400e;
}

.wps-cmp-badge--winner {
	background: var(--cmp-accent);
	border-color: var(--cmp-accent);
	color: #fff;
}

/* Verdict */
.wps-cmp-verdict__box,
.wps-cmp-section,
.wps-cmp-box {
	margin: 0 0 1.5rem;
	padding: 1.5rem;
	background: #fff;
	border: 1px solid var(--cmp-border);
	border-radius: var(--cmp-radius);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.wps-cmp-verdict__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem;
}

.wps-cmp-verdict__pick {
	margin: 0;
	font-size: 0.9rem;
	color: var(--cmp-muted);
}

.wps-cmp-verdict__pick strong {
	color: var(--cmp-accent);
}

.wps-cmp-verdict__text {
	margin: 0.25rem 0 1rem;
	font-size: 1.15rem;
	font-weight: 600;
	line-height: 1.5;
}

.wps-cmp-choose {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
}

.wps-cmp-choose__card {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1rem;
	border: 1px solid var(--cmp-border);
	border-left: 4px solid var(--cmp-a);
	border-radius: 0.75rem;
	background: #f8fafc;
}

.wps-cmp-choose__card--b {
	border-left-color: var(--cmp-b);
}

.wps-cmp-choose__title,
.wps-cmp-choose__text {
	margin: 0;
}

.wps-cmp-choose__text {
	flex-grow: 1;
}

.wps-cmp-choose__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.25rem;
}

.wps-cmp-verdict__neither,
.wps-cmp-verdict__tally {
	margin: 1rem 0 0;
	font-size: 0.9rem;
	color: #334155;
}

.wps-cmp-verdict__tally a {
	margin-left: 0.25rem;
	font-weight: 700;
}

/* Buttons */
.wps-cmp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.55rem 1rem;
	border-radius: 0.6rem;
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none !important;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.wps-cmp-btn--primary,
.wps-cmp-btn--small {
	background: var(--cmp-accent);
	color: #fff !important;
}

.wps-cmp-btn--primary:hover,
.wps-cmp-btn--small:hover {
	background: #15803d;
}

.wps-cmp-btn--small {
	padding: 0.4rem 0.75rem;
	font-size: 0.8rem;
}

.wps-cmp-btn--ghost {
	border: 1px solid var(--cmp-border);
	background: #fff;
	color: var(--cmp-ink) !important;
}

.wps-cmp-btn--ghost:hover {
	border-color: var(--cmp-accent);
}

/* On this page */
.wps-cmp-nav {
	position: sticky;
	top: var(--header-sticky-height, 0px);
	z-index: 5;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0 0 1.5rem;
	padding: 0.6rem 1rem;
	overflow-x: auto;
	background: rgba(255, 255, 255, 0.96);
	border: 1px solid var(--cmp-border);
	border-radius: 999px;
	backdrop-filter: blur(6px);
	scrollbar-width: none;
}

.wps-cmp-nav__label {
	flex-shrink: 0;
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--cmp-muted);
}

.wps-cmp-nav ul {
	display: flex;
	gap: 0.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
	white-space: nowrap;
}

.wps-cmp-nav a {
	display: block;
	padding: 0.3rem 0.7rem;
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 600;
	color: #334155;
	text-decoration: none;
}

.wps-cmp-nav a:hover {
	background: var(--cmp-accent-soft);
	color: var(--cmp-accent);
}

/* Sections and tables */
.wps-cmp-section__title {
	margin: 0 0 1rem;
	font-size: 1.5rem;
	font-weight: 800;
}

.wps-cmp-subtitle {
	margin: 1.5rem 0 0.75rem;
	font-size: 1.1rem;
	font-weight: 800;
}

.wps-cmp [id] {
	scroll-margin-top: 6rem;
}

.wps-cmp-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--cmp-border);
	border-radius: 0.75rem;
}

.wps-cmp-table {
	width: 100%;
	margin: 0 !important;
	border-collapse: collapse;
	font-size: 0.92rem;
}

.wps-cmp-table th,
.wps-cmp-table td {
	padding: 0.7rem 0.9rem;
	border: 0;
	border-bottom: 1px solid #f1f5f9;
	text-align: left;
	vertical-align: middle;
}

.wps-cmp-table thead th {
	background: #f8fafc;
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #334155;
}

.wps-cmp-table thead th:nth-child(2) {
	box-shadow: inset 0 3px 0 var(--cmp-a);
}

.wps-cmp-table thead th:last-child {
	box-shadow: inset 0 3px 0 var(--cmp-b);
}

.wps-cmp-table tbody th {
	width: 30%;
	font-weight: 600;
	color: #334155;
}

.wps-cmp-table td {
	width: 35%;
}

.wps-cmp-table td.is-better {
	background: var(--cmp-accent-soft);
	font-weight: 700;
}

.wps-cmp-check {
	margin-left: 0.3rem;
	color: var(--cmp-accent);
	font-weight: 900;
}

.wps-cmp-table__note td {
	padding-top: 0;
	font-size: 0.8rem;
	color: var(--cmp-muted);
}

.wps-cmp-table__total th,
.wps-cmp-table__total td {
	border-top: 2px solid var(--cmp-border);
	font-size: 1rem;
}

.wps-cmp-table small {
	color: var(--cmp-muted);
	font-weight: 600;
}

.wps-cmp-bar {
	display: block;
	width: 100%;
	max-width: 8rem;
	height: 0.35rem;
	margin-bottom: 0.3rem;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--cmp-accent) var(--wps-cmp-bar, 0%), #e2e8f0 var(--wps-cmp-bar, 0%));
}

.wps-cmp-table--features tr.is-different th {
	color: var(--cmp-ink);
}

.wps-cmp-feat {
	font-weight: 600;
}

.wps-cmp-feat--free,
.wps-cmp-feat--yes {
	color: #15803d;
}

.wps-cmp-feat--paid {
	color: #b45309;
}

.wps-cmp-feat--partial {
	color: #a16207;
}

.wps-cmp-feat--no {
	color: #94a3b8;
}

.wps-cmp-muted {
	color: var(--cmp-muted);
}

.wps-cmp-delta {
	margin-left: 0.2rem;
}

.wps-cmp-source {
	margin: 0.6rem 0 0;
	font-size: 0.8rem;
	color: var(--cmp-muted);
}

/* Head-to-head board */
.wps-cmp-board {
	display: grid;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: none;
}

.wps-cmp-board__row {
	display: grid;
	grid-template-columns: minmax(8rem, 1fr) auto;
	gap: 0.25rem 1rem;
	padding: 0.8rem 1rem;
	border: 1px solid var(--cmp-border);
	border-left: 4px solid #cbd5e1;
	border-radius: 0.75rem;
	background: #f8fafc;
}

.wps-cmp-board__row--a {
	border-left-color: var(--cmp-a);
}

.wps-cmp-board__row--b {
	border-left-color: var(--cmp-b);
}

.wps-cmp-board__criterion {
	font-weight: 800;
}

.wps-cmp-board__winner {
	font-weight: 700;
	text-align: right;
}

.wps-cmp-board__note {
	grid-column: 1 / -1;
	font-size: 0.88rem;
	color: #475569;
}

/* Article */
.wps-cmp__content {
	margin: 0 0 1.5rem;
}

.wps-cmp__content > h2 {
	margin-top: 2.5rem;
}

.wps-cmp__content .wps-cmp-box {
	margin-top: 1rem;
	max-width: none;
}

.wps-cmp-box__title {
	margin: 0 0 0.75rem;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--cmp-muted);
}

.wps-cmp-box__summary {
	margin: 0 0 0.75rem;
	font-weight: 600;
}

.wps-cmp-cols {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.wps-cmp-col {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.6rem;
	padding: 1rem;
	border: 1px solid var(--cmp-border);
	border-top: 4px solid var(--cmp-a);
	border-radius: 0.75rem;
}

.wps-cmp-col + .wps-cmp-col {
	border-top-color: var(--cmp-b);
}

.wps-cmp-col__name {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 800;
}

.wps-cmp-plans {
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.wps-cmp-plans li {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.1rem 0.75rem;
	padding: 0.5rem 0;
	border-bottom: 1px solid #f1f5f9;
}

.wps-cmp-plans li.is-popular .wps-cmp-plans__plan::after {
	content: "Popular";
	margin-left: 0.4rem;
	padding: 0.05rem 0.4rem;
	border-radius: 999px;
	background: var(--cmp-accent-soft);
	color: var(--cmp-accent);
	font-size: 0.65rem;
	font-weight: 800;
	text-transform: uppercase;
}

.wps-cmp-plans__plan {
	font-weight: 700;
}

.wps-cmp-plans__for {
	grid-column: 1 / -1;
	font-size: 0.8rem;
	color: var(--cmp-muted);
}

.wps-cmp-facts {
	width: 100%;
	margin: 0;
}

.wps-cmp-facts div {
	display: grid;
	grid-template-columns: 7.5rem 1fr;
	gap: 0.5rem;
	padding: 0.3rem 0;
	font-size: 0.85rem;
}

.wps-cmp-facts dt {
	font-weight: 700;
	color: #334155;
}

.wps-cmp-facts dd {
	margin: 0;
}

.wps-cmp-list {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.9rem;
}

.wps-cmp-list li {
	position: relative;
	margin: 0 0 0.45rem;
	padding-left: 1.4rem;
}

.wps-cmp-list li::before {
	position: absolute;
	left: 0;
	font-weight: 900;
}

.wps-cmp-list--pros li::before {
	content: "+";
	color: #16a34a;
}

.wps-cmp-list--cons li::before {
	content: "−";
	color: #dc2626;
}

.wps-cmp-alts {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.wps-cmp-alts a {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.3rem 0.75rem;
	align-items: center;
	height: 100%;
	padding: 0.9rem;
	border: 1px solid var(--cmp-border);
	border-radius: 0.75rem;
	color: var(--cmp-ink);
	text-decoration: none;
}

.wps-cmp-alts a:hover,
.wps-cmp-review-card:hover,
.wps-cmp-card__link:hover {
	border-color: var(--cmp-accent);
}

.wps-cmp-alts .wps-cmp-logo {
	grid-row: span 2;
}

.wps-cmp-alts__name {
	font-weight: 800;
}

.wps-cmp-alts__for {
	grid-column: 1 / -1;
	font-size: 0.8rem;
	color: var(--cmp-muted);
}

/* Full reviews */
.wps-cmp-review-card {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 0.9rem;
	padding: 1rem;
	border: 1px solid var(--cmp-border);
	border-radius: 0.75rem;
	color: var(--cmp-ink);
	text-decoration: none;
}

.wps-cmp-review-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.wps-cmp-review-card__name {
	font-weight: 800;
}

.wps-cmp-review-card__verdict {
	font-size: 0.82rem;
	color: var(--cmp-muted);
}

/* History */
.wps-cmp-history {
	margin: 0 0 1.5rem;
	font-size: 0.85rem;
	color: #475569;
}

.wps-cmp-history ul {
	margin: 0;
	padding-left: 1.1rem;
}

.wps-cmp-history time {
	font-weight: 700;
	margin-right: 0.35rem;
}

.wps-cmp-notice {
	padding: 1rem;
	border: 1px dashed var(--cmp-border);
	border-radius: 0.75rem;
	color: var(--cmp-muted);
	text-align: center;
}

/* Hub */
.wps-cmp-filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	margin: 0 0 2rem;
}

.wps-cmp-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.45rem 0.95rem;
	border: 1px solid var(--cmp-border);
	border-radius: 999px;
	background: #fff;
	color: #334155;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
}

.wps-cmp-chip span {
	padding: 0 0.4rem;
	border-radius: 999px;
	background: #f1f5f9;
	font-size: 0.75rem;
	color: var(--cmp-muted);
}

.wps-cmp-chip:hover,
.wps-cmp-chip.is-active {
	border-color: var(--cmp-accent);
	background: var(--cmp-accent-soft);
	color: #15803d;
}

.wps-cmp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
	gap: 1.25rem;
	margin-bottom: 2rem;
}

.wps-cmp-card__link {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	height: 100%;
	padding: 1.25rem;
	background: #fff;
	border: 1px solid var(--cmp-border);
	border-radius: var(--cmp-radius);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
	color: var(--cmp-ink);
	text-decoration: none;
	transition: border-color 0.15s ease, transform 0.15s ease;
}

.wps-cmp-card__link:hover {
	transform: translateY(-2px);
}

.wps-cmp-card__duo {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.wps-cmp-card__item {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.wps-cmp-card__item.is-winner .wps-cmp-logo {
	box-shadow: 0 0 0 2px var(--cmp-accent);
}

.wps-cmp-card__score {
	font-weight: 900;
}

.wps-cmp-card__vs {
	font-size: 0.75rem;
	font-weight: 900;
	text-transform: uppercase;
	color: var(--cmp-muted);
}

.wps-cmp-card__cat {
	align-self: flex-start;
	padding: 0.1rem 0.5rem;
	border-radius: 999px;
	background: #f1f5f9;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #475569;
}

.wps-cmp-card__title {
	margin: 0;
	font-size: 1.2rem;
	font-weight: 800;
	line-height: 1.25;
}

.wps-cmp-card__verdict {
	flex-grow: 1;
	margin: 0;
	font-size: 0.9rem;
	color: #475569;
}

.wps-cmp-card__meta {
	font-size: 0.78rem;
	color: var(--cmp-muted);
}

@media (max-width: 760px) {
	.wps-cmp-duo {
		grid-template-columns: 1fr;
	}

	.wps-cmp-duo__vs {
		justify-self: center;
		width: 2.25rem;
		height: 2.25rem;
		margin: -0.5rem 0;
		z-index: 1;
	}

	.wps-cmp-choose,
	.wps-cmp-cols {
		grid-template-columns: 1fr;
	}

	.wps-cmp-verdict__box,
	.wps-cmp-section,
	.wps-cmp-box {
		padding: 1rem;
	}

	.wps-cmp-table th,
	.wps-cmp-table td {
		padding: 0.55rem 0.6rem;
		font-size: 0.85rem;
	}

	.wps-cmp-review-card {
		grid-template-columns: auto 1fr;
	}

	.wps-cmp-review-card__score {
		grid-column: 1 / -1;
	}
}
