body {
  background-image: url("backgroundLines.png");
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  background-attachment: fixed;
}

#background {
  background-image: url("background.png");
  background-size: 100%;
  position: fixed;
  top: 0;
  left: 16%;
  width: 68%;
  height: 100%;
  image-rendering: pixelated;
  z-index: -1;
}

h1 {
  text-align: center;
  font-size: 2.5vw;
  position: relative;
}

h2 {
  text-align: center;
  font-size: 1.5vw;
  margin-bottom: 60px;
  position: relative;
}

h3 {
  font-size: 22px;
  margin-right: 20%;
  margin-left: 20%;
  position: relative;
}

p, ul, hr {
  margin-right: 20%;
  margin-left: 20%;
  position: relative;
}

video, img {
  max-width: 60%;
  margin-right: 20%;
  margin-left: 20%;
  position: relative;
}

.graph {
  margin-left: 20%;
  background-color: white;
  border: 2px solid #888;
  position: relative;
}

.paragraph {
  margin-bottom: 20px;
}

#tableOfContents {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 35%;
  background-image: linear-gradient(#f8ffff, #ccffff);
  border: 3px solid #446666;
  border-radius: 10px;
  padding-left: 10px;
  margin-bottom: 80px;
}

* {
  box-sizing: border-box;
}

@media only screen and (max-width: 768px) {
  #background {
    left: 0;
    width: 100%;
  }

  h1 {
    font-size: 8vw;
  }

  h2 {
    font-size: 6vw;
  }

  h3, p, ul, hr, button {
    margin-left: 5%;
    margin-right: 5%;
  }

  video, img {
    max-width: 90%;
  }

  .function {
    width: 90%;
    margin-left: auto;
    margin-right: auto;
  }

  #tableOfContents {
    width: 80%;
  }

  .graph {
    margin-left: 5%;
    width: 90%;
  }
}

.sim-table {
    border-collapse: collapse;
    margin-left: 20%;
    font-size: 0.9em;
    font-family: sans-serif;
    min-width: 400px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}
.sim-table thead tr {
    background-color: #009879;
    color: #ffffff;
    text-align: center;
}
.sim-table th, .sim-table td {
    padding: 12px 15px;
    border: 1px solid #bbbbbb;
    text-align: center;
}
.sim-table tbody tr {
    border-bottom: 1px solid #bbbbbb;
}
.sim-table tbody td:first-child {
    font-weight: bold;
    background-color: #f3f3f3;
}
.theory-row {
    font-weight: bold;
    border-top: 2px solid #009879;
}

/* Heatmap Color Coding */
.err-high { background-color: #fcc1a5; color: #000;}  /* > 5% Error */
.err-med { background-color: #fef08a; color: #000;}   /* 2% - 5% Error */
.err-low { background-color: #bbf7d0; color: #000;}   /* 0.5% - 2% Error */
.err-good { background-color: #86efac; color: #000;}  /* < 0.5% Error */
.theory { background-color: #f3f3f3; color: #000;}

.legend {
    font-size: 0.8em;
    margin-top: 10px;
    display: flex;
    gap: 15px;
    margin-left: 20%;
}
.legend span {
    padding: 4px 8px;
    border: 1px solid #ccc;
}