html, body {
  height: 100%;
  margin: 0;
}

body {
  background-color: #f7f7f7;
  color: #5c5f67;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
    sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  font-size: 16px;
  line-height: 1.42857143;
  margin: 0;
  padding: 0;
}

#main {
  box-sizing: border-box;
  min-height: 100%;
}

nav {
  background-color: #2c3e4f;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2);
  color: #f7f7f7;
  min-height: 50px;
  padding: 5px 20px 0;
  font-size: 18px;
  line-height: 42px;
  box-sizing: border-box;
}

main {
  padding: 20px 20px 150px;
}

header {
  text-align: center;
}

h1 {
  margin-bottom: 0;
}

table {
  background-color: white;
  border-collapse: collapse;
  border-spacing: 0;
  box-sizing: border-box;
  max-width: 100%;
  width: 100%;
}

tr.placeholder {
  background-color: lightgray;
}

tr.checked {
  background-color: lightblue;
}

th {
  padding: 8px;
  text-align: left;
  vertical-align: bottom;
}

td {
  border-top: 1px solid #ddd;
  padding: 8px;
  vertical-align: top;
}

td:first-child {
  width: 40px;
}

.list {
  max-height: 190px;
  overflow-y: auto;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

li > ul {
  padding-left: 2em;
}

input[type='checkbox'] {
  transform: scale3d(1.3, 1.3, 1.3);
}

input[type='search'],
input[type='text'],
input[type='number'] {
  border: 0;
  border-bottom: 2px solid #eaeaea;
  border-radius: 0;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  box-shadow: none;
  box-sizing: border-box;
  color: #5c5f67;
  display: block;
  font-size: 1em;
  font-weight: 200;
  margin-bottom: 5px;
  outline: none;
  padding: 12px 12px;
  text-align: left;
  transition: border-bottom .3s;
  width: 100%;
}

input[type='search']:focus,
input[type='text']:focus,
input[type='number']:focus {
  border-bottom: 2px solid #79b17d;
}

input[type='search']:focus,
input[type='text']:focus,
input[type='number']:focus,
input[type='search']:hover,
input[type='text']:hover,
input[type='number']:hover {
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
}

.search {
  margin-bottom: 15px;
  position: relative;
}

.search--results {
  box-shadow: 0 0 1px rgba(0, 0, 0, .5);
  position: absolute;
  width: 100%;
  z-index: 1;
}

.search--results button {
  background-color: white;
  border: 0;
  color: #5c5f67;
  cursor: pointer;
  display: block;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  margin: 0;
  padding: .75em 1em;
  text-align: left;
  width: 100%;
}

.search--results button:hover {
  background-color: #eaeaea;
}

.inline-btn {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: inline;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  margin: 0;
  padding: 0;
}

.inline-btn svg {
  height: .8em;
  width: .8em;
}

.inline-btn circle,
.inline-btn path {
  fill: none;
  stroke: #5c5f67;
  transition: stroke 250ms;
}

.inline-btn:hover circle,
.inline-btn:hover path {
  stroke: #8f929a;
}

.weights {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.weights label {
  flex-basis: calc(20% - 10px);
}

.coloring {
  margin-top: .5em;
}

.coloring button {
  background: white;
  border: solid 1px #8f929a;
  border-right: none;
  cursor: pointer;
  display: inline;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  margin: 0;
  padding: 3px 10px;
  width: 8em;
}

.coloring button:first-child {
  border-top-left-radius: 3px;
  border-bottom-left-radius: 3px;
}

.coloring button:last-child {
  border-right: solid 1px #8f929a;
  border-top-right-radius: 3px;
  border-bottom-right-radius: 3px;
}

.coloring button:hover {
  background-color: #ddd;
}

.coloring button[aria-current="true"] {
  background-color: #2c3e4f;
  color: white;
}

.popover {
  background-color: white;
  border: black solid 1px;
  border-radius: 3px;
  color: #333;
  font-size: .8em;
  opacity: 0;
  padding: 2px 10px;
  pointer-events: none;
  position: absolute;
}

.popover.show {
  animation: popover 300ms forwards;
}

.popover--caret {
  background-color: white;
  border-right: black solid 1px;
  border-top: black solid 1px;
  top: -7px;
  content: '';
  height: 12px;
  left: 35px;
  position: absolute;
  transform: rotate(-45deg);
  width: 12px;
}

.popover--content {
  position: relative;
}

@keyframes popover {
  from { opacity: 0; }
  to { opacity: 1; }
}

footer {
  background-color: #2c3e4f;
  box-shadow: inset 0 2px 2px rgba(0, 0, 0, .4);
  color: #f7f7f7;
  text-align: center;
  height: 130px;
  margin-top: -130px;
}

footer p {
  box-sizing: border-box;
  margin: 0;
  padding: 42px 0 10px;
}

footer a, footer a:hover {
  color: #f7f7f7;
}
