@font-face {
  font-family: Hanken Grotesque;
  src: url(./fonts/HankenGrotesk-VariableFont_wght.ttf);
}

* {
  margin: 0;
  padding: 0;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
}

body {
  font-family: Hanken Grotesque;
  font-variation-settings: "wght" 700;
}

#card-container {
  background-color: #fff;
  position: relative;
}

.card-heading {
  font-size: 1.2em;
  margin-bottom: 1.3em;
}

#overall-result {
  background: -webkit-gradient(linear, left top, left bottom, from(#7857ff), to(#2e2be9));
  background: linear-gradient(#7857ff, #2e2be9);
  border-radius: 0 0 2em 2em;
  padding: 2em 3em;
  text-align: center;
  color: #fff;
}

#overall-result .card-heading {
  opacity: 60%;
}

.total-score {
  background: -webkit-gradient(linear, left top, left bottom, from(#4e21ca), to(rgba(36, 33, 202, 0)));
  background: linear-gradient(#4e21ca, rgba(36, 33, 202, 0));
  border-radius: 100%;
  padding: 7% 12%;
  display: inline-block;
  margin-bottom: 1.8em;
}

#overall-score-num {
  font-size: 3.5em;
}

#total {
  opacity: 40%;
}

.score-desc {
  font-size: 1.5em;
  text-align: center;
  margin-bottom: .5em;
  font-variation-settings: "wght" 600;
}

.percentile-msg {
  width: 100%;
  opacity: 60%;
  text-align: center;
  font-variation-settings: "wght" 500;
  font-size: 1em;
}

#summary {
  padding: 8%;
  background-color: #fff;
}

#summary .card-heading {
  color: #303b5a;
}

.score-category {
  width: 100%;
  margin-bottom: 1.2em;
  border-radius: .6em;
  padding: 1em 1.2em;
}

.score-category .icon {
  vertical-align: bottom;
  margin-right: 6px;
}

.score-category.category-1 {
  background-color: rgba(255, 87, 87, 0.08);
  color: #ff5757;
}

.score-category.category-2 {
  background-color: rgba(255, 176, 31, 0.08);
  color: #ffb01f;
}

.score-category.category-3 {
  background-color: rgba(0, 189, 145, 0.08);
  color: #00bd91;
}

.score-category.category-4 {
  background-color: rgba(17, 37, 212, 0.08);
  color: #1125d4;
}

.category-name {
  display: inline-block;
}

.score {
  position: relative;
  float: right;
}

.score .numerator {
  display: inline-block;
  margin-right: 2px;
  color: #303b5a;
}

.score .denominator {
  display: inline-block;
  color: rgba(48, 59, 90, 0.4);
}

button {
  width: 100%;
  background: #303b5a;
  padding: .85em 0;
  margin-top: .7em;
  border: none;
  border-radius: 3em;
  color: #fff;
  font-family: inherit;
  font-size: 1.1em;
  font-variation-settings: "wght" 600;
}

.attribution {
  font-size: .5em;
  text-align: center;
  padding-bottom: 10px;
  color: rgba(48, 59, 90, 0.8);
}

.attribution a {
  color: #3e52a3;
  text-decoration: none;
}

@media screen and (min-width: 720px) {
  #card-container, #overall-result, #summary {
    border-radius: 2em;
  }
  #card-container {
    background: #fff;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
            transform: translate(-50%, -50%);
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: 1fr 1fr;
        grid-template-columns: 1fr 1fr;
    width: 650px;
    height: 468px;
    -webkit-box-shadow: 20px 10px 40px rgba(20, 42, 88, 0.1);
            box-shadow: 20px 10px 40px rgba(20, 42, 88, 0.1);
  }
  #overall-result, #summary {
    height: 100%;
  }
  #overall-result {
    padding: 35px 45px;
  }
  #summary {
    padding: 35px 30px;
  }
  .total-score {
    margin-bottom: 2em;
  }
  .score-desc {
    font-size: 1.8em;
  }
  .card-heading {
    font-size: 1.3em;
  }
  .total-score {
    padding: 14% 20%;
  }
  #overall-score-num {
    font-size: 4em;
  }
  .score-category {
    padding: .8em 1.2em;
  }
  button:hover {
    cursor: pointer;
    background: -webkit-gradient(linear, left top, left bottom, from(#7857ff), to(#2e2be9));
    background: linear-gradient(#7857ff, #2e2be9);
  }
  .attribution {
    position: absolute;
    bottom: 0;
    left: 50%;
    -webkit-transform: translateX(-50%);
            transform: translateX(-50%);
  }
}
