html, body {
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

canvas {
  display: block;
  align: center;
}

.top-ribbon-element {
  display: inline-block;
  width: 24%;
  text-align: center;
  margin-top: 0px;
  margin-bottom: 0px;
}

#topRibbon {
  display: flex;
  justify-content: space-around;
  padding: 0.5em;
  flex-shrink: 0;
}

svg {
  background: white;
  border: 1px solid #ccc;
  width: 100%;
  height: 100%;
  max-width: 100vmin;
  max-height: 100%;
}

.choices {
  font-size: 20px;
}

#problem {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#written-portion {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

#visual-aid {
  margin: 3em;
}

.question {
  font-size: 20px;
  text-align: center;
  margin: 10px 10px 10px 10px;
}

.option {
  display: inline-block;
  padding: 1em;
  text-align: center;
}

.option:hover {
  background: rgb(230, 230, 230);
  border-radius: 8px;
}

#option-div {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0px;
  justify-content: center;
  font-size: 20px;
}

.result-indicator {
  width: 100%;
  height: 10px;
}

.diagram {
  text-align: center;
  float: left;
}

.archive-entry {
  margin: 5px;
  border-style: solid;
  padding: 0.5em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#reset-button {
  text-align: center;
  background: black;
  color: white;
  font-size: 200%;
}

#game-over {
  display: none;
}

.summary-statement .katex {
  font-size: 1.1em;
}

.score-section-element .katex {
}

.summary-statement {
  width: 30%;
  text-align: center;
  background-color: red;
  margin: 0.5em 0em;
  padding: 0.2em;
}

.stats-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

#stats {
  margin: 5px;
  border-style: solid;
  border-color: grey;
  padding: 0.5em;
}

#disclaimer {
  margin: 1em;
}

.score-section-element {
  width: 16%;
  height: 1.5em;
  text-align: center;
  margin: 0.3em 0em;
  display: inline-flex;
  align-items: center;
  justify-content: space-around;
}

#angle-section .angle-score-section-element {
  width: 19%;
}

.sub-score-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: stretch;
}

.question .katex {
  font-size: 1em;
}

.option .katex {
  font-size: 1em;
}

.answer-review .katex {
  font-size: 1em;
}

@media only screen and (orientation: portrait) {
  #problem {
    flex-direction: column;
  }

  #written-portion {
    order: 1;
  }

  #visual-aid {
    order: 2;
    display: inline-block;
    text-align: center;
  }

  .score-section-element {
    width: 32%;
  }

  .score-section-element.katex {
    font-size: 0.8em;
  }
}

@media only screen and (orientation: landscape) {
  #problem {
    flex-direction: vertical;
  }

  #written-portion {
    order: 2;
  }

  #visual-aid {
    order: 1;
  }

  .score-section-element {
    width: 16%;
  }
}
// JavaScript Document