.container {
  display: grid;
  grid-template-columns: auto 300px;
  grid-column-gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 calc(30px + 4rem) 200px;
}

.header {
  grid-column: span 2;
  margin-bottom: 40px;
}

.main-content.no-sidebar {
  grid-column: 1/3;
}

.header {
  position: relative;
}
.header .title {
  position: relative;
  line-height: 1;
  padding: 2rem 0 1rem 0;
  font-size: 3rem;
}
.header .title:before {
  content: ">_";
  display: block;
  position: absolute;
  left: calc(-20px - 4rem);
  bottom: 1rem;
  color: #CABDC7;
}
.header .title h1 {
  margin: 0;
  font-size: 1em;
  font-weight: bold;
}
.header .account-links {
  position: absolute;
  display: flex;
  top: 0;
  right: 0;
  color: #CABDC7;
  font-size: 80%;
}
.header .account-links a {
  color: inherit;
}
.header .account-links a:hover {
  color: white;
}
.header .account-links > div:not(:last-child):after {
  content: "|";
  display: inline-block;
  margin: 0 0.5em;
}
.header .main-navigation ul {
  display: flex;
  padding-left: 0;
  color: #CC4452;
}
.header .main-navigation ul li {
  display: block;
  margin-right: 10px;
}
.header .main-navigation ul li a {
  color: inherit;
}
.header .main-navigation ul li.current-page a {
  text-decoration: underline;
}

body {
  line-height: 1.5;
}

a:not(.subtle):not(.div-link) {
  color: #CC4452;
  font-weight: bold;
  text-decoration: none;
}
a:not(.subtle):not(.div-link):before {
  content: "[";
  display: inline-block;
  margin-right: 0.25em;
  text-decoration: none;
}
a:not(.subtle):not(.div-link):after {
  content: "]";
  display: inline-block;
  margin-left: 0.25em;
  text-decoration: none;
}

a.div-link {
  color: inherit;
  text-decoration: none;
}

blockquote {
  margin-left: 1em;
  padding-left: 1em;
  border-left: 3px solid #673F5E;
}
blockquote footer {
  font-style: italic;
  font-size: 80%;
  color: #CABDC7;
}

.text-muted {
  color: #CABDC7;
  font-size: 0.8rem;
}

.centered {
  text-align: center;
}

.filler {
  height: 100px;
}

.flash-error {
  padding: 0.25em 1em;
  margin-bottom: 1em;
  font-size: 80%;
  font-weight: bold;
  color: #CABDC7;
  background-color: rgba(204, 68, 82, 0.6);
}

.editor-errors {
  margin-top: 2rem;
}

form {
  display: grid;
  grid-template-columns: 200px auto;
  grid-column-gap: 20px;
  grid-row-gap: 1em;
}
form.small {
  grid-template-columns: auto;
  grid-row-gap: 1em;
}
form input[type=text], form input[type=password] {
  border: none;
  outline: none;
  border-radius: 0;
  padding: 0.25em 0.5em;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: bold;
  background-color: #CABDC7;
}
form .button-container {
  grid-column: 2/3;
}
form .control-group {
  display: flex;
  flex-direction: column;
}
form .control-group.line {
  flex-direction: row;
}
form .control-group.line label {
  flex: 1;
}
form .control-group > *:not(:last-child) {
  margin-bottom: 0.25em;
}
form .number-selector {
  display: flex;
}
form .number-selector .minus, form .number-selector .plus {
  background-color: rgba(204, 68, 82, 0.6);
  width: 1.75rem;
  height: 1.75rem;
  text-align: center;
  font-weight: bold;
  line-height: 1.7;
  cursor: pointer;
  border-radius: 0.3rem;
  -webkit-user-select: none;
  user-select: none;
}
form .number-selector .number {
  margin: 0 20px;
}

canvas:not(.graph) {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

canvas.graph {
  display: block;
  max-width: 100%;
  background-color: #F9E4AD;
}

.canvas-border {
  border: 20px solid #723147;
  background-color: #723147;
}

.canvas-container {
  position: relative;
  height: 0;
  padding-top: 80%;
}

.toolbar {
  margin-top: 1em;
  display: flex;
}
.toolbar .button {
  width: 40px;
  margin-right: 0.5em;
  padding: 0.25em 0;
  text-align: center;
  background-color: rgba(204, 68, 82, 0.6);
  cursor: pointer;
}
.toolbar .button:hover {
  background-color: rgba(204, 68, 82, 0.8);
}
.toolbar .button.disabled {
  opacity: 0.5;
}
.toolbar label {
  display: block;
  margin-left: 3em;
  margin-right: 1em;
  padding: 0.25em 0;
  color: #CABDC7;
}
.toolbar .slider-container {
  flex: 1;
  display: flex;
  align-self: center;
}
.toolbar .slider-container .slider {
  -webkit-appearance: none;
  width: 100%;
  height: 25px;
  align-self: center;
  background: #d3d3d3;
  outline: none;
  opacity: 0.7;
  -webkit-transition: 0.2s;
  transition: opacity 0.2s;
}
.toolbar .slider-container .slider:hover {
  opacity: 1;
}
.toolbar .slider-container .slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 25px;
  height: 25px;
  background: #723147;
  cursor: pointer;
}
.toolbar .slider-container .slider::-moz-range-thumb {
  width: 25px;
  height: 25px;
  background: #723147;
  cursor: pointer;
}

.solution-index-preview {
  width: 50%;
  margin: 0 auto 2em;
}

.progressive-index-visuals {
  display: flex;
  align-items: flex-start;
}
.progressive-index-visuals > div:first-child {
  flex: 1;
}
.progressive-index-visuals > div:last-child {
  width: 300px;
  margin-left: 20px;
}

.btn {
  padding: 0.5em 1em;
  border: none;
  outline: none;
  color: white;
  border-radius: 5px;
  background-color: rgba(204, 68, 82, 0.6);
  font-family: inherit;
  font-size: 80%;
  font-weight: bold;
  -webkit-user-select: none;
  user-select: none;
  cursor: pointer;
}

.btn:hover {
  background-color: rgba(204, 68, 82, 0.8);
}

.btn.disabled {
  background-color: rgba(204, 68, 82, 0.4);
  cursor: default;
}
.btn.disabled:hover {
  background-color: rgba(204, 68, 82, 0.4);
}

table {
  width: 100%;
  border-collapse: collapse;
}
table th, table td {
  padding: 0.25em 0.25em 0.35em;
}
table th {
  text-align: left;
  padding-bottom: 0.5em;
  border-bottom: 3px solid rgba(255, 255, 255, 0.1);
}
table td {
  border-bottom: 2px dashed rgba(255, 255, 255, 0.1);
}
table td:last-child {
  text-align: right;
}
table .version {
  font-size: 80%;
}

.violation {
  position: relative;
  margin-top: 1em;
  padding: 0.5em 1em 0.5em 2.5em;
  color: white;
  font-size: 80%;
  background-color: #CC4452;
}
.violation:before {
  content: "!";
  display: block;
  position: absolute;
  top: 0.5em;
  left: 1em;
  font-weight: bold;
}

.violation-count {
  margin-left: 1em;
  background-color: #CC4452;
  padding: 0.15em 0.5em;
  color: white;
  font-size: 70%;
  font-weight: bold;
  border-radius: 0.25em;
}
.violation-count:after {
  content: "violation(s)";
  font-weight: normal;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-column-gap: 20px;
  grid-row-gap: 20px;
}
.grid .tile .preview img {
  display: block;
  width: 100%;
  box-sizing: border-box;
  image-rendering: pixelated;
  border: 10px solid #723147;
  margin-bottom: 0;
}
.grid .tile .preview .canvas-border {
  border-width: 10px;
}
.grid .tile .text {
  font-size: 0.8rem;
}
.grid .tile .text .name {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  font-weight: bold;
  font-size: 1rem;
}
.grid .tile .benchmark {
  display: flex;
  flex-direction: column;
}
.grid .benchmark.loading .preview {
  opacity: 0.5;
}

.tools {
  display: grid;
  grid-template-columns: 2rem 5rem;
  grid-gap: 1rem;
}
.tools > div {
  display: grid;
  grid-gap: 1rem;
}
.tools > div.agent-picker {
  grid-template-columns: 1fr 1fr;
}
.tools button {
  position: relative;
  display: block;
  height: 2rem;
  margin: 0;
  padding: 0;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.tools button:hover, .tools button.selected {
  background-color: rgba(255, 255, 255, 0.15);
}
.tools button:before {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: 80% 80%;
  background-position: center;
  background-repeat: no-repeat;
}
.tools button#walls:before {
  background-image: url("img/icons/walls.svg");
}
.tools button#eraser:before {
  background-image: url("img/icons/eraser.svg");
}
.tools button#start:before {
  background-image: url("img/icons/start.svg");
}
.tools button#waypoint:before {
  background-image: url("img/icons/waypoint.svg");
}
.tools button#goal:before {
  background-image: url("img/icons/goal.svg");
}
.tools button.agent:before {
  top: 0.5rem;
  left: 0.5rem;
  right: 0.5rem;
  bottom: 0.5rem;
  background-color: black;
  border-radius: 50%;
}
.tools button.agent.agent-1:before {
  background-color: rgb(204, 68, 82);
}
.tools button.agent.agent-2:before {
  background-color: rgb(36, 97, 128);
}
.tools button.agent.agent-3:before {
  background-color: rgb(128, 29, 39);
}
.tools button.agent.agent-4:before {
  background-color: rgb(47, 152, 204);
}
.tools button.agent.agent-5:before {
  background-color: rgb(17, 128, 42);
}
.tools button.agent.agent-6:before {
  background-color: rgb(67, 204, 98);
}
.tools button.agent.agent-7:before {
  background-color: rgb(57, 204, 174);
}
.tools button.agent.agent-8:before {
  background-color: rgb(102, 82, 74);
}
.tools button.agent.agent-9:before {
  background-color: rgb(128, 124, 23);
}
.tools button.agent.agent-10:before {
  background-color: rgb(204, 111, 78);
}

.agent-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-bottom: -0.25em;
  background-color: black;
  border: 2px solid white;
  border-radius: 50%;
}
.agent-icon.agent-1 {
  background-color: rgb(204, 68, 82);
}
.agent-icon.agent-2 {
  background-color: rgb(36, 97, 128);
}
.agent-icon.agent-3 {
  background-color: rgb(128, 29, 39);
}
.agent-icon.agent-4 {
  background-color: rgb(47, 152, 204);
}
.agent-icon.agent-5 {
  background-color: rgb(17, 128, 42);
}
.agent-icon.agent-6 {
  background-color: rgb(67, 204, 98);
}
.agent-icon.agent-7 {
  background-color: rgb(57, 204, 174);
}
.agent-icon.agent-8 {
  background-color: rgb(102, 82, 74);
}
.agent-icon.agent-9 {
  background-color: rgb(128, 124, 23);
}
.agent-icon.agent-10 {
  background-color: rgb(204, 111, 78);
}

body, html {
  min-width: 1100px;
  color: white;
  font-family: "Source Code Pro", monospace;
  background-color: #31152B;
}

.version {
  opacity: 0.6;
}

.no-select {
  -webkit-user-select: none;
  user-select: none;
}

.drawable {
  cursor: crosshair;
}
