:root {
  --table-light-row-color: #f8f9fa; /* Softer neutral */
  --table-light-header-color: #16784b; /* Richer green */
  --html-bk-color: #ffffff; /* Classic white */
  --text-color: #333333; /* Slightly darker for better contrast */
  --h3-bk-color: #16784b; /* Consistent with headers */
  --highlight-color-light: #dae3ff; /* More subdued blue */
  --highlight-color-dark: #ffefc2; /* Warmer highlight */
  --light-button-color: #006bb6; /* Stronger blue */
  --dark-background-color: #1e2228; /* Deeper gray-blue */
  --dark-headers-color: #14171c; /* Even darker contrast */
  --highlight-color-light: #c2d1ff; /* Cool-toned highlight */
  --highlight-color-dark: #f1cc71; /* Softer warm tones */
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--html-bk-color);
}

main {
  margin: 10px;
  padding: 10px;
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 300;
}

.center-items {
  text-align: center;
}

/* General button styling */
#backToTrees {
  padding: 15px 24px;
  font-size: 18px;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
  text-transform: capitalize;
  margin-bottom: 20px;
  background-color: var(--light-button-color);
  border: none;
  box-shadow: none;
  color: var(--html-bk-color);
}

#backToTrees:hover {
  background-color: var(--highlight-color-light);
  color: var(--text-color);
}

#trees-total {
  font-weight: bold;
}

a {
  color: blue;
  text-decoration: none;
  font-weight: 300;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}

p {
  color: var(--text-color);
  font-size: 18px;
  margin-left: 10px;
  font-weight: 300;
  letter-spacing: -0.4px;
}

h1 {
  text-align: center;
  font-size: 34px;
  padding: auto;
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  letter-spacing: -0.7px;
}

h2 {
  text-align: center;
  font-size: 30px;
  padding: auto;
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  letter-spacing: -0.7px;
}

h3 {
  background-color: var(--h3-bk-color);
  color: #fff;
  letter-spacing: 1px;
  text-align: center;
  border-radius: 6px;
  padding: 10px;
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 300;
  letter-spacing: -0.5px;
}

img {
  margin-top: 20px;
  width: 90px;
  height: 90px;
  text-align: center;
}
.center-items {
  text-align: center;
}

.link {
  font-size: 14px;
  margin-left: 10px;
}

/* first table  */

#redwood-table {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 300;
  font-size: 12px;
  border-collapse: collapse;
  width: 100%;
}

#redwood-table td,
#redwood-table th {
  border: 1px solid #ddd;
  padding: 8px;
}

#redwood-table tr:nth-child(even) {
  background-color: var(--table-light-row-color);
}

#redwood-table th {
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: left;
  background-color: var(--table-light-header-color);
  color: white;
}

#column-titles {
  font-weight: bold;
  background-color: var(--table-light-header-color);
  color: var(--table-light-row-color);
}

/* second table  */

#redwood-table2 {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 300;
  font-size: 12px;
  border-collapse: collapse;
  width: 100%;
}

#redwood-table2 td,
#redwood-table2 th {
  border: 1px solid #ddd;
  padding: 8px;
}

#redwood-table2 tr:nth-child(even) {
  background-color: #f2f2f2;
}

#redwood-table2 th {
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: left;
  background-color: #1d6f42;
  color: white;
}

#column-titles2 {
  font-weight: bold;
  background-color: #1d6f42;
  color: #f2f2f2;
}

@media (prefers-color-scheme: dark) {
  body {
    background-color: var(--dark-background-color);
    color: var(--highlight-color-dark);
  }

  #topBtn {
    background-color: var(--highlight-color-dark);
    opacity: 90%;
    border: 3px solid var(--text-color);
    color: var(--text-color);
  }

  a {
    color: var(--highlight-color-dark);
  }

  .link {
    color: var(--highlight-color-light);
  }

  p {
    color: var(--highlight-color-light);
  }

  h3 {
    color: var(--highlight-color-dark);
    background-color: var(--dark-headers-color);
  }


  #column-titles {
    font-weight: bold;
    background-color: var(--highlight-color-light);
    color: var(--text-color);
  }

  #redwood-table tr:nth-child(even) {
    background-color: var(--dark-headers-color);
  }

  #redwood-table td,
  #redwood-table th {
    border: 1px solid var(--text-color);
    padding: 8px;
  }

  #column-titles2 {
    font-weight: bold;
    background-color: var(--highlight-color-light);
    color: var(--text-color);
  }

  #redwood-table2 tr:nth-child(even) {
    background-color: var(--dark-headers-color);
  }

  #redwood-table2 td,
  #redwood-table2 th {
    border: 1px solid var(--text-color);
    padding: 8px;
  }

  #redwood-table {
    color: var(--highlight-color-light);
  }

  #redwood-table2 {
    color: var(--highlight-color-light);
  }

  #backToTrees {
    background-color: var(--highlight-color-dark);
    color: var(--dark-headers-color);
  }

  #backToTrees:hover {
    background-color: var(--highlight-color-light);
    color: var(--dark-background-color);
  }
}

@media screen and (min-width: 1024px) {
  main {
    margin-left: 130px;
    margin-right: 130px;
    margin-top: 0;
  }
  h2 {
    font-size: 26px;
  }
  h3 {
    font-size: 24px;
  }
}

@media screen and (min-width: 1200px) {
  main {
    margin-left: 110px;
    margin-right: 110px;
    margin-top: 0;
  }

  h2 {
    font-size: 28px;
  }

  h3 {
    font-size: 26px;
  }
}

@media screen and (min-width: 1700px) {
  main {
    margin-left: 200px;
    margin-right: 200px;
    margin-top: 0;
  }

  img {
    width: 162px;
    height: 162px;
    display: block;
    margin-left: auto;
    margin-right: auto;
  }

  #topBtn {
    font-family: monospace;
    position: fixed;
    font-size: 50px;
    bottom: 20px;
    right: 10px;
    z-index: 99;
    border: none;
    outline: none;
    color: var(--html-bk-color);
    background-color: var(--light-button-color);
    opacity: 80%;
    cursor: pointer;
    padding-top: 20px;
    padding-right: 50px;
    padding-left: 50px;
    padding-bottom: 20px;
    border-color: #eee;
    border-radius: 6px;
  }

  #topBtn {
    font-family: monospace;
    display: none;
    position: fixed;
    font-size: 50px;
    bottom: 20px;
    right: 10px;
    z-index: 99;
    border: none;
    outline: none;
    color: var(--text-color);
    opacity: 85%;
    cursor: pointer;
    padding-top: 20px;
    padding-right: 50px;
    padding-left: 50px;
    padding-bottom: 20px;
    border-radius: 6px;
  }

  h1 {
    font-size: 50px;
    font-weight: 400;
  }

  h2 {
    font-size: 42px;
  }

  h3 {
    font-size: 36px;
  }

  p {
    font-size: 32px;
    font-weight: 400;
  }

  .tooHighToLow {
    font-size: 32px;
  }

  #buttonInput {
    padding: 30px 64px;
    font-size: 34px;
  }

  #buttonInput {
    padding: 30px 64px;
    font-size: 34px;
  }

  .link {
    font-size: 26px;
  }

  a {
    font-size: 24px;
  }

  /* first table  */

  #redwood-table {
    font-size: 24px;
  }

  #column-titles {
    font-size: 26px;
    font-weight: bold;
  }

  /* second table  */
  #redwood-table2 {
    font-size: 24px;
  }

  #column-titles2 {
    font-size: 26px;
    font-weight: bold;
  }
}
