body {
  background: #DDDDDD;
}

.drop {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 200px;
  height: 60px;
  margin-left: -100px;
  margin-top: -30px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 2;
  border: 2px solid black;
  background: white;
  padding: 10px 20px;
  border-radius: 10px;
  pointer-events: none;
}
.drop.active {
  background: black;
  color: white;
}
body.hasoutput .drop {
  display: none;
}
body.hasoutput .drop.active {
  display: flex;
}

.warning {
  color: red;
}

.output {
  font: 1em monospace;
}

.output h2 {
  position: sticky;
  top: 0;
  background: #DDDDDD;
  padding: 5px 0;
  z-index: 1;
  text-align: right;
  width: fit-content;
  margin-left: auto;
  padding-left: 5px;
}

.chunk {
  margin-top: 10px;
  padding: 5px 10px;
  background: #EEEEEE;
}

details {
  contain: inline-size layout paint style;
}

summary {
  cursor: pointer;
}

.chunk-header {
  font-weight: bold;
}

.chunk-value {
  font: 1em monospace;
  white-space: pre-wrap;
  margin-top: 5px;
  margin-left: 20px;
}

canvas {
  image-rendering: pixelated;
}

ul {
  margin: 0;
  padding: 0 0 0 16px;
  border-left: 1px solid #BBBBBB;
  list-style: none;

  &:target {
    border-left: 4px solid #99DD88;
    padding-left: 13px;
  }
}

li {
  margin-top: 5px;
  position: relative;

  &:target {
    background: #99DD88;
  }
}

li::before {
  content: "";
  position: absolute;
  top: 0.5em;
  left: -16px;
  width: 10px;
  height: 1px;
  background: #BBBBBB;
}

li > details {
  margin-left: -4px;
  padding-left: 4px;

  & > summary {
    margin-left: -4px;
  }
}

.parsed {
  margin-bottom: 20px;
  line-height: 1.4;
}

a:link, a:visited {
  color: #000080;
  text-decoration: underline;
}

a:active, a:hover {
  color: #0000FF;
  text-decoration-thickness: 2px;
}

.horizontal {
  display: flex;
  flex-flow: row;
  overflow-x: auto;
  gap: 20px;
  margin-bottom: 20px;
}

.image-canvas {
  border: 1px solid black;
  background: conic-gradient(
      #ffffff 25%,
      #cccccc 25%,
      #cccccc 50%,
      #ffffff 50%,
      #ffffff 75%,
      #cccccc 75%
    )
    top left / 16px 16px;
  width: fit-content;
  height: fit-content;
  max-width: 100%;
  overflow: auto;

  & > svg {
    display: block;
    contain: strict;
  }
}

.colour-preview {
  position: relative;
  display: inline-block;
  border: 1px solid black;
  padding: 5px;
  min-width: 10px;
  min-height: 10px;
  margin: 2px;
}

.options {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: 10px 20px;
  padding: 10px;
}

input {
  vertical-align: middle;
}
