@font-face {
  font-family: "Barlow Condensed";
  src:
    url("/assets/fonts/BarlowCondensed-ExtraLight.ttf") format("truetype"),
    local("Barlow Condensed ExtraLight"),
    local("BarlowCondensed-ExtraLight");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #020402;
  --green: #64ff00;
  --green-dim: #245f0a;
  --amber: #ffb000;
  --muted: #777d72;
  --muted-low: #293322;
  --white: #f2f2f2;
  --font-condensed: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-cn: "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  --ease-soft: cubic-bezier(0.2, 0.9, 0.2, 1);
  --ease-settle: cubic-bezier(0.16, 1, 0.3, 1);
  --time-soft: 360ms;
  --time-slow: 680ms;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #111;
  color: var(--white);
}

body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  font-family: var(--font-cn);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.screen {
  position: relative;
  width: min(100vw, 430px);
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 102% 88%, rgba(100, 255, 0, 0.12), transparent 28%),
    radial-gradient(circle at 72% 106%, rgba(100, 255, 0, 0.08), transparent 34%),
    var(--bg);
  isolation: isolate;
}

.screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.028), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.02));
  pointer-events: none;
}

@media (min-width: 720px) {
  .screen {
    width: 390px;
    min-height: 844px;
  }
}

.network-line,
.phase,
.status-word,
.metric-label,
.metric-value,
.ping-row,
.tick-label,
.go-orb,
.foot {
  font-family: var(--font-condensed);
  font-weight: 200;
  letter-spacing: 0;
}

.top {
  position: relative;
  z-index: 3;
  padding: max(34px, env(safe-area-inset-top)) 27px 0;
  animation: panelIn var(--time-slow) var(--ease-settle) both;
}

.network-line {
  display: grid;
  gap: 24px;
  margin-top: 98px;
  font-size: 13px;
  line-height: 1.1;
  color: var(--muted);
  opacity: 0.92;
}

.network-group {
  display: grid;
  gap: 4px;
}

.menu-button {
  position: absolute;
  top: max(42px, calc(env(safe-area-inset-top) + 8px));
  left: 27px;
  z-index: 8;
  display: grid;
  align-content: center;
  gap: 7px;
  width: 28px;
  height: 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(235, 238, 232, 0.58);
  cursor: pointer;
  box-shadow: none;
  transition:
    transform var(--time-soft) var(--ease-soft),
    color var(--time-soft) ease,
    opacity var(--time-soft) ease;
}

.menu-button span {
  display: block;
  width: 16px;
  height: 1px;
  margin: 0;
  background: currentColor;
  opacity: 0.88;
  transform-origin: center;
  transition:
    transform var(--time-soft) var(--ease-soft),
    opacity var(--time-soft) ease;
}

.menu-button:hover,
.menu-button:focus-visible {
  color: rgba(235, 238, 232, 0.82);
  box-shadow: none;
  outline: none;
}

.menu-button:active {
  transform: scale(0.94);
}

.menu-button[aria-expanded="true"] span:nth-child(1) {
  opacity: 0;
}

.menu-button[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-panel {
  position: absolute;
  top: max(34px, calc(env(safe-area-inset-top) + 8px));
  left: 24px;
  z-index: 12;
  display: grid;
  min-width: 168px;
  padding: 12px;
  border-radius: 28px;
  background: rgba(20, 24, 20, 0.72);
  border: 0;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
  -webkit-backdrop-filter: blur(28px) saturate(1.18);
  backdrop-filter: blur(28px) saturate(1.18);
  transform-origin: top left;
  animation: menuIn 260ms var(--ease-settle) both;
  overflow: hidden;
}

.menu-panel::before {
  content: none;
}

.menu-panel::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  top: 50%;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  transform: scaleY(0.5);
  pointer-events: none;
}

.menu-panel[hidden] {
  display: none;
}

.menu-panel a {
  position: relative;
  z-index: 1;
  padding: 11px 15px;
  border-radius: 16px;
  font-size: 17px;
  line-height: 1.2;
  color: rgba(244, 247, 241, 0.9);
  text-shadow: none;
  transition:
    color var(--time-soft) ease,
    background var(--time-soft) ease,
    transform var(--time-soft) var(--ease-soft);
}

.menu-panel a:hover,
.menu-panel a:focus-visible {
  color: rgba(255, 255, 255, 0.96);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
  transform: translateX(1px);
}

.menu-panel a:active {
  background: rgba(255, 255, 255, 0.09);
  transform: scale(0.985);
}

.hero {
  position: relative;
  z-index: 3;
  margin: 24px 0 0 27px;
  min-height: 126px;
  animation: panelIn var(--time-slow) var(--ease-settle) 70ms both;
}

.phase {
  display: none;
  height: 20px;
  margin-bottom: 10px;
  font-size: 14px;
  color: color-mix(in srgb, var(--green), transparent 12%);
  transition: color var(--time-soft) ease, opacity var(--time-soft) ease;
}

.status-word {
  max-width: 275px;
  font-size: 90px;
  line-height: 0.86;
  color: var(--white);
  text-transform: uppercase;
  transform-origin: left center;
  will-change: transform, opacity;
  transition:
    color var(--time-soft) ease,
    transform var(--time-soft) var(--ease-soft),
    opacity var(--time-soft) ease,
    text-shadow var(--time-soft) ease;
}

.screen[data-state="testing"] .status-word {
  color: var(--white);
  animation: numberWake 520ms var(--ease-settle) both;
}

.status-word.is-changing {
  animation: liveNumber 260ms var(--ease-soft) both;
}

.screen[data-state="good"] .status-word {
  text-shadow: 0 0 18px rgba(100, 255, 0, 0.08);
}

.screen[data-state="good"] .status-word,
.screen[data-state="start"] .go-orb,
.screen[data-state="good"] .go-orb {
  color: var(--green);
}

.screen[data-state="slow"] .status-word,
.screen[data-state="fix"] .status-word,
.screen[data-state="off"] .status-word,
.screen[data-state="slow"] .status-copy,
.screen[data-state="fix"] .status-copy,
.screen[data-state="off"] .status-copy {
  color: var(--amber);
}

.status-copy {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  min-height: 19px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--green);
  transition:
    color var(--time-soft) ease,
    opacity var(--time-soft) ease,
    transform var(--time-soft) var(--ease-soft);
}

.status-copy::before {
  content: attr(data-icon);
  color: var(--green);
}

.status-copy[data-icon=""]::before {
  display: none;
}

.metrics {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 78px 78px;
  gap: 14px 34px;
  width: 190px;
  margin: 50px 0 0 27px;
  animation: panelIn var(--time-slow) var(--ease-settle) 120ms both;
}

.metric {
  opacity: 0.58;
  transition: opacity var(--time-soft) ease;
}

.metric.is-active,
.metric.has-result,
.screen[data-state="good"] .metric,
.screen[data-state="slow"] .metric,
.screen[data-state="fix"] .metric {
  opacity: 1;
}

.metric.has-value {
  animation: metricSettle 420ms var(--ease-settle) both;
}

.metric-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  line-height: 1;
  color: var(--muted);
}

.data-icon {
  display: block;
  width: 12px;
  height: 12px;
  color: currentColor;
  opacity: 0.86;
  transform: translateY(0.5px);
}

.data-icon svg {
  display: block;
  width: 12px;
  height: 12px;
  overflow: visible;
}

.data-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.metric-value {
  margin-top: 5px;
  font-size: 37px;
  line-height: 0.94;
  color: var(--white);
  font-variant-numeric: tabular-nums;
  will-change: transform, opacity;
  transition:
    opacity var(--time-soft) ease,
    transform var(--time-soft) var(--ease-soft),
    color var(--time-soft) ease;
}

.metric-value.is-changing,
.ping-value.is-changing {
  animation: smallNumber 300ms var(--ease-settle) both;
}

.ping {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.ping-row {
  display: grid;
  grid-template-columns: 48px 48px 48px;
  column-gap: 34px;
  margin-top: 6px;
  font-size: 21px;
  line-height: 1;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.ping-row div {
  display: grid;
  grid-template-columns: 18px 1fr;
  column-gap: 6px;
  align-items: center;
  min-width: 0;
  height: 24px;
}

.ping-icon {
  display: block;
  width: 18px;
  height: 18px;
  color: currentColor;
  opacity: 0.86;
}

.ping-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  overflow: visible;
}

.ping-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.08;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ping-value {
  position: relative;
  display: inline-grid;
  align-items: center;
  min-width: 24px;
  height: 1.08em;
  line-height: 1;
  overflow: hidden;
}

.ping-value.is-flipping {
  animation: none;
}

.roll-value {
  grid-area: 1 / 1;
  display: block;
  will-change: transform, opacity, filter;
}

.roll-old {
  animation: rollOutUp 540ms cubic-bezier(0.18, 0.86, 0.2, 1) both;
}

.roll-new {
  animation: rollInUp 540ms cubic-bezier(0.18, 0.86, 0.2, 1) both;
}

.tips {
  position: relative;
  z-index: 4;
  margin: 24px 0 0 27px;
  font-size: 13px;
  line-height: 1.78;
  color: var(--amber);
  transform-origin: left top;
  animation: panelIn var(--time-slow) var(--ease-settle) both;
}

.tips div {
  animation: tipIn 360ms ease both;
}

.tips div:nth-child(2) {
  animation-delay: 60ms;
}

.tips div:nth-child(3) {
  animation-delay: 120ms;
}

.tips span {
  display: inline-block;
  width: 28px;
  font-family: var(--font-condensed);
  font-size: 16px;
  color: var(--amber);
}

.gauge {
  position: absolute;
  z-index: 1;
  top: 99px;
  right: -211px;
  width: 374px;
  height: 374px;
  opacity: 0.94;
  animation: gaugeIn 780ms var(--ease-settle) 90ms both;
}

.gauge-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.gauge-track {
  fill: none;
  stroke: transparent;
  stroke-width: 0;
  stroke-linecap: round;
}

.gauge-active {
  fill: none;
  stroke: transparent;
  stroke-width: 0;
  stroke-linecap: round;
  filter: url("#gaugeGlow");
  transition: stroke-dashoffset 360ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.gauge-tick {
  stroke: rgba(100, 255, 0, 0.22);
  stroke-width: 0.72;
  stroke-linecap: round;
  transition:
    stroke var(--time-soft) ease,
    stroke-width var(--time-soft) var(--ease-soft),
    opacity var(--time-soft) ease;
}

.gauge-tick.active {
  stroke: var(--green);
  stroke-width: 0.9;
  filter: none;
}

.gauge-tick.major {
  stroke: rgba(100, 255, 0, 0.36);
  stroke-width: 1.05;
}

.gauge-tick.major.active {
  stroke: var(--green);
  stroke-width: 1.9;
  filter: drop-shadow(0 0 4px rgba(100, 255, 0, 0.6));
}

.gauge-tick.major.current {
  stroke: var(--green);
  stroke-width: 2.2;
  filter: drop-shadow(0 0 6px rgba(100, 255, 0, 0.72));
}

.gauge-needle {
  stroke: var(--green);
  stroke-width: 1;
  stroke-linecap: round;
  opacity: 0;
  filter: none;
  transition:
    x2 520ms var(--ease-soft),
    y2 520ms var(--ease-soft),
    stroke 180ms ease,
    opacity 160ms ease;
}

.gauge.is-resetting .gauge-needle,
.gauge.is-resetting .gauge-active {
  transition-duration: 430ms;
  transition-timing-function: cubic-bezier(0.1, 0.72, 0.22, 1);
}

.gauge.is-motion-driven .gauge-needle {
  transition:
    stroke 180ms ease,
    opacity 160ms ease;
}

.gauge.is-motion-driven .gauge-active {
  transition: none;
}

.gauge.is-needle-visible .gauge-needle {
  opacity: 1;
}

.gauge.is-needle-fading .gauge-needle {
  opacity: 0;
}

.gauge-center {
  fill: rgba(100, 255, 0, 0.75);
  opacity: 0;
  transition: opacity 160ms ease;
}

.gauge.is-needle-visible .gauge-center {
  opacity: 0.34;
}

.gauge.is-needle-fading .gauge-center {
  opacity: 0;
}

.gauge-label {
  fill: rgba(235, 238, 232, 0.58);
  font-family: var(--font-condensed);
  font-size: 17px;
  font-weight: 200;
  letter-spacing: 0;
}

.label-1000,
.label-0 {
  text-anchor: end;
}

.screen[data-state="slow"] .gauge-active,
.screen[data-state="fix"] .gauge-active,
.screen[data-state="off"] .gauge-active,
.screen[data-state="slow"] .gauge-needle,
.screen[data-state="fix"] .gauge-needle,
.screen[data-state="off"] .gauge-needle {
  stroke: var(--amber);
  filter: drop-shadow(0 0 5px rgba(255, 176, 0, 0.52));
}

.screen[data-state="testing"] .gauge-needle {
  filter: drop-shadow(0 0 5px rgba(100, 255, 0, 0.25));
}

.go-orb {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 61% 62%, rgba(100, 255, 0, 0.2), rgba(44, 132, 0, 0.08) 43%, rgba(0, 0, 0, 0) 67%),
    rgba(0, 12, 0, 0.18);
  color: var(--green);
  cursor: pointer;
  overflow: visible;
  padding: 0;
  animation: orbBreathe 2.7s ease-in-out infinite;
  box-shadow:
    inset 0 0 0 1px rgba(118, 255, 34, 0.58),
    inset 0 0 28px rgba(100, 255, 0, 0.06),
    0 0 20px rgba(100, 255, 0, 0.08);
  backdrop-filter: blur(2px);
  transform: translateX(-50%);
  transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.go-orb::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: inherit;
  border: 1px solid rgba(100, 255, 0, 0.14);
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.go-orb span {
  display: block;
  font-size: 36px;
  line-height: 1;
  transform: translateY(-1px);
  pointer-events: none;
}

.go-orb:active {
  transform: translateX(-50%) scale(0.96);
  filter: brightness(1.18);
}

.go-orb:active::after {
  animation: tapRing 520ms var(--ease-soft) both;
}

.screen[data-state="testing"] .go-orb {
  opacity: 0;
  pointer-events: none;
  animation: none;
  transform: translateX(-50%) scale(0.88) translateY(12px);
}

.screen[data-state="good"] .go-orb,
.screen[data-state="slow"] .go-orb,
.screen[data-state="fix"] .go-orb,
.screen[data-state="off"] .go-orb {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  animation: orbBreathe 2.7s ease-in-out infinite;
}

.screen:not([data-state="testing"]) .go-orb {
  animation: orbAppear 520ms var(--ease-settle) both, orbBreathe 2.7s ease-in-out 520ms infinite;
}

.screen[data-state="slow"] .go-orb,
.screen[data-state="fix"] .go-orb,
.screen[data-state="off"] .go-orb {
  color: var(--amber);
  background:
    radial-gradient(circle at 61% 62%, rgba(255, 176, 0, 0.16), rgba(92, 55, 0, 0.08) 43%, rgba(0, 0, 0, 0) 67%),
    rgba(12, 7, 0, 0.18);
  box-shadow:
    inset 0 0 0 1px rgba(255, 176, 0, 0.48),
    inset 0 0 28px rgba(255, 176, 0, 0.05),
    0 0 22px rgba(255, 176, 0, 0.08);
}

.foot {
  position: absolute;
  z-index: 5;
  left: 27px;
  bottom: max(18px, env(safe-area-inset-bottom));
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: rgba(138, 141, 138, 0.64);
}

@keyframes orbBreathe {
  0%,
  100% {
    filter: brightness(0.92);
    transform: translateX(-50%) scale(1);
  }
  50% {
    filter: brightness(1.08);
    transform: translateX(-50%) scale(1.035);
  }
}

@keyframes menuIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gaugeIn {
  from {
    opacity: 0;
    transform: translateX(12px) scale(0.985);
  }
  to {
    opacity: 0.94;
    transform: translateX(0) scale(1);
  }
}

@keyframes liveNumber {
  0% {
    opacity: 0.86;
    transform: translateY(2px) scale(0.992);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes smallNumber {
  from {
    opacity: 0.38;
  }
  to {
    opacity: 1;
  }
}

@keyframes digitFlip {
  from {
    opacity: 0;
    transform: translateY(-9px) rotateX(54deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

@keyframes rollOutUp {
  0% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    filter: blur(1.4px);
    transform: translateY(-115%);
  }
}

@keyframes rollInUp {
  0% {
    opacity: 0;
    filter: blur(1.4px);
    transform: translateY(115%);
  }
  70% {
    opacity: 1;
    filter: blur(0);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes metricSettle {
  0% {
    opacity: 0.58;
    transform: translateY(5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes orbAppear {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(14px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes tapRing {
  from {
    opacity: 0.8;
    transform: scale(0.78);
  }
  to {
    opacity: 0;
    transform: scale(1.72);
  }
}

@keyframes orbRun {
  0%,
  100% {
    filter: brightness(0.92) blur(0);
    transform: scale(1);
  }
  50% {
    filter: brightness(1.24) blur(1px);
    transform: scale(1.035);
  }
}

@keyframes orbEnter {
  from {
    opacity: 0;
    filter: brightness(1.22) blur(1px);
    transform: scale(0.84) translateY(28px);
  }
  to {
    opacity: 1;
    filter: brightness(1);
    transform: scale(1) translateY(0);
  }
}

@keyframes tickPulse {
  from {
    opacity: 0.48;
  }
  to {
    opacity: 1;
  }
}

@keyframes tipIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes numberWake {
  from {
    opacity: 0.54;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-height: 760px) {
  .network {
    margin-top: 42px;
  }

  .hero {
    margin-top: 34px;
  }

  .status-word {
    font-size: 82px;
  }

  .metrics {
    margin-top: 20px;
  }

  .tips {
    margin-top: 18px;
  }
}

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

.doc-page {
  display: block;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(100, 255, 0, 0.08), transparent 28%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025), transparent 24%, transparent 78%, rgba(100, 255, 0, 0.025)),
    var(--bg);
  color: var(--white);
  font-family: var(--font-cn);
}

.doc-shell {
  width: min(100%, 840px);
  margin: 0 auto;
  padding: 44px 24px 72px;
}

.doc-back {
  display: inline-flex;
  margin-bottom: 42px;
  font-family: var(--font-condensed);
  font-size: 24px;
  line-height: 1;
  color: rgba(242, 242, 242, 0.86);
  transition: color var(--time-soft) ease, transform var(--time-soft) var(--ease-soft);
}

.doc-back:hover,
.doc-back:focus-visible {
  color: var(--green);
  outline: none;
  transform: translateY(-1px);
}

.doc-card {
  max-width: 720px;
}

.doc-kicker {
  margin: 0 0 16px;
  font-family: var(--font-condensed);
  font-size: 18px;
  color: var(--green);
}

.doc-card h1,
.doc-card h2,
.doc-card p,
.doc-card ul {
  max-width: 680px;
}

.doc-card h1 {
  margin: 0 0 14px;
  font-size: 34px;
  line-height: 1.18;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.94);
}

.doc-card h2 {
  margin: 34px 0 10px;
  font-size: 18px;
  line-height: 1.45;
  font-weight: 400;
  color: var(--green);
}

.doc-card p,
.doc-card li {
  font-size: 15px;
  line-height: 1.9;
  color: rgba(226, 232, 222, 0.72);
}

.doc-card p {
  margin: 0 0 12px;
}

.doc-card ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.doc-card li + li {
  margin-top: 4px;
}

.doc-date {
  color: rgba(226, 232, 222, 0.42) !important;
}

.doc-card a {
  color: var(--green);
  text-decoration: none;
}

.doc-card a:hover,
.doc-card a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.doc-card hr {
  width: min(100%, 680px);
  margin: 48px 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

@media (max-width: 520px) {
  .doc-shell {
    padding: 34px 22px 56px;
  }

  .doc-back {
    margin-bottom: 34px;
  }

  .doc-card h1 {
    font-size: 28px;
  }
}
