html,
body {
  margin: 0;
  height: 100%;
}

body {
  --highlighted-bg: rgb(62 43 174);
  --highlighted-text: #d6d6d6;
  --highlighted-text-active: #f1f1f1;

  font-family: "Lato", sans-serif;
}

main {
  margin: 0.5em;
}

p,
ul {
  width: 90%;
  margin-left: auto;
  margin-right: auto;
}

li + ul {
  padding-left: 20px;
}

img {
  max-width: 100%;
}

[title="YouTube video player"] {
  margin: auto;
  width: min(560px, 100%);
  aspect-ratio: 16/9;
}

.skipToMainContent {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 1em;
  background-color: black;
  color: var(--highlighted-text);
  opacity: 0;

  &:focus {
    left: 50%;
    transform: translateX(-50%);
    opacity: 1;
  }
}

.pagewrapper {
  display: flex;
  align-items: stretch;
  position: relative;
  min-height: 100%;

  @media screen and (width < 594px) {
    flex-direction: column;
  }
}

.sidenav,
.mobilenavheader {
  background-color: var(--highlighted-bg);
  min-width: 12.5em;

  a,
  label {
    margin: 6px 8px 6px 16px;
    text-decoration: none;
    color: var(--highlighted-text);
    display: block;

    &:hover,
    &:active,
    &:focus {
      color: var(--highlighted-text-active);
    }
  }

  .homelink {
    font-size: 2rem;
    margin: 0.675em 0;
  }
}

.mobilenavheader {
  display: none;

  [type="checkbox"] {
    display: none;
  }
}

@media (width < 594px) {
  .mobilenavheader {
    display: flex;
    text-align: center;
    z-index: 2;
    height: 1.2em;
    align-items: center;
    font-size: 2em;
    line-height: 1.2em;
    min-width: 0;

    .hamburger {
      display: block;
      cursor: pointer;
      margin: 0;

      &:before {
        content: "≡";
        display: block;
        font-size: 1em;
        width: 1em;
        height: 1em;
        margin-top: -0.4em;
      }
    }

    .homelink {
      margin: 0 0 0.2em;
      font-size: 1em;
    }
  }

  .sidenav {
    display: block;
    position: absolute;
    top: 2.4em; /* height of mobilenavheader x font-size */
    left: 0;
    transform: translateY(-100%);
    z-index: 1;
    padding-bottom: 1em;
    transition: transform linear 0.2s;

    .homelink {
      display: none;
    }
  }

  .mobilenavheader:has(.hamburger [type="checkbox"]:checked) + .sidenav {
    transform: translateY(0);
  }
}

.homepage {
  text-align: center;

  .header {
    text-align: left;
    position: relative;
    margin-left: max(7.5vw, 9.5%);

    @media screen and (width < 960px) {
      margin-left: 1em;
    }
  }
  .header__heading {
    font-weight: normal;
    font-size: 1rem;
    margin: 2% 0 0 0;
    display: inline-block;

    a {
      text-decoration: none;
      color: inherit;
    }
  }
  .header__introducing {
    font-size: max(2vw, 0.75em);
    font-family: "Manifestly";
  }
  .header__title {
    font-size: max(5vw, 1.875em);
    font-family: "DePixel";
    text-transform: uppercase;
    display: block;
  }
  .header__features {
    font-size: max(1.5vw, 0.9em);
    font-family: "Arial";
    margin-top: 0;
  }

  @media screen and (width < 594px) {
    .header__heading {
      font-size: 1.8em;
    }
    .header__features {
      font-size: 1.2em;
    }
  }
  .header__image {
    width: 50%;
    margin-top: -22%;
    margin-left: 34%;
    position: relative;
    z-index: -1;

    @media screen and (width < 960px) {
      display: block;
      z-index: inherit;
      margin: auto;
      max-width: 100%;
      width: min(100%, 335px);
    }
  }
  h2 {
    width: 100%;
  }
  p {
    text-align: left;
  }
  .announce {
    font-weight: bold;
    font-size: 2em;
  }
}

.underconst {
  padding-top: 100px;
}

.gallery {
  display: flex;
  width: 90%;
  margin: auto;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 1200px;
}

.postPreviewBox {
  width: 200px;
  margin: 8px 0;
  border: 1px solid #777;
  padding: 8px;
  box-sizing: border-box;
  background-color: #fff;
}
.postPreviewBox img {
  width: 100%;
  height: 184px;
  border: 1px solid #777;
  object-fit: cover;
}
.postPreviewBox figcaption {
  text-align: center;
  padding: 8px 4px;
}

.diagram {
  padding: 8px 4px;
  text-align: center;
}

.diagram figcaption {
  padding: 8px 4px;
  text-align: center;
  color: #555;
  font-style: italic;
  font-size: small;
}

table {
  border-collapse: collapse;
}

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

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

table th {
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: left;
  background-color: #7a7a7a;
  color: white;
}

pre {
  background: #f2f2f2;
  border: 1px solid #ddd;
  border-left: 3px solid #dfc114;
  color: #7a7a7a;
  page-break-inside: avoid;
  font-family: monospace;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 1.6em;
  max-width: 100%;
  overflow: auto;
  padding: 1em 1.5em;
  display: block;
  word-wrap: break-word;
}

.stepImages {
  position: relative;
  width: 60%;

  @media screen and (width < 796px) {
    width: auto;
  }
}

.steptext {
  width: 40%;
  font-size: large;

  ul {
    width: auto;
    padding-left: 1em;
  }

  @media screen and (width < 796px) {
    width: auto;
  }
}

.stepLittleImage {
  height: 100px;
  padding-right: 8px;
}

.stepBigImage {
  width: 100%;
  padding-bottom: 16px;
}

.stepTitle {
  color: black;
  text-decoration: none;
}

.stepContent {
  display: flex;
  gap: 10px;

  @media screen and (width < 796px) {
    display: block;
  }
}

.zoomModal {
  position: fixed;
  left: 0px;
  top: 0px;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
}

.zoomImg {
  padding-top: 2.5%;
  padding-left: 20%;
  height: 90%;
}

.modalX {
  text-shadow: 3px 4px 7px black;
  position: absolute;
  left: 21%;
  top: 6%;
  color: white;
  font-size: xxx-large;
}
