:root {
  color-scheme: dark;
  --bg: #030814;
  --text: #f8fbff;
  --muted: #9fb0c8;
  --line: rgba(196,231,255,.16);
  --cyan: #1de8ee;
  --blue: #2563ff;
  --purple: #a633ff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100svh;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 22% 16%, rgba(29,232,238,.18), transparent 32%),
    radial-gradient(circle at 78% 70%, rgba(116,54,255,.24), transparent 38%),
    linear-gradient(145deg, #030814, #071425 58%, #0b0630);
}

a { color: inherit; text-decoration: none; }

.speed-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 24px 0 44px;
}

.speed-nav {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
}

.brand {
  margin-right: auto;
}

.brand img {
  width: 168px;
  height: auto;
}

.speed-panel {
  min-height: calc(100svh - 138px);
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(360px, .72fr);
  gap: 28px;
  align-items: center;
}

.speed-copy span {
  color: var(--cyan);
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 13px;
}

.speed-copy h1 {
  margin: 16px 0;
  font-size: clamp(54px, 8vw, 112px);
  line-height: .92;
  letter-spacing: 0;
}

.speed-copy p {
  width: min(620px, 100%);
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.gauge-card,
.speed-stats article {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255,255,255,.1), rgba(255,255,255,.035));
  box-shadow: 0 34px 110px rgba(0,0,0,.34);
  backdrop-filter: blur(26px);
}

.gauge-card {
  position: relative;
  display: grid;
  place-items: center;
  gap: 24px;
  padding: 36px;
  border-radius: 36px;
}

.gauge {
  position: relative;
  width: min(420px, 82vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    conic-gradient(from 220deg, var(--cyan), var(--blue) 42%, var(--purple) 72%, transparent 73% 100%),
    radial-gradient(circle, #071426 0 58%, rgba(255,255,255,.08) 59% 62%, transparent 63%);
}

.gauge::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, rgba(29,232,238,.16), transparent 34%), #040b17;
}

.needle {
  position: absolute;
  z-index: 2;
  width: 34%;
  height: 5px;
  left: 50%;
  top: 50%;
  border-radius: 999px;
  background: #fff;
  transform-origin: left center;
  transform: rotate(220deg);
  box-shadow: 0 0 28px rgba(29,232,238,.44);
  transition: transform 900ms cubic-bezier(.2,.84,.2,1);
}

.gauge-value {
  position: relative;
  z-index: 3;
  display: grid;
  justify-items: center;
}

.gauge-value strong {
  font-size: clamp(52px, 8vw, 90px);
  line-height: 1;
}

.gauge-value span {
  color: var(--muted);
  font-weight: 800;
}

#start-test {
  min-height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue), var(--purple));
  box-shadow: 0 18px 50px rgba(37,99,255,.32);
}

.speed-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.speed-stats article {
  display: grid;
  gap: 8px;
  padding: 20px;
  border-radius: 22px;
}

.speed-stats span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.speed-stats strong {
  font-size: 24px;
}

@media (max-width: 820px) {
  .speed-panel,
  .speed-stats {
    grid-template-columns: 1fr;
  }
  .speed-copy {
    text-align: center;
  }
  .speed-copy p {
    margin-inline: auto;
    font-size: 16px;
  }
}
