header a img {
  filter: invert(1);
}

@media screen and (min-width: 30em) {
  header a .mw5-ns {
    max-width: 24rem !important;
  }
}

body {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

section:empty {
  display: none !important;
}

.hidden-small {
  display: none;
}

@media screen and (min-width: 60em) {
  footer {
    position: sticky;
    bottom: 0;
  }
}

.measure-wide {
  max-width: 64em;
}

header h1 {
  word-break: break-word;
}

img {
  max-height: 100%;
}

.unset-image-width img {
  width: unset;
  display: inline-block;
}

.unset-image-width {
  display: inline-block;
}

.image-half-size img {
  max-width: 50%;
}

.center-image {
  width: 100%;
}

.center-image img {
  margin-right: auto;
  margin-left: auto;
  display: block;
}

.width-50 img {
  width: 50%;
}

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

.center-content img {
  margin: auto;
}

.list-inline {
  display: inline-block;
}

/* Tables */
main table {
  width: 100%;
}

main td,
main th {
  padding: 0.3em;
}

main tbody tr:nth-of-type(odd) {
  background-color: #ddd;
}

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

figcaption p {
  margin-block-start: 0;
  font-style: italic;
}

/* ToC */
.nested-list-reset ul {
  margin-left: 1em;
  padding-top: 1em;
  list-style-type: decimal;
}

.nested-list-reset ul ul {
  margin-left: 1em;
  padding-top: 1em;
  list-style-type: lower-alpha;
}

/* figure */
figure {
  margin-left: 0;
  margin-right: 0;
}

/* dialog */
.dialog {
  display: none;
  text-align: center;
}

.dialog:target {
  display: block;
}

/* search */
@keyframes spin {
  100% {
    transform: rotateY(360deg);
  }
}

.search {
  display: flex;
  justify-content: center;
  border: 1px solid;
  min-width: 1em;
  line-height: 1;
  border-radius: 0.75em;
  padding: 0.25em;
  margin-right: 1em;
}

.search-icon {
  cursor: pointer;
  width: 1em;
  height: 1em;
  margin: 0;
  vertical-align: bottom;
}

.search[data-running] .search-icon {
  animation: spin 1.5s linear infinite;
}

.search-input {
  border-width: 0;
  padding: 0;
  margin: 0;
  width: 0;
  outline: none;
  background: transparent;
  transition: width 0.5s;
}

.search-input:focus {
  margin-left: 0.5em;
  width: 10em;
}

@media screen and (max-width: 60em) {
  .search {
    display: none;
  }
}

/* Links */
.frontpage-links {
  line-height: 2em;
  text-align: center;
}

.frontpage-links .link {
  white-space: nowrap;
}

/* Extra social icons */
.flickr {
  fill: #bababa;
}

.flickr:hover {
  fill: #0063dc;
}


/* Attachments */

.attachment {
  margin-top: 1em;
  border: 1px solid #00357a;
  border-radius: 0.3em;
  width: 100%;
  padding: 0;
  display: flex;
  background-color: #efefef;
}


.attachment-end {
  padding: 1em;
  justify-self: center;
  align-self: center;
}

.attachment-end img {
  max-width: 10em;
  max-height: 24em;
}

@media screen and (max-width: 60em) {
  .attachment {
    flex-direction: column-reverse;
  }

}

/* Factbox */

.factbox p:first-child {
  margin-top: 0;
}

.factbox p:last-child {
  margin-bottom: 0;
}

/* Utilities */

.translate-x--50 {
  transform: translateX(-50%);
}

.wb-bw {
  word-break: break-word;
}

.to-ell {
  text-overflow: ellipsis;
}

/* Colors for alerts */

/* MUI Colors */
.mui-green { color: #2e7d32; }
.b--mui-green { border-color: #2e7d32; }
.bg-mui-green-light { background-color: #e8f5e9; } /* green[50] */

.mui-red { color: #d32f2f; }
.b--mui-red { border-color: #d32f2f; }
.bg-mui-red-light { background-color: #ffebee; } /* red[50] */

.mui-amber { color: #ed6c02; }
.b--mui-amber { border-color: #ed6c02; }
.bg-mui-amber-light { background-color: #fff8e1; } /* amber[50] */

.mui-blue { color: #0288d1; }
.b--mui-blue { border-color: #0288d1; }
.bg-mui-blue-light { background-color: #e3f2fd; } /* blue[50] */

.mui-grey { color: #5f6368; }            
.b--mui-grey { border-color: #bdbdbd; }  
.bg-mui-grey-light { background-color: #e8e8e8; }

/* Filled variants (strong background) */
.bg-mui-green-filled { background-color: #2e7d32; color: #fff; }
.bg-mui-red-filled { background-color: #d32f2f; color: #fff; }
.bg-mui-amber-filled { background-color: #ed6c02; color: #fff; }
.bg-mui-blue-filled { background-color: #0288d1; color: #fff; }
.bg-mui-grey-filled { background-color: #5f6368; color: #fff; }
