pre,
code {
  background-color: #080808;
}

pre {
  overflow: auto;
  padding: 0.5rem !important;
}

th {
  text-align: left;
}

table {
  width: 100%;
  border-color: #444444;
}

* {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

body {
  font-family: "Open Sans", sans-serif;
  line-height: 1.75em;
  font-size: 16px;
  background-color: #191919;
  color: #deeeed;
}

.simple-container {
  max-width: 675px;
  margin: 0 auto;
  padding-top: 70px;
  padding-bottom: 20px;
}

.simple-print {
  fill: white;
  stroke: white;
}
.simple-print svg {
  height: 100%;
}

.simple-close {
  color: white;
  border-color: white;
}

.simple-ext-info {
  border-top: 1px solid #444444;
}

p {
  font-size: 16px;
}

h1 {
  font-size: 30px;
  line-height: 34px;
}

h2 {
  font-size: 20px;
  line-height: 25px;
}

h3 {
  font-size: 16px;
  line-height: 27px;
  padding-top: 15px;
  padding-bottom: 15px;
}

hr {
  height: 1px;
  background-color: #444444;
  border: none;
  width: 100%;
  margin: 0px;
}

a[href] {
  color: #7788aa;
}

a[href]:hover {
  color: #789978;
}

img {
  max-width: 100%;
}

li {
  line-height: 1.5em;
}

aside,
[class*="sidebar"],
[id*="sidebar"] {
  max-width: 90%;
  margin: 0 auto;
  border: 1px solid #444444;
  padding: 5px 15px;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

@media (min-width: 1921px) {
  body {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  main {
    padding: 1.5rem 1rem;
  }
  .desktop-only {
    display: none;
  }
}

.dropdown {
  position: relative;
  margin-right: 3rem;
  float: right;
}

.dropdown summary {
  cursor: pointer;
  color: #7788aa;
}

.dropdown summary:hover {
  color: #789978;
}

.dropdown summary::marker {
  content: "";
}

.dropdown summary::-webkit-details-marker {
  display: none;
}

.dropdown summary::after {
  content: " ▾";
}

.dropdown[open] summary::after {
  content: " ▴";
}

.dropdown-content {
  display: none;
  position: absolute;
  background: #080808;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.dropdown-content a {
  display: block;
  padding: 0.2rem 1rem;
}

.dropdown[open] .dropdown-content {
  display: block;
  z-index: 1;
}

nav.top-nav > a {
  padding-right: 0.75rem;
}

/* Content wrapper with sidebar layout */
.content-wrapper {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

/* TOC Sidebar */
.toc-sidebar {
  flex: 0 0 220px;
  position: sticky;
  top: 1rem;
  align-self: flex-start;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  border: 1px solid #444444;
  padding: 1rem;
  margin: 0;
  font-size: 0.875rem;
}

.toc-title {
  font-weight: bold;
  margin-bottom: 0.75rem;
  color: #789978;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.toc-sidebar ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.toc-sidebar ul ul {
  padding-left: 1rem;
}

.toc-sidebar li {
  line-height: 1.4;
  margin-bottom: 0.4rem;
}

.toc-sidebar a {
  color: #aabbcc;
  text-decoration: none;
}

.toc-sidebar a:hover {
  color: #789978;
}

/* Main article content */
article {
  flex: 1;
  min-width: 0;
}

/* Heading anchor links */
h1, h2, h3, h4, h5, h6 {
  position: relative;
}

.heading-anchor {
  margin-left: 0.5rem;
  color: #555555;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  font-weight: normal;
}

h1:hover .heading-anchor,
h2:hover .heading-anchor,
h3:hover .heading-anchor,
h4:hover .heading-anchor,
h5:hover .heading-anchor,
h6:hover .heading-anchor {
  opacity: 1;
}

.heading-anchor:hover {
  color: #789978;
}

/* Page navigation footer */
.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #444444;
}

.nav-prev,
.nav-next {
  padding: 0.5rem 1rem;
  border: 1px solid #444444;
  border-radius: 4px;
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.nav-prev:hover,
.nav-next:hover {
  border-color: #789978;
  background-color: rgba(120, 153, 120, 0.1);
}

.nav-spacer {
  flex: 1;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .content-wrapper {
    flex-direction: column;
  }

  .toc-sidebar {
    position: static;
    flex: none;
    width: 100%;
    max-width: 100%;
    max-height: none;
  }

  .page-nav {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .nav-prev,
  .nav-next {
    flex: 1;
    text-align: center;
  }

  .nav-spacer {
    display: none;
  }
}
