:root {
  --bg-top: #1d3a5f;
  --bg-bottom: #0b1f38;
  --teal: #1ed4b5;
  --dl: #2fe0a0;        /* greener download accent */
  --dl2: #19d6c2;
  --ul: #b07bff;
  --gold: #f5c451;
  --text: #eaf2fb;
  --muted: #8aa0bd;
  --center-bg: #163150;
  --font: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-num: "Saira Condensed", "Inter", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; background: #0b1f38; }
body {
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  /* single fixed gradient tied to the viewport — no seam when content scrolls */
  background: radial-gradient(125% 120% at 50% 0%, var(--bg-top) 0%, var(--bg-bottom) 55%, #07172b 100%) fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 36px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: 2px; font-size: 20px; }
.brand-ic { width: 30px; height: 30px; }
.brand-name { color: var(--text); }

.stage {
  max-width: 1040px;
  margin: 0 auto;
  padding: 6px 24px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ===== Results (screen 1) ===== */
.metrics {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 10px 0 2px;
}
.result-main { display: flex; gap: 90px; }
.rm { text-align: center; min-width: 160px; }
.rm-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
}
.rm-head svg { width: 17px; height: 17px; }
.rm-head i { font-style: normal; font-size: 12px; opacity: .75; text-transform: none; }
.rm.dl .rm-head svg { fill: var(--dl); }
.rm.ul .rm-head svg { fill: var(--ul); }
.rm-val {
  font-family: var(--font-num);
  font-size: 64px;
  font-weight: 300;
  line-height: 1;
  color: #fff;
  letter-spacing: .5px;
}

.result-sub {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  margin-top: 10px;
  color: var(--muted);
}
.lat { text-align: center; min-width: 92px; }
.lat-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
}
.lat-head svg { width: 13px; height: 13px; }
.lat.idle .lat-head svg { fill: var(--gold); }
.lat.down .lat-head svg { fill: var(--dl); }
.lat.up .lat-head svg { fill: var(--ul); }
.lat-val {
  font-family: var(--font-num);
  font-size: 26px;
  font-weight: 400;
  color: #d5e1f0;
  line-height: 1.1;
  margin-top: 2px;
}
.lat-jit { font-size: 10.5px; color: var(--muted); opacity: .8; }

/* ===== Gauge (screen 2) ===== */
.gauge-wrap {
  position: relative;
  width: 470px;
  height: 470px;
  margin: 6px 0 8px;
}
#gauge { width: 100%; height: 100%; }

.gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* drop shadow that lifts the glass plate above the needle (kept separate so
   the blur mask on .center-disc doesn't clip the shadow) */
.center-shadow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 196px;
  height: 196px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  box-shadow: 0 16px 34px rgba(0,0,0,.55), 0 5px 12px rgba(0,0,0,.45);
  z-index: 1;
  pointer-events: none;
}

/* single frosted glass disc that masks the needle but sits under the text */
.center-disc {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 208px;
  height: 208px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(120% 85% at 50% 20%, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 46%),
    radial-gradient(circle, rgba(15,36,62,0.82) 0%, rgba(9,23,42,0.62) 55%, rgba(9,23,42,0.10) 100%);
  backdrop-filter: blur(11px) saturate(125%);
  -webkit-backdrop-filter: blur(11px) saturate(125%);
  /* blur strongest in the center, fading out toward the edges */
  -webkit-mask-image: radial-gradient(circle, #000 42%, rgba(0,0,0,0.6) 70%, transparent 100%);
  mask-image: radial-gradient(circle, #000 42%, rgba(0,0,0,0.6) 70%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

.go-btn {
  pointer-events: auto;
  position: relative;
  z-index: 2;
  width: 134px;
  height: 134px;
  border-radius: 50%;
  border: 2px solid var(--teal);
  background: transparent;
  color: var(--teal);
  font-family: var(--font-num);
  font-size: 38px;
  font-weight: 500;
  letter-spacing: 2px;
  cursor: pointer;
  transition: transform .15s, color .2s, box-shadow .2s;
  box-shadow: 0 0 26px rgba(30,212,181,.20);
}
.go-btn:hover { color: #fff; box-shadow: 0 0 32px rgba(30,212,181,.4); }
.go-btn:active { transform: scale(.96); }
.go-btn.hidden { display: none; }

.live-value {
  position: relative;
  z-index: 2;
  font-family: var(--font-num);
  font-size: 80px;
  font-weight: 300;
  line-height: 1;
  display: none;
  color: #fff;
}
.live-unit {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
}
.live-unit svg { width: 14px; height: 14px; }
.live-label {
  position: relative;
  z-index: 2;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-top: 8px;
}
.testing .live-value { display: block; }
.live-unit:empty, .live-label:empty { display: none; }

/* ===== Live graph ===== */
.graph-wrap {
  width: 100%;
  max-width: 720px;
  height: 130px;
  margin: 2px 0 8px;
  opacity: 0;
  transition: opacity .3s;
}
.testing .graph-wrap, .has-result .graph-wrap { opacity: 1; }
.graph { width: 100%; height: 100%; display: block; }

/* ===== Actions ===== */
.actions { display: none; justify-content: center; margin-top: 16px; }
.has-result .actions { display: flex; }
.report-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 22px;
  border-radius: 26px;
  border: 1px solid var(--teal);
  background: rgba(30,212,181,.10);
  color: var(--teal);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s, box-shadow .2s;
}
.report-btn svg { width: 18px; height: 18px; fill: currentColor; }
.report-btn:hover { background: var(--teal); color: #06243a; box-shadow: 0 0 24px rgba(30,212,181,.35); }

/* ===== Info bar ===== */
.infobar {
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid rgba(255,255,255,.07);
  padding-top: 22px;
  margin-top: 14px;
  width: 100%;
  max-width: 760px;
}
.info-block { display: flex; align-items: center; gap: 12px; flex: 1; justify-content: center; padding: 0 18px; }
.info-block + .info-block { border-left: 1px solid rgba(255,255,255,.07); }
.info-ic svg { width: 26px; height: 26px; fill: var(--muted); }
.info-cap { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.info-main { font-size: 15px; font-weight: 600; color: var(--text); }
.link { color: var(--teal); text-decoration: none; }
.link:hover { text-decoration: underline; }

/* ===== Network info table ===== */
.netinfo {
  width: 100%;
  max-width: 560px;
  margin: 22px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.netinfo-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 8px;
  text-align: center;
}
.netinfo table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.netinfo td { padding: 8px 6px; border-bottom: 1px solid rgba(255,255,255,.05); }
.netinfo td.k { color: var(--muted); text-transform: uppercase; letter-spacing: .4px; font-size: 11px; width: 42%; }
.netinfo td.v { color: var(--text); text-align: right; font-weight: 500; }
.testing .netinfo, .has-result .netinfo { display: none; }

/* ===== SEO content ===== */
.seo {
  margin-top: 140px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(7,18,33,.45);
  padding: 56px 24px 80px;
}
.seo-inner { max-width: 860px; margin: 0 auto; color: #c7d4e6; line-height: 1.7; font-size: 15px; }
.seo-inner h1 { font-size: 30px; font-weight: 700; color: #fff; margin-bottom: 18px; line-height: 1.25; }
.seo-inner h2 { font-size: 22px; font-weight: 600; color: #eaf2fb; margin: 36px 0 12px; }
.seo-inner h3 { font-size: 17px; font-weight: 600; color: #eaf2fb; margin: 18px 0 6px; }
.seo-inner p { margin-bottom: 14px; }
.seo-inner strong { color: #eaf2fb; font-weight: 600; }
.seo-inner ul, .seo-inner ol { margin: 0 0 16px 22px; }
.seo-inner li { margin-bottom: 7px; }
.seo-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 18px;
  font-size: 14px;
}
.seo-table th, .seo-table td {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.10);
}
.seo-table th { background: rgba(255,255,255,.05); color: #eaf2fb; font-weight: 600; }
.seo-table tr:nth-child(even) td { background: rgba(255,255,255,.02); }
.seo-faq h3 { margin-top: 16px; }
.seo-note { margin-top: 28px; font-size: 12.5px; color: var(--muted); opacity: .8; }

@media (max-width: 640px) {
  .seo { margin-top: 90px; padding: 40px 18px 56px; }
  .seo-inner h1 { font-size: 24px; }
  .seo-inner h2 { font-size: 19px; }
  .result-main { gap: 36px; }
  .rm { min-width: 120px; }
  .rm-val { font-size: 48px; }
  .gauge-wrap { width: 340px; height: 340px; }
  .infobar { flex-direction: column; gap: 18px; }
  .info-block + .info-block { border-left: none; }
}
