.pg-speedtest {
  --pg-bg: #0f172a;
  --pg-panel: #111827;
  --pg-text: #f8fafc;
  --pg-muted: #cbd5e1;
  --pg-accent: #38bdf8;
  --pg-accent-2: #22c55e;
  --pg-border: rgba(255,255,255,0.12);
  box-sizing: border-box;
  max-width: 900px;
  margin: 32px auto;
  font-family: inherit;
}

.pg-speedtest * {
  box-sizing: border-box;
}

.pg-speedtest__card {
  background: radial-gradient(circle at top left, rgba(56,189,248,.22), transparent 30%), var(--pg-bg);
  color: var(--pg-text);
  border: 1px solid var(--pg-border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(15,23,42,.35);
}

.pg-speedtest__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.pg-speedtest__header h2 {
  color: var(--pg-text);
  margin: 0 0 6px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
}

.pg-speedtest__header p,
.pg-speedtest__note,
.pg-speedtest__status {
  color: var(--pg-muted);
}

.pg-speedtest__header p {
  margin: 0;
  font-size: 16px;
}

.pg-speedtest__badge {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: rgba(56,189,248,.16);
  border: 1px solid rgba(56,189,248,.35);
  color: var(--pg-accent);
  font-weight: 800;
  letter-spacing: .04em;
}

.pg-speedtest__status {
  margin-bottom: 18px;
  font-size: 15px;
}

.pg-speedtest__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.pg-speedtest__metric {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--pg-border);
  border-radius: 18px;
  padding: 18px;
  min-height: 132px;
}

.pg-speedtest__metric span,
.pg-speedtest__metric small {
  display: block;
  color: var(--pg-muted);
}

.pg-speedtest__metric strong {
  display: block;
  color: var(--pg-text);
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.1;
  margin: 14px 0 4px;
}

.pg-speedtest__progress {
  height: 12px;
  background: rgba(255,255,255,.08);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 20px;
}

.pg-speedtest__progress div {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--pg-accent), var(--pg-accent-2));
  border-radius: inherit;
  transition: width .25s ease;
}

.pg-speedtest__button {
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 16px 20px;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  color: #07111f;
  background: linear-gradient(90deg, var(--pg-accent), var(--pg-accent-2));
}

.pg-speedtest__button:disabled {
  opacity: .65;
  cursor: not-allowed;
}

.pg-speedtest__note {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .pg-speedtest__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 460px) {
  .pg-speedtest__card {
    padding: 20px;
    border-radius: 18px;
  }

  .pg-speedtest__grid {
    grid-template-columns: 1fr;
  }
}
