@media print {
  @page {margin:2cm; size:auto; }
  
  * {background-image: none !important;}
  
  #contents, div.ad, button {display:none;}
  
  a {text-decoration:none; color:inherit;}
  
  a[href]:after {
  content: " (" attr(href) ")";
  font-size:90%;
  color:#333;
  }
  
  table, figure {page-break-inside:avoid;}
}