:root {
  color-scheme: light dark;
  font-family: system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
#message { margin: 24px; }

#lab {
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  color-scheme: dark;
  color: #fff;
  background: #000;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 72px 20px;
}
.back {
  position: absolute;
  top: 12px;
  left: 12px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #fff;
  font-size: 1.5rem;
  text-decoration: none;
}
.back:hover { background: #222; }
.workspace { width: min(100%, 600px); }
h1 {
  margin: 0;
  font: 750 clamp(2.75rem, 9vw, 5rem)/.9 system-ui, sans-serif;
  letter-spacing: -.075em;
}
.subtitle {
  margin: 8px 0 18px;
  color: #bbb;
  font: .875rem var(--mono);
}

form { display: grid; }
input, output {
  width: 100%;
  border: 1px solid #777;
  border-radius: 0;
  padding: 12px clamp(12px, 4vw, 22px);
}
input {
  min-height: 50px;
  background: #000;
  color: #fff;
  font: 1rem var(--mono);
}
input::placeholder { color: #bbb; opacity: 1; }
output {
  display: flex;
  align-items: center;
  min-height: clamp(100px, 22vw, 140px);
  overflow-wrap: anywhere;
  border-color: #fff;
  background: #fff;
  color: #000;
  font: 650 clamp(1.6rem, 7vw, 3.4rem)/1.05 var(--mono);
  letter-spacing: -.075em;
}

.network {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 20px;
}
.network-edges, .network-signals {
  fill: none;
}
.network-edges {
  stroke: #414141;
  stroke-width: 1;
}
.network-signals {
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 8 104;
}
.network-signals path {
  animation: transmit 3.2s linear infinite;
}
.network-signals path:nth-child(2) { animation-delay: -1.1s; opacity: .7; }
.network-signals path:nth-child(3) { animation-delay: -2.2s; opacity: .5; }
@keyframes transmit {
  from { stroke-dashoffset: 8; }
  to { stroke-dashoffset: -104; }
}
.network-nodes {
  fill: #000;
  stroke: #b5b5b5;
  stroke-width: 1.5;
}
.network-nodes circle:nth-child(4n + 2) { fill: #fff; stroke: #fff; }
@media (prefers-reduced-motion: reduce) {
  .network-signals { display: none; }
  .network-signals path { animation: none; }
}
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
