:root {
  color-scheme: dark;
  --bg: #050b14;
  --surface: rgba(12, 24, 40, .74);
  --surface-border: rgba(125, 171, 220, .15);
  --text: #f3f8ff;
  --muted: #8192aa;
  --cyan: #31d7f5;
  --violet: #8a5cff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(28, 62, 101, .27), transparent 34rem),
    linear-gradient(155deg, #07111f 0%, var(--bg) 58%, #07101a 100%);
  color: var(--text);
  font-family: "Segoe UI", Inter, system-ui, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .13;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.ambient { position: fixed; border-radius: 50%; filter: blur(100px); opacity: .12; pointer-events: none; }
.ambient-one { width: 30rem; height: 30rem; left: -15rem; top: 18rem; background: var(--cyan); }
.ambient-two { width: 26rem; height: 26rem; right: -13rem; top: 5rem; background: var(--violet); }

.site-header, main, footer { position: relative; z-index: 1; }

.site-header {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; font-size: 15px; font-weight: 800; letter-spacing: .08em; }
.brand > span:last-child > span { color: var(--cyan); }
.brand-mark { display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid rgba(49,215,245,.34); border-radius: 10px; background: rgba(49,215,245,.08); box-shadow: inset 0 0 20px rgba(49,215,245,.08); }
.brand-mark svg { width: 24px; fill: none; stroke: var(--cyan); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }

.status-pill { display: flex; align-items: center; gap: 9px; padding: 9px 13px; border: 1px solid var(--surface-border); border-radius: 999px; color: #a2b0c1; background: rgba(9,18,31,.65); font-size: 11px; font-weight: 600; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #48e6a4; box-shadow: 0 0 10px #48e6a4; }
.status-pill.busy .status-dot { background: var(--cyan); animation: pulse 1s ease-in-out infinite; }
.status-pill.error .status-dot { background: #ff6b78; box-shadow: 0 0 10px #ff6b78; }

main { width: min(960px, calc(100% - 32px)); margin: 36px auto 0; }
.hero { text-align: center; max-width: 690px; margin: 0 auto 36px; }
.eyebrow { margin: 0 0 13px; color: var(--cyan); font-size: 10px; font-weight: 700; letter-spacing: .25em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(38px, 6vw, 66px); line-height: 1.04; letter-spacing: -.05em; font-weight: 800; }
h1 span { background: linear-gradient(90deg, #eaf5ff 12%, #5edff8 55%, #a87cff); background-clip: text; -webkit-background-clip: text; color: transparent; }
.intro { max-width: 590px; margin: 22px auto 0; color: var(--muted); font-size: 14px; line-height: 1.8; }

.test-card {
  position: relative;
  overflow: hidden;
  padding: 0 58px 30px;
  border: 1px solid var(--surface-border);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(16,31,50,.84), rgba(7,15,27,.88));
  box-shadow: 0 35px 90px rgba(0,0,0,.25), inset 0 1px rgba(255,255,255,.03);
  backdrop-filter: blur(16px);
}
.test-card::after { content: ""; position: absolute; width: 40%; height: 2px; left: 30%; top: -1px; background: linear-gradient(90deg, transparent, var(--cyan), transparent); opacity: .55; }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 -58px 12px; border-bottom: 1px solid var(--surface-border); }
.metric { display: flex; align-items: center; justify-content: center; gap: 13px; min-height: 96px; border-right: 1px solid var(--surface-border); }
.metric:last-child { border-right: 0; }
.metric-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; font-size: 14px; font-weight: 700; }
.ping-icon { color: #5ce4c0; background: rgba(92,228,192,.1); }
.download-icon { color: var(--cyan); background: rgba(49,215,245,.12); }
.upload-icon { color: #a68bff; background: rgba(166,139,255,.12); }
.metric div:last-child { display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 5px; }
.metric span { grid-column: 1 / 3; color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.metric strong { min-width: 26px; font-size: 23px; line-height: 1.2; }
.metric small { color: var(--muted); font-size: 9px; }
.metric.active { background: linear-gradient(180deg, rgba(49,215,245,.06), transparent); }
.metric.active strong { color: var(--cyan); }

.speedometer { position: relative; width: min(100%, 460px); height: 250px; margin: 18px auto -28px; }
.gauge { width: 100%; height: 100%; overflow: visible; }
.gauge-track, .gauge-progress { fill: none; stroke-width: 10; stroke-linecap: round; }
.gauge-track { stroke: rgba(121,153,187,.11); }
.gauge-progress { stroke: url(#gaugeGradient); stroke-dasharray: 100; stroke-dashoffset: 100; filter: drop-shadow(0 0 8px rgba(49,215,245,.45)); transition: stroke-dashoffset .35s ease-out; }
.ticks path { stroke: rgba(177,199,223,.25); stroke-width: 1.5; }
.live-reading { position: absolute; inset: 78px 0 auto; display: flex; flex-direction: column; align-items: center; }
.live-reading span { margin-bottom: 4px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.live-reading strong { font-size: 58px; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.055em; }
.live-reading small { margin-top: 5px; color: var(--muted); font-size: 11px; }

.scale { display: flex; justify-content: space-between; width: min(100%, 450px); margin: 0 auto 27px; padding: 0 4px; color: #53657c; font-size: 8px; }
.start-button { display: flex; align-items: center; justify-content: center; gap: 14px; width: min(100%, 290px); height: 54px; margin: 0 auto; border: 0; border-radius: 14px; color: #031019; background: linear-gradient(100deg, #31d7f5, #66e8ff); box-shadow: 0 12px 30px rgba(49,215,245,.18); font: 700 13px/1 "Segoe UI", Inter, system-ui, sans-serif; cursor: pointer; transition: transform .2s, box-shadow .2s, opacity .2s; }
.start-button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(49,215,245,.28); }
.start-button:active:not(:disabled) { transform: translateY(0); }
.start-button:disabled { cursor: wait; opacity: .7; }
.button-arrow { font-size: 19px; }
.start-button.running .button-arrow { width: 16px; height: 16px; border: 2px solid rgba(3,16,25,.3); border-top-color: #031019; border-radius: 50%; font-size: 0; animation: spin .7s linear infinite; }
.privacy-note { margin: 17px 0 0; text-align: center; color: #506278; font-size: 8px; }

.details { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 15px 0 70px; }
.details div { padding: 16px 18px; border: 1px solid rgba(125,171,220,.1); border-radius: 12px; background: rgba(10,21,35,.55); }
.details span, .details strong { display: block; }
.details span { margin-bottom: 6px; color: #53657c; font-size: 8px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.details strong { overflow: hidden; color: #9cabbc; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }

footer { display: flex; justify-content: space-between; width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 22px 0 30px; border-top: 1px solid rgba(125,171,220,.08); color: #405166; font-size: 9px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; } }

@media (max-width: 650px) {
  .site-header { height: 72px; }
  .status-pill { padding: 8px; }
  .status-pill span:last-child { display: none; }
  main { margin-top: 25px; }
  .hero { margin-bottom: 27px; }
  .intro { font-size: 13px; }
  .test-card { padding: 0 20px 24px; border-radius: 19px; }
  .metrics { margin: 0 -20px 4px; }
  .metric { min-height: 82px; gap: 7px; }
  .metric-icon { width: 25px; height: 25px; font-size: 11px; }
  .metric strong { font-size: 17px; }
  .metric small { font-size: 7px; }
  .speedometer { height: 210px; margin-bottom: -34px; }
  .live-reading { inset-block-start: 66px; }
  .live-reading strong { font-size: 47px; }
  .details { grid-template-columns: 1fr; margin-bottom: 45px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
