/* ---------- Left sidebar — section labels ---------- */

/* All section labels — top-level entries (Home, Documentation, Projects, …)
   and nested sub-sections (General Functions, Plotting Functions) — get a
   uniform uppercase + accent treatment so the hierarchy reads as
   CATEGORY > sub-category > leaf page. Material's nested navs use
   data-md-level instead of a class name, so target by attribute. */
.md-sidebar--primary .md-nav[data-md-level="0"] > .md-nav__list > .md-nav__item > .md-nav__link,
.md-sidebar--primary .md-nav__item--section > .md-nav__link,
.md-sidebar--primary .md-nav__item--section > label.md-nav__link {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.65rem;
  color: var(--md-primary-fg-color);
}

/* ---------- Right-hand table of contents ---------- */

/* Wider so most function signatures fit on a single line. The flex layout
   in .md-main__inner adjusts the main content width automatically — don't
   add a margin-right override (an earlier version did, and it broke the
   horizontal centering of the whole layout). */
.md-sidebar--secondary {
  width: 16rem;
}

/* "Table of contents" heading — same uppercase + accent treatment as the
   left-menu section labels, so both sidebars read as one visual system. */
.md-sidebar--secondary .md-nav__title {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.65rem;
  color: var(--md-primary-fg-color);
}

/* Let long entries wrap at natural breakpoints (spaces, commas) instead of
   being truncated. Don't break inside tokens — a few long single-token
   entries may overflow the box slightly, but most read cleanly. The sidebar
   shows a vertical scrollbar when total height exceeds the viewport. */
.md-sidebar--secondary .md-ellipsis {
  white-space: normal;
  text-overflow: clip;
  overflow: visible;
  line-height: 1.35;
}

/* ---------- Tables ---------- */

/* Don't break inline `code` across lines inside tables — short tokens like
   `'DETECTION'` were splitting on the leading quote when the column was
   narrow. The column grows to fit instead. */
.md-typeset table:not([class]) td code,
.md-typeset table:not([class]) th code {
  white-space: nowrap;
}

/* ---------- Enum value highlight ---------- */

/* Paragraphs tagged `{: .enum }` get a tinted left-border callout — used for
   short "Allowed values: `'A'`, `'B'`" lines where a full table would be
   overkill but plain prose buries the values. */
.md-typeset p.enum {
  background: var(--md-code-bg-color);
  border-left: 3px solid var(--md-accent-fg-color);
  padding: 0.4em 0.8em;
  margin: 0.8em 0;
  border-radius: 0.1rem;
}
.md-typeset p.enum code {
  background: var(--md-default-bg-color);
}

/* ---------- Code blocks ---------- */

/* Suppress the unnecessary vertical scrollbar gutter that some browsers
   reserve when `overflow: auto` is set, even on blocks that don't overflow.
   Horizontal scrolling for long lines is still allowed. */
.md-typeset pre > code {
  overflow-x: auto;
  overflow-y: hidden;
}

/* Tighter code blocks — reduce vertical space taken by long snippets
   without harming readability. Material's defaults use line-height ≈ 1.6
   for code which is generous; 1.35 fits 18% more lines per screen. */
.md-typeset pre > code {
  font-size: 0.58rem;
  line-height: 1.35;
  padding-top: 0.6em;
  padding-bottom: 0.6em;
}
