/* CompareISP — provider comparison (1c) */

.cisp-cmp {
	--cisp-ink: #172033;
	--cisp-body: #334155;
	--cisp-muted: #64748b;
	--cisp-faint: #94a3b8;
	--cisp-line: #eef2f7;
	--cisp-edge: #e2e8f0;
	--cisp-win: #0f9b72;
	--cisp-win-bg: #e6f6f0;
	--cisp-accent: #2563eb;
	/* Horizontal inset for every band in the widget. 0 = the table runs
	   edge to edge, so the surrounding theme block owns the padding. */
	--cisp-pad: 0px;

	container-type: inline-size;
	box-sizing: border-box;
	/* Transparent shell: the surrounding theme block supplies the
	   background, border and shadow. Nothing is painted here, so there
	   is no rounded corner left to clip against either. */
	color: var(--cisp-body);
	overflow: visible;
	font-size: 15px;
	line-height: 1.5;
}

.cisp-cmp *,
.cisp-cmp *::before,
.cisp-cmp *::after { box-sizing: inherit; }

.cisp-cmp--empty { padding: 28px var(--cisp-pad); }
.cisp-cmp--empty p { margin: 0; color: var(--cisp-muted); }

/* ------------------------------------------------------------------ header */

.cisp-cmp__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px 24px;
	padding: 30px var(--cisp-pad) 24px;
	border-bottom: 1px solid var(--cisp-line);
}

.cisp-cmp__title {
	margin: 0 0 7px;
	font-size: clamp(21px, 2.6vw, 27px);
	line-height: 1.15;
	font-weight: 800;
	letter-spacing: -.02em;
	color: var(--cisp-ink);
}

.cisp-cmp__sum {
	margin: 0;
	max-width: 62ch;
	font-size: 15px;
	color: #475569;
}

.cisp-cmp__toggle {
	flex: 0 1 auto;
	max-width: 100%;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	margin: 0;
	padding: 9px 14px;
	border: 1px solid #dbe3ec;
	border-radius: 10px;
	background: #fff;
	color: var(--cisp-body);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: border-color .15s, color .15s;
}

.cisp-cmp__toggle:hover { border-color: #bfdbfe; color: #1d4ed8; }
.cisp-cmp__toggle:focus-visible { outline: 2px solid var(--cisp-accent); outline-offset: 2px; }

.cisp-cmp__switch {
	position: relative;
	display: inline-block;
	width: 26px;
	height: 15px;
	border-radius: 99px;
	background: #cbd5e1;
	transition: background .15s;
}

.cisp-cmp__switch::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 11px;
	height: 11px;
	border-radius: 99px;
	background: #fff;
	transition: left .15s;
}

.cisp-cmp__toggle[aria-pressed="true"] .cisp-cmp__switch { background: var(--cisp-accent); }
.cisp-cmp__toggle[aria-pressed="true"] .cisp-cmp__switch::after { left: 13px; }

/* ----------------------------------------------------------- column heads */

.cisp-cmp__cols,
.cisp-cmp__row {
	display: grid;
	grid-template-columns: clamp(112px, 22%, 232px) 1fr 1fr;
}

.cisp-cmp__cols { padding: 0 var(--cisp-pad); }

.cisp-cmp__col { padding: 22px 20px 20px 0; min-width: 0; }
.cisp-cmp__col--b { padding: 22px 0 20px 20px; border-left: 1px solid var(--cisp-line); }

.cisp-cmp__select {
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 12px 36px 12px 14px;
	border: 1px solid #dbe3ec;
	border-radius: 11px;
	background-color: #fff;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	color: var(--cisp-ink);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}

.cisp-cmp__col--b .cisp-cmp__select { border-color: #bfdbfe; background-color: #eff6ff; }
.cisp-cmp__select:focus-visible { outline: 2px solid var(--cisp-accent); outline-offset: 1px; }

.cisp-cmp__tech {
	display: inline-flex;
	align-items: center;
	margin-top: 12px;
	padding: 4px 9px;
	border-radius: 6px;
	background: #f1f5f9;
	color: #475569;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.cisp-cmp__tech.is-fiber { background: var(--cisp-win-bg); color: #0f7a5c; }

.cisp-cmp__eyebrow {
	margin-top: 14px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--cisp-faint);
}

.cisp-cmp__big { margin-top: 5px; color: var(--cisp-ink); }
.cisp-cmp__big strong { font-size: clamp(24px, 3.4vw, 30px); font-weight: 800; letter-spacing: -.02em; }
.cisp-cmp__big span { font-size: 14px; font-weight: 400; color: var(--cisp-muted); white-space: nowrap; }
.cisp-cmp__big.is-unknown { font-size: 17px; font-style: italic; color: #a8b2bf; }

/* -------------------------------------------------------------------- bars */

.cisp-cmp__bar {
	margin-top: 10px;
	height: 6px;
	/* Half the track height. A pill radius (99px) is clamped against the box
	   it is set on, which is 15px tall on --sm below, and that slices the
	   visible 6px track at an angle instead of capping it. */
	border-radius: 3px;
	background: var(--cisp-edge);
	overflow: hidden;
}

/* 15px box = 9px gap + a 6px track, matching the column-head bar above, so
   the bar can sit flush at the cell bottom (margin-top:auto) and still keep
   its breathing room above. */
.cisp-cmp__bar--sm {
	height: 15px;
	padding-top: 9px;
	margin-top: 9px;
	background-clip: content-box;
	border-radius: 3px;
}

.cisp-cmp__bar i {
	display: block;
	height: 100%;
	/* A 2% fill would otherwise render as a dot rather than a short bar. */
	min-width: 14px;
	/* Matches the track's radius exactly, so the shared left cap is clean. */
	border-radius: 3px;
	background: var(--cisp-faint);
}

/* Green marks the better value, whichever column it lands in. A row with no
   winner — identical values, or one side unpublished — stays neutral on both
   sides, so the colour never implies a decision the data does not support. */
.cisp-cmp__bar--win i { background: var(--cisp-win); }

/* -------------------------------------------------------------------- rows */

.cisp-cmp__rows { padding: 6px var(--cisp-pad) 0; }
.cisp-cmp__row { align-items: stretch; border-top: 1px solid var(--cisp-line); }
.cisp-cmp__row.is-muted { opacity: .55; }

.cisp-cmp.is-filtered .cisp-cmp__row.is-muted,
.cisp-cmp.is-filtered .cisp-cmp__varies { display: none; }

.cisp-cmp__label {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 16px 16px 16px 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--cisp-ink);
}
.cisp-cmp__label small { display: block; margin-top: 3px; font-size: 12px; font-weight: 400; color: var(--cisp-faint); }

.cisp-cmp__cell {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 16px 20px 16px 0;
	min-width: 0;
}

/* Keeps the two value bars on one baseline even when a badge wraps. */
.cisp-cmp__cell .cisp-cmp__bar--sm { margin-top: auto; }
.cisp-cmp__cell--b { padding: 16px 0 16px 20px; border-left: 1px solid var(--cisp-line); }

.cisp-cmp__v { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.cisp-cmp__val { font-size: 16px; font-weight: 600; color: var(--cisp-ink); }
.cisp-cmp__val.is-unknown { font-weight: 400; font-style: italic; color: #a8b2bf; }
.cisp-cmp__stars { color: var(--cisp-accent); font-size: 14px; letter-spacing: 2px; }
.cisp-cmp__sub { margin-top: 3px; font-size: 12.5px; color: var(--cisp-muted); }

.cisp-cmp__badge {
	flex: none;
	padding: 3px 8px;
	border-radius: 6px;
	background: var(--cisp-win-bg);
	color: var(--cisp-win);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
}

/* ------------------------------------------------------- varies by plan */

.cisp-cmp__varies {
	margin: 20px var(--cisp-pad) 0;
	padding: 14px 18px;
	border: 1px solid var(--cisp-line);
	border-radius: 14px;
	background: #f8fafc;
}

.cisp-cmp__varieshead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding-bottom: 6px; }
.cisp-cmp__varieshead span { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--cisp-faint); }
.cisp-cmp__varieshead em { font-size: 12.5px; font-style: normal; color: var(--cisp-faint); }

.cisp-cmp__variesrow {
	display: grid;
	grid-template-columns: clamp(104px, 20%, 214px) 1fr 1fr;
	gap: 0 20px;
	align-items: baseline;
	padding: 9px 0;
	border-top: 1px solid var(--cisp-line);
}

.cisp-cmp__variesrow span { font-size: 13.5px; font-weight: 600; color: #475569; }
.cisp-cmp__variesrow i { font-size: 14px; font-style: italic; color: #a8b2bf; }

.cisp-cmp__source {
	margin: 18px var(--cisp-pad) 0;
	font-size: 12.5px;
	color: var(--cisp-faint);
}

/* ------------------------------------------------------------- pick cards */

.cisp-cmp__picks {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1px;
	margin: 22px var(--cisp-pad) 32px;
	background: var(--cisp-edge);
	border: 1px solid var(--cisp-edge);
	border-radius: 16px;
	overflow: hidden;
}

.cisp-cmp__pick { background: #f8fafc; padding: 22px 24px; }
.cisp-cmp__pick--b { background: #fff; }
.cisp-cmp__pickhead { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--cisp-faint); }
.cisp-cmp__pick--b .cisp-cmp__pickhead { color: var(--cisp-win); }
.cisp-cmp__pick p { margin: 10px 0 16px; font-size: 14.5px; line-height: 1.6; color: var(--cisp-body); }
.cisp-cmp__pick a { font-size: 14px; font-weight: 600; }

/* ----------------------------------------------------------- loading state */

.cisp-cmp__rows,
.cisp-cmp__colbody,
.cisp-cmp__picks { transition: opacity .12s ease; }

.cisp-cmp.is-loading .cisp-cmp__rows,
.cisp-cmp.is-loading .cisp-cmp__colbody,
.cisp-cmp.is-loading .cisp-cmp__picks { opacity: .45; }

/* ------------------------------------------------------------------ mobile */
/* Container queries, so the widget adapts to the column it is placed in
   rather than to the viewport. The @supports block below keeps browsers
   without container query support on a usable stacked layout. */

@container (max-width: 720px) {
	.cisp-cmp__cols,
	.cisp-cmp__row { grid-template-columns: 1fr 1fr; }

	.cisp-cmp__spacer { display: none; }

	.cisp-cmp__label {
		grid-column: 1 / -1;
		padding: 14px 0 0;
		font-size: 13px;
	}

	.cisp-cmp__col,
	.cisp-cmp__cell { padding: 12px 12px 14px 0; }

	.cisp-cmp__col--b,
	.cisp-cmp__cell--b { padding: 12px 0 14px 12px; }

	.cisp-cmp__variesrow { grid-template-columns: 1fr 1fr; gap: 0 12px; }
	.cisp-cmp__variesrow span { grid-column: 1 / -1; margin-bottom: 2px; }

	.cisp-cmp__picks { grid-template-columns: 1fr; }
}

@container (max-width: 560px) {
	.cisp-cmp__head { padding-bottom: 20px; }
	.cisp-cmp__big strong { font-size: 24px; }
	.cisp-cmp__big span { font-size: 13px; }
	.cisp-cmp__eyebrow { margin-top: 12px; font-size: 10px; letter-spacing: .06em; }
	.cisp-cmp__val { font-size: 15px; }
	.cisp-cmp__v { gap: 6px; }
	.cisp-cmp__pick { padding: 18px 20px; }
}

/* Below this the value and its badge stop fitting on one line, which pushes
   the sub-label under the badge and reads as if it belongs to it. Shrinking
   both keeps value + badge together. */
@container (max-width: 430px) {
	.cisp-cmp { font-size: 14px; }

	.cisp-cmp__title { font-size: 20px; }
	.cisp-cmp__sum { font-size: 14px; }

	.cisp-cmp__toggle {
		width: 100%;
		justify-content: center;
		padding: 8px 12px;
		font-size: 12px;
	}

	.cisp-cmp__select { padding: 10px 30px 10px 11px; font-size: 14px; }
	.cisp-cmp__big strong { font-size: 21px; }
	.cisp-cmp__val { font-size: 14px; }
	.cisp-cmp__sub { font-size: 12px; }
	.cisp-cmp__stars { font-size: 12px; letter-spacing: 1px; }

	/* At 390px the value + badge needed 155px into 151px. A smaller badge
	   buys ~14px of headroom so they stay on one line; if a very long value
	   still wraps, the tight row-gap keeps the badge read as part of it. */
	.cisp-cmp__badge { padding: 2px 5px; font-size: 9.5px; letter-spacing: 0; }

	/* Badge hugs the value (2px); the sub-label sits further off (5px), so if
	   the badge does wrap it still reads as part of the value above it and
	   not as a label on the line below. */
	.cisp-cmp__v { gap: 2px 5px; }
	.cisp-cmp__sub { margin-top: 5px; }

	.cisp-cmp__col,
	.cisp-cmp__cell { padding: 10px 8px 12px 0; }

	.cisp-cmp__col--b,
	.cisp-cmp__cell--b { padding: 10px 0 12px 8px; }

	.cisp-cmp__varies { padding: 12px 14px; }
	.cisp-cmp__source { font-size: 12px; }
}

/* Small Android / iPhone SE territory. */
@container (max-width: 350px) {
	.cisp-cmp__val { font-size: 12.5px; }
	.cisp-cmp__badge { font-size: 9px; padding: 1px 4px; }
	.cisp-cmp__v { gap: 2px 4px; }
	.cisp-cmp__big strong { font-size: 19px; }
	.cisp-cmp__big span { font-size: 12px; }
	.cisp-cmp__label { font-size: 12.5px; }
	.cisp-cmp__stars { letter-spacing: 0; }
}

@supports not (container-type: inline-size) {
	@media (max-width: 760px) {
		.cisp-cmp__cols,
		.cisp-cmp__row { grid-template-columns: 1fr 1fr; }

		.cisp-cmp__spacer { display: none; }
		.cisp-cmp__label { grid-column: 1 / -1; padding: 14px 0 0; font-size: 13px; }
		.cisp-cmp__picks { grid-template-columns: 1fr; }
		.cisp-cmp__variesrow { grid-template-columns: 1fr 1fr; gap: 0 12px; }
		.cisp-cmp__variesrow span { grid-column: 1 / -1; }
	}
}

@media (prefers-reduced-motion: reduce) {
	.cisp-cmp * { transition: none !important; }
}
