:root {
  --toc-width: 260px;
  --toc-gap: 32px;
  --toc-bg: #0f1117;
  --toc-border: #2b2f3a;
  --toc-link: #cdd7ff;
  --toc-link-hover: #ffffff;
  --toc-muted: #9aa4bf;
}

.inner {
  max-width: none !important;
  width: 100% !important;
  padding-left: 24px;
  padding-right: 24px;
}

#header_wrap .inner,
#main_content_wrap .inner,
#main_content {
  max-width: none !important;
  width: 100% !important;
}

#main_content_wrap,
.outer {
  width: 100% !important;
  max-width: none !important;
}

.page {
  display: grid;
  grid-template-columns: minmax(200px, var(--toc-width)) minmax(0, 1fr) minmax(200px, var(--toc-width));
  gap: var(--toc-gap);
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.toc {
  position: sticky;
  top: 24px;
  align-self: start;
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--toc-border);
  background: var(--toc-bg);
  border-radius: 10px;
  padding: 16px 14px 18px;
}

.toc-spacer {
  align-self: start;
  min-height: 1px;
}

.toc__title {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--toc-muted);
  margin-bottom: 12px;
}

.toc__nav {
  margin-bottom: 16px;
}

.toc__home {
  color: var(--toc-link);
  text-decoration: none;
  font-size: 0.95rem;
}

.toc__title {
  margin-top: 6px;
}

.toc__home:hover,
.toc__home:focus {
  color: var(--toc-link-hover);
  text-decoration: underline;
}

.toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc__item {
  margin: 6px 0;
}

.toc__item a {
  color: var(--toc-link);
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.35;
}

.toc__item--active a {
  color: var(--toc-link-hover);
  font-weight: 600;
}

.toc__item a:hover,
.toc__item a:focus {
  color: var(--toc-link-hover);
  text-decoration: underline;
}

.toc__item--h3 {
  margin-left: 12px;
  font-size: 0.92rem;
}

.toc__item--h4 {
  margin-left: 22px;
  font-size: 0.9rem;
}

.toc--empty {
  display: none;
}

.page-title {
  font-size: 1.65rem;
  margin: 18px 0 14px;
}

.content {
  text-align: justify;
}

#project_description {
  margin-top: 6px;
  color: #d5d9e5;
}

#header_wrap .inner {
  text-align: center !important;
}

#project_title {
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-align: center !important;
}

#project_tagline {
  color: var(--toc-link);
  text-align: center !important;
}

@media (max-width: 900px) {
  .page {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .toc {
    position: static;
    max-height: none;
    order: 2;
  }

  .toc-spacer {
    display: none;
  }
}
