:root {
  --tap-scale: 0.98;
}

/* spec 20.1., 20.3., 20.4., 20.5., 20.6., 20.7., 20.8., 20.9., 20.10., 20.11. */
button {
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 3px 7px;
  border: none;
  border-radius: 5px;
  outline: none;
  box-shadow:
    0 0.5px 2.5px 0 rgba(0, 0, 0, 0.3),
    0 0 0 0.5px rgba(0, 0, 0, 0.05);
  font-size: 14px;
  line-height: 19px;
  letter-spacing: -0.2px;
  font-weight: 525;
  -webkit-user-select: none;
  user-select: none;
  cursor: pointer;
  background-color: black;
  background-image:
    linear-gradient(to bottom,
    rgba(255, 255, 255, 0.3),
    rgba(255, 255, 255, 0));
  color: white;
  transition: all var(--transition-duration) var(--transition-easing);
}

/* spec 20.2. */
button.secondary {
  background-color: white;
  background-image: none;
  color: black;
  font-weight: 475;
}

/* spec 20.13. */
button:active:hover,
button:focus-visible {
  background-color: #3a3a3a;
}

/* spec 20.14. */
button.secondary:active:hover,
button.secondary:focus-visible {
  background-color: #eee;
}

/* spec 20.15., 20.16. */
button:active:hover,
button:focus-visible:active {
  transform: scale(var(--tap-scale));
}

/* spec 20.12. */
button:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

/* spec 20.17., 20.18. */
@media (hover: none) and (pointer: coarse) {
  button {
    font-size: 14.5px;
    line-height: 20px;
    font-weight: 550;
  }

  button.secondary {
    font-weight: 500;
  }

  /* spec 20.15. */
  button:active {
    transform: scale(var(--tap-scale));
  }
}
