.backlinks {
  /* margin: 20px 0; */
  padding: 0px 20px;
  border: 1px solid;
}

body {
  counter-reset: def-counter thm-counter;
}

.definition, .theorem {
  margin: 20px 0;
  padding: 15px 20px;
  border-left: 4px solid;
  font-style: italic;
}

.definition p, .theorem p {
  display: inline;
  font-style: normal;
}

/* Definition Styling */
.definition {
  background-color: #f0f7ff;
  border-color: #369;
  counter-increment: def-counter;
}
.definition::before {
  content: "Definition " counter(def-counter) ". ";
  font-weight: bold;
  font-style: normal;
  color: #369;
}
.definition[title]::before {
  content: "Definition " counter(def-counter) " (" attr(title) "). ";
  font-weight: bold;
  font-style: normal;
  color: #369;
}

/* Theorem Styling */
.theorem {
  background-color: #fff8f0;
  border-color: #cc6600;
  counter-increment: thm-counter;
}
.theorem::before {
  content: "Theorem " counter(thm-counter) ". ";
  font-weight: bold;
  font-style: normal;
  color: #cc6600;
}
.theorem[title]::before {
  content: "Theorem " counter(thm-counter) " (" attr(title) ").";
  white-space: pre;
  font-weight: bold;
  font-style: normal;
  color: #cc6600;
}
