:root {
  --accent: #ff5a43;
  --accent-dark: #e04431;
  --ink: #252528;
  --muted: #9a9aa2;
  --line: #eeeeef;
  --soft: #f5f6f8;
  --track: #eceef2;
  --good: #13a876;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
select {
  font: inherit;
}

.page {
  min-height: 100vh;
  padding: 26px clamp(18px, 5vw, 76px) 54px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #111;
  text-decoration: none;
  font-size: clamp(22px, 2.2vw, 34px);
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark,
.profile {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #050505;
  color: #fff;
  font-weight: 900;
}

.brand-burst {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, #fff 0 8deg, transparent 8deg 22deg),
    var(--accent);
}

.profile {
  width: 54px;
  height: 54px;
  border: 3px solid #cc5dec;
  background: #f2f2f4;
  color: #222;
  cursor: default;
}

.meter-section {
  width: min(1200px, 100%);
  margin: clamp(38px, 8vh, 96px) auto 0;
}

.gauge {
  position: relative;
  width: min(980px, 100%);
  aspect-ratio: 1.8 / 1;
  margin: 0 auto;
}

.speed-arc {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.arc-track,
.arc-progress {
  fill: none;
  stroke-linecap: round;
  stroke-width: 18;
}

.arc-track {
  stroke: var(--track);
}

.arc-progress {
  stroke: url("#speedGradient");
  stroke: var(--accent);
  stroke-dasharray: 942;
  stroke-dashoffset: 942;
  transition: stroke-dashoffset .28s ease-out;
}

.arc-tick {
  stroke: #d7dae0;
  stroke-linecap: round;
  stroke-width: 2.5;
}

.arc-tick.major {
  stroke: var(--accent);
  stroke-width: 4;
}

.scale-label,
.scale-mode {
  position: absolute;
  color: var(--accent);
  font-weight: 800;
  line-height: 1;
}

.scale-left {
  left: 9%;
  bottom: 13%;
}

.scale-mid {
  left: 50%;
  top: 9%;
  transform: translateX(-50%);
}

.scale-right {
  right: 9%;
  bottom: 13%;
}

.scale-mode {
  left: 50%;
  top: 67%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.start {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  min-width: min(430px, 72vw);
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 650;
  line-height: 1.05;
  cursor: pointer;
  letter-spacing: 0;
}

.start:disabled {
  color: #5f5f66;
  cursor: progress;
}

.current-speed {
  position: absolute;
  left: 50%;
  top: 58%;
  transform: translateX(-50%);
  min-width: 220px;
  color: var(--ink);
  text-align: center;
  font-size: clamp(22px, 3vw, 38px);
  font-weight: 800;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: min(850px, 100%);
  margin: 0 auto;
}

.metric {
  min-height: 86px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.metric-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.metric strong {
  display: inline-block;
  min-width: 42px;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1;
}

.user-data {
  width: min(560px, 100%);
  margin: clamp(36px, 7vh, 88px) auto 0;
  text-align: center;
}

.user-data h2 {
  margin: 0 0 20px;
  font-size: 22px;
}

.user-data dl {
  display: grid;
  gap: 9px;
  margin: 0;
}

.user-data dl > div {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(0, 1.35fr);
  align-items: center;
  gap: 18px;
}

.user-data dt {
  color: #b5b5bb;
  font-size: 20px;
  font-weight: 700;
  text-align: right;
}

.user-data dd {
  min-width: 0;
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  text-align: left;
  overflow-wrap: anywhere;
}

select {
  width: 220px;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid #d8d8de;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

@media (max-width: 760px) {
  .page {
    padding: 18px 16px 36px;
  }

  .brand {
    font-size: 21px;
  }

  .brand-mark,
  .brand-burst {
    width: 28px;
    height: 28px;
  }

  .profile {
    width: 42px;
    height: 42px;
  }

  .gauge {
    width: min(560px, 100%);
    aspect-ratio: 1.45 / 1;
  }

  .result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-data dl > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .user-data dt,
  .user-data dd {
    text-align: center;
    font-size: 17px;
  }
}
