[contenteditable] {
  outline: none;
}

#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 32px;
  padding-left: 16px;
  padding-right: 16px;
  background: #fff;
}

#header img {
  margin: 0;
  padding: 2px;
  display: inline-block;
  height: 28px;
}

#content {
  position: fixed;
  top: 32px;
  left: 0;
  right: 0;
  bottom: 0;
}

#content nav {
  display: block;
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 32px;
  background: #5136ba;
  color: #fff;
  line-height: 32px;
}

#source {
  display: block;
  position: absolute;
  left: 0px;
  top: 0px;
  width: 600px;
  height: 692px;
  color: #fff;
  background: #000;
}

#source nav button {
  min-width: 80px;
  height: 24px;
  margin: 4px;
}

#code {
  display: block;
  position: absolute;
  top: 32px;
  left: 50px;
  right: 0px;
  bottom: 0px;
  padding: 8px;
  box-sizing: border-box;
  overflow: auto;
  font-family: "Courier New", Courier, monospace;
  white-space: pre;
  line-height: 20px;
  font-size: 16px;
}

#lineNumbers {
  display: block;
  position: absolute;
  top: 32px;
  left: 0px;
  bottom: 0px;
  width: 40px;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-right: 2px;
  box-sizing: border-box;
  overflow: hidden;
  background: #000;
  color: #777;
  font-family: "Courier New", Courier, monospace;
  white-space: pre;
  text-align: right;
  line-height: 20px;
  font-size: 12px;
}

#lineNumbers div {
  display: block;
  margin: 0;
  padding: 0;
  height: 20px;
  box-sizing: border-box;
  padding-top: 1px;
}

#output {
  display: block;
  position: absolute;
  top: 0px;
  left: 600px;
  width: 660px;
  height: 692px;
}

#canvas {
  position: absolute;
  top: 32px;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("/assets/checkerboard.png");
  background-position-x: 20px;
  background-position-y: 20px;
  background-repeat: no-repeat;
}

#canvas svg.canvas {
  position: absolute;
  left: 20px;
  top: 20px;
  width: 640px;
  height: 640px;
}

.ruler {
  position: absolute;
  left: 0;
  height: 20px;
  width: 660px;
}

#xRuler {
  top: 0;
  transform: translate(20px, 0px);
}

#yRuler {
  top: 480px;
  left: -640px;
  transform: rotate(90deg) translate(-140px, -320px);
}

#console {
  display: block;
  position: absolute;
  right: 0;
  bottom: 0;
  top: 692px;
  width: 100%;
  border-top: solid 1px #000;
  background: #bbb;
  padding: 8px;
  overflow: auto;
  box-sizing: border-box;
}

#console div {
  font-size: 14px;
  line-height: 16px;
  border-bottom: solid 1px #ddd;
}

#console div span {
  display: inline-block;
  vertical-align: middle;
}

#console div .lineNumber {
  width: 32px;
  text-align: right;
  color: #777;
  margin-right: 8px;
}

#console div .message {
  color: #000;
}

#help {
  display: block;
  position: absolute;
  left: 1260px;
  top: 0;
  right: 0;
  height: 692px;
  background: #fff;
}

#help > div {
  color: #555;
  position: absolute;
  top: 32px;
  left: 0;
  right: 0;
  bottom: 0;
  border-left: solid 1px #000;
}

#help iframe {
  width: 100%;
  height: 100%;
  border: none;
}

svg {
  dominant-baseline: hanging;
}
