.docs-archive__main-section {
  padding: 20px 10px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.docs-archive__title.page-header__title {
  display: block;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.docs-archive__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  /* 2 columns */
  /* grid-template-columns: repeat(2, 1fr); */
  gap: 1.5rem;
  margin-top: 2rem;
}

.docs-archive__card {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1rem;
  background-color: var(--color-background-secondary);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.dark-theme .docs-archive__card {
  background-color: #260000;
}

.docs-archive__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.docs-archive__card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.docs-archive__card-description {
  font-size: 1rem;
  color: var(--color-text-secondary);
}

@media (min-width: 768px) {
  .docs-archive__cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .docs-archive__cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (prefers-color-scheme: dark) {
  .docs-archive__card {
    background-color: #260000;
  }
}

.docs-page__main {
  width: 100%;
  min-width: 0;
}

.docs-page__content-wrapper {
  /* splits up main content and sidebar */
  display: flex;
  gap: 20px;
}

main:has(.docs-page__main-section) {
  flex: 1;
}

.docs-page__main-section.main-section {
  width: 100%;
  max-width: 800px;
}

.docs-page__mobile-nav-container {
  display: none;
  z-index: 2;
}
@media (max-width: 992px) {
  .docs-page__mobile-nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 60px;
    background-color: var(--color-background);
    padding: 10px;
    border-bottom: 1px solid var(--color-border);
  }
}


:root:has(.docs-sidebar.sidebar--open) {
  overflow: hidden;
}

.docs-sidebar {
  border: 1px solid var(--color-border);
  position: sticky;
  top: 62px;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  scrollbar-width: thin;
  background: var(--color-background);
  z-index: 3;

  position: fixed;
  z-index: 4;
  top: 0;
  transform: translate(-620px, 0);
  transition: transform 0.2s ease-in-out;
  min-width: 80vw;
}
.docs-sidebar__title {
  font-size: 1rem;
  font-weight: 500;
  margin: 1rem;
  padding: 0 0 1rem 0;
  border-bottom: 1px solid var(--color-border);
}
.docs-sidebar.sidebar--open {
  transform: translate(0, 0);
  transition: transform 0.2s ease-in-out;
}
.docs-sidebar.sidebar--closed {
  display: none;
}
/* Make rest of page inert when sidebar is open */
body:has(.docs-sidebar.sidebar--open) .docs-sidebar ~ *,
body:has(.docs-sidebar.sidebar--open) > * > footer,
body:has(.docs-sidebar.sidebar--open) > * > main,
body:has(.docs-sidebar.sidebar--open)
  > *
  > header
  > *:not(.docs-sidebar__toggle),
body:has(.docs-sidebar.sidebar--open) > * > .docs-page__mobile-nav-container {
  pointer-events: none;
  user-select: none;
}
body:has(.docs-sidebar.sidebar--open) .docs-sidebar ~ *::after,
body:has(.docs-sidebar.sidebar--open) > * > footer::after,
body:has(.docs-sidebar.sidebar--open) > * > main::after,
body:has(.docs-sidebar.sidebar--open)
  > *
  > header
  > *:not(.docs-sidebar__toggle)::after,
body:has(.docs-sidebar.sidebar--open)
  > *
  > .docs-page__mobile-nav-container::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.2);
  z-index: 0;
}
.docs-sidebar__close-container {
  display: flex;
  justify-content: flex-end;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--color-border);
}
.docs-sidebar__nav {
  padding: 1rem;
  width: 100%;
}
.docs-sidebar__list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.docs-sidebar__item {
  margin-bottom: 0.5rem;
}
.docs-sidebar__link {
  text-decoration: none;
  color: var(--color-primary);
  font-weight: 500;
}
.docs-sidebar__link:hover {
  text-decoration: underline;
}
.docs-sidebar__toggle {
  border: none;
  background: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-primary);
}
.docs-sidebar__link::before {
  /* Make link bold without shifting layout */
  content: attr(data-content);
  font-weight: bold; /* This sets the width */
  text-decoration: underline;
  display: block;
  height: 0;
  overflow: hidden; /* Hides the content visually */
  visibility: hidden; /* Ensures it is hidden from view and screen readers */
}
.docs-sidebar__link--active {
  font-weight: 700;
  text-decoration: underline;
}

@media (min-width: 992px) {
  .docs-sidebar {
    position: sticky;
    top: 62px;
    transform: translate(0, 0);
    height: calc(100vh - 62px);
    height: calc(100svh - 62px);
    z-index: 2;
    border-top: none;
    border-bottom: none;
    border-left: none;
    display: block;
    min-width: 208px;
    max-width: 268px;
    width: 25%;
  }
  .docs-sidebar.sidebar--closed {
    display: block;
  }
  .docs-sidebar__toggle {
    display: none;
  }
  .docs-sidebar__close-container {
    display: none;
  }
}


footer {
    padding: 24px 8px;
    display: flex;
    flex-direction: column;
    column-gap: 20px;
    row-gap: 20px;
    justify-content: center;
    align-items: center;
    box-shadow: 0px -4px 15px rgba(0, 0, 0, 0.1);
    margin-top: auto;
    z-index: 3;
}

footer nav {
    display: flex;
    column-gap: 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

footer nav a,
footer nav a span {
    font-weight: 500;
    text-decoration: none;
}

.rss-link {
    display: flex;
    align-items: center;
    column-gap: 6px;
}

.rss-icon {
    width: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-theme footer {
    /* border-top: 1px solid var(--color-border); */
    background-color: #1e0000;
    background-color: #260000;
}

@media (prefers-color-scheme: dark) {
    footer {
        /* border-top: 1px solid var(--color-border); */
        background-color: #1e0000;
        background-color: #260000;
    }
}

.homepage-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 8px;
    /* box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1); */
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-background);
    min-height: 18rem;
    height: 86vh;
    height: 86svh;
}

.homepage-header .page-header__title {
    font-weight: bold;
    font-size: 5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.homepage-header .page-header__title .secondary {
    font-weight: normal;
    font-size: 1.5rem;
    color: var(--color-text-secondary);
    margin-top: 8px;
}

.homepage-header__subtitle {
    margin-top: 12px;
    font-size: 1.1rem;
    width: 100%;
    max-width: 600px;
    text-align: center;
    color: var(--color-text-secondary);
}

.homepage-header .cta-buttons {
    margin-top: 20px;
    display: flex;
    column-gap: 16px;
}

.homepage-header .cta-buttons a {
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 5px;
    font-weight: 600;
    padding-top: 11px;
    transition: background-color 0.3s, color 0.3s, filter 0.3s;
}

.homepage-header a.cta-btn-primary {
    background-color: var(--color-primary);
    color: #fff;
}

.homepage-header a.cta-btn-primary:hover {
    /* background-color: darken(var(--color-primary), 10%); */
    filter: brightness(90%);
}

.homepage-header a.cta-btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.homepage-header a.cta-btn-secondary:hover {
    background-color: var(--color-primary);
    color: #fff;
}

.dark-theme .homepage-header {
    background-color: var(--color-background);
    border-bottom: 1px solid var(--color-border);
}

* {
    box-sizing: border-box;
}

:root {
    --color-primary: #ad0303;
    --color-secondary: rgb(255, 108, 59);
    --color-background: #fff;
    --color-text: #333333;
    --color-text-secondary: #666666;
    --font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --color-border: #e0e0e0;
    scrollbar-color: var(--color-primary) var(--color-background);
}

body {
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-family);
    margin: 0;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Dark theme support */
:root:has(.dark-theme) {
    /* background-color: #1e0000; */
    color: #e0e0e0;
    --color-text: #e0e0e0;
    --color-background: #260000;
    --color-background: #1e0000;
    /* --color-background: #170000; */
    --color-primary: #d45858;
    /* --color-primary: #f38c8c; */
    --color-border: #4a1a1a;
    --color-text-secondary: #aaaaaa;
}

p, div, span, li, a {
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings:
        "wdth" 100;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-primary);
    font-family: "Momo Trust Display", sans-serif;
    font-weight: 400;
    font-style: normal;
}

/* Gradient for h1 and h2 */
h1, h2 {
    color: #ad0303;
    background-image: linear-gradient(45deg, #ad0303 , #c11401 25%, #eb280a 50%, #FF3300 75%, rgb(255, 108, 59) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.dark-theme h1, .dark-theme h2 {
    color: #ff7e5f;
    background-image: linear-gradient(45deg, rgb(255, 108, 59) , #FF3300 25%, #eb280a 50%, #cf1e0a 75%, #f53535 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.main-section {
    padding: 20px 10px;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* code {
    text-wrap: wrap;
    overflow-wrap: break-word;
} */

pre {
    background-color: #2d2d2d;
    color: #f4f4f4;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    scrollbar-width: thin;
}

code:not(pre code) {
    background-color: #e2e2e2;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95em;
    overflow-x: auto;
    display: inline-flex;
    scrollbar-width: thin;
    max-width: 100%;
    line-height: normal;
}

.dark-theme code:not(pre code) {
    background-color: #3a3a3a;
    color: #e0e0e0;
}

@media (prefers-color-scheme: dark) {
    :root {
        /* background-color: #1e0000; */
        color: #e0e0e0;
        --color-text: #e0e0e0;
        --color-background: #260000;
        --color-background: #1e0000;
        /* --color-background: #170000; */
        --color-primary: #d45858;
        /* --color-primary: #f38c8c; */
        /* --color-primary: rgb(255, 108, 59); */
        --color-border: #4a1a1a;
        --color-text-secondary: #aaaaaa;
    }

    h1, h2 {
        color: #ff7e5f;
        background-image: linear-gradient(45deg, rgb(255, 108, 59) , #FF3300 25%, #eb280a 50%, #cf1e0a 75%, #f53535 100%);
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        display: inline-block;
    }

    code:not(pre code) {
        background-color: #3a3a3a;
        color: #e0e0e0;
    }
}

.page-header {
    display: flex;
    column-gap: 20px;
    justify-content: center;
    align-items: center;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
    padding: 0 8px;
}

.page-header__title {
    font-weight: bold;
}

@media (min-width: 300px) {
    .page-header {
        flex-wrap: nowrap;
    }
}

.pagination-list {
  list-style: none;
  display: flex;
  justify-content: center;
  padding: 0;
}

.pagination-item {
  margin: 0 5px;
}

.pagination-previous,
.pagination-next {
  font-weight: bold;
}

.pagination-item.active {
  text-decoration: underline;
}

.pagination-next a span,
.pagination-previous a span {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.pagination-next a::after,
.pagination-previous a::before {
  font-weight: normal;
}

.pagination-next a::after {
  content: " »";
}

.pagination-previous a::before {
  content: "« ";
}


.site-header {
    padding: 20px 8px;
    display: flex;
    column-gap: 20px;
    justify-content: center;
    align-items: center;
    box-shadow: 0px -4px 15px rgba(0, 0, 0, 0.1);
    background-color: var(--color-background);
    position: sticky;
    top: 0;
    z-index: 3;
}

.site-header nav {
    display: flex;
    column-gap: 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-left: auto;
    margin-right: auto;
}

.site-header nav a,
.site-header nav a span {
    font-weight: 500;
    text-decoration: none;
}

.site-header .rss-link {
    display: flex;
    align-items: center;
    column-gap: 6px;
}

.site-header .rss-icon {
    width: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-theme .site-header {
    /* border-bottom: 1px solid var(--color-border); */
    background-color: #1e0000;
    background-color: #260000;
}

@media (prefers-color-scheme: dark) {
    .site-header {
        /* border-bottom: 1px solid var(--color-border); */
        background-color: #1e0000;
        background-color: #260000
    }
}

:root:has(.sidebar--open) {
  overflow: clip;
}

.this-page-sidebar {
  border: 1px solid var(--color-border);
  position: sticky;
  top: 62px;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  scrollbar-width: thin;
  background: var(--color-background);
  z-index: 3;

  position: fixed;
  z-index: 4;
  top: 0;
  right: 0;
  transform: translate(620px, 0);
  transition: transform 0.2s ease-in-out;
  min-width: 80vw;
}
.this-page-sidebar.sidebar--open {
  transform: translate(0, 0);
  transition: transform 0.2s ease-in-out;
}
.this-page-sidebar.sidebar--closed {
  display: none;
}
/* Make rest of page inert when sidebar is open */
body:has(.this-page-sidebar.sidebar--open) .this-page-sidebar ~ *,
body:has(.this-page-sidebar.sidebar--open) > * > footer,
body:has(.this-page-sidebar.sidebar--open) > * > main,
body:has(.this-page-sidebar.sidebar--open)
  > *
  > header
  > *:not(.this-page-sidebar__toggle),
body:has(.this-page-sidebar.sidebar--open)
  > *
  > .docs-page__mobile-nav-container {
  pointer-events: none;
  user-select: none;
}
body:has(.this-page-sidebar.sidebar--open) .this-page-sidebar ~ *::after,
body:has(.this-page-sidebar.sidebar--open) > * > footer::after,
body:has(.this-page-sidebar.sidebar--open) > * > main::after,
body:has(.this-page-sidebar.sidebar--open)
  > *
  > header
  > *:not(.this-page-sidebar__toggle)::after,
body:has(.this-page-sidebar.sidebar--open)
  > *
  > .docs-page__mobile-nav-container::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.2);
  z-index: 0;
}
.this-page-sidebar__close-container {
  display: flex;
  justify-content: flex-end;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--color-border);
}
.this-page-sidebar__title {
  font-size: 1rem;
  font-weight: 500;
  margin: 1rem;
  padding: 0 0 1rem 0;
  border-bottom: 1px solid var(--color-border);
}
.this-page-sidebar__nav {
  padding: 1rem;
  width: 100%;
}
.this-page-sidebar__list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.this-page-sidebar__item {
  margin-bottom: 0.5rem;
}
.this-page-sidebar__link {
  text-decoration: none;
  color: var(--color-primary);
  font-weight: 500;
}
.this-page-sidebar__link:hover {
  text-decoration: underline;
}
.this-page-sidebar__toggle {
  border: none;
  background: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-primary);
}
.this-page-sidebar__link::before {
  /* Make link bold without shifting layout */
  content: attr(data-content);
  font-weight: bold; /* This sets the width */
  text-decoration: underline;
  display: block;
  height: 0;
  overflow: hidden; /* Hides the content visually */
  visibility: hidden; /* Ensures it is hidden from view and screen readers */
}
.this-page-sidebar__link--active {
  font-weight: 700;
  text-decoration: underline;
}
.this-page-sidebar__item--h3 {
  margin-left: 10px;
  font-size: 0.95em;
}
.this-page-sidebar__item--h3 > a {
  font-size: 0.95em;
}
.this-page-sidebar__item--h4 {
  margin-left: 20px;
}
.this-page-sidebar__item--h4 > a {
  font-size: 0.9em;
}

@media (min-width: 992px) {
  .this-page-sidebar {
    position: sticky;
    top: 62px;
    transform: translate(0, 0);
    height: calc(100vh - 62px);
    height: calc(100svh - 62px);
    z-index: 2;
    border-top: none;
    border-bottom: none;
    border-right: none;
    display: block;
    min-width: 208px;
    max-width: 268px;
    width: 25%;
  }
  .this-page-sidebar.sidebar--closed {
    display: block;
  }
  .this-page-sidebar__toggle {
    display: none;
  }
  .this-page-sidebar__close-container {
    display: none;
  }
}
