:root {
  --background: #071414;
  --foreground: #f2f0df;
  --muted: #96a89e;
  --line: rgba(242, 240, 223, 0.28);
  --line-strong: rgba(242, 240, 223, 0.64);
  --cyan: #31d7d2;
  --green: #b9f45d;
  --coral: #ff6b58;
  --shadow: rgba(49, 215, 210, 0.22);
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 15%, rgba(49, 215, 210, 0.11), transparent 30vw),
    radial-gradient(circle at 82% 70%, rgba(255, 107, 88, 0.08), transparent 28vw),
    var(--background);
  color: var(--foreground);
  font-family:
    "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo,
    monospace;
}

a,
button {
  color: inherit;
  font: inherit;
}

.site-header {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  pointer-events: none;
}

.contract-line,
.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.contract-line {
  min-width: 0;
  max-width: min(720px, calc(100vw - 210px));
}

.muted {
  color: var(--muted);
}

.contract-button {
  max-width: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-button:focus-visible,
.nav-links a:focus-visible {
  outline: 1px solid var(--green);
  outline-offset: 5px;
}

.contract-button.copied {
  color: var(--green);
}

.nav-links a {
  display: inline-flex;
  min-width: 44px;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  text-decoration: none;
  transition:
    border-color 180ms ease,
    color 180ms ease,
    background 180ms ease;
}

.nav-links a:hover {
  border-color: var(--line-strong);
  background: rgba(242, 240, 223, 0.06);
}

.stage {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 84px 24px 48px;
}

.one-liner {
  position: fixed;
  left: 24px;
  bottom: 22px;
  z-index: 9;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.instrument {
  position: relative;
  width: min(62vmin, 680px);
  min-width: 280px;
  aspect-ratio: 1;
}

#field {
  position: absolute;
  inset: -18%;
  width: 136%;
  height: 136%;
}

.boundary {
  position: absolute;
  inset: 13%;
  border: 1px solid rgba(242, 240, 223, 0.18);
}

.boundary span {
  position: absolute;
  width: 42px;
  height: 42px;
  border-color: var(--line-strong);
}

.boundary span:nth-child(1) {
  top: -1px;
  left: -1px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.boundary span:nth-child(2) {
  top: -1px;
  right: -1px;
  border-top: 1px solid;
  border-right: 1px solid;
}

.boundary span:nth-child(3) {
  right: -1px;
  bottom: -1px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.boundary span:nth-child(4) {
  bottom: -1px;
  left: -1px;
  border-bottom: 1px solid;
  border-left: 1px solid;
}

.market-readout {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  min-width: 180px;
  transform: translate(-50%, -50%);
  place-items: center;
  text-align: center;
  text-shadow: 0 1px 20px rgba(7, 20, 20, 0.44);
}

#marketCap {
  color: var(--foreground);
  font-size: clamp(30px, 7vmin, 76px);
  line-height: 1;
}

@media (max-width: 700px) {
  body {
    overflow-y: auto;
  }

  .site-header {
    position: absolute;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
  }

  .contract-line {
    max-width: 100%;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .stage {
    min-height: 100svh;
    padding: 132px 18px 64px;
  }

  .one-liner {
    left: 18px;
    bottom: 18px;
  }

  .instrument {
    width: min(88vmin, 520px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
