/* ==========================================================================
   DTS Speed Test page. Everything scoped to .speed-* so nothing else is touched.
   ========================================================================== */

.speed-hero {
	position: relative;
	padding: 120px 0 0;
	margin-bottom: 177px;
	background: linear-gradient(180deg, #fff 0%, #fff4f8 100%);
	isolation: isolate;
}

.speed-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image: var(--speed-hero-bg, none);
	background-size: cover;
	background-position: center;
	-webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
	mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
}

.speed-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 600px);
	gap: 48px;
	align-items: center;
}

/* ---------- Left column ---------- */
.speed-hero__title {
	margin: 0 0 24px;
	font-size: 70px;
	line-height: 69px;
	font-weight: 700;
	color: var(--dts-primary, #0d2b6e);
}

.speed-hero__title .highlight {
	display: block;
	color: var(--dts-secondary, #d81b60);
}

.speed-hero__desc {
	margin: 0 0 40px;
	max-width: 560px;
	font-size: 24px;
	line-height: 26px;
	color: #4a5568;
}

.speed-bar {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0;
	padding: 20px 28px;
	background: rgba(255, 255, 255, 0.85);
	border: 1px solid #fce8f0;
	border-radius: 24px;
	box-shadow: 0 8px 30px rgba(13, 43, 110, 0.06);
}

.speed-bar__item {
	display: flex;
	align-items: center;
	gap: 14px;
}

.speed-bar__item--divided {
	margin-left: 28px;
	padding-left: 28px;
	border-left: 1px solid #fce8f0;
}

.speed-bar__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #fde8f0;
	color: var(--dts-secondary, #d81b60);
}

.speed-bar__icon svg { width: 22px; height: 22px; }

.speed-bar__text { display: flex; flex-direction: column; line-height: 1.3; }
.speed-bar__label { font-size: 14px; color: #718096; }
.speed-bar__value { font-size: 18px; font-weight: 600; color: var(--dts-primary, #0d2b6e); }
.speed-bar__isp { font-size: 14px; font-weight: 600; color: var(--dts-secondary, #d81b60); }

.speed-error {
	margin: 16px 0 0;
	font-size: 16px;
	color: #c53030;
}

/* ---------- Gauge ---------- */
.speed-gauge {
	position: relative;
	width: 100%;
	max-width: 600px;
	aspect-ratio: 1;
	justify-self: end;
}

.speed-gauge__svg {
	display: block;
	width: 100%;
	height: 100%;
	font-family: var(--dts-font-inter, "Inter", sans-serif);
	overflow: visible;
}

.speed-start {
	position: absolute;
	left: 50%;
	bottom: 1%;
	transform: translateX(-50%);
	min-width: 141px;
	height: 65px;
	padding: 0 28px;
	border: 0;
	border-radius: 74px;
	background: var(--dts-secondary, #d81b60);
	color: #fff;
	font-family: inherit;
	font-size: 28px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	box-shadow: 0 10px 30px rgba(216, 27, 96, 0.35);
	transition: var(--dts-transition-effects, all 0.3s ease);
}

.speed-start:hover:not(:disabled) { transform: translateX(-50%) translateY(-2px); filter: brightness(1.08); }
.speed-start:disabled { cursor: progress; opacity: 0.9; font-size: 18px; }
.speed-start:focus-visible { outline: 3px solid var(--dts-primary, #0d2b6e); outline-offset: 3px; }

/* ---------- Metric cards ---------- */
.speed-metrics {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	margin-top: 64px;
	margin-bottom: -97px;
	position: relative;
	z-index: 2;
}

.speed-card {
	padding: 28px;
	background: #fffcfd;
	border: 1px solid #fce8f0;
	border-radius: 24px;
	box-shadow: 0 12px 40px rgba(13, 43, 110, 0.07);
	transition: var(--dts-transition-effects, all 0.3s ease);
}

.speed-card.is-active {
	border-color: var(--speed-accent);
	box-shadow: 0 12px 40px rgba(13, 43, 110, 0.12), 0 0 0 2px var(--speed-accent);
}

.speed-card__head { display: flex; align-items: center; gap: 16px; }

.speed-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 56px;
	height: 56px;
	border-radius: 50%;
}

.speed-card__icon svg { width: 26px; height: 26px; }

.speed-card__meta { display: flex; flex-direction: column; line-height: 1.25; }
.speed-card__label { font-size: 16px; color: #718096; }
.speed-card__reading { display: flex; align-items: baseline; gap: 6px; }
.speed-card__value { font-size: 36px; font-weight: 700; color: var(--dts-primary, #0d2b6e); font-variant-numeric: tabular-nums; }
.speed-card__unit { font-size: 16px; color: #718096; }

.speed-card__spark { display: block; width: 100%; height: 73px; margin: 16px 0 8px; opacity: 0.45; }
.speed-card__spark .is-live { opacity: 1; }
.speed-card__stability { font-size: 14px; color: #718096; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
	.speed-hero__title { font-size: 56px; line-height: 1.1; }
	.speed-hero__desc { font-size: 20px; line-height: 1.4; }
}

@media (max-width: 1024px) {
	.speed-hero { padding-top: 80px; }
	.speed-hero__grid { grid-template-columns: 1fr; gap: 40px; }
	.speed-gauge { justify-self: center; max-width: 520px; }
	.speed-hero__desc { max-width: none; }
}

@media (max-width: 900px) {
	.speed-metrics { grid-template-columns: 1fr; margin-top: 40px; }
}

@media (max-width: 768px) {
	.speed-hero { padding-top: 56px; margin-bottom: 140px; }
	.speed-hero__title { font-size: 3rem; line-height: 1.2; margin-bottom: 16px; }
	.speed-hero__desc { font-size: 1rem; line-height: 1.5; margin-bottom: 28px; }

	.speed-bar { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; width: 100%; padding: 18px 20px; }
	.speed-bar__item--divided { margin-left: 0; padding-left: 0; border-left: 0; padding-top: 16px; border-top: 1px solid #fce8f0; width: 100%; }
	.speed-bar__label, .speed-bar__isp { font-size: 14px; }
	.speed-bar__value { font-size: 16px; }

	.speed-start { min-width: 120px; height: 52px; font-size: 14px; padding: 0 22px; }
	.speed-start:disabled { font-size: 14px; }

	.speed-card { padding: 22px; }
	.speed-card__value { font-size: 30px; }
}

/* ==========================================================================
   "Check your Connection" section (.speed-conn)
   Values measured from the Figma frame (1920px artboard, node 3068:78).
   ========================================================================== */
.speed-conn {
	position: relative;
	padding: 90px 0;
	background: #080c28;
	color: #fff;
	font-family: var(--dts-font-inter, "Inter", sans-serif);
}

.speed-conn *,
.speed-conn *::before,
.speed-conn *::after { box-sizing: border-box; }

.speed-conn__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 300px;
	height: 54px;
	border: 1px solid #d81b60;
	border-radius: 100px;
	font-size: 18px;
	line-height: 24px;
	font-weight: 700;
	color: #d81b60;
}

.speed-conn__title {
	margin: 49px 0 26px;
	font-size: 40px;
	line-height: 48px;
	font-weight: 700;
	color: #fff;
}

.speed-conn__desc {
	margin: 0 0 47px;
	max-width: 830px;
	font-size: 24px;
	line-height: 26px;
	font-weight: 400;
	color: #fff;
}

.speed-conn__grid {
	display: grid;
	grid-template-columns: 818fr 814fr;
	gap: 50px;
	margin: 0 -8px 0 12px; /* panels sit 12px in from the heading in the design */
}

/* ---------- Panels ---------- */
.speed-panel {
	background: #151833;
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 18px;
}

.speed-panel--test { padding: 67px 65px 67px; }
.speed-panel--ip { padding: 67px 95px 79px 96px; }

.speed-panel__title {
	margin: 0;
	font-size: 28px;
	line-height: 32px;
	font-weight: 700;
	color: #fff;
}

.speed-panel__text {
	margin: 34px 0 0;
	font-size: 24px;
	line-height: 26px;
	font-weight: 400;
	color: #fff;
}

.speed-panel--ip .speed-panel__text { line-height: 30px; }

/* ---------- Gauge (left panel) ---------- */
.speed-panel--test .speed-gauge {
	width: 100%;
	max-width: 597px;
	margin: 44px 0 0 26px; /* disc is 18px left of centre in the design */
	justify-self: start;
	aspect-ratio: 600 / 612;
}

.speed-conn .speed-start {
	left: calc(50% + 8px);
	top: 83.7%;
	bottom: auto;
	min-width: 147px;
	height: 52px;
	padding: 0 24px;
	border-radius: 44px;
	font-size: 24px;
	line-height: 1.2;
	font-weight: 600;
	box-shadow: none;
}

.speed-conn .speed-start:disabled { font-size: 16px; padding: 0 18px; }
.speed-conn .speed-error { color: #ff8a9b; text-align: center; margin: 16px 0 0; }

/* ---------- IP panel ---------- */
.speed-ip { margin-top: 74px; }
.speed-ip + .speed-ip { margin-top: 54px; }

.speed-ip__label {
	display: block;
	margin-bottom: 25px;
	font-size: 24px;
	line-height: 30px;
	font-weight: 400;
	color: #fff;
}

.speed-ip__field {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	min-height: 71px;
	padding: 0 24px;
	background: #272a43;
	border-radius: 12px;
}

.speed-ip__value {
	min-width: 0;
	font-size: 22px;
	line-height: 26px;
	font-weight: 700;
	color: #fff;
	word-break: break-all;
}

.speed-ip__copy {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 37px;
	height: 37px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #fff;
	cursor: pointer;
	transition: var(--dts-transition-effects, all 0.3s ease);
}

.speed-ip__copy svg { width: 30px; height: 30px; }
.speed-ip__copy:hover { background: rgba(255, 255, 255, 0.1); }
.speed-ip__copy.is-copied { color: #4ade80; background: rgba(74, 222, 128, 0.12); }
.speed-ip__copy:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.speed-ip__note {
	margin: 35px 0 0;
	font-size: 18px;
	line-height: 26px;
	font-weight: 400;
	color: #fff;
}

.speed-chips {
	display: grid;
	grid-template-columns: 315fr 308fr;
	gap: 22px;
	margin: 38px -11px 0 -13px;
}

.speed-chip {
	display: flex;
	align-items: center;
	gap: 18px;
	height: 107px;
	padding: 0 16px 0 42px;
	background: #262841;
	border: 1px solid rgba(255, 255, 255, 0.4);
	border-radius: 24px;
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
}

.speed-chip__icon { flex: none; display: inline-flex; color: #fff; }
.speed-chip__icon svg { width: 38px; height: 38px; }
.speed-chip__text { display: flex; flex-direction: column; min-width: 0; }
.speed-chip__label { font-size: 18px; line-height: 14px; font-weight: 500; color: #94a3b8; white-space: nowrap; }
.speed-chip__value { margin-top: 10px; font-size: 18px; line-height: 18px; font-weight: 500; color: #fff; }
.speed-chip__value [data-conn-isp] { margin-left: 6px; }
.speed-chip__value [hidden] { display: none; }

/* ---------- Result cards ---------- */
.speed-conn__metrics {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	margin: 64px 0 0 5px;
}

.speed-mini {
	position: relative;
	height: 194px;
	background: #fffcfd;
	border: 1px solid #fce8f0;
	border-radius: 24px;
	box-shadow: 0 4px 20px -2px rgba(9, 30, 66, 0.04), 0 0 1px 1px rgba(9, 30, 66, 0.03);
	color: #000;
	transition: var(--dts-transition-effects, all 0.3s ease);
}

.speed-mini.is-active { border-color: var(--speed-accent); box-shadow: 0 0 0 2px var(--speed-accent); }

.speed-mini__head { position: absolute; left: 16px; top: 16px; }

.speed-mini__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 9999px;
}

.speed-mini__icon svg { width: 20px; height: 20px; }

.speed-mini__label {
	position: absolute;
	left: 56px;
	top: 0;
	font-size: 16px;
	line-height: 16px;
	font-weight: 400;
	color: #8e8e8e;
	white-space: nowrap;
}

.speed-mini__reading {
	position: absolute;
	left: 71px;
	top: 35px;
	display: flex;
	align-items: center;
	gap: 7px;
	white-space: nowrap;
}

.speed-mini__value { font-size: 24px; line-height: 24px; font-weight: 700; color: #000; font-variant-numeric: tabular-nums; }
.speed-mini__unit { position: relative; top: 3px; font-size: 12px; line-height: 16px; font-weight: 600; color: #43474f; }

.speed-mini__spark { position: absolute; left: 39px; top: 78px; width: calc(100% - 73px); height: 73px; opacity: 0.55; }
.speed-mini__spark .is-live { opacity: 1; }

.speed-mini__stability {
	position: absolute;
	right: 34px;
	bottom: 19px;
	font-size: 15px;
	line-height: 15px;
	font-weight: 400;
	color: #43474f;
}

/* ---------- Responsive ---------- */
@media (max-width: 1600px) {
	.speed-conn__grid { margin: 0; }
	.speed-conn__metrics { margin-left: 0; }
	.speed-panel--test .speed-gauge { margin: 44px auto 0; justify-self: center; }
	.speed-conn .speed-start { left: 50%; }
	.speed-conn__desc, .speed-panel__text, .speed-ip__label { font-size: 20px; }
	.speed-conn__desc { line-height: 1.4; }
	.speed-panel__text { line-height: 1.4; }
	.speed-panel--test { padding: 56px 40px 64px; }
	.speed-panel--ip { padding: 56px 56px 64px; }
	.speed-panel__title { font-size: 24px; }
	.speed-ip__value { font-size: 20px; }
	.speed-chips { margin: 38px 0 0; }
}

@media (max-width: 1280px) {
	.speed-conn__grid { gap: 24px; }
	.speed-chips { grid-template-columns: 1fr; gap: 16px; }
	.speed-chip { height: 88px; }
}

@media (max-width: 1024px) {
	.speed-conn__grid { grid-template-columns: 1fr; }
	.speed-conn__title { font-size: 36px; line-height: 1.2; }
	.speed-chips { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
	.speed-conn__metrics { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
	.speed-conn { padding: 56px 0; }
	.speed-conn__badge { width: auto; height: auto; padding: 10px 20px; font-size: 14px; line-height: 1.2; }
	.speed-conn__title { font-size: 2.25rem; line-height: 1.2; margin: 24px 0 14px; }
	.speed-conn__desc { font-size: 1rem; line-height: 1.5; margin-bottom: 28px; }
	.speed-conn__br { display: none; }

	.speed-panel--test, .speed-panel--ip { padding: 32px 20px 36px; }
	.speed-panel__title { font-size: 20px; line-height: 1.3; }
	.speed-panel__text { font-size: 1rem; line-height: 1.5; margin-top: 12px; }
	.speed-panel--test .speed-gauge { margin-top: 24px; }
	.speed-conn .speed-start { min-width: 100px; height: 40px; font-size: 14px; }
	.speed-conn .speed-start:disabled { font-size: 14px; padding: 0 14px; }

	.speed-ip { margin-top: 28px; }
	.speed-ip + .speed-ip { margin-top: 20px; }
	.speed-ip__label { font-size: 1rem; margin-bottom: 10px; }
	.speed-ip__field { min-height: 60px; padding: 0 16px; }
	.speed-ip__value { font-size: 14px; line-height: 1.4; }
	.speed-ip__note { font-size: 14px; line-height: 1.6; margin-top: 24px; }
	.speed-chips { grid-template-columns: 1fr; margin-top: 24px; }
	.speed-chip { padding-left: 20px; height: 80px; }
	.speed-chip__icon svg { width: 28px; height: 28px; }
	.speed-chip__label, .speed-chip__value { font-size: 14px; }
	.speed-chip__label { line-height: 16px; }

	.speed-conn__metrics { margin-top: 32px; }
}