:root {
  color-scheme: dark;
  --bg: #081321;
  --surface: #101e31;
  --line: #2a3c56;
  --ink: #f3f7ff;
  --muted: #aebed3;
  --accent: #98bfff;
  --mint: #6fe1cf;
  font: 16px/1.55 "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 72% 0, #193352, transparent 62%) no-repeat; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }
.container { width: min(1056px, calc(100% - 48px)); margin-inline: auto; }
.header { border-bottom: 1px solid var(--line); background: #081321ad; }
.header-inner { min-height: 69px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.wordmark { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.03em; }
.wordmark strong { color: var(--accent); font-weight: 650; }
.home-link { font-size: .86rem; color: var(--muted); white-space: nowrap; }
.home-link span { margin-inline-start: 4px; }
.intro { padding-block: clamp(38px, 8vw, 102px) clamp(22px, 4vw, 42px); }
h1, p, dl, dd { margin: 0; }
h1 { max-width: 15ch; font-size: clamp(36px, 6.5vw, 74px); line-height: 1.02; font-weight: 750; letter-spacing: -.06em; }
h1 em { color: var(--accent); font-style: normal; }
.intro p { margin-top: 16px; color: var(--muted); font-size: clamp(.95rem, 2.2vw, 1.1rem); }
.test-panel { border: 1px solid var(--line); border-radius: 26px; background: #101e31ef; box-shadow: 0 26px 65px #02081292; overflow: clip; }
.test-core { display: grid; grid-template-columns: minmax(235px, .75fr) minmax(0, 1.25fr); }
.controls { align-self: center; padding: clamp(22px, 4vw, 42px); }
.endpoint { display: flex; align-items: center; gap: 12px; margin-bottom: 30px; }
.endpoint small, .endpoint strong { display: block; }
.endpoint small { color: var(--muted); }
.endpoint-icon { width: 39px; height: 39px; display: grid; align-content: center; gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; }
.endpoint-icon i { height: 5px; border: 1px solid var(--accent); border-radius: 2px; }
#start { display: flex; align-items: center; justify-content: center; gap: 11px; width: min(100%, 220px); min-height: 55px; padding-inline: 14px; border: 1px solid transparent; border-radius: 13px; font: inherit; font-weight: 750; cursor: pointer; color: #091524; background: var(--accent); box-shadow: 0 8px 28px #4278bb36; }
#start:hover:enabled { background: #bbd5ff; }
#start:disabled { opacity: .6; cursor: default; }
#start.running { color: var(--ink); border-color: var(--line); background: #192c44; box-shadow: none; }
.start-icon { width: 11px; height: 13px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.running .start-icon { height: 11px; clip-path: none; border-radius: 2px; }
#status { min-height: 3.1em; margin-top: 12px; max-width: 34ch; color: var(--muted); font-size: .86rem; }
#status.error { color: #ffb4b4; }
.meter { position: relative; min-height: 246px; padding: 24px clamp(22px, 4vw, 38px) 29px; border-left: 1px solid var(--line); background: linear-gradient(135deg, #162943, #0b1728); overflow: hidden; }
.meter[data-phase="upload"] { --accent: var(--mint); }
.meter-head, .readout { position: relative; z-index: 1; }
.meter-head { display: flex; justify-content: space-between; color: var(--muted); font-size: .9rem; font-weight: 600; }
#progress-label { font-variant-numeric: tabular-nums; color: var(--accent); }
.readout { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; }
.readout strong { font-size: clamp(42px, 6.2vw, 72px); line-height: 1.05; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.readout span { color: var(--accent); }
#chart { position: absolute; width: calc(100% - 44px); height: 88px; left: 22px; bottom: 25px; }
.progress-track { position: absolute; inset: auto 22px 17px; height: 3px; background: #304362; border-radius: 8px; overflow: hidden; }
#progress { width: 100%; height: 100%; transform: scaleX(0); transform-origin: left; background: var(--accent); }
.results { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.results > div { min-width: 0; padding: 18px clamp(14px, 2.65vw, 34px) 22px; }
.results > div + div { border-left: 1px solid var(--line); }
.results dt { color: var(--muted); font-size: .86rem; font-weight: 600; }
.results dd { display: flex; gap: 5px 8px; flex-wrap: wrap; align-items: baseline; }
.results strong { font-size: clamp(22px, 3.5vw, 38px); font-variant-numeric: tabular-nums; letter-spacing: -.045em; }
.results dd span { font-size: .8rem; color: var(--muted); }
.results > div:first-child strong { color: var(--accent); }
.results > div:nth-child(2) strong { color: var(--mint); }
.measurement-note { margin-block: 20px 38px; color: var(--muted); font-size: .86rem; }
.footer { display: flex; gap: 20px; padding-block: 16px 26px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
@media (max-width: 680px) {
  .container { width: calc(100% - 32px); }
  .test-panel { border-radius: 18px; }
  .test-core { grid-template-columns: 1fr; }
  .meter { min-height: 210px; border-left: 0; border-top: 1px solid var(--line); }
  .endpoint { margin-bottom: 16px; }
  #start { width: 100%; }
  .results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .results > div:nth-child(3) { border-left: 0; }
  .results > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
