* {
  box-sizing: border-box;
}

.hidden {
  background: green !important;
  color: blue !important;
}

sub {
  vertical-align: baseline;
  font-size: 70%;
}

h4 {
  font-size: 120%;
}

.Main:first-of-type {
  display: none;
}

div.lab {
  position: absolute;
  right: 0.25in;
}

iframe {
  /* float: right; */
  position: absolute;
  top: 0;
  right: 0;
  /* height: 1500%; */
  width: calc(100% - 8in);
  max-width: 9in;
}

.target65,
.graph,
#Comment970,
#Comment-CaBS,
#Organic {
  display: none;
}

.calculator {
  float: right;
  font-size: 95%;
  background: #eee;
  border: 1px solid #aaa;
  padding: 0.3rem;
}

#Comments,
#FactSheet {
  line-height: 1.1rem;
}

@media print {
  body {
    zoom: 100%;
  }

  section {
    page-break-inside: avoid; 
  }

  #Sections section {
    min-height: 100vh;
  }

  .noprint,
  nav {
    display: none;
  }

  .Main, td.DReport {
    border: none;
    padding: 0;
  }

  #DReport {
    border: none;
  }

  iframe {
    display: none !important;
  }
}

section {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto; /* Define the grid layout */
}

.content {
  zflex-grow: 1;
}

footer {
  position: absolute;
  width: 100%;
  bottom: 5px;
  text-align: center;
  color: #444;
}

@media screen {
  div.lab {
    top: 0.3in;
  }

  nav {
    padding: 0.3rem;
    position: fixed;
    top: 0;
    width: 100vw;
    background: #eef;
    border: 1px solid #ddd;
    height: 2rem;
    z-index: 2;
  }

  section {
    padding-bottom: 1rem;
  }
  
  iframe {
    margin-top: -2rem;
  }

  section {
    height: 11in;
    /* max-height: 10.5in; */
    margin: 0.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 2px;
  }

  section + section {
    margin-bottom: 2rem;
  }
  
  #DReport, #Organic, #FactSheet, #Summary, #PeggingZone {
    background: white;
    height: 95%;
    overflow-y: auto;
    padding: 0.3in;
    width: 8in;
  }

  html, body {
    background: #ccc;
    height: 100%;
    margin: 0;
    /* overflow-y: hidden; */
    padding: 0;
  }
}

:root {
  print-color-adjust: exact;
  -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;
}

section {
  /* page-break-before: always; */
}

.Bar {
  background: #eee;
  border: 1px solid #666;
  border-top: none;
  bottom: 0px;
  height: 0px;
  left: 15%;
  opacity:0.8;
  position: absolute;
  width: 70%;
  transform: rotate(180deg);
  transform-origin: 50% 50%;
  zbox-shadow: 2px 1px 1px #666;
}

.Main {
  background: white;
  max-width: 8in;
  /* width: 1200px; */
  /* overflow: hidden; */
  /* margin: auto; */
}

.Main table > td {
  height: 100%;
  width: 50%;
  padding: 0;
}

.leftbars {
  clear: both;
  border: none;
  border: 1px solid black;
  float: left;
  width: 49%;
}

.leftbars td:nth-child(1) {
  border-right: 1px solid #888;
}

.rightbars td:nth-last-child(1) {
  border-left: 1px solid #888;
}

.rightbars {
  border: none;
  border: 1px solid black;
  float: right;
  width: 49%;
}

.rightbars td, .leftbars td {
  height: 1px;  /* whatever */
}

.Agronomic {
  margin-bottom: 1em;
  display: none;
}

.Agronomic table {
  width: 100%;
}

.Agronomic table th {
  background: #eee;
  width: calc(100% / 9);
  font-size: 90%;
  white-space: nowrap;
}

.Agronomic table td {
  text-align: center;
}

#DReport h1, #PeggingZone h1 {
  font-size: 140%;
  font-weight: bold;
  text-align: center;
  margin: 0;
  clear: both;
}

#DReport h1 {
  margin-bottom: -0.5rem;
}

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%;
  line-height: 1rem;
}

table.sample td:nth-child(1) { width: 50%; }
table.sample td:nth-child(2) { width: 20%; }
table.sample td:nth-child(3) { width: 30%; }

table.sample i {
  font-weight: bold;
  color: #888;
}

table.sample .contact {
  float: right;
  text-align: right;
  margin: 0em 0;
}

#iName {
  font-weight: bold;
}

.iscounty, .islab {
  display: none;
}

.labinfo {
  white-space: nowrap;
}

div.arches img {
  height: 52px;
}

div.arches {
  font: 15.5px times new roman;
  text-decoration: overline;
}

h2.results {
  float: left;
}

td.inputs {
  background: #eee;
  width: 50%;
}

td.inputs input:focus {
  background: yellow;
}

.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;
}

.output {
  width: 50em;
  white-space: normal;
}

label {
  cursor: pointer;
}

@page {
  size: portrait;
  margin: 0.3in;
}

#Print {
  float: right;
  margin-right: 2rem;
}

#Summary {
  background: white;
  display: none;
}

#Summary .data tr > * {
  height: 1.2rem !important;
}

#Summary .data tr.lab,
#Summary .data tr.sample {
  background: #f8f8f8;
}

#Summary .data tr.sample > * {
  border-bottom: 1px solid black;
}

#Summary .data tr.lab > :nth-child(1),
#Summary .data tr.sample > :nth-child(1) {
  text-align: right;
  vertical-align: top;
}

#Summary .data td:nth-child(n + 3) {
  text-align: right;
}

#Summary .data td:nth-child(1) {
  white-space: nowrap;
}

#Summary .nosummary, #PeggingZone .nosummary {
  display: none;
}

#Summary h1,
#Summary h2 {
  margin: 0;
  text-align: center;
  background: white;
  color: black;
}

#Summary h3 {
  margin: 0;
  background: white;
  color: black;
}

#Summary table.sdata {
  margin-bottom: 1rem;
  width: 0;
}

#Summary:has(table.sdata:nth-child(2)) table.sdata td:nth-child(n + 3) {
  min-width: 4rem;
}

span.parm {
  display: inline-block;
  white-space: nowrap;
  width: 1.5rem;
}

#PeggingZone {
  background: white;
  display: none;
}

#PeggingZone table.data {
  width: auto;
  margin: auto;
  margin-top: 1rem;
}

#PeggingZone table.data td:nth-child(n + 3) {
  text-align: center;
}

#PeggingZone table.data th {
  border-bottom: 1px solid black;
}