﻿/* ============================================================
   Typography baseline
   Root dropped to 19px; body text scaled back up to ~21px so
   the reading size is unchanged while UI chrome stops inflating.
   ============================================================ */

html {
  font-size: 19px;
}

.md-content {
  font-family: Merriweather, Georgia, serif;
  font-size: 1.105rem;
  line-height: 1.7;
}

.md-content h1,
.md-content h2,
.md-content h3,
.md-content h4 {
  font-family: Inter, system-ui, sans-serif;
}

/* ============================================================
   Layout
   Wide grid, wide primary sidebar, secondary TOC on the right.
   ============================================================ */

.md-grid {
  max-width: 1440px;
}

@media screen and (min-width: 76.25em) {
  .md-sidebar--primary {
    width: 17rem;
  }

  .md-sidebar--secondary {
    width: 13rem;
  }

  .md-sidebar__scrollwrap {
    padding-right: 0.8rem;
    scrollbar-gutter: stable;
  }

  .md-content {
    max-width: 52rem;
  }
}

/* ============================================================
   Primary navigation density
   Nav gets its own font size, decoupled from the reading size.
   ============================================================ */

.md-nav {
  font-size: 0.72rem;
}

.md-nav__title {
  font-size: 0.65rem;
  letter-spacing: 0.02em;
}

.md-nav__item {
  margin: 0;
}

.md-nav__link {
  line-height: 1.35;
  margin-top: 0.3em;
  margin-bottom: 0.3em;
  padding-top: 0.1em;
  padding-bottom: 0.1em;
}

/* ============================================================
   Truncation — label shrinks, chevron stays put
   ============================================================ */

.md-sidebar--primary .md-nav__link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.md-sidebar--primary .md-nav__link .md-ellipsis {
  min-width: 0;
}

.md-sidebar--primary .md-nav__icon {
  flex-shrink: 0;
}

/* ============================================================
   Right-hand TOC
   ============================================================ */

.md-nav--secondary .md-nav__link {
  font-size: 0.66rem;
  line-height: 1.4;
}

.md-nav--secondary .md-nav__title {
  font-size: 0.62rem;
}

/* ============================================================
   Indentation — deeper levels step in less
   ============================================================ */

.md-nav .md-nav,
.md-nav .md-nav .md-nav {
  padding-left: 0.5rem;
}

.md-nav--secondary .md-nav {
  padding-left: 0.4rem;
}

/* ============================================================
   Sidebar scrollbars — thin and unobtrusive
   ============================================================ */

.md-sidebar__scrollwrap::-webkit-scrollbar {
  width: 6px;
}

.md-sidebar__scrollwrap::-webkit-scrollbar-thumb {
  background: var(--md-default-fg-color--lighter);
  border-radius: 3px;
}

.md-sidebar__scrollwrap::-webkit-scrollbar-track {
  background: transparent;
}

/* ============================================================
   Mobile drawer — same density fix applies
   ============================================================ */

@media screen and (max-width: 76.1875em) {
  .md-nav--primary .md-nav__link {
    font-size: 0.75rem;
    padding-top: 0.35em;
    padding-bottom: 0.35em;
  }
}