/* ===================================================================
   Comparison Table section — Rally vs. competitor, editor-filled.
   Self-contained so it renders correctly on any post or page.
   =================================================================== */
.rally-ctbl {
	padding-block: var(--rally-section-padding-y, 4rem);
	background: var(--rally-white, #fff);
}
.rally-ctbl--bg-gray {
	background: var(--rally-gray-light, #f5f5f5);
}

.rally-ctbl__header {
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--rally-space-1, 0.25rem);
	margin-bottom: var(--rally-space-5, 1.5rem);
}
.rally-ctbl__eyebrow {
	margin: 0;
	font-family: var(--rally-font-body, system-ui, sans-serif);
	font-size: var(--rally-text-sm, 0.85rem);
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--rally-red, #d10000);
}
.rally-ctbl__heading {
	margin: 0;
	font-size: clamp(1.5rem, 4vw, 2.5rem);
	line-height: 1.1;
	color: var(--rally-black, #111);
}
.rally-ctbl__rule {
	display: block;
	width: 80px;
	height: 4px;
	margin: 0.5rem auto 0;
	background: var(--rally-red, #d10000);
}

.rally-ctbl__scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-radius: 12px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.rally-ctbl__table {
	width: 100%;
	min-width: 640px;
	border-collapse: collapse;
	font-family: var(--rally-font-body, system-ui, sans-serif);
	background: var(--rally-white, #fff);
}
.rally-ctbl__table thead th {
	background: var(--rally-black, #111);
	color: #fff;
	font-size: var(--rally-text-sm, 0.85rem);
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 0.95rem 1rem;
	text-align: center;
	vertical-align: middle;
}
.rally-ctbl__table thead th:first-child { text-align: left; }
.rally-ctbl__table thead th.is-rally { background: var(--rally-red, #d10000); }

.rally-ctbl__table tbody th,
.rally-ctbl__table tbody td {
	padding: 0.85rem 1rem;
	border-bottom: 1px solid var(--rally-gray-200, #e5e5e5);
	font-size: var(--rally-text-base, 1rem);
	vertical-align: middle;
}
.rally-ctbl__table tbody th {
	text-align: left;
	font-weight: 700;
	color: var(--rally-black, #111);
	background: var(--rally-white, #fff);
}
.rally-ctbl__table tbody td {
	text-align: center;
	color: var(--rally-gray-dark, #444);
}
.rally-ctbl__table tbody td.is-rally {
	font-weight: 700;
	color: var(--rally-black, #111);
	background: rgba(209, 0, 0, 0.06);
	box-shadow: inset 2px 0 0 rgba(209, 0, 0, 0.35), inset -2px 0 0 rgba(209, 0, 0, 0.35);
}
.rally-ctbl__advantage {
	color: var(--rally-gray, #7a7a7a) !important;
	font-size: var(--rally-text-sm, 0.85rem);
}
.rally-ctbl__table tbody tr:nth-child(even) th,
.rally-ctbl__table tbody tr:nth-child(even) td:not(.is-rally) {
	background: var(--rally-gray-light, #f5f5f5);
}
.rally-ctbl--bg-gray .rally-ctbl__table tbody tr:nth-child(even) th,
.rally-ctbl--bg-gray .rally-ctbl__table tbody tr:nth-child(even) td:not(.is-rally) {
	background: #ececec;
}
.rally-ctbl__table tbody tr:last-child th,
.rally-ctbl__table tbody tr:last-child td { border-bottom: none; }
.rally-ctbl__dash { color: var(--rally-gray, #9aa0a6); }

/* Phones: keep a real table but tighten it and drop the wordy Advantage
   column so it stays readable and never overflows. */
@media (max-width: 720px) {
	.rally-ctbl { overflow-x: hidden; }
	.rally-ctbl__scroll { overflow: visible; box-shadow: none; }
	.rally-ctbl__table {
		min-width: 0 !important;
		width: 100% !important;
		table-layout: fixed;
	}
	.rally-ctbl__table thead th:nth-child(4),
	.rally-ctbl__table td.rally-ctbl__advantage { display: none; }
	.rally-ctbl__table thead th:nth-child(1) { width: 34%; }
	.rally-ctbl__table thead th:nth-child(2) { width: 33%; }
	.rally-ctbl__table thead th:nth-child(3) { width: 33%; }
	.rally-ctbl__table thead th {
		font-size: var(--rally-text-xs, 0.72rem);
		letter-spacing: 0.02em;
		padding: 0.6rem 0.5rem;
	}
	.rally-ctbl__table tbody th,
	.rally-ctbl__table tbody td {
		padding: 0.6rem 0.5rem;
		font-size: var(--rally-text-sm, 0.85rem);
		overflow-wrap: anywhere;
		hyphens: auto;
	}
}
