/* User Provided Stylesheet */

/* Inline code: gray background like standard Markdown renderers */
code {
  background-color: #f0f0f0;
  padding: 0.15em 0.3em;
  border-radius: 3px;
  font-size: 0.9em;
}

/* Don't apply background to code inside code blocks */
pre code {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

.article {
  line-height: 1.5;
}

.p-2 {
    padding: .25rem .5rem .25rem .5rem;
}

.my-1 {
    margin-top: .15rem;
    margin-bottom: .15rem;
}

.h-9 {
    height: 1rem;
}

/* Widen the 6 content columns from max 10ch each (60ch total) to 15ch each (90ch total).
   This targets the subgrid on the article element, which is what actually constrains
   content width. The main grid is inherited from the page-level layout. */
@media (min-width: 768px) {
  article.article-grid.subgrid-gap {
    grid-template-columns:
      [screen-start] 0.5rem
      [screen-inset-start page-start page-inset-start body-outset-start] 1rem
      [body-start gutter-left-start] 1rem
      [body-inset-start] minmax(5ch, 15ch)
      [middle-start] minmax(5ch, 15ch)
      [gutter-left-end] minmax(5ch, 15ch)
      minmax(5ch, 15ch)
      [gutter-right-start] minmax(5ch, 15ch)
      [middle-end] minmax(5ch, 15ch)
      [body-inset-end] 1rem
      [body-end gutter-right-end body-outset-end page-inset-end page-end screen-inset-end] 0.5rem
      [screen-end] !important;
    display: grid !important;
  }
}

@media (min-width: 1024px) {
  article.article-grid.subgrid-gap {
    grid-template-columns:
      [screen-start] 0.5rem
      [screen-inset-start page-start page-inset-start body-outset-start] 1rem
      [body-start gutter-left-start] 1rem
      [body-inset-start] minmax(5ch, 15ch)
      [middle-start] minmax(5ch, 15ch)
      [gutter-left-end] minmax(5ch, 15ch)
      minmax(5ch, 15ch)
      [gutter-right-start] minmax(5ch, 15ch)
      [middle-end] minmax(5ch, 15ch)
      [body-inset-end] 1rem
      [body-end gutter-right-end body-outset-end page-inset-end page-end screen-inset-end] 0.5rem
      [screen-end] !important;
    display: grid !important;
  }
}

/* At xl (1280px+) the TOC sidebar appears fixed on the left.
   Push content to the right to avoid overlap. */
@media (min-width: 1280px) {
  main.article-grid {
    margin-left: 19.5rem;
  }

  /* Pin the TOC sidebar to the left instead of using the grid for positioning */
  .myst-primary-sidebar {
    left: 0 !important;
    width: 19.5rem !important;
    display: flex !important;
    grid-template-columns: none !important;
  }
}

@media (min-width: 1536px) {
  .myst-primary-sidebar {
    left: 0 !important;
    width: 19.5rem !important;
    display: flex !important;
    grid-template-columns: none !important;
  }
  .subgrid-gap {
      -moz-column-gap: 1rem;
      column-gap: 0.75rem;
  }
}

/* Keep header nav aligned left instead of centered on wide screens */
.myst-top-nav-bar {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Search modal input: the global .p-2 override above also matches this input
   (its theme classes are `p-2 ps-10`). Our .p-2 padding shorthand resets the
   `ps-10` inline-start padding that reserves 2.5rem for the absolutely
   positioned search icon (label#search-label, start-0), so typed text slid
   under the icon. Restore the icon gutter. */
.myst-search-input {
  padding-inline-start: 2.5rem !important;
}

/* Hide the entire downloads control (button + menu) in the book header.
   mystmd always renders a downloads dropdown — the PDF exports from
   pdf-exports.yml plus an automatic per-page .md source export — with no
   config toggle to remove it in jupyter-book 2.1.6. The PDFs are still built
   under build/ and can be linked to manually where needed. */
.myst-fm-downloads-dropdown {
  display: none !important;
}
