*, *::before, *::after {
  box-sizing: border-box;
}

body {
  background-color: white;
  color: black;
  font-size: 16px;
  font-family: Roboto, Arial, sans-serif;
  margin: 0;
  padding: 0;
}

.progress {
  display: grid;
  gap: 1px;
  margin: 0 5px;
  height: 1rem;
}

.progress > div {
  text-align: center;
  border: 2px solid #aaa;
  position: relative;
}

.progress > .current::before {
  content: '▲';
  position: absolute;
  top: -4px;
  left: calc(50% - 7px);
}

.menu, .summary-screen {
  justify-items: space-between;
  align-items: center;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  width: 100vw;
  height: 100vh;
  border: 1px solid #aaa;
}

.play-menu,
.summary-screen {
  display: none;
}

.menu ul, .menu li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu ul {
  width: 100%;
}

.menu li.span2 {
  grid-column: 2 / span 2;
}

.main-menu li {
  margin-bottom: 1rem;
  text-align: center;
}

.menu button,
.summary-buttons button {
  font-size: 1.5rem;
  width: 70%;
  height: 3rem;
}

.play-screen {
  display: none;
  grid-template-columns: 1fr;
  grid-template-rows: auto 2fr auto 3fr;
  width: 100vw;
  height: 100vh;
  border: 1px solid #aaa;
}

.play-screen .title {
  text-align: center;
}

.summary-screen .content {
  padding: 0 1rem;
}

.summary-screen table {
  font-size: 2rem;
  width: 100%;
}
.summary-screen td {
  text-align: right;
}
.summary-screen .number {
  color: #aaa;
  font-size: 1.5rem;
  grid-row: 1;
  grid-column: 1;
}
.summary-screen .correct .useranswer,
.summary-screen .correct .mark {
  color: green;
}
.summary-screen .incorrect .useranswer,
.summary-screen .incorrect .mark {
  color: red;
}
.summary-screen .incorrect .useranswer {
  text-decoration: line-through;
}
.summary-screen .correct .answer {
  color: transparent;
}
.summary-screen .incorrect .answer {
  color: green;
  text-align: center;
}


.question {
  font-size: 4rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  grid-template-rows: 1fr 1fr auto 1fr;
  grid-template-areas:
    "operand1 operand1"
    "operator operand2"
    "divider divider"
    "answer answer";
  justify-items: end;
  align-items: center;
}

.operand1 {
  grid-area: operand1;
}

.operand2 {
  grid-area: operand2;
}

.operator {
  grid-area: operator;
  margin-right: 1rem;
}

.divider {
  grid-area: divider;
  border: 2px solid black;
  justify-self: stretch;
}

.user-answer {
  grid-area: answer;
}

.buttons {
  background: white;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr 1fr;
  gap: 5px;
  padding: 5px;
}

.play-screen button {
  font-size: 3rem;
}

.play-screen button.backspace {
  font-size: 2rem;
}

.summary-buttons {
  text-align: center;
  margin-top: 2rem;
}

.toolbar {
  height: 3rem;
  border-bottom: 1px solid #aaa;
  margin: 0 0 0.5rem 0;
  padding: 0 0.5rem;
  display: grid;
  grid-template-columns: 1fr 3fr 1fr;
  gap: 0.5rem;
  justify-items: center;
  align-items: center;
}

.toolbar .left {
  justify-self: start;
}
.toolbar .right {
  justify-self: end;
}

.toolbar h2 {
  font-size: 2rem;
  text-align: center;
  padding: 0;
  margin: 0;
}

.toolbar button {
  width: 2.5rem;
  height: 2.5rem;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 2rem 2rem;
  font-size: 1rem;
  border: 1px solid transparent;
  background-color: transparent;
}
.toolbar button:hover {
  border: 1px solid #aaa;
}
.back-button {
  background-image: url(/img/arrow_back.svg);
}
.settings-button {
  background-image: url(/img/settings.svg);
}

.play-menu .question {
  gap: 0.5rem;
  justify-items: stretch;
  align-items: stretch;
  width: 60vw;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-areas:
    ". operand1 operand1"
    "operator operand2 operand2"
    "divider divider divider"
    "answer answer answer";
  font-size: 1rem;
}
.play-menu .question button {
  width: 100%;
  height: 4rem;
  font-size: 2rem;
}
.play-menu .question .operator {
  margin-right: 0;
}
.play-menu .question .divider {
  background: black;
  border: none;
  padding-top: 4px;
  margin-top: 2px;
}
