*, *::before, *::after { box-sizing: border-box; }

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: #138240;

  font-size: 20px;
  font-family: "Open Sans", sans-serif;
  color: #fff;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Zilla Slab", "Open Sans", sans-serif;
  font-weight: 600;
  color: #333;
}

a {
  text-decoration: none;
  color: #242323;
}
a:hover,
a:focus,
a:active { border-bottom: 2px solid currentColor; }

img {
  max-width: 100%;
  height: auto;
}

strong { font-weight: 600; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.block-center {
  display: block;
  margin-right: auto;
  margin-left: auto;
}

/* Table border styling */
.table-center {
  margin: auto;
}

.optimal td {
  background-color: #62ba42;
}

table, td, tr {
  text-align: center;
}

table { border-spacing: 0; }
th, td {
  border-color: #333;
  border-style: solid;
  border-top-width: 2px;
  border-right-width: 1px;
  border-bottom-width: 0;
  border-left-width: 1px;
}

tr:last-of-type td { border-bottom-width: 2px; }
tr th:first-of-type,
tr td:first-of-type { border-left-width: 2px; }
tr th:last-of-type,
tr td:last-of-type { border-right-width: 2px; }

th {
  padding: 0.4em 0.5em;
  background-color: #00963D;
  font-family: "Zilla Slab", "Open Sans", sans-serif;
  font-weight: 600;
  font-size: 0.95em;
}

th:first-of-type { border-top-left-radius: 2px; }
th:last-of-type { border-top-right-radius: 2px; }
tr:last-of-type td:first-of-type { border-bottom-left-radius: 2px; }
tr:last-of-type td:last-of-type { border-bottom-right-radius: 2px; }

td {
  padding: 0.4em 0.5em;
  background-color: #eee;
  font-size: 0.95rem;
  color: #242323;
}

nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  position: fixed;
  width: 100%;
  min-height: 3.5em;
  top: 0;
  left: 0;
  z-index: 2;
  background-color: #00963d;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.4);
  font-size: 1em;
}

nav ul {
  list-style-type: none;
  margin: 0;
}

nav li {
  display: inline-block;
  margin-right: 0.6em;
  margin-left: 0.6em;
}

nav a {
  font-family: "Zilla Slab", "Open Sans", sans-serif;
  font-weight: 600;
  color: #eaeaea;
}

nav a.active,
nav a:hover,
nav a:focus,
nav a:active,
#content a {
  border-bottom: 2px solid currentColor;
}

#wrapper {
  position: relative;
  top: 4em;
}

header {
  text-align: center;
}

#site-logo {
  margin-bottom: -1.5em;
}

main {
  padding-top: 0.2em;
  padding-bottom: 2em;
  background-color: #2dad60;
  text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2);
}

main > #content {
  width: 80vw;
  margin-right: auto;
  margin-left: auto;
}

#content a {
  padding-right: 0.1em;
  padding-left: 0.1em;

  background-color: rgba(255, 255, 255, 0.25);

  font-family: "Zilla Slab", "Open Sans", sans-serif;
  font-size: 1.15em;
  font-weight: 600;
  text-shadow: 1px 1px 1px #eee;
}
#content a:hover,
#content a:focus,
#content a:active {
  border-bottom: none;
  background-color: transparent;
}

.page-title {
  padding-top: 0;
  margin-top: 0;
  text-align: center;
}

.box-wrapper {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
}

.box {
  display: inline-flex;
  flex-direction: column;
  min-width: 14.5em;
  width: 32%;
  margin-top: 0.5em;
  margin-bottom: 1em;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  background-color: #eee;
  border-radius: 2px;
}

.box > .header {
  padding: 0.4em 0.5em;
  background-color: #00963D;
  font-family: "Zilla Slab", "Open Sans", sans-serif;
  font-weight: 600;
  font-size: 0.95em;
  text-align: center;
}

.box > .body {
  padding-right: 0.6em;
  padding-left: 0.6em;
  font-size: 0.95rem;
  color: #242323;
  text-align: center;
}

.big-box {
  width: 80%;

  margin-top: 1em;
  margin-right: auto;
  margin-left: auto;

  background-color: #eee;
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.big-box > .header {
  padding: 0.4em 0.5em;
  background-color: #00963D;
  font-family: "Zilla Slab", "Open Sans", sans-serif;
  font-weight: 600;
  font-size: 0.95em;
  text-align: center;
}

.big-box > .body {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: center;
  align-items: baseline;

  padding-right: 0.6em;
  padding-left: 0.6em;
  font-size: 0.95rem;
  color: #242323;
}

/* Form Styles  */
.btn-submit {
  font-family: inherit;
  font-size: 20px;
  box-shadow: none;
  color: #fff;
  background-color: #00963D;
  border: 2px solid #333;
  border-radius: 2px;
  cursor: pointer;
  margin-top: 0.3em;
  margin-bottom: 1em;
  padding: 0.35em;
  width: 100%;
}

.btn-submit:hover {
  background-color: inherit;
  color: #333;
}

.form-group input {
  font-family: inherit;
  padding: 0.8em 0.2em;
  width: 100%;
  font-size: 1rem;
  border-radius: 2px;
  border-color: transparent;
}

label[for="input-updates"] { display: inline; }
.form-group .check {
  display: inline;
  width: auto;
}

.input-required { color: red; }

label {
  display: block;
  font-size: 20px;
}
.form-group:nth-child(6) label { display: inline; }
.form-group { padding: 5px; }

.rightForm, form {
  width: 50%;
  padding: 0.6em;
}

.howto { font-size: 20px; }

.result-msg-box {
  width: 100%;
  text-align: left;
  padding-left: 15px;
  margin-top: 1em;
  background-color: #00963D;
  border: 2px solid #333;
  border-radius: 2px;
  color: #fff;
  display: none;
}
.result-msg-box.visible { display: block; }

.loud {
  background-color: #00963D;
  margin-top: 2em;
  border-radius: 2px;
  border: 2px solid #333;
}

.square {
  width: 1em;
  height: 1em;
  background-color: #62ba42;
  border: 1px solid #333;
}

.square, .goal {
  display: inline-block;
  vertical-align: middle;
}

.step, .action {
  display: inline-block;
  text-align: center;
  width: 49%;
  font-size: 1.4em;
  font-weight: 600;
}

.top {
  border-radius: 50%;
  background-color: #fff;
  width: 40px;
  height: 40px;
  color: #333;
  border: 4px solid #333;
  text-align: center;
  position: fixed;
  bottom: 0.95em;
  right: 2.5em;
  cursor: pointer;
}

.top span {
  -ms-user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  user-select: none;

  font-weight: 600;
  font-size: 1.1em;
}

.top:hover,
.top:focus,
.top:active {
  box-shadow: 0 0 2px 2px #fff;
}

.emoji { vertical-align: middle; }

footer {
  min-height: 3em;
  padding: .7em 1em;
  background-color: #333;

  font-size: 0.95rem;
  color: #fff;
}

footer a { color: inherit; }
footer .breaker {
  margin-right: 0.1em;
  margin-left: 0.1em;
}
footer .breaker::before { content: " | "; }

.page-books .box {
  width: auto;
}

@media (max-width: 800px) {
  .big-box > .body { flex-direction: column; }
  .rightForm, form { width: auto; }

  footer .breaker {
    display: block;
  }
  footer .breaker::before { content: ""; }
}

@media (max-width: 600px) {
  .top {
    right: 1em;
  }

  nav {text-align: center;}

  nav ul {padding-left: 0;}

  nav li { margin-left: 0;}

  .step, .action {
    display: inline;
  }

  .loud {
    text-align: center;
  }
  /* Responsive table */
  /* https://css-tricks.com/accessible-simple-responsive-tables/ */
  table {
    width: 100%;
    margin-right: 0;
    margin-left: 0;
  }
  th, td { display: block; }

  /* Responsive table borders */
  th, td {
    border-top-width: 2px;
    border-right-width: 2px;
    border-bottom-width: 2px;
    border-left-width: 2px;
  }
  th { border-bottom-width: 0px;}

  tr:last-of-type td { border-bottom-width: 0px; }
  tr:last-of-type td:last-of-type { border-bottom-width: 2px; }

  th:first-of-type {
    border-top-left-radius: 2px;
    border-top-right-radius: 2px;
  }
  th:last-of-type { border-top-right-radius: 0; }

  /* Pricing table-specific  */
  .table-pricing tr td { border-bottom-width: 0; }
  .table-pricing tr td:last-child { border-bottom-width: 2px; }
  .table-pricing td:last-of-type { margin-bottom: 1em; }

  .table-pricing td { text-align: right; }
  .table-pricing td::before { float: left; }
  .table-pricing td:nth-child(1) { background-color: #62ba42; }
  .table-pricing td:nth-child(1)::before { content: "Books: "; }
  .table-pricing td:nth-child(2)::before { content: "Cost: "; }
  .table-pricing td:nth-child(3)::before { content: "Advertiser Cost: "; }
  .table-pricing td:nth-child(4)::before { content: "Resale Cost: "; }
  .table-pricing td:nth-child(5)::before { content: "Potential Profit: "; }

  .big-box { width: 100%; }
}
