article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
nav,
section {
  display: block;
}
.container {
	max-width:1170px;
	margin:0 auto;
	padding:0px 15px;
}
html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
      -ms-text-size-adjust: 100%;
}

button,
input,
select,
textarea {
  margin: 0;
  font-size: 100%;
  vertical-align: middle;
}

button,
input {
  *overflow: visible;
  line-height: normal;
}

button::-moz-focus-inner,
input::-moz-focus-inner {
  padding: 0;
  border: 0;
}

button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
  cursor: pointer;
  -webkit-appearance: button;
}

a {
  color: #0088cc;
  text-decoration: none;
}

a:hover {
  color: #005580;
  text-decoration: underline;
}

input[type='number'] {
  text-align: right;
}


#header {
  border-bottom: 1px solid #999;
}
#header h1 {
  padding: 20px 20px 15px 20px;
  margin: 0;
  border-bottom: 1px solid #999;
}
#footer {
  background: #ccc;
  border-top: 1px solid #999;
  line-height: 70px;
  padding: 0 20px;
  color: #333;
  margin-top: 30px;
}

#content {
  overflow: hidden;
  padding: 0 20px;
}

#form {
  background: #ccc;
  color: #333;
  padding: 10px 20px;
  overflow: hidden;
}
#form fieldset {
  float: left;
  border: none;
  padding: 0;
  overflow: hidden;
  background: #eee;
  padding: 0 10px;
  margin-left: 10px;
  line-height: 35px;
}
#form fieldset:first-child {
  margin-left: 0;
}
#form div {
  margin-left: 15px;
  float: left;
  overflow: hidden;
}
#form div:first-child {
  margin-left: 0;
}
#form label {
  margin-right: 5px;
}
#form input[type='number'],
#form input[type='text'] {
  width: 60px;
}

.group {
  clear: left;
  overflow: visible;
}

.swatch {
  display: block;
  position: relative;
  float: left;
  width: 10%;
  margin-left: 1.25%;
  margin-bottom: 10px;
}
.swatch:first-child {
  margin-left: 0;
}
.swatch .col {
  display: block;
  width: 100%;
  height: 120px;
  transition: background 1s;
  -webkit-transition: background 1s;
}

.swatch .details {
  position: absolute;
  opacity: 0;
  top: 30px;
  left: 0px;
  right: 0px;
  bottom: 30px;
  white-space: nowrap;
  overflow: hidden;
  background: rgba(255, 255, 255, .6);
  transition: opacity 1s;
  -webkit-transition: opacity 1s;
}
.swatch:hover .details,
.show-labels .swatch .details {
  opacity: 1;
}

.swatch .rgb,
.swatch .hsl,
.swatch .hex {
  display: block;
  font-size: .8em;
  text-align: center;
  line-height: 20px;
  color: black;
}

.swatch a:hover {
  box-shadow: 2px -2px 0 white, -2px 2px 0 white, -2px -2px 0 white, 2px 2px 0 white, 4px -4px 0 blue, -4px 4px 0 blue, -4px -4px 0 blue, 4px 4px 0 blue;
  transition: box-shadow .5s;
}

.swatch:nth-child(8n+5) {
  box-shadow: 2px -2px 0 white, -2px 2px 0 white, -2px -2px 0 white, 2px 2px 0 white, 4px -4px 0 black, -4px 4px 0 black, -4px -4px 0 black, 4px 4px 0 black;
}

@media (max-width: 980px) {
  .swatch {
    width: 18%;
    margin-left: 2%;
  }
  
  .swatch:nth-child(8n+2),
  .swatch:nth-child(8n+2),
  .swatch:nth-child(8n+8),
  .swatch:nth-child(8n+9) {
    display: none;
  }
  
  .swatch .col {
    height: 80px;
  }
  
  .swatch .details {
    opacity: 1;
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
  }

  #labels-fieldset {
    display: none;
  }

  #form fieldset {
    float: none;
    clear: left;
    margin-left: 0;
  }
}

@media (max-width: 550px) {
  #header h1 {
    font-size: 18px;
    padding: 10px;
    white-space: nowrap;
  }
  
  #form {
    padding: 10px;
    background: #eee;
  }
  
  #form fieldset {
    padding: 5px 0;
    background: transparent;
    white-space: nowrap;
  }
  
  #content {
    padding: 0 10px;
  }
  
  #footer {
    line-height: 30px;
    white-space: nowrap;
    background: #eee;
  }
  
  .swatch .details {
    display: none;
  }
}
