#chart-title {
  font-size: 0.9rem;
  color: rgb(61, 60, 60);
  box-sizing: border-box;
  display:block;
  margin: 1vh;
  margin-top: 1.5vh;
}

/* Bottom right chart style start */


#lead-level-chart {
    /* position: absolute; */
    padding-top: 5rem;
    box-sizing: border-box;
    width: 100%;
    height: calc(100% - 16px); /* 16px is the height of the chart title */
}

#lead-level-chart .scale {
    height: 1.5rem;
    box-sizing: border-box;
    /* The following gradient code is from https://cssgradient.io/ */
    background: rgb(116, 141, 107);
    background: linear-gradient(90deg, rgba(101, 160, 79, 0.41) 0%, rgba(246,177,114,0.73) 100%);
    /* background: rgb(112,133,95);
    background: linear-gradient(90deg, rgba(112,133,95,1) 0%, rgba(201,100,60,1) 100%); */
}

#lead-level-chart .safe-level {
  position: relative;
  top: -1.5rem;
  left: 0;
  border-right: 2px solid rgb(85, 65, 65);
  height: 4.5rem;
  box-sizing: border-box;
  transition: width 0.5s;
  /* calculate the relative width using log scale: 5.9914645471/9.8016762864 */
  width: 61.1%;
}

#lead-level-chart .level {
  position: relative;
  top: -6.5rem;
  left: 0;
  border-right: 2px solid rgb(158, 65, 65);
  height: 2.5rem;
  box-sizing: border-box;
  transition: width 0.5s;
  width: 61.1%;
}

#lead-level-chart .level-label {
    position: relative;
    width: fit-content;
    top: -11rem;
    left: 0;
    font-size: 0.8rem;
    padding: 5px;
    border-radius: 0.5rem;
    box-sizing: border-box;
    transition: left 0.5s, background-color 0.5s;
  }

#safe-lead-level-description {
    position: relative;
    right: -2.5em;
    bottom: 4rem;
    box-sizing: border-box;
    font-size: 0.8rem;
    width: 9rem;
    text-align: center;
}

/* Bottom right chart style end */


/* mobile compatibility  */
/* phone vertical */
@media screen and (width <= 450px) {

  #lead-level-chart {
    padding-top: 2.5rem;

  }

  #safe-lead-level-description {
    bottom: 4rem;
    right: -4.5em;
  }

}

@media screen and (width <= 300px) {

  #lead-level-chart {
    padding-top: 2.5rem;

  }

  #safe-lead-level-description {
    bottom: 4rem;
    right: -0.5em;
  }

}

/* phone horizontal, except iPad vertical */
@media screen and (max-width: 1000px) and (min-width: 450px) and (max-height: 700px) {

  #safe-lead-level-description {
    position: relative;
    right: -25px;
    bottom: 5rem;
    box-sizing: border-box;
    font-size: 0.8rem;
    width: 9rem;
    text-align: center;
  }

  #lead-level-chart {
    padding-top: 4rem;

  }

}

/* computer with short screen */
@media screen and (max-height: 750px) {

  #lead-level-chart {
      padding-top: 3rem;
  
  }
}