:root {
  --primary: #d8c3ab;
  --background: #151311;
  --h1: #fb4934;
  --h2: #8ec07c;
  --h3: #fabd2f;
  --border: #494643;
}

body {
  background-color: var(--background);
  color: var(--primary);
  font-size: 1.2rem;
  /* Switch to rem for better consistency */
  margin: 0;

  /* ADD THIS to center everything easily */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.toc {
  /* Delete all the position: absolute stuff */
  width: 90%;
  /* prevent it from touching edges on mobile */
  max-width: 600px;
  /* cap it for desktop */
  margin-top: 2rem;
}

h1 {
  color: var(--h1);
  border-bottom: 2px dashed var(--border);
  margin-bottom: 1rem;
}

h2 {
  color: var(--h2);
  border-bottom: 2px dashed var(--border);
  margin-bottom: 1rem;
}

h3 {
  color: var(--h3);
  border-bottom: 2px dashed var(--border);
  margin-bottom: 1rem;
}

ul {
  list-style: square;
  position: relative;
}

li {
  position: relative;
  padding-left: 0.5rem;
  /* Space for the line */
  line-height: 2rem;
}

a {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--primary);
  display: inline-block;
}

a:hover {
  color: var(--primary);
  background-color: #32302f;
}

@media (max-width: 768px) {

  .toc {
    margin-top: 0;
  }
}
