/* ==========================================================================
   Shared tool-page components: the test card, numbered steps, bulleted
   lists, connection flow diagram and activity table reused across every
   tool and guide page (speed tests, ping/jitter/packet-loss tests, WHOIS,
   DNS lookup, port checker, calculators, guides…), loaded once alongside
   each page's own stylesheet. Reuses the design tokens from main.css
   (colors, radii, shadows, type) — no new palette.
   ========================================================================== */

/* ---------- Test card ---------- */

.pv-testcard {
	max-width: 640px;
	margin: 0 auto;
	padding: clamp(24px, 4vw, 36px);
	border: 1px solid var(--pv-line);
	border-radius: var(--pv-r-lg);
	background: linear-gradient(180deg, #fff 0%, var(--pv-soft-2) 100%);
	box-shadow: var(--pv-shadow-lg);
	text-align: center;
}

.pv-testcard__stats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
	margin-bottom: 24px;
}
.pv-stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 16px 6px;
	border: 1px solid var(--pv-line-2);
	border-radius: 16px;
	background: var(--pv-soft-2);
	transition: border-color .2s ease, box-shadow .2s ease;
}
.pv-stat__ico { color: var(--pv-muted); }
.pv-stat__k { color: var(--pv-muted); font-size: 11px; font-weight: 600; }
.pv-stat__v { font-size: clamp(18px, 4vw, 22px); font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pv-stat__v small { margin-left: 3px; color: var(--pv-muted); font-size: 10.5px; font-weight: 600; }
.pv-testcard[data-state="testing"] .pv-stat.is-active {
	border-color: var(--pv-cyan);
	box-shadow: 0 0 0 3px rgba(14, 165, 196, .12);
}
.pv-testcard[data-state="testing"] .pv-stat.is-active .pv-stat__v { color: var(--pv-cyan); }

.pv-testcard__progress { margin: 0 0 22px; }
.pv-testcard__bar {
	height: 8px;
	border-radius: 999px;
	background: var(--pv-line-2);
	overflow: hidden;
}
.pv-testcard__bar > span {
	display: block;
	height: 100%;
	width: 2%;
	border-radius: inherit;
	background: var(--pv-grad);
	transition: width .3s ease;
}
.pv-testcard__phase {
	margin: 10px 0 0;
	color: var(--pv-ink-2);
	font-size: 13.5px;
	font-weight: 600;
}

.pv-testcard__actions { display: flex; justify-content: center; }

.pv-testcard__note {
	margin: 14px 0 0;
	min-height: 1.4em;
	color: var(--pv-muted);
	font-size: 12.5px;
	font-weight: 600;
}

.pv-testcard__error {
	margin: 14px 0 0;
	padding: 11px 16px;
	border: 1px solid rgba(214, 60, 60, .25);
	border-radius: 12px;
	background: rgba(214, 60, 60, .07);
	color: #b02a2a;
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.5;
}

.pv-testcard__fine {
	margin: 20px 0 0;
	padding-top: 18px;
	border-top: 1px solid var(--pv-line-2);
	color: var(--pv-muted);
	font-size: 12px;
	line-height: 1.65;
}

@media (max-width: 560px) {
	.pv-testcard__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Internet Speed Test: download / upload / ping only, no jitter tile. */
.pv-testcard__stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 560px) {
	.pv-testcard__stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Numbered steps ---------- */

.pv-steps {
	counter-reset: pv-step;
	display: grid;
	gap: 4px;
	max-width: 720px;
	margin: 0 auto;
	padding: 0;
	list-style: none;
	text-align: left;
}
.pv-steps li {
	counter-increment: pv-step;
	position: relative;
	display: flex;
	gap: 14px;
	align-items: flex-start;
	padding: 14px 4px;
	border-bottom: 1px solid var(--pv-line-2);
}
.pv-steps li:last-child { border-bottom: 0; }
.pv-steps li::before {
	content: counter(pv-step);
	display: grid;
	place-items: center;
	flex: none;
	width: 30px;
	height: 30px;
	margin-top: 1px;
	border-radius: 50%;
	background: var(--pv-ink);
	color: #fff;
	font-size: 12.5px;
	font-weight: 700;
}
.pv-steps p { margin: 0; padding-top: 4px; color: var(--pv-ink-2); font-size: 14.5px; line-height: 1.6; }

/* ---------- Simple bulleted list (causes / tips) ---------- */

.pv-list {
	display: grid;
	gap: 10px;
	max-width: 760px;
	margin: 0 auto;
	padding: 0;
	list-style: none;
}
.pv-list--2col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pv-list li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px 14px;
	border: 1px solid var(--pv-line-2);
	border-radius: 14px;
	background: var(--pv-soft-2);
	color: var(--pv-ink-2);
	font-size: 14px;
	line-height: 1.55;
	text-align: left;
}
.pv-list li .pv-ico { flex: none; margin-top: 2px; color: var(--pv-orange); }
@media (max-width: 640px) {
	.pv-list--2col { grid-template-columns: 1fr; }
}

/* ---------- Connection flow diagram ---------- */

.pv-flow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 20px 0;
}
.pv-flow__node {
	padding: 10px 16px;
	border: 1px solid var(--pv-line);
	border-radius: 999px;
	background: var(--pv-soft);
	color: var(--pv-ink);
	font-size: 13.5px;
	font-weight: 700;
	white-space: nowrap;
}
.pv-flow--isp .pv-flow__node:first-child {
	border-color: transparent;
	background: var(--pv-ink);
	color: #fff;
}
.pv-flow__arrow { display: grid; place-items: center; color: var(--pv-muted); }
.pv-flow__caption { margin: 0 0 8px; color: var(--pv-muted); font-size: 12.5px; font-weight: 600; text-align: center; }

/* ---------- Activity table ---------- */

.pv-table-wrap {
	max-width: 760px;
	min-width: 0;
	margin: 0 auto;
	overflow-x: auto;
	border: 1px solid var(--pv-line);
	border-radius: var(--pv-r);
	background: #fff;
}
.pv-table { width: 100%; min-width: 480px; border-collapse: collapse; text-align: left; }
.pv-table th,
.pv-table td { padding: 13px 16px; border-bottom: 1px solid var(--pv-line-2); font-size: 13.5px; line-height: 1.5; }
.pv-table thead th {
	color: var(--pv-muted);
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	background: var(--pv-soft-2);
}
.pv-table tbody th { color: var(--pv-ink); font-weight: 600; white-space: nowrap; }
.pv-table tbody tr:last-child td,
.pv-table tbody tr:last-child th { border-bottom: 0; }
.pv-table td { color: var(--pv-ink-2); }
