:root {
  --rtsl-purple: #382986;
  --rtsl-red: #E8383D;
  --rtsl-orange: #F3775C;
  --rtsl-yellow: #FCBA24;
  --rtsl-light-green: #85BD40;
  --rtsl-dark-green: #40BD52;
  --rtsl-light-purple-1: #6577BA;
  --rtsl-light-purple-2: #B2B1D9;
  --rtsl-light-purple-3: #E6E8F5;
  --rtsl-soft-black: #25252C;
  --rtsl-mid-grey: #69697D;
  --rtsl-grey: #9292A4;
  --rtsl-chart-grey: #E4E7EE;
  --rtsl-background: #F6F7F8;
  --rtsl-footer: #e7ebed;
  --rtsl-highlight: #fff;
}

@font-face {
  font-family: "Public Sans";
  src: url("/fonts/public_sans/PublicSans-Regular.woff2") format("woff2"), url("/fonts/public_sans/PublicSans-Regular.woff") format("woff");
  font-style: normal;
}
@font-face {
  font-family: "Public Sans";
  src: url("/fonts/public_sans/PublicSans-Bold.woff2") format("woff2"), url("/fonts/public_sans/PublicSans-Bold.woff") format("woff");
  font-weight: bold;
  font-style: normal;
}
@font-face {
  font-family: "Public Sans";
  src: url("/fonts/public_sans/PublicSans-Italic.woff2") format("woff2"), url("/fonts/public_sans/PublicSans-Italic.woff") format("woff");
  font-style: italic;
}
@font-face {
  font-family: "Public Sans";
  src: url("/fonts/public_sans/PublicSans-BoldItalic.woff2") format("woff2"), url("/fonts/public_sans/PublicSans-BoldItalic.woff") format("woff");
  font-weight: bold;
  font-style: italic;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow_condensed/barlow-condensed-latin-700-normal.woff2") format("woff2"), url("/fonts/barlow_condensed/barlow-condensed-latin-700-normal.woff2") format("woff2");
  font-weight: bold;
  font-style: normal;
}
html,
body {
  font-family: "Public Sans", sans-serif;
  font-size: 1rem;
  color: var(--rtsl-soft-black);
}

h1 {
  font-family: "Barlow Condensed";
  font-weight: bold;
  color: var(--rtsl-purple);
  text-transform: uppercase;
  position: relative;
}

h1::before {
  content: "";
  display: block;
  width: 30px;
  height: 6px;
  background-color: var(--rtsl-orange);
  border-radius: 3px;
  position: absolute;
  top: -0.5rem;
}

h2,
h3,
h4,
h5,
h6,
p {
  font-family: "Public Sans", sans-serif;
}

form {
  width: 50%;
}

label {
  width: 20%;
  display: block;
  float: left;
  text-align: right;
}

select {
  border-bottom: 2px solid var(--rtsl-soft-black);
  width: 78%;
  margin-left: 2%;
}

table {
  margin-top: 2rem;
  width: 100%;
  table-layout: fixed;
  padding: 3rem 0;
  font-size: 0.8rem;
  border-collapse: collapse;
}

tr {
  border-top: 1px solid #CCCCCC;
}

tr:nth-child(odd) {
  background-color: #EEEEEE;
}

tr:nth-child(even) {
  background-color: #DDDDDD;
}

th {
  border-bottom: 1px solid var(--rtsl-soft-black);
  font-weight: bold;
  padding: 0.5rem;
}

td {
  text-align: center;
  padding: 0.5rem;
  vertical-align: top;
  cursor: pointer;
}

tr:hover {
  background-color: #CCFFCC;
}

tr:first-child {
  border-top: none;
  background-color: unset;
}

td.left,
th.left {
  text-align: left;
}

form div {
  margin-bottom: 0.5rem;
}

tr.detail {
  background-color: unset;
  display: none;
}
tr.detail p {
  text-align: left;
  -webkit-margin-before: 0;
          margin-block-start: 0;
  -webkit-margin-after: 0.25rem;
          margin-block-end: 0.25rem;
}
tr.detail.active {
  display: table-row;
}
tr.detail .detail-wrapper {
  display: none;
}

.detail-wrapper table {
  margin-top: 0;
}
.detail-wrapper table tr {
  border: none;
  background-color: unset;
  /* td:first-child {
  	text-align: right;
  	width: 25%;
  	font-weight: 300;
  } */
}
.detail-wrapper table tr td,
.detail-wrapper table tr th {
  text-align: left;
  padding: 0.2rem;
}
.detail-wrapper table tr tr:nth-child(odd) {
  background-color: none;
}
.detail-wrapper table tr tr:nth-child(even) {
  background-color: none;
}

html,
body {
  font-family: "Public Sans", sans-serif;
  font-size: 1rem;
  color: var(--rtsl-soft-black);
  background: #f6f5f8;
  padding: 0 1rem;
}

h2,
h3,
label,
th,
td:first-child {
  font-family: "Public Sans", sans-serif;
  font-weight: normal;
}

h1 + p, p#addl_text {
  max-width: 40rem;
  font-weight: normal;
  font-size: 1.25rem;
}

form {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  grid-column-gap: 2rem;
  grid-row-gap: 1rem;
  margin-top: 3rem;
  /*   position: sticky;
  top: 0; */
}

label {
  display: block;
}

select {
  transition: all 0.2s ease-in-out;
  -webkit-appearance: none;
  border: 1px solid transparent;
  width: 100%;
  font-size: 0.875rem;
  line-height: 2.75;
  padding: 0 2rem 0 0.5rem;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='8' viewBox='0 0 14 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.5 1.11259L6.72516 6.88742L0.950333 1.11259' stroke='%232E2D37' stroke-width='1.5' stroke-miterlimit='10'/%3E%3C/svg%3E%0A");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
}

select:hover, button:hover, a.button:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), 0 3px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #d5d4dd;
}

table {
  margin-top: 2rem;
  width: 100%;
  table-layout: fixed;
  padding: 3rem 0;
  font-size: 0.875rem;
  border-collapse: collapse;
}

#results {
  padding: 0;
}

tr {
  transition: all 0.2s ease-in-out;
}

tr:not(.detail) {
  border-top: 1px solid #d5d4dd;
  padding: 5rem 0;
}

th {
  border-bottom: 1px solid #d5d4dd;
  padding: 0.5rem;
}

th {
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  color: #5c5b70;
  font-size: 0.75rem;
}

td {
  text-align: center;
  padding: 0.5rem;
  vertical-align: top;
  font-weight: normal;
  cursor: pointer;
}

td:first-child {
  font-size: 1rem;
}

tr:hover {
  background-color: rgba(255, 255, 255, 0.5);
}

tr:first-child {
  border-top: none;
  background-color: unset;
}

td.left,
th.left {
  text-align: left;
}

form div {
  margin-bottom: 0.5rem;
}

tr.detail.active {
  background-color: #fff;
}

tr.detail {
  display: none;
}

tr.detail p {
  text-align: left;
  -webkit-margin-before: 0;
  margin-block-start: 0;
  -webkit-margin-after: 0.25rem;
  margin-block-end: 0.25rem;
}

tr.detail.active {
  display: table-row;
}

tr.detail .detail-wrapper {
  display: none;
}

.detail-wrapper table {
  margin-top: 0;
}

.detail-wrapper table tr {
  border: none;
  background-color: unset;
}

.detail-wrapper table tr td,
.detail-wrapper table tr th {
  text-align: left;
  padding: 0.2rem;
  font-weight: normal;
}

/* .detail-wrapper table tr td:first-child {
text-align: right;
width: 25%;
font-weight: 300;
} */
.detail-wrapper table tr tr:nth-child(odd) {
  background-color: none;
}

.detail-wrapper table tr tr:nth-child(even) {
  background-color: none;
}

/* overrides for inline styles */
.max-w-6xl {
  max-width: 80rem;
}

.sm\:px-6 {
  padding: 0;
}

label {
  width: 100%;
  text-align: left;
  margin-left: 20px;
}

button, a.button {
  font-family: "Public Sans";
  font-size: 1rem;
  color: var(--rtsl-highlight);
  margin-top: 1.5rem;
  padding: 0.6rem;
  background-color: var(--rtsl-purple);
  transition: all 0.2s ease-in-out;
  border: 1px solid transparent;
}

h1 a.button {
  float: right;
  margin-top: 0;
  text-transform: none;
}

#results {
  margin-bottom: 2rem;
}
#results h2 {
  font-size: 2rem;
  text-align: center;
  margin: 3rem;
}

th:nth-child(3), td:nth-child(3) {
  width: 20%;
}

th:nth-child(4), th:nth-child(5), td:nth-child(4), td:nth-child(5) {
  width: 10%;
}

.detail td {
  padding: 0;
}

.detail-wrapper table tr th, .detail-wrapper table tr td {
  padding: 0.25rem 0.5rem 0 0.5rem;
  text-align: center;
  border: none;
}
.detail-wrapper table tr th.left, .detail-wrapper table tr td.left {
  text-align: left;
}
.detail-wrapper table tr th {
  font-size: 0.5rem;
}
.detail-wrapper table tr td {
  font-size: 0.75rem;
}
.detail-wrapper table tr:first-child th, .detail-wrapper table tr:first-child td {
  padding: 0.5rem 0.5rem 0 0.5rem;
}
.detail-wrapper table tr:last-child th, .detail-wrapper table tr:last-child td {
  padding: 0.25rem 0.5rem 0.25rem 0.5rem;
}

h3 {
  font-size: 2rem;
  margin-bottom: 0;
  -webkit-margin-after: 0;
          margin-block-end: 0;
}

#results h3 {
  float: left;
}
#results h3.nation-year > a {
  font-family: "Public Sans";
  font-weight: bold;
  color: var(--rtsl-purple);
  border-bottom: 2px solid var(--rtsl-purple);
}
#results h3.nation-year > a:hover {
  border-bottom: 2px solid var(--rtsl-orange);
}
#results .buttons {
  float: right;
}
#results .buttons button {
  margin-left: 1rem;
}

table {
  margin-top: 0;
}

.legend {
  width: -webkit-fit-content;
  width: -moz-fit-content;
  width: fit-content;
  border: 1px solid var(--rtsl-orange);
  list-style-type: none;
  padding: 1rem;
}
.legend h3 {
  font-size: 1.25rem;
  margin-top: 0;
}
.legend span {
  margin-right: 1rem;
}

.nation-year span {
  font-size: 1rem;
  margin-left: 1rem;
}

th span.nutrient {
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.625rem;
}

.main-header th {
  vertical-align: bottom;
}

tr.main-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0px;
  background-color: var(--rtsl-highlight);
  z-index: 1;
}

a {
  border-bottom: 1px solid var(--rtsl-soft-black);
}
a:hover {
  border-bottom: 1px solid var(--rtsl-orange);
}

tr.summary button {
  border: 0;
  -webkit-clip-path: circle(0.5rem);
          clip-path: circle(0.5rem);
  color: var(--rtsl-highlight);
  margin-top: 0;
  background-color: var(--rtsl-purple);
  transition: all 0.2s ease-in-out;
  width: 1.2rem;
  height: 1.2rem;
  padding: 0;
  margin: 0 0.2rem 0.2rem 0;
  vertical-align: middle;
}
tr.summary button span {
  position: relative;
  line-height: 1;
}
tr.summary button span::before, tr.summary button span::after {
  position: absolute;
  width: 1rem;
  left: -0.5rem;
  top: -0.5rem;
}
tr.summary button span::before {
  opacity: 1;
  content: "+";
}
tr.summary button span::after {
  content: "-";
  opacity: 0;
  top: -0.6rem;
}
tr.summary.active button {
  transition: all 0.2s ease-in-out;
}
tr.summary.active button span::before {
  opacity: 0;
}
tr.summary.active button span::after {
  opacity: 1;
}
