/* Page content */
.history {
  margin-top: 4em;
}

/* Author text */
.history-author {
  text-align: center;
  color: #767676;
  font-size: 1.25em;
  margin-top: 0;
}

/* Header 2 */
h2 {
  margin-top: 4em;
}

/* Headers 3, 4, and 5 */
h3, h4, h5 {
  margin-top: 32px;
  color: #767676;
}

/* Grid for sidebar and page */
.sidebar-and-page {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
}

/* Sidebar grid */
.sidebar {
  background-color: white;
  margin: 6.25em 1.25em 0;
  padding: 0 1ch 1em 0;
  height: 32em;
  width: 24ch;
  overflow: auto;
}

/* Sidebar styling shared between all links */
.sidebar ol li a {
  display: inline-block;
  font-weight: bold;
  text-decoration: none;
  color: black;
  border: 2px solid white;
  word-break: break-word;
  transition:
    background-color 0.25s,
    border 0.25s;
}

/* Sidebar styling shared between all links when mouse-over or focused */
.sidebar ol li a:hover, .sidebar ol li a:focus {
  background-color: lightgray;
  cursor: pointer;
  border: 2px solid black;
}

/* Sidebar link h3, h4, h5 specific */
.sidebar ol li ol li ol li a {
  color: #767676;
}

/* Sidebar link h4, h5 specific */
.sidebar ol li ol li ol li ol li a{
  font-weight: normal;
}

.sidebar ol {
  padding-left: 1ch;
  margin: 0;
  margin-top: 0.5em;
}

/* Removes all markers from the sidebar */
.sidebar li {
  margin-bottom: 0.5em;
  display: block;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {

  /* Sidebar background in dark mode */
  .sidebar {
    background-color: #1A2D51;
  }

  /* Sidebar links in dark mode */
  .sidebar ol li a {
    border-color: #1A2D51;
    color: #E7E7E7;
  }

  /* Sidebar links hovered/focused in dark mode */
  .sidebar ol li a:hover, .sidebar ol li a:focus {
    border-color: #E7E7E7;
    background-color: #204279;
  }

  /* Sidebar lower header colors in dark mode */
  .sidebar ol li ol li ol li a {
    color: #B0B0B0;
  }

  /* Document author color in dark mode */
  .history-author {
    color: #B0B0B0;
  }
}

/* High contrast mode */
@media (forced-colors: active) {

  /* Makes sidebar links visible in high contrast mode */
  .sidebar ol li a {
    color: AccentColorText;
    border: 2px solid ButtonText;
    transition:
      border 0.1s;
  }

  /* Sidebar links hovered/focused in high contrast mode */
  .sidebar ol li a:hover, .sidebar ol li a:focus {
    border: 2px solid Highlight;
  }

  /* Makes the sidebar visible */
  .sidebar {
    border: 2px solid CanvasText;
  }
}

/* Any screen less than or equal to 1027 pixels in width */
@media screen and (max-width: 1027px) {

  /* Removes custom styling */
  .sidebar-and-page {
    display: unset;
  }

  /* Hides the sidebar */
  .sidebar {
    display: none;
  }
}

/* Any screen less than or equal to 649 pixels in width */
@media screen and (max-width: 649px) {

  /* Overrides all content image width (makes them bigger) */
  main img.content-image {
    min-width: 90%;
  }
}