* {
  zbox-sizing: border-box;
}

@media print {
  @page {size: portrait;}

  .noprint {
    display: none;
  }

  #Main, td.DReport {
    border: none;
    padding: 0;
  }

  #DReport {
    border: none;
    width: 7.5in;
  }

  html, body {
    overflow: hidden;
  }
}

@media screen {
  #DReport {
    background: white;
    height: 95%;
    overflow-y: auto;
    margin: auto;
    padding: 0.25in;
    width: 8in;
  }

  div.arches {
    display: none;
  }

  html, body {
    background: #ccc;
    height: 100%;
    margin: 0;
    overflow-y: hidden;
    padding: 0;
  }
}

:root {
  -webkit-print-color-adjust: exact;
}

body, table {
  font: 9pt arial;
}

table {
  border: 1px solid black;
  border-spacing: 0;
}

td,th {
  border-bottom: 1px solid #bbb;
  border-right: 1px solid #ddd;
  padding: 0.2em 0.5em;
}

xmp {
  display: none;
}

u {
  color: darkblue;
}

u:hover {
  color: green;
  cursor: pointer;
}

p {
  margin-top: 0;
}

.Bar {
  background: #eee;
  border: 1px solid #666;
  border-top: none;
  bottom: 0px;
  height: 160px;
  height: 0px;
  left: 15%;
  opacity:0.8;
  position: absolute;
  width: 70%;
  transform: rotate(180deg);
  transform-origin: 50% 50%;
  zbox-shadow: 2px 1px 1px #666;
}

#STable {
  background: white;
  border-spacing: 0;
  margin: auto;
}

#STable th {
  background: #def;
}

#Key {
  float: right;
  margin: 0.5em 0;
}

#Key th {
  border: none;
  width: 4em;
}

#Main {
  background: white;
  height: 99%;
  width: 1200px;
  overflow: hidden;
  margin: auto;
}

#Main table > td {
  height: 100%;
  width: 50%;
  padding: 0;
}

#DSummary {
  clear: both;
  height: 90%;
  overflow-x: hidden;
  overflow-y: auto;
}

#DSummary table {
  font: 13px Arial;
  width: 100%;
}

#DSummary td {
  padding: 0.2em;
}

#leftbars {
  border: none;
  border: 1px solid black;
  float: left;
  width: 48%;
}

#rightbars {
  border: none;
  border: 1px solid black;
  float: left;
  margin-left: 3%;
  width: 48%;
}

#rightbars td, #leftbars td {
  height: 1px;  //whatever
}

#DSummary tr:nth-of-type(4) td:nth-of-type(1), #DSummary tr:nth-of-type(4) td:nth-of-type(2) {
  zcolor: white;
  zbackground: purple;
}

.L {
  background: #bdf;
}

.M, .S {
  background: #cfc;
}

.H {
  background: yellow
}

.V {
  background: red;
  font-weight: bold;
  color: white;
}

.Ag {
  margin-bottom: 1em;
}

.Ag table {
  width: 100%;
}

.Ag table th {
  background: #eee;
  width: calc(100% / 9);
  font-size: 90%;
  zwhite-space: nowrap;
}

.Ag table td {
  text-align: center;
}

#STable th:not(:first-child)[colspan]::before {
  content: '';
  height: 999px;
  position: absolute;
  border-left: 1px solid black;
  left: 0;
  top: 0;
  z-index: 1;
}

#STable {
  position: relative;
  overflow: hidden;
}

#STable th {
  position: relative;
}

#DReport h1 {
  font-size: 120%;
  font-weight : bold;
  text-align: center;
  margin: 0;
}

#DReport h2 {
  font-size: 120%;
  font-weight: bold;
  margin: 0;
}

#leftbars td, #rightbars td {
  width: 20%;
}

#leftbars tr:nth-child(-n+4) {
  height: 37.5px;
}

#rightbars tr:nth-child(-n+3) {
  height: 50px;
}

#leftbars tr:nth-child(-n+4) td:nth-child(1),
#rightbars td:last-of-type {
  background: #f0f8ff;
}

#leftbars tr:nth-child(4) td:nth-child(n+2),
#rightbars tr:nth-child(3) td:nth-child(-n+3) {
  border-right: none;
  position: relative;
}

#leftbars tr:nth-child(5),
#rightbars tr:nth-child(4) {
  font-size: 9pt;
  text-align: center;
  background: #f0f8ff;
  height: 50px;
}

#leftbars tr:nth-child(5) td:nth-child(1),
#rightbars tr:nth-child(4) td:last-of-type {  /* Soil Test Index */
  font-size: 8pt;
}

#CaBar {
  text-align: center;
  font-style: italic;
  font-size: 9pt;
}

.f90 {
  font-size: 90%;
}

table.sample {
  width: 100%;
}

table.sample td:nth-child(1),
table.sample td:nth-child(3) {
  width: 40%;
}

table.sample i {
  font-weight: bold;
  color: #888;
}

table.sample .contact {
  zfloat: right;
  ztext-align: right;
  margin: 0.5em 0;
}

table.sample td > div:not(.islab):not(.iscounty) {
  padding: 0.5em;
  zwhite-space: nowrap;
}

#iName {
  font-weight: bold;
}

.iscounty, .islab {
  display: none;
}

.iscounty div, .islab div {
  padding: 0.5em;
  zwhite-space: nowrap;
}

.labinfo {
  white-space: nowrap;
}

div.arches img {
  height: 52px;
}

div.arches {
  font-size: 10px;
  text-decoration: overline;
}

h2.results {
  float: left;
}

#leftbars {
  clear: both;
}

td.inputs {
  background: #eee;
  width: 50%;
}

td.inputs input:focus {
  background: yellow;
}

#Main td:nth-child(1) {
  border-right: ridge;
}

.inputs fieldset {
  display: inline-block;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 100%;
  box-sizing: border-box;
}

.inputs fieldset input, .inputs fieldset select {
  width: 100%;
}

fieldset.City {
  width: 50%;
}

fieldset.State {
  width: 15%;
}

fieldset.Zip {
  width: 30%;
}

fieldset {
  margin-bottom: 0.5em;
}

fieldset.Yield {
  width: 15em;
}

#Yield {
  width: 4em;
}

fieldset td:nth-child(1) {
  text-align: right;
  padding-right: 0;
}

fieldset table {
  width: 100%;
  border: none;
}

fieldset table td {
  border: none !important;
}

#Zip {
  width: 5em;
}

#City {
  width: 15em;
}

#State {
  width: 5em;
}

#Phone {
  width: 10em;
}

#Email {
  width: 20em;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

fieldset th {
  background: #def;
}

fieldset.soiltest table {
  border: 1px solid black;
}

div.comment {
  color: gray;
}

tr.summary {
  height: 100%;
  background: #f4f4f4;
}

tr.summary td:nth-child(n+3) {
  white-space: nowrap;
}

h3 {
  font: bold 110% verdana;
  color: #bdf;
  background: #333;
  margin: 0;
  padding: 0.3em;
  border-radius: 3px;
  margin-bottom: 0.5em;
}

#STable tr:hover {
  outline: 1px solid green;
  cursor: pointer;
}

.output {
  width: 50em;
  white-space: normal;
}