th, td {
  border-width: 1px;
  padding: 0.5em;
  position: relative;
  text-align: left;
  border-radius: 0.25em;
  border-style: solid;
}

table.balance:after, table.meta:after {
  clear: both;
  content: "";
  display: table;
}

.cut, .add {
  border-width: 1px;
  display: block;
  font-size: 0.8rem;
  padding: 0.25em 0.5em;
  float: left;
  text-align: center;
  width: 0.6em;
  background: #9af;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  background-image: -moz-linear-gradient(#00adee 5%, #0078a5 100%);
  background-image: -webkit-linear-gradient(#00adee 5%, #0078a5 100%);
  border-radius: 0.5em;
  border-color: #0076a3;
  color: #fff;
  cursor: pointer;
  font-weight: bold;
  text-shadow: 0 -1px 2px rgba(0, 0, 0, 0.33);
}

* {
  border: 0;
  box-sizing: content-box;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-style: inherit;
  font-weight: inherit;
  line-height: inherit;
  list-style: none;
  margin: 0;
  padding: 0;
  text-decoration: none;
  vertical-align: top;
}

*[contenteditable] {
  border-radius: 0.25em;
  min-width: 1em;
  outline: 0;
  cursor: pointer;
}
*[contenteditable]:hover {
  background: #def;
  box-shadow: 0 0 1em 0.5em #def;
}
*[contenteditable]:focus {
  background: #def;
  box-shadow: 0 0 1em 0.5em #def;
}

td {
  border-color: #ddd;
}
td:hover *[contenteditable] {
  background: #def;
  box-shadow: 0 0 1em 0.5em #def;
}
td:focus *[contenteditable] {
  background: #def;
  box-shadow: 0 0 1em 0.5em #def;
}

span[contenteditable] {
  display: inline-block;
}

h1 {
  font: bold 100% sans-serif;
  letter-spacing: 0.5em;
  text-align: center;
  text-transform: uppercase;
}

table {
  font-size: 75%;
  table-layout: fixed;
  width: 100%;
  border-collapse: separate;
  border-spacing: 2px;
}
table.meta {
  margin: 0 0 3em;
  float: right;
  width: 36%;
}
table.meta th {
  width: 40%;
}
table.meta td {
  width: 60%;
}
table.inventory {
  margin: 0 0 3em;
  clear: both;
  width: 100%;
}
table.inventory th {
  font-weight: bold;
  text-align: center;
}
table.inventory td:nth-child(1) {
  width: 26%;
}
table.inventory td:nth-child(2) {
  width: 38%;
}
table.inventory td:nth-child(3) {
  text-align: right;
  width: 12%;
}
table.inventory td:nth-child(4) {
  text-align: right;
  width: 12%;
}
table.inventory td:nth-child(5) {
  text-align: right;
  width: 12%;
}
table.balance {
  float: right;
  width: 36%;
}
table.balance th {
  width: 50%;
}
table.balance td {
  width: 50%;
  text-align: right;
}

th {
  background: #eee;
  border-color: #bbb;
}

html {
  font: 16px/1 "Open Sans", sans-serif;
  overflow: auto;
  padding: 0.5in;
  background: #fff;
  cursor: default;
}

body {
  box-sizing: border-box;
  height: 11in;
  margin: 0 auto;
  overflow: hidden;
  padding: 0.5in;
  width: 8.5in;
  background: #fff;
  border-radius: 1px;
  box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);
}

header {
  margin: 0 0 3em;
}
header:after {
  clear: both;
  content: "";
  display: table;
}
header h1 {
  background: #000;
  border-radius: 0.25em;
  color: #fff;
  margin: 0 0 1em;
  padding: 0.5em 0;
}
header address {
  float: left;
  font-size: 75%;
  font-style: normal;
  line-height: 1.25;
  margin: 0 1em 1em 0;
}
header address p {
  margin: 0 0 0.25em;
}
header span {
  display: block;
  float: right;
  margin: 0 0 1em 1em;
  max-height: 25%;
  max-width: 60%;
  position: relative;
}
header img {
  display: block;
  float: right;
  max-height: 100%;
  max-width: 100%;
}
header input {
  cursor: pointer;
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
  height: 100%;
  left: 0;
  opacity: 0;
  position: absolute;
  top: 0;
  width: 100%;
}

article {
  margin: 0 0 3em;
}
article address {
  margin: 0 0 3em;
  float: left;
  font-size: 125%;
  font-weight: bold;
}
article:after {
  clear: both;
  content: "";
  display: table;
}
article h1 {
  clip: rect(0 0 0 0);
  position: absolute;
}

.add {
  margin: -2.5em 0 0;
}
.add:hover {
  background: #00adee;
}

.cut {
  opacity: 0;
  position: absolute;
  top: 0;
  left: -1.5em;
  -webkit-transition: opacity 100ms ease-in;
}

@media print {
  * {
    -webkit-print-color-adjust: exact;
  }

  html {
    background: none;
    padding: 0;
  }

  body {
    box-shadow: none;
    margin: 0;
  }

  .add {
    display: none;
  }

  .cut {
    display: none;
  }

  span:empty {
    display: none;
  }
}
@page {
  margin: 0;
}
img.hover {
  background: #def;
  box-shadow: 0 0 1em 0.5em #def;
}

aside h1 {
  border: none;
  border-width: 0 0 1px;
  margin: 0 0 1em;
  border-color: #999;
  border-bottom-style: solid;
}

tr:hover .cut {
  opacity: 1;
}