* {
  font-family: sans-serif;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: #eee;
}

.banner {
  background-image: url(/banner.webp);
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  height: 200px;
  position: absolute;
  top: 0;
  z-index: 1;
}

.banner-overlay {
  background-image: linear-gradient(
    to bottom,
    #eeeeee00 0%,
    #eeeeee00 25%,
    #eeeeeeff 100%
  );
  width: 100%;
  height: 200px;
  position: absolute;
  top: 0;
  z-index: 2;
}

.main {
  z-index: 3;
  position: absolute;
  top: 150px;
  left: 225px;
  width: calc(100% - 225px);
  min-height: calc(100vh - 150px);
}

.sidebar {
  position: absolute;
  top: 0;
  left: 0;
  width: 225px;
  z-index: 4;

  display: flex;
  flex-direction: column;
  gap: 10px;

  align-items: center;
  padding-top: 25px;
}

.side-links {
  width: calc(100% - 15px);
}

.side-links a {
  display: block;
  margin-bottom: 0.3em;
  color: #0645ad;
  text-decoration: none;

  font-size: 9.5pt;
}

.side-links p {
  display: block;
  margin-bottom: 0.3em;
  font-size: 9.5pt;
  color: #535353;
}

.side-links a:hover {
  text-decoration: underline;
}

.side-links a:visited {
  color: #0b0080;
}

.side-links h3 {
  background: linear-gradient(
    to right,
    rgba(200, 204, 209, 0) 0,
    #c8ccd1 33%,
    #c8ccd1 66%,
    rgba(200, 204, 209, 0) 100%
  );
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: center bottom;

  font-size: 9.5pt;
  font-weight: normal;
  color: #535353;

  margin-bottom: 0.5em;
}

.doc-links {
  position: absolute;
  top: 0;
  left: 225px;
  height: 150px;
  width: calc(100% - 225px);

  display: flex;
  align-items: end;

  z-index: 5;
}

.doc-links a {
  border-right: 1px solid #a7d7f9;
  border-bottom: 1px solid #a7d7f9;
  border-top: 1px solid #a7d7f9;
  padding: 0.5em 0.7em;

  display: flex;
  align-items: end;

  color: black;
  text-decoration: none;

  background: #f6f6f6;
}

.doc-links a:first-child {
  border-left: 1px solid #a7d7f9;
}

.doc-links a:not(.selected):hover {
  text-decoration: underline;
}

.doc-links a span {
  font-size: 0.8em;
  position: relative;
  z-index: 10;
  color: #0645ad;
}

.doc-links a.selected span {
  color: black;
}

.doc-links a.selected {
  border-bottom: 1px solid transparent;
  background: white;
}

.doc-links .short-spacer {
  width: 100px;
  border-bottom: 1px solid #a7d7f9;
}

.doc-links .spacer {
  flex: 1;
  border-bottom: 1px solid #a7d7f9;
}

.doc-body {
  border-bottom: 1px solid #a7d7f9;
  border-left: 1px solid #a7d7f9;

  padding: 1.25em;

  position: relative;
  z-index: 10;

  min-height: 300px;

  font-size: 0.9em;

  background-color: white;
}

.doc-byline {
  font-size: 0.9em;
  margin-top: 0.4em;
}

.doc-injected {
  line-height: 1.6;
  font-family: sans-serif;
  color: #202122;
}

.doc-injected a {
  color: #0645ad;
  text-decoration: none;
}

.doc-injected a:hover {
  text-decoration: underline;
}

.doc-injected a:visited {
  color: #0b0080;
}

.side-links {
  padding-left: 22.5px;
  padding-right: 22.5px;
}

.side-links a {
  display: block;
  margin-bottom: 0.3em;
  color: #0645ad;
  text-decoration: none;

  font-size: 9.5pt;
}

.side-links p {
  display: block;
  margin-bottom: 0.3em;
  font-size: 9.5pt;
  color: #535353;
}

.side-links a:hover {
  text-decoration: underline;
}

.side-links a:visited {
  color: #0b0080;
}

.side-links h3 {
  background: linear-gradient(
    to right,
    rgba(200, 204, 209, 0) 0,
    #c8ccd1 33%,
    #c8ccd1 66%,
    rgba(200, 204, 209, 0) 100%
  );
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: center bottom;

  font-size: 9.5pt;
  font-weight: normal;
  color: #535353;

  margin-bottom: 0.5em;
}

.doc-footer {
  padding: 1.25em;
  font-size: 0.9em;
}

.doc-footer p {
  margin: 0;
  margin-bottom: 0.5em;
}

.doc-injected {
  margin-top: 1.25em;
}

.doc-title {
  font-size: 2em;
  font-family: Georgia, "Times New Roman", Times, serif;
  border-bottom: 1px solid #a2a9b1;
  padding-bottom: 0.2em;
}

.sgw-unknown-link,
.sgw-unknown-template {
  color: rgb(199, 25, 25);
}

.sgw-unknown-link {
  cursor: pointer;
}

.sgw-unknown-link:hover {
  text-decoration: underline;
}

.search {
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 150px;

  padding-bottom: 1px;

  display: flex;
  justify-content: right;
  align-items: end;

  z-index: 8;
}

.search-container {
  position: relative;
  width: 100%;
}

.search-container input {
  width: 100%;
  height: 32px;
  outline: none;
  border: 0;
  border-top: 1px solid #a7d7f9;

  padding: 5px;
  padding-top: 6px;
}

.search-container .search-results {
  position: absolute;
  top: 32px;
  left: -1px;
  width: calc(100% + 1px);

  z-index: 10;

  display: flex;
  flex-direction: column;

  border-left: 1px solid #a7d7f9;
  border-bottom: 1px solid #a7d7f9;
  border-top: 1px solid #a7d7f9;

  background-color: #f6f6f6;
}

.search-container .search-results .result {
  color: rgb(41, 41, 41);
  text-decoration: none;
  padding: 3px 5px;

  font-size: 12px;
}

.search-container .search-results .result:hover {
  background-color: #00000011;
}

.search-results.hidden {
  display: none;
}

.doc-injected::after {
  content: "";
  display: block;
  clear: both;
}

.sgw-external-link::after {
  content: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path style='fill: %230645ad;' d='M6 1h5v5L8.86 3.85 4.7 8 4 7.3l4.15-4.16zM2 3h2v1H2v6h6V8h1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1'/></svg>");
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  margin-left: 0.25em;
}

@media (max-width: 640px) {
  .banner,
  .banner-overlay,
  .sidebar,
  .main,
  .doc-links,
  .search {
    position: static;
    width: 100%;
    left: 0;
    top: 0;
  }

  .banner {
    display: none;
  }

  .banner-overlay {
    display: none;
  }

  body {
    display: flex;
    flex-direction: column;
  }

  .sidebar {
    order: 1;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;

    padding: 10px;
    padding-top: 30px;
    gap: 15px;
  }

  .sidebar img {
    width: 10vw;
    height: 10vw;
  }

  .side-links {
    display: none;
    width: auto;
    padding: 0;
  }

  .search {
    order: 2;
    padding: 10px;
    height: auto;
  }

  .search-container input {
    border: 1px solid #a7d7f9;
  }

  .mobile-hide {
    display: none;
  }

  .main {
    order: 4;
    width: 100%;
    padding: 0;
  }

  .doc-body {
    border-left: none;
    border-right: none;
    padding: 1em;
  }

  .doc-title {
    font-size: 1.6em;
  }

  .doc-injected {
    font-size: 0.95em;
  }

  .search-container .search-results {
    width: 100%;
    left: 0;

    border: 1px solid #a7d7f9;
    border-top: none;
  }
}
