:root {
  --left-pad: 140px;
  --window-width: calc(min(1200px, 100vw) - var(--left-pad));
}

div.search-item p {
    margin-left: 3em;
}

div.search-item details {
    margin-left: 3em;
}

#maincontent {
  padding-left: var(--left-pad);
  max-width: var(--window-width);
}

nav {
  /*padding-left: 140px;*/
  padding-left: var(--left-pad);
  width: 100%;
  position: sticky;
  top: 0;
  background: #6f8ea3;
  margin: 0;
  z-index: 10;
}

nav ul {
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: space-between;
  width: var(--window-width);
}

nav li {
  display: flex;
  margin: 5px;
}

li.menu-item {
  min-width: 150px;
  min-height: 50px;
  background: white;
  position: relative;
}

li.menu-item a, li.menu-item span {
  text-decoration: none;
  color: black;
  line-height: 50px;
  text-align: center;
  display: block;
  width: 100%;
  height: 100%;
}

nav li span {
  color: white;
}

li.menu-item form {
  min-width: 150px;
}

li.menu-item form button {
  background: none;
  border: none;
  cursor: pointer;
  line-height: 50px;
  text-align: center;
  width: 100%;
  height: 100%;
  margin: 0px;
  font-weight: inherit;
}

li.menu-item a.multiline, li.menu-item span.multiline {
  line-height: normal;
}

body, button, select, input, li > div {
  font-family: "Lato", sans-serif;
  font-size: 16pt;
}

h1 {
  font-size: 36pt;
  text-align: center;
}

h2, li.header-bullet {
  font-family: "Lato", sans-serif;
  font-size: 24pt;
}

h3 {
  font-family: "Lato", sans-serif;
  font-size: 20pt;
}

th {
  background-color: #6f8ea3;
  color: white;
  padding-top: 10px;
  padding-bottom: 10px;
}

tr:hover {
  background-color: lightgray;
}

td, th {
  padding-left: 20px;
  padding-right: 20px;
}

table {
  margin-bottom: 20px;
  border-collapse: collapse;
}

td {
  border-bottom: 1px solid gray;
}

input[type=number] {
  text-align: right;
}

form {
  width: fit-content;
}

form button {
  width: 80%;
  margin-left: 10%;
  display: block;
  max-width: 400px;
  margin-bottom: 20px;
  font-weight: bold;
}

form.delete-form button {
  margin-top: 20%;
  width: 100%;
}

form td button {
  width: 100%;
}

form span.button-row button {
  display: inline;
  margin-bottom: 0px;
}

td select {
  margin-top: 5px;
  margin-bottom: 5px;
}

form div {
  margin-bottom: 20px;
}

div.center-subtitle {
  width: fit-content;
}

div.center-subtitle h2 {
  margin-bottom: 10px;
  text-align: center;
}

div.center-subtitle h3 {
  width: 100%;
  text-align: center;
  margin-top: 10px;
}

#toc {
  float: left;
  top: 100px;
  position: fixed;
  width: 220px;
  max-height: calc(100% - 100px);
  overflow-y: scroll;
  font-size: 12pt;
}
#contents {
  margin-left: 250px;
}

.fake-anchor {
  visibility: hidden;
  position: relative;
  top: -20px;
}

.flex-row {
  display: flex;
  max-height: 60vh;
}
.flex-col {
  display: flex;
  flex-direction: row;
  flex-grow: 1;
  max-height: 100%;
  overflow-y: scroll;
}

fieldset.radio-row {
  border: none;
  margin-top: 10px;
  margin-bottom: 10px;
}
span.radio-block {
  padding: 5px;
}
.radio-block:has(input:checked) {
  background: #6f8ea3;
}

input[type=number] {
  text-align: center;
  width: 5em;
}

@keyframes status-fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

td.status {
  color: green;
  animation: 2s ease-out 0s 1 status-fade-out both;
  transition-behavior: allow-discrete;
}
