@font-face {
  font-family: "Sometype Mono";
  src: url("fonts/sometype-mono-400.woff2") format("woff2");
  font-display: swap;
}

:root {
  --ground: #04060b;
  --line: #e9f1ff;
  --dim: #a9b8cc;
  --query: #00e5ff;
  --reply: #ff2bd6;
  --unit: clamp(10px, 0.72vw, 12px);
  font: 400 var(--unit) / 1.4 "Sometype Mono", monospace;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  color: var(--line);
  background: var(--ground);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; overflow: hidden; }

::selection { background: var(--line); color: var(--ground); }

#city {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: none;
}

.idle #city { cursor: none; }

/* Keeps the two lines of text readable where traffic crosses behind them. */
body::after {
  content: "";
  position: fixed;
  inset: auto 0 0;
  height: calc(var(--unit) * 6);
  background: linear-gradient(to top, var(--ground) 45%, transparent);
  pointer-events: none;
}

#stream, #data, #status, #probe { z-index: 1; position: fixed; margin: 0; pointer-events: none; }

#stream {
  left: 0;
  right: 0;
  bottom: var(--unit);
  height: 1.4em;
  overflow: hidden;
  white-space: pre;
  display: flex;
  justify-content: flex-end;
  padding-right: calc(var(--unit) * 2);
  color: var(--dim);
  letter-spacing: 0.04em;
}

#read { flex: 1; min-width: 0; overflow: hidden; display: flex; justify-content: flex-end; }
#words { will-change: transform; }
#stream b { font-weight: 400; color: var(--line); }
#guess { font-style: normal; color: var(--reply); padding-left: 1ch; }

#data {
  right: calc(var(--unit) * 2);
  bottom: calc(var(--unit) * 2.9);
  text-align: right;
  white-space: pre;
  color: var(--dim);
}

#data b { font-weight: 400; color: var(--line); }

#status {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--line);
}

#probe {
  left: 0;
  top: 0;
  padding-left: 0.9em;
  white-space: pre;
  color: var(--line);
  text-shadow: 0 1px 6px var(--ground), 0 0 2px var(--ground);
  will-change: transform;
}

#probe b { font-weight: 400; color: var(--line); }

.quiet #stream, .quiet #data, .quiet::after { opacity: 0; }

@media (max-width: 700px) {
  :root { --unit: 10px; }
}
