:root {
  color-scheme: dark;
  --background: #111323;
  --surface: #181b2d;
  --text: #f0f2fa;
  --muted: #989db3;
  --line: #2c3044;
  --mint: #6aebd5;
  --purple: #b09cfa;
  --yellow: #f0c777;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); -webkit-font-smoothing: antialiased; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--mint); outline-offset: 6px; }
button, a { touch-action: manipulation; }
[hidden] { display: none !important; }
.skip-link { position: fixed; left: 20px; top: -100px; z-index: 5; padding: 12px; background: var(--surface); }
.skip-link:focus { top: 12px; }

.site-header { height: 86px; border-bottom: 1px solid #25283b; }
.header-inner { max-width: 1180px; height: 100%; margin: auto; padding: 0 32px; display: flex; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 25px; font-weight: 780; letter-spacing: 2px; }
.brand img { display: block; }
.brand-dot { color: var(--mint); }
nav { display: flex; align-items: stretch; gap: 34px; height: 100%; margin-left: 84px; font-size: 13px; }
nav a, nav button { display: inline-flex; align-items: center; position: relative; border: 0; padding: 0; background: transparent; color: var(--muted); }
nav a:hover, nav button:hover { color: var(--text); }
nav .nav-active { color: var(--mint); }
.nav-active::after { content: ""; position: absolute; height: 2px; left: 0; right: 0; bottom: -1px; background: var(--mint); }
.header-label { margin-left: auto; color: #9297ac; font: 10px ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: 2px; }
main { max-width: 1056px; margin: 0 auto; padding: 0 32px; }
.intro { text-align: center; padding: 51px 0 35px; }
.eyebrow { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--mint); font: 10px ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: 2px; }
.eyebrow > span { width: 5px; height: 5px; border-radius: 50%; background: var(--mint); }
h1 { margin: 15px 0 12px; font-size: clamp(29px, 4vw, 42px); line-height: 1.4; letter-spacing: -1.6px; font-weight: 600; }
h1 > span { color: var(--mint); }
.intro-copy { color: var(--muted); font-size: 13px; line-height: 1.8; letter-spacing: 1px; }

.test-panel { overflow: hidden; border: 1px solid #31354a; border-radius: 18px; background: var(--surface); box-shadow: 0 24px 70px #07081530; scroll-margin-top: 20px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; margin: 0 29px; border-bottom: 1px solid var(--line); }
.panel-title { font: 11px ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: 1.3px; }
.panel-title > span { color: var(--muted); font: 11px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; margin-left: 8px; letter-spacing: .5px; }
.status-badge { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; letter-spacing: .5px; }
.status-badge > span { height: 5px; width: 5px; border-radius: 50%; background: var(--mint); }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 790px; padding: 29px 0 0; margin: auto; }
.metric { text-align: center; position: relative; }
.metric + .metric::before { content: ""; position: absolute; left: 0; top: 12px; height: 51px; width: 1px; background: var(--line); }
.metric-label { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 13px; }
.metric-label > span:last-child { color: var(--muted); font: 9px ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .8px; margin-left: 2px; }
.direction { font-family: sans-serif; font-size: 19px; line-height: 1; }
.download { color: var(--mint); }
.upload { color: var(--purple); }
.latency { color: var(--yellow); }
.metric p { margin: 12px 0 0; display: flex; justify-content: center; align-items: baseline; gap: 9px; }
.metric-value { min-width: 30px; font: 38px/1.2 ui-monospace, "SFMono-Regular", Consolas, monospace; font-weight: 400; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.unit { color: var(--muted); font: 10px ui-monospace, "SFMono-Regular", Consolas, monospace; }
.metric[data-active] .metric-value { color: var(--mint); }
#upload-metric[data-active] .metric-value { color: var(--purple); }
#latency-metric[data-active] .metric-value { color: var(--yellow); }

.test-stage { position: relative; padding: 16px 24px 29px; text-align: center; background: radial-gradient(ellipse at 50% 51%, #2750581c 0, transparent 58%); }
.stage-note { position: absolute; left: 32px; top: 190px; display: flex; align-items: center; gap: 10px; color: #9298b0; font-size: 10px; letter-spacing: 1px; }
.tiny-line { width: 19px; height: 1px; background: #535a73; }
.dial { position: relative; width: min(100%, 410px); aspect-ratio: 440 / 340; margin: 0 auto; }
.gauge { display: block; width: 100%; height: 100%; overflow: visible; }
.gauge-track, .gauge-progress { fill: none; stroke-width: 4; stroke-linecap: round; }
.gauge-track { stroke: #303849; }
.gauge-progress { stroke: url(#gauge-gradient); stroke-dasharray: 100; transition: stroke-dashoffset 100ms linear; }
.gauge-ticks { fill: none; stroke: #3b4359; stroke-width: 5; stroke-dasharray: .15 1.65; }
.gauge-labels { fill: #9298b0; font: 10px ui-monospace, "SFMono-Regular", Consolas, monospace; text-anchor: middle; }
.dial-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-top: 13px; }
.dial-caption { color: #9ea6bd; font: 9px ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: 2.5px; margin-bottom: 15px; }
.go-button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 166px; height: 166px; padding: 0; border: 2px solid var(--mint); border-radius: 50%; color: var(--mint); background: #152932; box-shadow: 0 0 0 7px #66ebd507, 0 0 46px #64e2d314, inset 0 0 30px #6aebd50a; transition: box-shadow 180ms, background 180ms; }
.go-button:hover:not(:disabled) { background: #1e3940; box-shadow: 0 0 0 9px #66ebd50d, 0 0 50px #64e2d321; }
.go-button > span:first-child { font: 49px/1.2 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: -2px; }
.go-caption { font-size: 11px; letter-spacing: 2px; color: #b8d7d5; }
.dial-under { color: #9ca2b7; font-size: 10px; letter-spacing: 1px; margin-top: 21px; }
.dial[data-running] .go-button > span:first-child { font-size: 37px; }
.dial[data-running] .go-button { background: #182f36; }
.status-area { margin-top: -10px; }
.status { margin: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; letter-spacing: 1px; min-height: 20px; }
.status-dot { display: block; width: 5px; height: 5px; background: var(--mint); border-radius: 50%; }
.test-note { font-size: 10px; color: #999fb6; margin: 9px 0 21px; letter-spacing: .5px; }
.test-steps { display: flex; align-items: center; justify-content: center; gap: 28px; font-size: 10px; color: var(--muted); }
.test-steps > span { display: flex; align-items: center; gap: 6px; }
.test-steps i { width: 4px; height: 4px; border: 1px solid #81879f; border-radius: 50%; }
.test-steps [data-active], .test-steps [data-done] { color: var(--mint); }
.test-steps [data-active] i, .test-steps [data-done] i { border-color: var(--mint); background: var(--mint); }
.test-steps [data-active] i { box-shadow: 0 0 0 3px #6aebd514; }
.copy-button { margin: 18px auto 0; padding: 7px 13px; border: 1px solid #465367; border-radius: 5px; background: transparent; color: var(--mint); font-size: 11px; }
.copy-button:hover { background: #6aebd50b; }
.copy-button span { margin-left: 7px; }
.noscript-note { font-size: 12px; color: var(--yellow); }

.connection-info { min-height: 90px; border-top: 1px solid var(--line); background: #14172866; display: flex; align-items: center; justify-content: center; gap: 64px; padding: 20px 28px; }
.connection-item { display: flex; align-items: center; gap: 14px; min-width: 190px; text-align: left; }
.connection-item > svg { color: #969eb9; width: 26px; height: 26px; flex-shrink: 0; }
.connection-label { color: var(--muted); font-size: 10px; }
.connection-item p { font-size: 12px; margin: 5px 0 0; }
.connection-tag { color: #9da6be; font: 8px ui-monospace, "SFMono-Regular", Consolas, monospace; padding: 2px 5px; border: 1px solid #373e53; border-radius: 3px; margin-left: 6px; vertical-align: 1px; }
.connection-link { display: flex; gap: 7px; align-items: center; }
.connection-link span { width: 25px; height: 1px; background: #384055; }
.connection-link i { width: 5px; height: 5px; border: 1px solid #737e96; border-radius: 50%; }

.explainer { display: grid; grid-template-columns: repeat(3, 1fr); gap: 43px; margin: 34px 0 42px; padding: 0 6px; }
.explainer-number { font: 10px ui-monospace, "SFMono-Regular", Consolas, monospace; color: #81899f; }
.explainer h2 { margin: 9px 0; font-size: 13px; font-weight: 500; color: #d5d9e6; }
.explainer p { margin: 0; font-size: 11px; line-height: 1.9; color: var(--muted); }
.site-footer { max-width: 1120px; margin: 0 auto; border-top: 1px solid #282c3f; padding: 21px 0 25px; display: flex; justify-content: space-between; gap: 20px; color: #8f96ad; font-size: 10px; }
.site-footer p { margin: 0; line-height: 1.8; }
.site-footer strong { font-size: 12px; font-weight: 650; color: #b1b7ca; letter-spacing: 1px; margin-right: 12px; }
.site-footer button { border: 0; background: none; padding: 0; color: #adb5ca; font-size: 10px; }
.site-footer button:hover { color: var(--mint); }
.footer-separator { padding: 0 10px; color: #555e77; }

dialog { width: min(520px, calc(100% - 40px)); max-height: calc(100% - 48px); padding: 38px; border: 1px solid #3a4357; border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: 0 30px 100px #0006; }
dialog::backdrop { background: #080b16ce; backdrop-filter: blur(5px); }
dialog .eyebrow { justify-content: flex-start; }
dialog h2 { margin-top: 22px; font-size: 23px; font-weight: 550; }
dialog > p:not(.eyebrow) { color: #aeb6cc; font-size: 13px; line-height: 1.95; }
dialog strong { color: #e5eaf5; font-weight: 500; }
.dialog-close { position: absolute; top: 10px; right: 13px; width: 36px; height: 36px; border: 0; background: transparent; color: #b0b8cb; font-size: 28px; }
.dialog-action { display: inline-flex; align-items: center; gap: 22px; margin-top: 15px; padding: 11px 22px; border: 1px solid var(--mint); border-radius: 6px; background: #6aebd514; color: var(--mint); font-size: 13px; }
.dialog-action:hover { background: #6aebd527; }
.not-found main { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 40px 24px; }
.not-found .brand { margin-bottom: 40px; }
.not-found h1 { font-size: clamp(24px, 4vw, 38px); }

@media (min-width: 1500px) {
  .intro { padding-top: 66px; padding-bottom: 42px; }
  .test-stage { padding-top: 23px; padding-bottom: 36px; }
}

@media (max-width: 850px) {
  nav { margin-left: 55px; }
  .header-label, .stage-note { display: none; }
  .connection-info { gap: 22px; }
  .connection-item { min-width: 170px; }
  .site-footer { margin: 0 32px; }
}

@media (max-width: 600px) {
  .site-header { height: 72px; }
  .header-inner { padding: 0 20px; justify-content: space-between; }
  .brand { font-size: 21px; gap: 5px; }
  .brand img { width: 30px; height: 30px; }
  nav { margin-left: 20px; gap: 20px; font-size: 11px; }
  main { padding: 0 16px; }
  .intro { padding: 33px 0 23px; }
  .eyebrow { font-size: 8px; letter-spacing: 1.6px; }
  h1 { letter-spacing: -1px; margin-top: 13px; }
  .intro-copy { font-size: 11px; letter-spacing: .5px; }
  .test-panel { border-radius: 13px; }
  .panel-heading { margin: 0 18px; min-height: 52px; }
  .panel-title { font-size: 10px; }
  .panel-title > span { display: none; }
  .status-badge { font-size: 9px; }
  .metrics { padding: 24px 8px 8px; }
  .metric-label { font-size: 11px; gap: 5px; }
  .metric-label > span:last-child { display: none; }
  .metric-value { font-size: 25px; letter-spacing: -1.4px; }
  .metric p { gap: 5px; margin-top: 10px; }
  .metric + .metric::before { height: 39px; top: 9px; }
  .unit { font-size: 8px; }
  .test-stage { padding: 14px 16px 25px; }
  .dial { max-width: 360px; }
  .dial-center { padding-top: 11px; }
  .go-button { width: clamp(120px, 35vw, 150px); height: clamp(120px, 35vw, 150px); gap: 1px; }
  .go-button > span:first-child { font-size: 40px; }
  .dial[data-running] .go-button > span:first-child { font-size: 31px; }
  .go-caption { font-size: 9px; }
  .dial-caption { font-size: 8px; margin-bottom: 12px; }
  .dial-under { font-size: 9px; margin-top: 14px; letter-spacing: .5px; }
  .status-area { margin-top: 0; }
  .test-note { font-size: 9px; margin-bottom: 19px; }
  .test-steps { gap: 23px; font-size: 9px; }
  .connection-info { justify-content: space-around; gap: 15px; padding: 18px 15px; min-height: 85px; }
  .connection-link { display: none; }
  .connection-item { min-width: 0; gap: 8px; }
  .connection-item > svg { width: 20px; height: 20px; }
  .connection-item p { font-size: 10px; }
  .connection-label { font-size: 9px; }
  .connection-tag { display: none; }
  .explainer { gap: 20px; margin: 28px 2px; padding: 0; }
  .explainer h2 { font-size: 11px; line-height: 1.7; }
  .explainer p { font-size: 10px; line-height: 1.8; }
  .site-footer { margin: 0 20px; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 20px 0 24px; font-size: 9px; }
  .site-footer button { font-size: 9px; }
  dialog { padding: 28px; }
}

@media (max-width: 360px) {
  nav { gap: 13px; margin-left: 12px; }
  .header-inner { padding: 0 15px; }
  .metric p { gap: 3px; }
  .metric-value { font-size: 23px; }
  .go-button { width: 112px; height: 112px; }
  .dial-caption { margin-bottom: 9px; }
  .dial-under { margin-top: 10px; font-size: 8px; }
  .explainer { grid-template-columns: 1fr; gap: 18px; }
  .explainer-number { float: left; margin-top: 10px; }
  .explainer h2, .explainer p { margin-left: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
