:root {
  --ink: #06111e;
  --ink-2: #0a1b2e;
  --panel: rgba(10, 28, 47, .82);
  --panel-strong: #0b2238;
  --line: rgba(121, 216, 255, .18);
  --cyan: #3de7ff;
  --blue: #4d7cff;
  --mint: #71f7c8;
  --amber: #ffbf5b;
  --rose: #ff7f8f;
  --text: #eef8ff;
  --muted: #9db2c4;
  --shadow: 0 30px 80px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 80% 10%, rgba(61, 231, 255, .11), transparent 28rem),
    radial-gradient(circle at 15% 60%, rgba(77, 124, 255, .08), transparent 32rem),
    var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(61, 231, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 231, 255, .025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, #000, transparent 86%);
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 17, 30, .88);
  backdrop-filter: blur(18px);
}

.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 850; letter-spacing: .02em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(61, 231, 255, .45); border-radius: 10px; background: rgba(61, 231, 255, .08); }
.brand-mark::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 18px var(--cyan); }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: #bfd0dd; text-decoration: none; font-size: .92rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #fff; }
.nav-links .phone-link { color: var(--mint); font-weight: 850; white-space: nowrap; }
.nav-links .phone-link:hover { color: #fff; text-shadow: 0 0 14px rgba(113, 247, 200, .65); }

.hero { padding: 92px 0 58px; }
.eyebrow { color: var(--cyan); font-size: .76rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3 { letter-spacing: -.035em; line-height: 1.05; }
h1 { max-width: 900px; margin: 14px 0 22px; font-size: clamp(2.8rem, 7vw, 6rem); }
h2 { margin: 8px 0 14px; font-size: clamp(2rem, 4vw, 3.6rem); }
h3 { margin: 8px 0 10px; }
.lead { max-width: 760px; color: #b9ccda; font-size: clamp(1rem, 1.7vw, 1.22rem); }
.hero-badges, .chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.badge, .chip { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; color: #bcd0dd; background: rgba(8, 25, 42, .68); font-size: .82rem; }

.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-bottom: 90px; }
.tool-card, .panel, .result-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(150deg, rgba(14, 40, 63, .86), rgba(6, 20, 35, .88));
  box-shadow: var(--shadow);
}
.tool-card { min-height: 330px; padding: 28px; display: flex; flex-direction: column; text-decoration: none; transition: transform .25s, border-color .25s; }
.tool-card:hover { transform: translateY(-5px); border-color: rgba(61, 231, 255, .58); }
.tool-no { color: var(--cyan); font-size: .75rem; font-weight: 800; letter-spacing: .14em; }
.tool-card h2 { font-size: 1.7rem; margin-top: 48px; }
.tool-card p { color: var(--muted); }
.tool-link { margin-top: auto; color: var(--mint); font-weight: 800; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .72fr); gap: 24px; padding-bottom: 100px; align-items: start; }
.panel { padding: clamp(22px, 4vw, 38px); }
.panel.sticky { position: sticky; top: 96px; }
.section-label { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; color: #d9eef8; font-weight: 800; }
.section-label span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--cyan); background: rgba(61, 231, 255, .08); border: 1px solid rgba(61, 231, 255, .25); font-size: .78rem; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field.full { grid-column: 1 / -1; }
label, legend { display: block; margin-bottom: 8px; color: #d7e6f0; font-weight: 750; font-size: .92rem; }
input[type="number"], select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(138, 208, 244, .23);
  border-radius: 12px;
  padding: 10px 13px;
  color: var(--text);
  background: rgba(5, 16, 29, .8);
}
input[type="range"] { width: 100%; accent-color: var(--cyan); }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.range-line { display: flex; justify-content: space-between; color: var(--muted); font-size: .83rem; }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label { height: 100%; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(5, 17, 30, .62); cursor: pointer; font-weight: 650; color: #b9ccda; }
.choice input:checked + label { color: #fff; border-color: rgba(61, 231, 255, .66); background: rgba(61, 231, 255, .1); box-shadow: inset 0 0 24px rgba(61, 231, 255, .06); }
.choice input:focus-visible + label { outline: 2px solid var(--cyan); outline-offset: 2px; }

.check-list { display: grid; gap: 10px; }
.check-row { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: rgba(5, 17, 30, .56); }
.check-row input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--mint); }
.check-row label { margin: 0; cursor: pointer; }
.check-row small { display: block; margin-top: 3px; color: var(--muted); font-weight: 450; }

.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; border: 1px solid rgba(61, 231, 255, .4); border-radius: 999px; padding: 11px 19px; background: rgba(61, 231, 255, .08); color: #eaffff; text-decoration: none; font-weight: 800; transition: .2s; }
.button:hover { transform: translateY(-2px); background: rgba(61, 231, 255, .15); }
.button.primary { border-color: transparent; color: #03131d; background: linear-gradient(120deg, var(--cyan), var(--mint)); }
.button[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 24px 0; }
.metric { min-height: 118px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(5, 17, 30, .64); }
.metric small { color: var(--muted); }
.metric strong { display: block; margin-top: 8px; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1; }
.metric strong span { font-size: .82rem; color: var(--muted); letter-spacing: 0; }
.meter { height: 9px; margin: 18px 0; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.meter > i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan), var(--mint)); transition: width .35s ease; }
.status-line { min-height: 26px; color: #c7dae6; }

.test-visual {
  position: relative;
  overflow: hidden;
  margin: 20px 0 24px;
  padding: 18px 16px 16px;
  border: 1px solid rgba(61, 231, 255, .2);
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 58%, rgba(61, 231, 255, .12), transparent 42%),
    linear-gradient(160deg, rgba(5, 18, 31, .92), rgba(8, 30, 48, .74));
  box-shadow: inset 0 0 45px rgba(61, 231, 255, .035);
}
.test-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(61, 231, 255, .07) 50%, transparent 65%);
  transform: translateX(-120%);
}
.test-visual.testing::before { animation: scan-panel 2.8s linear infinite; }
.traffic-route { display: grid; grid-template-columns: 62px 1fr 62px; align-items: center; gap: 10px; }
.route-node { display: grid; justify-items: center; gap: 7px; color: #91a9ba; text-transform: uppercase; letter-spacing: .11em; }
.route-node small { font-size: .58rem; font-weight: 800; }
.route-icon { width: 38px; height: 38px; position: relative; display: block; border: 1px solid rgba(61, 231, 255, .34); background: rgba(61, 231, 255, .07); box-shadow: 0 0 22px rgba(61, 231, 255, .08); }
.home-icon { margin-top: 8px; border-radius: 6px; }
.home-icon::before { content: ""; position: absolute; width: 25px; height: 25px; left: 5px; top: -11px; border-top: 2px solid var(--cyan); border-left: 2px solid var(--cyan); transform: rotate(45deg); border-radius: 3px 0 0; }
.home-icon::after { content: ""; position: absolute; width: 8px; height: 15px; left: 14px; bottom: 0; border: 1px solid rgba(113,247,200,.7); border-bottom: 0; }
.server-icon { display: grid; align-content: center; gap: 4px; padding: 6px; border-radius: 8px; }
.server-icon b { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--cyan), rgba(61,231,255,.18)); }
.packet-lane { height: 24px; position: relative; overflow: hidden; }
.packet-lane::before, .packet-lane::after { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(61,231,255,.42), transparent); }
.packet-lane::before { top: 7px; }.packet-lane::after { bottom: 7px; }
.packet-lane > span { position: absolute; inset: 11px 0 auto; height: 2px; background: linear-gradient(90deg, var(--blue), var(--cyan), var(--mint)); opacity: .25; }
.packet-lane i { position: absolute; top: 8px; left: -16px; width: 9px; height: 9px; border-radius: 3px; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); opacity: 0; }
.test-visual.testing .packet-lane i { animation: packet-flow 1.35s linear infinite; opacity: 1; }
.test-visual.testing .packet-lane i:nth-child(2) { animation-delay: -.34s; background: var(--mint); }
.test-visual.testing .packet-lane i:nth-child(3) { animation-delay: -.68s; }
.test-visual.testing .packet-lane i:nth-child(4) { animation-delay: -1.02s; background: var(--blue); }
.test-visual[data-phase="upload"] .packet-lane i { animation-direction: reverse; }

.live-gauge {
  --gauge-stop: 0%;
  --needle-angle: -130deg;
  width: min(230px, 76%);
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  margin: 16px auto 6px;
  border-radius: 50%;
  background: conic-gradient(from 230deg, var(--blue), var(--cyan) var(--gauge-stop), var(--mint) var(--gauge-stop), rgba(255,255,255,.055) 0 72%, transparent 72%);
  filter: drop-shadow(0 0 20px rgba(61,231,255,.1));
}
.live-gauge::before { content: ""; position: absolute; inset: 13px; border-radius: 50%; background: radial-gradient(circle at 50% 38%, #102c45, #071724 67%); border: 1px solid rgba(121,216,255,.12); }
.gauge-ticks { position: absolute; inset: 5px; border-radius: 50%; background: repeating-conic-gradient(from 230deg, rgba(225,248,255,.52) 0 1deg, transparent 1deg 10deg); mask: radial-gradient(transparent 65%, #000 66% 69%, transparent 70%); opacity: .55; }
.gauge-needle { position: absolute; z-index: 2; width: 39%; height: 3px; right: 50%; top: calc(50% - 1px); transform-origin: 100% 50%; transform: rotate(var(--needle-angle)); border-radius: 999px; background: linear-gradient(90deg, transparent, var(--cyan)); box-shadow: 0 0 12px rgba(61,231,255,.8); transition: transform .32s cubic-bezier(.22,.85,.38,1); }
.gauge-hub { position: absolute; z-index: 3; width: 16px; height: 16px; border: 4px solid #dffbff; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 18px var(--cyan); }
.gauge-readout { position: relative; z-index: 4; display: grid; justify-items: center; margin-top: 76px; }
.gauge-readout strong { font-size: 2rem; line-height: 1; letter-spacing: -.04em; }
.gauge-readout > span { color: #8fa9ba; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.gauge-readout small { margin-top: 7px; color: var(--mint); font-size: .68rem; font-weight: 850; text-transform: uppercase; letter-spacing: .14em; }
.test-phases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 10px; }
.test-phases span { padding-top: 7px; border-top: 2px solid rgba(255,255,255,.09); color: #6f8799; font-size: .58rem; font-weight: 800; text-align: center; text-transform: uppercase; letter-spacing: .08em; transition: .25s; }
.test-visual[data-phase="discover"] [data-step="discover"],
.test-visual[data-phase="download"] [data-step="download"],
.test-visual[data-phase="upload"] [data-step="upload"],
.test-visual[data-phase="analyze"] [data-step="analyze"],
.test-visual[data-phase="complete"] [data-step="analyze"] { border-color: var(--cyan); color: #eaffff; text-shadow: 0 0 12px var(--cyan); }
.test-visual[data-phase="complete"] .gauge-readout small { color: var(--mint); }
.test-visual[data-phase="error"] .gauge-readout small { color: var(--rose); }

@keyframes packet-flow { from { left: -16px; transform: rotate(0); } to { left: calc(100% + 16px); transform: rotate(180deg); } }
@keyframes scan-panel { to { transform: translateX(120%); } }

.score-ring { --score: 0; width: 184px; aspect-ratio: 1; margin: 8px auto 24px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--cyan) calc(var(--score) * 1%), rgba(255,255,255,.07) 0); position: relative; }
.score-ring::after { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--ink-2); }
.score-ring strong { position: relative; z-index: 1; font-size: 3.1rem; line-height: 1; }
.score-ring strong span { display: block; margin-top: 7px; color: var(--muted); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.result-title { text-align: center; }
.result-list { padding: 0; margin: 22px 0; list-style: none; }
.result-list li { padding: 12px 0 12px 28px; border-bottom: 1px solid rgba(121, 216, 255, .1); position: relative; color: #c3d5e2; }
.result-list li::before { content: "✓"; position: absolute; left: 0; color: var(--mint); font-weight: 900; }
.result-list li.warn::before { content: "!"; color: var(--amber); }

.privacy { margin-top: 22px; padding: 16px; border-left: 2px solid var(--amber); border-radius: 0 12px 12px 0; background: rgba(255, 191, 91, .07); color: #c7d3da; font-size: .84rem; }
.privacy a { color: #ffe0a6; }
.consent { display: grid; grid-template-columns: 24px 1fr; gap: 10px; margin-top: 14px; align-items: start; }
.consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--cyan); }
.consent label { margin: 0; font-size: .84rem; font-weight: 500; }

.comparison { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: .88rem; }
.comparison th, .comparison td { padding: 11px 8px; text-align: left; border-bottom: 1px solid var(--line); }
.comparison th { color: var(--muted); font-weight: 650; }

.cta { margin: 20px 0 90px; padding: clamp(28px, 5vw, 54px); border: 1px solid rgba(61, 231, 255, .25); border-radius: 28px; background: radial-gradient(circle at 90% 20%, rgba(61, 231, 255, .15), transparent 25rem), var(--panel-strong); }
.cta h2 { max-width: 700px; }
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: #7990a2; font-size: .84rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.footer-contact { display: inline-flex; gap: 16px; flex-wrap: wrap; }
.footer-contact a { color: #b9ccda; text-decoration: none; }
.footer-contact a:hover { color: var(--mint); }

@media (max-width: 900px) {
  .tool-grid { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; }
  .panel.sticky { position: static; }
  .nav-links a:not(.keep) { display: none; }
}

@media (max-width: 620px) {
  .hero { padding-top: 64px; }
  .brand span:last-child { display: none; }
  .form-grid, .choice-grid, .metric-grid { grid-template-columns: 1fr; }
  .panel { border-radius: 18px; }
  .button { width: 100%; }
  .traffic-route { grid-template-columns: 54px 1fr 54px; }
  .live-gauge { width: min(210px, 82%); }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; }
}
