* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  outline: none;
}

body {
  background: #1b2638;
  color: #fff;
  font-size: 18px;
  line-height: 1.5;
}

.wrap {
  max-width: 800px;
  margin: 50px auto;
  padding: 0 20px;
}

header {
  font-size: 46px;
  margin: 0 0 50px 0;
}

header a {
  color: #fff;
  text-decoration: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-svg {
  width: 60px;
  margin: 0 20px 0 0;
}

.logo-svg .color {
  fill: #fa3;
}

.logo-svg .change {
  fill: #fff;
}

.form {
  display: flex;
  flex-direction: column;
  margin: 0 0 30px 0;
  box-shadow: 0 20px 50px rgba(0, 180, 255, .3);
}

.form label {
  width: 100%;
}

.form input {
  background: #fff;
  color: #000;
  border-radius: 3px 3px 0 0;
  border: 1px solid #fff;
  width: 100%;
  height: 50px;
  font-size: 18px;
  padding: 10px 30px;
}

.form input:focus {
  outline: none;
}

.form button {
  background: #d52055;
  color: #fff;
  height: 50px;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 14px;
  font-weight: bold;
  padding: 15px 30px;
  white-space: break-spaces;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 0;
  max-width: 100%;
  text-align: center;
  position: relative;
  border-radius: 0 0 3px 3px;
}

h1, h2 {
  font-size: 22px;
  font-weight: normal;
  line-height: 1.8;
}

.metrics {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.metrics h2 {
  margin: 0;
  content-visibility: auto;
}

.metric {
  border-radius: 3px;
  border: 1px solid #000;
  padding: 10px;
  background: rgba(0, 0, 0, .2);
  content-visibility: auto;
}

.metric-good {
  border-color: #52b94f;
}

.metric-mid {
  border-color: #ffaa33;
}

.metric-bad {
  border-color: #E8547C;
}

.metric .title {
  display: flex;
  flex-direction: column;
  margin: 0 0 10px 0;
  gap: 10px;
}

.metric button {
  background: none;
  border: 0;
  font-size: 18px;
  color: #fff;
  height: 50px;
  text-align: center;
  width: 100%;
  margin: 10px 0 0 0;
  border-radius: 3px;
}

.metric button span {
  position: relative;
  pointer-events: none;
}

.metric button span::after {
  content: '';
  width: 8px;
  position: absolute;
  top: 11px;
  left: -20px;
  border-bottom: 1px solid #fff;
  transform: rotate(45deg);
  transition: transform .15s ease-in-out;
}

.metric button span:before {
  content: '';
  width: 8px;
  position: absolute;
  border-bottom: 1px solid #fff;
  transform: rotate(-45deg);
  top: 11px;
  left: -15px;
  transition: transform .15s ease-in-out;
}

.metric button.open span:before {
  transform: rotate(45deg);
}

.metric button.open span:after {
  transform: rotate(-45deg);
}

.value-good {
  color: #52b94f;
}

.value-mid {
  color: #ffaa33;
}

.value-bad {
  color: #E8547C;
}

.metric .metricTitle {
  min-width: 90px;
  max-width: 90px;
  width: 100%;
  min-height: 90px;
}

.metric .key {
  font-weight: bold;
  font-size: 36px;
}

.metric .result {
  font-size: 16px;
  display: none;
}

.metric .value {
  font-weight: bold;
  font-size: 22px;
}

.graph {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  min-height: 90px;
  position: relative;
  background: #666;
  border-radius: 3px;
  padding: 5px 5px 0 5px;
  width: 100%;
}

.graph > div {
  width: calc(100% / 20);
  margin: 0 0 0 1px;
  min-width: 1px;
  background: #999;
  display: none;
}

.graph > div.graph-good:hover {
  background: #52b94f;
  color: #52b94f;
}

.graph > div.graph-mid:hover {
  background: #ffaa33;
  color: #ffaa33;
}

.graph > div.graph-bad:hover {
  background: #E8547C;
  color: #E8547C;
}

.graph > div:hover:before {
  content: attr(data-date);
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 12px;
  color: #fff;
  background: #333;
  padding: 5px;
  border-radius: 3px;
}

.graph > div:hover:after {
  content: attr(data-value);
  position: absolute;
  top: 5px;
  left: 5px;
  font-size: 12px;
  background: #333;
  padding: 5px;
  border-radius: 3px;
}

.urlTitle {
  color: #d52055;
}

p, h1, h2 {
  margin: 0 0 30px 0;
}

.histogram {
  display: flex;
  align-items: stretch;
  height: 50px;
  background: #666;
  border-radius: 3px;
}

.histogram > * {
  padding: 0 0 0 10px;
  overflow: hidden;
  display: none;
  align-items: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  position: relative;
}

.histogram > *:active {
  min-width: 50px;
}

.histogram > *:after {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 20px;
}

.histogram-good {
  background: #52b94f;
  border-radius: 3px 0 0 3px;
  color: #000;
}

.histogram-good:after {
  content: '';
  background: linear-gradient(90deg, rgba(82, 185, 79, 0) 0%, rgba(82, 185, 79, 1) 100%);
}

.histogram-mid {
  background: #fa3;
  color: #000;
}

.histogram-mid:after {
  content: '';
  background: linear-gradient(90deg, rgba(255, 170, 51, 0) 0%, rgba(255, 170, 51, 1) 100%);
}

.histogram-bad {
  background: #E8547C;
  border-radius: 0 3px 3px 0;
  color: #000;
}

.histogram-bad:after {
  content: '';
  background: linear-gradient(90deg, rgba(232, 84, 124, 0) 0%, rgba(232, 84, 124, 1) 100%);
}

.history {
  display: flex;
  flex-direction: column-reverse;
  gap: 20px;
  margin: 10px 0 0 0;
}

.history .histogram {
  height: 30px;
  font-size: 12px;
  margin-top: 20px;
  position: relative;
}

.history .histogram:before {
  content: attr(data-date);
  position: absolute;
  top: -20px;
  right: 0;
  color: #fff;
}

.history .histogram:after {
  content: attr(data-value);
  position: absolute;
  top: -20px;
}

.hide {
  display: none;
}

@media screen and (min-width: 600px) {
  .form {
    flex-direction: row;
  }

  .form input {
    border-radius: 3px 0 0 3px;
  }

  .form button {
    border-radius: 0 3px 3px 0;
  }

  .metric .title {
    flex-direction: row;
    justify-content: space-between;
    gap: 50px;
  }

  .graph > div,
  button {
    cursor: pointer;
  }

  .metric button:hover {
    background: rgba(255, 255, 255, .2);
  }
}
