/****************************** CSS variables ******************************/
:root {
  /*colors*/
  --dark-text: rgb(20, 20, 20);
  --med-text: rgb(80, 80, 80); 
  --light-text: rgb(118, 118, 118);
  --light-bg: rgb(240, 240, 240);
  --main-col-rgb: 32, 124, 177;
  --main-col: rgb(var(--main-col-rgb));
  --link-rgb: var(--main-col-rgb);
  --link: rgb(var(--link-rgb));
  --error-light: rgb(248, 232, 233);
  --error: rgb(179, 8, 11);

  /*other variables*/
  --trans: 0.2s;
  --long-trans: 0.35s;
  --radius: 5px;
  --shadow-offset: 3px;
  --body-padding: max(1.5em, 5vw);
  --bold-weight: 800;
}

/****************************** Fonts ******************************/
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400 var(--bold-weight);
  src: url("media/font/SourceSans3-VariableFont_wght.ttf") format("TrueType");
}
@font-face {
  font-family: "Source Sans 3 Italic";
  font-style: italic;
  font-weight: 400;
  src: url("media/font/SourceSans3-Italic-VariableFont_wght.ttf");
}
/*generated with the help of https://screenspan.net/fallback*/
@font-face {
  font-family: "Adjusted Arial Fallback";
  src: local(Arial);
  size-adjust: 93%;
  ascent-override: normal;
  descent-override: normal;
  line-gap-override: 40%;
}

/****************************** General styling ******************************/
main, section, div, input, tr, th, td {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  width: 100%;
}
body {
  overflow-x: hidden;
}
body, input, select {
  color: var(--med-text);
  font-family: "Source Sans 3", "Adjusted Arial Fallback", sans-serif;
}
body #content-cont {
  margin: 0 auto;
  padding: 1em var(--body-padding);
  width: fit-content;
  max-width: 100%;
}
body #content-cont.no-search {
  max-width: 60em;
}
body #content-cont #introduction {
  /*
    the width of content-cont should be determined by the table, not the text,
    but the text should still take up 100% of the parent; solution from
    https://stackoverflow.com/questions/55040250/how-to-match-width-of-text-to-width-of-dynamically-sized-image-title
  */
  width: 0;
  min-width: 100%;
}
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--bold-weight);
  color: var(--dark-text);
}
.hidden {
  display: none !important;
}
a {
  text-decoration: none;
  color: var(--link);
  background: linear-gradient(rgba(var(--link-rgb), 0.1), rgba(var(--link-rgb), 0.1));
  background-size: 100% 0;
  background-repeat: no-repeat;
  background-position: 0 100%;
  border-bottom: 1px solid rgba(var(--link-rgb), 0.7);
  transition: var(--trans) ease;
}
a:hover {
  cursor: pointer;
  background-size: 100% 100%;
  border-bottom-color: rgba(var(--link-rgb), 1);
}
.no-js .js-only {
  display: none;
}
.has-js .js-only {
  display: block;
}

/******************* Styling forms *******************/
/*section styling*/
.form-section-title > *,
#result-title {
  font-weight: var(--bold-weight);
  font-size: 1.25em;
  color: var(--dark-text);
  margin: 0;
  transition: inherit;
}
.form-section-title {
  display: block;
  position: relative;
  padding: 1em 0;
  padding-right: 2em;
  margin: 0;
  border-bottom: 2px solid var(--dark-text);
  transition: var(--trans) ease;
}
.form-section-title:hover {
  cursor: pointer;
  border-bottom-color: var(--main-col);
}
.form-section-title:hover > * {
  color: var(--main-col);
}
.form-section-title::after { /*caret next to title*/
  content: "";
  position: absolute;
  right: 2em;
  top: 50%;
  width: 0.65em;
  height: 0.65em;
  border-right: 2px solid var(--dark-text);
  border-bottom: 2px solid var(--dark-text);
  transform-origin: center center;
  transform: translate(50%, -50%) rotate(45deg);
  transition: var(--trans) ease;
}
.has-js .form-section.active .form-section-title::after,
.no-js input.collapse-checkbox:checked ~ .form-section-title::after {
  transform: translate(50%, 0%) rotate(225deg);
} 
.form-section-title:hover::after {
  border-right-color: var(--main-col);
  border-bottom-color: var(--main-col);
}
.form-section-content-cont { /*section content styling*/
  max-height: 0;
  overflow: hidden;
  width: 100%;
}
.form-section.active .form-section-content-cont,
.no-js input.collapse-checkbox:checked ~ .form-section-content-cont {
  max-height: none;
  overflow: visible;
}
.form-section-content {
  padding: 1em 0;
  padding-bottom: 2em;
}

/*general formatting*/
label,
fieldset legend,
input, 
button,
.radio-options,
.checkbox-options,
.custom-select,
.no-js select {
  display: block;
  margin: 0.5em 0;
  font-size: 1em;
  font-family: inherit;
}
input, 
button,
.radio-options,
.checkbox-options,
.custom-select,
.no-js select {
  margin-bottom: 1.25em;
}
.no-js .custom-select {
  display: none;
}
fieldset {
  display: block;
  border: 0;
  padding: 0;
  margin: 0;
}
fieldset legend {
  padding: 0;
}

/*styling inputs + selects*/
input, 
.custom-select-label,
.no-js select {
  position: relative;
  padding: 0.25em 0.5em;
  outline: none;
  border: 1px solid var(--light-text);
  border-radius: var(--radius);
  transition: var(--trans) ease;
  background: transparent;
}
input:hover, input:focus,
.custom-select:hover .custom-select-label, .custom-select:focus .custom-select-label,
.no-js select:hover, .no-js select:focus {
  border-color: var(--med-text);
}
input:hover, 
.custom-select:hover .custom-select-label,
.no-js select:hover {
  box-shadow: 0 0 0 var(--shadow-offset) rgba(0, 0, 0, 0.15);
}
input:focus, 
.custom-select:focus .custom-select-label,
.no-js select:focus {
  box-shadow: 0 0 0 var(--shadow-offset) rgba(0, 0, 0, 0.25);
  transition: box-shadow var(--long-trans) cubic-bezier(0.33, -4.00, 0.63, 1),
              border-color var(--trans) ease;
}

/*specifically styling custom selects*/
.has-js select {
  display: none;
}
.custom-select {
  position: relative;
  outline: none;
}
.custom-select-label {
  padding-right: 1.75em; /*to accommodate dropdown caret*/
}
.custom-select-label::after { /*dropdown caret*/
  content: "";
  position: absolute;
  top: 45%;
  right: 0.4em;
  width: 0.45em;
  height: 0.45em;
  border-right: 2px solid var(--light-text);
  border-bottom: 2px solid var(--light-text);
  transform-origin: center center;
  transform: translate(-50%, -50%) rotate(45deg);
  transition: var(--trans) ease;
}
.custom-select:hover .custom-select-label::after,
.custom-select:focus .custom-select-label::after {
  border-right-color: var(--med-text);
  border-bottom-color: var(--med-text);
}
.custom-select.active .custom-select-label::after {
  transform: translate(-50%, -20%) rotate(225deg);
}
.custom-select-dropdown { /*styling dropdown*/
  position: absolute;
  bottom: 0;
  padding-top: 0.5em;
  width: 100%;
  transform-origin: center top;
  transform: translateY(100%) scaleY(0.75);
  visibility: hidden;
  opacity: 0;
  z-index: 10;
  transition: var(--trans) ease;
}
.custom-select.active .custom-select-dropdown {
  visibility: visible;
  opacity: 1;
  transform: translateY(100%) scaleY(1);
}
.custom-select-dropdown ul {
  width: 100%;
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 0.5em 1em rgba(0, 0, 0, 0.15);
  margin: 0;
  margin-block-start: 0;
  margin-block-end: 0;
  padding-inline-start: 0;
  max-height: 12em;
  max-height: min(12em, 100vh);
  overflow-y: auto;
}
.custom-select-dropdown li.option {
  list-style: none;
  margin: 0;
  padding: 0.3em 0.5em;
  transition: var(--trans) ease;
}
.custom-select-dropdown li.option:first-child {
  padding-top: 0.5em;
  border-radius: var(--radius) var(--radius) 0 0;
}
.custom-select-dropdown li.option:last-child {
  padding-bottom: 0.5em;
  border-radius: 0 0 var(--radius) var(--radius);
}
.custom-select-dropdown li.option:hover {
  cursor: pointer;
  background: var(--light-bg);
}
.custom-select-dropdown li.option.selected {
  pointer-events: none;
  background: var(--main-col);
  color: white;
}

/*styling radio options + checkbox options (inline options)*/
.inline-option {
  margin: 0.25em 0;
  display: flex;
  align-items: center;
}
.inline-option > * {
  margin-top: 0;
  margin-bottom: 0;
}
fieldset legend + .inline-option {
  margin-top: 0;
}
.inline-option > * {
  display: inline-block;
  margin: 0;
}
.inline-option input {
  display: none;
}
.inline-option:hover {
  cursor: pointer;
}
.inline-option .visible-option {
  position: relative;
  margin-right: 0.5em;
  border: 1px solid var(--light-text);
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.15);
  transition: var(--trans) ease;
}
.inline-option:hover .visible-option {
  border-color: var(--med-text);
  box-shadow: 0 0 0 var(--shadow-offset) rgba(0, 0, 0, 0.15);
}
.inline-option input:checked ~ .visible-option {
  border-color: var(--main-col);
  box-shadow: 0 0 0 0 rgba(var(--main-col-rgb), 0.15);
}
.inline-option:hover input:checked ~ .visible-option {
  box-shadow: 0 0 0 var(--shadow-offset) rgba(var(--main-col-rgb), 0.25);
}

/*radio option specific styling*/
.visible-radio-option {
  width: 1em;
  height: 1em;
  border-radius: 50%;
}
.visible-radio-option::before,
.visible-radio-option::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  transition: inherit;
}
.visible-radio-option::after {
  box-sizing: border-box;
  border: 2px solid white;
  background: transparent;
}
.visible-radio-option::before {
  background: var(--main-col);
  transform: translate(-50%, -50%) scale(0);
}
.radio-option input[type="radio"]:checked ~ .visible-radio-option::before {
  transform: translate(-50%, -50%) scale(1);
}

/*checkbox option specific styling*/
.visible-checkbox-option {
  width: 1.15em;
  height: 1.15em;
  border-radius: var(--radius);
}
.visible-checkbox-option::after {
  content: "";
  position: absolute;
  display: block;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: inherit;
  border-color: var(--main-col);
  background: var(--main-col);
  transform: translate(-50%, -50%) scale(0);
  transform-origin: center center;
  z-index: 0;
  transition: inherit;
}
.checkbox-check {
  position: absolute;
  top: 40%;
  left: 50%;
  width: 0.22em;
  height: 0.55em;
  border-right: 2px solid white;
  border-bottom: 2px solid white;
  transform-origin: center;
  transform: translate(-50%, -50%) rotate(45deg) scale(0);
  z-index: 1;
}
.checkbox-option input[type="checkbox"]:checked ~ .visible-checkbox-option::after {
  transform: translate(-50%, -50%) scale(1);
  border-radius: inherit;
}
.checkbox-option input[type="checkbox"]:checked ~ .visible-checkbox-option .checkbox-check {
  transform: translate(-50%, -50%) rotate(45deg) scale(1);
}

/*styling form tooltips*/
.tooltip {
  position: relative;
  display: inline-block;
  margin-left: 0.5em;
  outline: none;
}
.tooltip-icon { /*question mark icon*/
  position: relative;
  padding: 0 0.25em;
  color: var(--main-col);
  z-index: 0;
}
.tooltip-icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1em;
  height: 1em;
  border: 1px solid var(--main-col);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.tooltip-icon:hover {
  cursor: pointer; 
}
.tooltip-content { /*container with tooltip text*/
  position: absolute; 
  top: -0.5em;
  left: 50%;
  width: 10em;
  max-width: 100vw;
  padding: 0.5em;
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 0.15em 1em rgba(0, 0, 0, 0.15);
  transform: translate(-50%, -100%);
  opacity: 0;
  visibility: hidden;
  z-index: 10;
  transition: opacity var(--trans) ease, 
              visibility var(--trans) ease;
}
.tooltip-content .tooltip-arrow {
  position: absolute;
  bottom: 0;
  left: 50%;
  border: 0.5em solid transparent;
  border-top-color: white;
  transform: translate(-50%, 100%);
}
.tooltip-content:hover {
  cursor: default;
}
.tooltip:hover .tooltip-content,
.tooltip:focus .tooltip-content { /*show tooltip on hover/focus*/
  opacity: 1;
  visibility: visible;
}
.tooltip-content.right-align { /*alternative alignments to keep everything on screen*/
  right: 0;
  left: unset;
  border-radius: var(--radius) var(--radius) 0 var(--radius);
  transform: translate(0, -100%);
}
.tooltip-content.right-align .tooltip-arrow {
  right: 0;
  left: unset;
  transform: translate(0%, 100%);
}
.tooltip-content.left-align {
  left: 0;
  border-radius: var(--radius) var(--radius) var(--radius) 0;
  transform: translate(0, -100%);
}
.tooltip-content.left-align .tooltip-arrow {
  left: 0;
  transform: translate(0, 100%);
}
.tooltip-content.bottom-align {
  top: unset;
  bottom: -0.5em;
  transform: translate(-50%, 100%);
}
.tooltip-content.bottom-align .tooltip-arrow {
  bottom: unset; 
  top: 0;
  border-bottom-color: white;
  border-top-color: transparent;
  transform: translate(-50%, -100%);
}
.tooltip-content.bottom-align.right-align,
.tooltip-content.bottom-align.left-align{ /*handling combinations of bottom and left/right align*/
  transform: translate(0, 100%);
}
.tooltip-content.bottom-align.right-align {
  border-radius: var(--radius) 0 var(--radius) var(--radius);
}
.tooltip-content.bottom-align.left-align {
  border-radius: 0 var(--radius) var(--radius) var(--radius);
}
.tooltip-content.bottom-align.right-align .tooltip-arrow,
.tooltip-content.bottom-align.left-align .tooltip-arrow {
  transform: translate(0, -100%);
}

/*styling form buttons*/
button:not(.control),
input[type="reset"] {
  position: relative;
  padding: 0.65em 1.25em;
  outline: none;
  border: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--main-col);
  color: white;
  transition: var(--trans) ease;
}
button.secondary:not(.control),
input[type="reset"].secondary {
  background: transparent;
  border: 1px solid var(--main-col);
  color: var(--main-col);
}
button:not(.control):hover,
button:not(.control):focus,
input[type="reset"]:hover,
input[type="reset"]:focus { /*hover / focus styling*/
  box-shadow: 0 0 0 3px rgba(var(--main-col-rgb), 0.25);
  cursor: pointer;
}
button.secondary:not(.control):hover,
button.secondary:not(.control):focus,
input[type="reset"].secondary:hover,
input[type="reset"].secondary:focus {
  background: var(--main-col);
  color: white;
}
button:not(.control).loading { /*loading state*/
  pointer-events: none;
}
button:not(.control)::after, button:not(.control)::before {
  content: "";
  position: absolute;
  visibility: hidden;
  opacity: 0;
  transition: inherit;
}
button:not(.control)::after {
  top: 0;
  left: 0;
  border-radius: inherit;
  background: rgba(0, 0, 0, 0.15);
  width: 100%;
  height: 100%;
}
button:not(.control)::before { /*loading symbol*/
  width: 1em;
  height: 1em;
  border: 2px solid white;
  border-right-color: transparent;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0) rotate(0);
}
@keyframes buttonLoad { /*loading animation*/
  from {
    transform: translate(-50%, -50%) rotate(0);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
button.loading:not(.control)::after, button.loading:not(.control)::before {
  visibility: visible;
  opacity: 1;
}
button.loading:not(.control)::before {
  animation: buttonLoad 1s linear infinite;
}

/*styling interactive elements that are clickable and are semantically 
buttons, but should not appear like the form buttons above*/
.control {
  position: relative;
  display: block;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  text-decoration: none;
  color: inherit;
}
.control:hover, 
.control:focus {
  cursor: pointer;
}
.control.disabled {
  pointer-events: none;
  opacity: 0.5;
}
.control.circle-style::before { /*circle that appears on hover behind*/
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  background: var(--main-col);
  transform-origin: center center;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  transition: var(--trans) ease;
}
.control.circle-style.link::before {
  background: var(--link);
}
.control.circle-style:hover::before {
  transform: translate(-50%, -50%) scale(1);
  opacity: 0.1;
}
.control.next::after,
.control.prev::after { /*styling next/prev arrows, which are common*/
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  /*width and height separately specified by elements that use it*/
  border-right: 2px solid var(--main-col);
  border-bottom: 2px solid var(--main-col);
}
.control.link.next::after,
.control.link.prev::after {
  border-right-color: var(--link);
  border-bottom-color: var(--link);
}
.control.next::after {
  transform: translate(-70%, -50%) rotate(-45deg);
}
.control.prev::after {
  transform: translate(-30%, -50%) rotate(-225deg);
}
.control.disabled.prev::after,
.control.disabled.next::after {
  border-right-color: var(--light-text);
  border-bottom-color: var(--light-text);
}

/******************* Form layout styling *******************/
/*search bar at the top*/
#form-search-bar input, 
#form-search-bar select,
#form-search-bar .custom-select {
  width: 100%;
  margin: 0;
  margin-bottom: 0.5em;
}
#search-bar-cont {
  position: relative;
}
#form-search-bar input {
  padding-right: 1.5em;
}
#search-bar-clear { /*styling search bar clear button*/
  position: absolute;
  top: 50%;
  right: 0.5em;
  width: 1.35em;
  height: 1.35em;
  border-radius: 50%;
  user-select: none;
  display: none;
  transition: var(--trans) ease;
}
.has-js input ~ #search-bar-clear { /*only show with js*/
  display: block;
  visibility: visible;
  opacity: 1;
  transform: translate(0, -50%) scale(1);
}
.has-js input:placeholder-shown ~ #search-bar-clear { /*hide when there's no input*/
  visibility: hidden;
  opacity: 0;
  transform: translate(0, -50%) scale(0);
}
#search-bar-clear::before,
#search-bar-clear::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 0.75em;
  background: var(--light-text);
  transform-origin: center center;
  transform: translate(-50%, -50%) rotate(45deg);
  transition: inherit;
}
#search-bar-clear::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
#search-bar-clear:hover {
  background: var(--light-bg);
  cursor: pointer;
}
#search-bar-clear:hover::before,
#search-bar-clear:hover::after {
  background: var(--med-text);
}
/*side-by-side styling of search bar on larger screens*/
@media (min-width: 25em) {
  #form-search-dropdowns {
    display: flex;
  }
  #form-search-dropdowns select,
  #form-search-dropdowns .custom-select {
    flex-grow: 1;
    flex-shrink: 0;
    flex-basis: 11em;
    width: 11em;
  }
  #form-search-dropdowns select:first-child,
  #form-search-dropdowns select:first-child + .custom-select {
    margin-right: 0.5em;
  }
}
@media (min-width: 37.5em){
  #form-search-bar {
    display: flex;
  }
  #form-search-dropdowns {
    flex-basis: auto;
    flex-grow: 0;
    flex-shrink: 0;
    margin-right: 0.5em;
  }
  #form-search-bar #search-bar-cont {
    flex-grow: 1;
    flex-basis: 0;
  }
  #form-search-dropdowns select,
  #form-search-dropdowns .custom-select,
  #form-search-bar input {
    margin-bottom: 0;
  }
}

/*character filter styline*/
#filter-len-cont input {
  margin-top: 0;
  width: 100%;
  max-width: 6em;
  display: inline-block;
}
#filter-len-cont input:first-of-type {
  margin-right: 1em;
}
/*side-by-side styling of category + plural/singular nouns,
and also the character filters*/
@media (min-width: 20em){
  #filter-nc-cont {
    display: flex;
    align-items: stretch;
  }
  #filter-nc-cont > * {
    flex: 1 1 0;
  }
  #filter-nc-cont > *:first-child {
    margin-right: 1em;
  }
}
@media (min-width: 35em){
  #filter-dropdowns-cont,
  #filter-character-cont {
    display: flex;
  }
  #filter-dropdowns-cont > *:first-child,
  #filter-character-cont > *:first-child {
    margin-right: 1em;
    flex: 1 1 0;
  }
  #filter-dropdowns-cont #filter-nc-cont,
  #filter-character-cont #filter-len-cont {
    flex: 1.5 1.5 0;
  }
}

/*side-by-side styling of adjusting results*/
@media (min-width: 40em){
  #adjust-cont {
    display: flex;
  }
  #adjust-cont > *:first-child {
    margin-right: 3em;
    flex: 1 1 0;
  }
  #adjust-cont > *:nth-child(2){
    flex: 1 1 0;
  }
}

/*remove margin on bottom of fieldset for information to return*/
#adjust-info {
  margin-bottom: 0;
}

/*styling for the reset and submit buttons on the form*/
button.reset.secondary {
  margin-bottom: 0;
}
#form-end-buttons {
  margin-top: 1.5em;
}
#submit-button, #reset-button {
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 30em){ /*side-by-side styling of buttons*/
  #form-end-buttons {
    display: flex;
  }
  #submit-button, #reset-button { 
    margin: 0;
  }
  #submit-button {
    margin-right: 1em;
  }
}

/******************* Handling modal styling of form (when there's search results) + modification modals *****************/
.no-js #modal-form .modal-title,
.no-js #show-modal,
.modification-modal { /*hiding modal styling without js + modification modals on default*/
  display: none;
}
.has-js .modal-overlay { /*overlay (container)*/
  position: fixed;
  display: flex; /*for vertical/horizontal centering of modal*/
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  padding: 1.5em 0;
  background: rgba(0, 0, 0, 0.75);
  overflow-y: scroll;
  z-index: 99999;
  visibility: hidden;
  opacity: 0;
}
@supports (scrollbar-gutter: stable){
  .has-js .modal-overlay {
    overflow-y: auto;
    scrollbar-gutter: stable;
  }
}
.has-js .modal-overlay.active {
  visibility: visible;
  opacity: 1;
}
.has-js .modal-overlay .modal-content { /*content styling*/
  position: relative;
  width: 95%;
  max-width: 50em;
  margin: auto;
  padding: 2em 1em;
  background: white;
  border-radius: var(--radius);
}
@media (min-width: 30em){
  .has-js .modal-overlay .modal-content {
    width: 90%;
    padding: 2em 2em;
    padding: 2em min(5vw, 5em);
  }
}
.has-js .modal-overlay .modal-title {
  font-weight: var(--bold-weight);
  font-size: 1.5em;
  color: var(--dark-text);
  text-align: center;
}
.has-js .modal-overlay .modal-close { /*close button*/
  position: absolute;
  top: 0.75em;
  right: 0.75em;
  width: 2em;
  height: 2em;
  border-radius: 50%;
  transition: var(--trans) ease;
}
.has-js .modal-overlay .modal-close:hover {
  cursor: pointer;
  background: var(--light-bg);
}
.has-js .modal-overlay .modal-close::before,
.has-js .modal-overlay .modal-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.1em;
  height: 2px;
  transform-origin: center center;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--med-text);
  transition: inherit;
}
.has-js .modal-overlay .modal-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
.has-js .modal-overlay .modal-close:hover::before,
.has-js .modal-overlay .modal-close:hover::after {
  background: var(--dark-text);
}
.has-js .modification-modal { /*modification modal specific styling*/
  transform: scale(0.25);
  transition-duration: inherit;
  transition-timing-function: ease-out;
}
.has-js .modal-overlay.active .modification-modal {
  transform: scale(1);
}
.has-js .modification-modal .record-info {
  margin-bottom: 1.5em;
}
.has-js .modification-modal .record-info p {
  margin: 0.25em 0;
}
.has-js .modification-modal .modal-subtitle {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}
.has-js .modification-modal .modal-subtitle + * {
  margin-top: 0.5em;
}

/********************************* Styling results *********************************/
/*general*/
#results-cont, #table-results-cont { /*to make sure that table isn't larger than necessary*/
  width: fit-content;
  max-width: 100%;
  position: relative;
}
#result-title {
  margin: 1em 0 0.25em 0;
}
#table-results-cont {
  z-index: 0;
  overflow-x: auto;
}

/*empty results*/
#empty-results {
  text-align: center;
}
#empty-results img {
  width: 100%;
  max-width: 30em;
  display: block;
  margin: 2.5em auto;
}
#empty-results #show-modal {
  margin: 0 auto;
  margin-top: 1.25em;
}

/*overflow arrows*/
.overflow-arrows {
  position: sticky;
  top: 0;
  width: 0;
  height: 100vh;
  z-index: 1; /*must be larger than z-index of #table-results-cont to constrain header element*/
  visibility: hidden;
  opacity: 0; /*hide on default until made visible with js*/
  transition: var(--trans) ease;
}
.overflow-arrows.visible {
  visibility: visible;
  opacity: 1;
}
#overflow-left { /*remove from flow*/
  float: left;
}
#overflow-right {
  float: right;
}
.overflow-arrows:hover {
  cursor: pointer;
}
.overflow-arrows::before { /*clickable area*/
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: var(--body-padding);
  background: white; /*white to constrain header element*/
  height: 100%;
  z-index: 1;
}
#overflow-left::before {
  transform: translateX(-100%);
}
.overflow-arrows .inner-arrow { /*actual arrow element*/
  content: "";
  position: absolute;
  top: 50%;
  width: var(--body-padding);
  height: var(--body-padding);
  z-index: 2;
}
#overflow-left .inner-arrow {
  right: 0;
}
#overflow-right .inner-arrow {
  left: 0;
}
.overflow-arrows .inner-arrow::before { /*circle behind everything*/
  width: 100%;
  height: 100%;
  max-width: 2.25em;
  max-height: 2.25em;
}
.overflow-arrows:hover .inner-arrow::before {
  transform: translate(-50%, -50%) scale(1);
  opacity: 0.1;
}
.overflow-arrows .inner-arrow::after { /*arrow*/
  width: 40%;
  height: 40%;
  max-width: 0.75em;
  max-height: 0.75em;
}
#overflow-left .inner-arrow::after {
  transform: translate(-40%, -50%) rotate(-225deg);
}
#overflow-right .inner-arrow::after {
  transform: translate(-60%, -50%) rotate(-45deg);
}
/*disabled styling*/
.overflow-arrows.disabled {
  pointer-events: none;
}
.overflow-arrows.disabled .inner-arrow::before {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
}
.overflow-arrows.disabled .inner-arrow::after {
  border-right-color: var(--light-text);
  border-bottom-color: var(--light-text);
  opacity: 0.5;
}
/*gradient indication on smaller screens*/
@media (max-width: 30em){
  .overflow-arrows::after {
    content: "";
    position: absolute;
    width: var(--body-padding);
    height: 100%;
    top: 0;
    z-index: 2;
    transition: var(--trans) ease;
  }
  #overflow-left::after {
    right: 0;
    background: linear-gradient(white, transparent 15%, transparent 85%, white),
                linear-gradient(90deg, rgba(var(--main-col-rgb), 0.1), transparent);
  }
  #overflow-right::after {
    left: 0;
    background: linear-gradient(white, transparent 15%, transparent 85%, white),
                linear-gradient(90deg, transparent, rgba(var(--main-col-rgb), 0.1));
  }
  .overflow-arrows.disabled::after {
    opacity: 0;
  }
}
/*top part styling*/
#result-top-cont {
  position: relative;
  z-index: 5; /*to prevent hover outline from being cut off by the arrows on smaller screens*/
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 0.5em;
}
#result-top-cont button {
  margin: 0;
  flex-grow: 1;
}
#result-top-cont > div {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.5em 0;
}
#result-top-cont > div:first-child {
  flex-wrap: wrap;
  gap: 0.5em;
}
#result-top-cont > div > p {
  margin: 0 0.5em;
}
@media (max-width: 25em){
  #result-top-cont > * {
    flex-grow: 1;
  }
}
.no-js #download-csv { /*hide csv download button without js*/
  display: none;
}

/*table overall styling*/
#results-table {
  border-collapse: collapse;
  transition: var(--long-trans) ease-out;
}
#results-table thead {
  position: relative;
  /*position: sticky; /*won't work with #table-results-cont overflow x being auto :/ due to nearest scrollable container...*/
  top: 0;
  background: var(--main-col);
  color: white;
  z-index: 1;
}
#results-table th {
  position: relative;
  padding: 0;
  font-weight: var(--bold-weight);
  text-align: left;
  border-bottom: none;
}
#results-table th:not(.sortable), #results-table th.sortable a { /*padding is either on th or a for sortable headers*/
  padding: 1em 0.75em;
}
#results-table th.sortable a {
  position: relative;
  padding-right: 1.5em; /*extra padding to make it less cramped*/
  color: white;
  border-bottom: none;
  display: block;
  background: none;
  z-index: 1;
}
#results-table th.sortable .sort-icons { /*sortable icon styling*/
  position: absolute;
  top: 50%;
  right: 0.75em;
  width: 0.5em;
  display: flex;
  flex-direction: column;
  transform: translate(50%, -50%);
}
#results-table th.sortable .sort-arrow {
  width: 0;
  height: 0;
  border: 0.25em solid transparent; 
  border-bottom-color: white;
  opacity: 0.4;
  transition: var(--trans) ease;
}
#results-table th.sortable .sort-arrow.active,
#results-table th.sortable a:hover ~ .sort-icons .sort-arrow.active {
  opacity: 1;
}
#results-table th.sortable .sort-arrow.inactive,
#results-table th.sortable a:hover ~ .sort-icons .sort-arrow.inactive {
  opacity: 0;
}
#results-table th.sortable .sort-desc {
  margin-top: 0.25em;
  transform: scaleY(-1);
}
#results-table th.sortable a:hover ~ .sort-icons .sort-arrow {
  opacity: 0.75;
}
#results-table tbody tr { /*table body styling*/
  border-bottom: 2px solid var(--light-bg);
  transition: var(--trans) ease;
}
#results-table tbody tr:hover,
#results-table tbody tr:focus {
  background: var(--light-bg);
}
#results-table td {
  position: relative;
  padding: 0.5em 0.75em;
}
#results-table td:first-child,
#results-table th:first-child:not(.sortable),
#results-table th:first-child.sortable a {
  padding-left: 1.25em;
}
#results-table td:last-child,
#results-table th:last-child:not(.sortable) {
  padding-right: 1.25em;
}

/*specific content styling*/
/*modification asterisk*/
#results-table .modification-icon {
  position: absolute;
  top: 50%;
  left: 0.5em;
  padding: 0 0.25em;
  font-size: 1.25em;
  transform: translate(-50%, -50%);
  transition: var(--trans) ease;
}
#results-table .modification-icon::before {
  width: 80%;
  height: 80%;
  z-index: 0;
}
#results-table .modification-icon span {
  position: relative;
  display: block;
  line-height: 0.5em;
  padding: 0.25em 0;
  z-index: 1;
}
#results-table .modification-icon:hover {
  color: var(--main-col);
}

/*alternate spellings*/
.alternate-spelling {
  display: block;
  color: var(--light-text);
  font-style: italic;
}

/*pages container*/
#pages-cont {
  text-align: center;
  margin-top: 1em;
}
#page-links {
  margin: 0.5em 0;
}

/*page buttons - general layout*/
#page-links {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
#page-links > * {
  margin-right: 0.5em;
}
#page-links > *:last-child {
  margin-right: 0;
}
#prev-page-cont, #next-page-cont {
  padding: 0.5em 0;
}
#prev-page-cont {
  text-align: right;
}
#next-page-cont {
  text-align: left;
}
#page-links-middle {
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

/*page buttons - dots (when there's too many links)*/
#page-links-middle .page-link-dots {
  position: relative;
  margin-left: 0.75em;
  margin-right: 0.75em;
}
#page-links-middle .page-link-dots,
#page-links-middle .page-link-dots::before,
#page-links-middle .page-link-dots::after {
  content: "";
  width: 2px;
  height: 2px;
  background: var(--med-text);
  border-radius: 50%;
}
#page-links-middle .page-link-dots::before {
  position: absolute;
  top: 0;
  left: -3px;
  transform: translateX(-100%);
}
#page-links-middle .page-link-dots::after {
  position: absolute;
  top: 0;
  right: -3px;
  transform: translateX(100%);
}

/*page buttons - numbers */
.page-link {
  flex: 0 0 1.75em;
  width: 1.75em;
  position: relative;
  color: var(--link);
  padding: 0.5em 0em;
  margin: 0em 0.25em;
}
.page-link.active {
  color: white;
  pointer-events: none;
}
.page-link::before,
.page-link::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.75em;
  height: 1.75em;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--link);
  opacity: 0.25;
  transform: translate(-50%, -50%);
  z-index: -1;
  transition: var(--trans) ease;
}
.page-link::after {
  border: none;
  background: var(--link);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
}
.page-link.active::before {
  background: var(--link);
  border-color: transparent;
  opacity: 1;
}
.page-link:hover::before {
  opacity: 0.1;
}
.page-link:hover::after {
  transform: translate(-50%, -50%) scale(1);
  opacity: 0.1;
}

/*previous and next page buttons*/
.prev-page-link, .next-page-link {
  width: 1.75em;
  height: 1.75em;
}
.prev-page-link::after, .next-page-link::after {
  width: 0.55em;
  height: 0.55em;
}

/********************************* Styling error popups (on download) *********************************/
#popup-cont {
  display: flex;
  flex-direction: column;
  position: fixed;
  bottom: 0;
  width: 100%;
  max-width: 20em;
  z-index: 10;
}
.popup-wrapper {
  overflow: hidden;
  max-height: 0;
  margin: 0; /*will be 0.25em 0 on transition in*/
}
.popup {
  display: flex;
  background: var(--error-light);
  color: var(--error);
  border-radius: var(--radius);
  overflow: hidden;
}
.popup-close {
  position: relative;
  width: 1.25em;
  flex-basis: 1.25em;
  flex-shrink: 0;
  background: var(--error);
  transition: var(--trans) ease;
}
.popup-close::before,
.popup-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.75em;
  height: 2px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: white;
  opacity: 0.8;
  transition: var(--trans) ease;
}
.popup-close::before {
  transform: translate(-50%, -50%) rotate(-45deg);
}
.popup-close:hover {
  cursor: pointer;
  width: 1.75em;
  flex-basis: 1.75em;
}
.popup-close:hover::before, 
.popup-close:hover::after {
  opacity: 1;
}
.popup > p {
  margin: 0.5em 1em;
}