body {
  font: 14px/18px Helvetica Neue, Helvetica, Arial, sans-serif;
  background-color: #fff;
}

table.model td {
  padding: 3px;
}

div.picture {
  display: inline-block;
  vertical-align: top;
  margin: 20px;
}

#content {
  margin: 0 1em;
  display: inline-block;
  vertical-align: top;
  max-width: 550px;
}

form#model {
  padding: 1em;
  border: 3px solid #177fe3;
}

input[type='number'] {
  width: 2rem;
  height: 1rem;
}

input[type='submit'], input[type='reset'] {
  -webkit-appearance: button;
  background: #eee;
  text-align: center;
  vertical-align: middle;
  outline: none;
  border: none;
  height: 1.8rem;
  padding: 0 1rem;
  font-size: 0.875rem;
  margin: 0.8rem 0.16rem 0.16rem 0.16rem;
  cursor: pointer;
}

input[type='submit'] {
  background: #177FE3;
  color: #fff;
}

input[type='submit']:hover {
  background: #0074E3;
}

input[type='reset']:hover {
  background: #e7e7e7;
}

h1 {
  color: #0074E3;
  letter-spacing: -0.05em;
  font-weight: normal;
  font-size: 30px;
  line-height: 30px;
}

h2 {
  letter-spacing: -0.04em;
  font-weight: normal;
  font-size: 16px;
  line-height: 16px;
}

abbr {
  border-bottom: 1px dotted #666;
  font-variant: normal;
  cursor: help;
}

.units {
  color: #777;
  font-size: 90%;
}

img {
  border: none;
}

.credit {
  margin: 2em 0;
}

.credit, .credit ol li {
  font-size: smaller;
  color: #888;
}

#results, #results2 {
  display: none;
}

.result {
  color: #177FE3;
}

/* Responsive */

@media (max-width:1020px) {
  div.picture, div#content {
    display: block;
    max-width: auto;
    margin: 20px auto;
  }

  div.picture img {
    width: 25%;
    margin: 0 auto;
    display: block;
  }
}

@media (max-width:479px) {
  div.picture img {
    width: 20%;
  }

  #content {
    margin: 5px;
  }
}

/* http://osvaldas.info/elegant-css-and-jquery-tooltip-responsive-mobile-friendly */

#tooltip
{
  font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
  font-size: 0.875em;
  text-align: center;
  text-shadow: 0 1px rgba( 0, 0, 0, .5 );
  line-height: 1.5;
  color: #fff;
  background: #333;
  background: -webkit-gradient( linear, left top, left bottom, from( rgba( 0, 0, 0, .7 ) ), to( rgba( 0, 0, 0, .9 ) ) );
  background: -webkit-linear-gradient( top, rgba( 0, 0, 0, .7 ), rgba( 0, 0, 0, .9 ) );
  background: -moz-linear-gradient( top, rgba( 0, 0, 0, .7 ), rgba( 0, 0, 0, .9 ) );
  background: -ms-radial-gradient( top, rgba( 0, 0, 0, .7 ), rgba( 0, 0, 0, .9 ) );
  background: -o-linear-gradient( top, rgba( 0, 0, 0, .7 ), rgba( 0, 0, 0, .9 ) );
  background: linear-gradient( top, rgba( 0, 0, 0, .7 ), rgba( 0, 0, 0, .9 ) );
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  border-radius: 5px;
  border-top: 1px solid #222;
  -webkit-box-shadow: 0 3px 5px rgba( 0, 0, 0, .3 );
  -moz-box-shadow: 0 3px 5px rgba( 0, 0, 0, .3 );
  box-shadow: 0 3px 5px rgba( 0, 0, 0, .3 );
  position: absolute;
  z-index: 100;
  padding: 15px;
}

#tooltip:after
{
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #333;
  border-top-color: rgba( 0, 0, 0, .8 );
  content: '';
  position: absolute;
  left: 50%;
  bottom: -10px;
  margin-left: -10px;
}

#tooltip.top:after
{
  border-top-color: transparent;
  border-bottom: 10px solid #333;
  border-bottom-color: rgba( 0, 0, 0, .6 );
  top: -20px;
  bottom: auto;
}

#tooltip.left:after
{
  left: 10px;
  margin: 0;
}

#tooltip.right:after
{
  right: 10px;
  left: auto;
  margin: 0;
}
