/* GitBook-inspired look for MkDocs Material.
   Mimics GitBook's Inter typography, spacing, muted grays, and blue accent. */

:root {
  --md-primary-fg-color: #ffffff;
  --md-primary-bg-color: #1a1a1a;
  --md-accent-fg-color: #346ddb;
  --md-typeset-a-color: #346ddb;
}

/* Primary=white makes Material derive white links; re-pin them at the
   same specificity the theme uses */
[data-md-color-scheme="default"],
[data-md-color-primary="custom"] {
  --md-typeset-a-color: #346ddb;
  --md-accent-fg-color: #2757b0;
}

[data-md-color-scheme="slate"] {
  --md-default-bg-color: #1a1c1e;
  --md-typeset-a-color: #6ea8fe;
  --md-accent-fg-color: #6ea8fe;
}

/* GitBook body type: 16px Inter, relaxed leading, dark-gray-not-black text */
.md-typeset {
  font-size: 0.8rem;
  line-height: 1.65;
}
[data-md-color-scheme="default"] .md-typeset {
  color: #1f2937;
}

/* Headings: tight, semibold, GitBook scale; h1 large + bottom border like page titles */
.md-typeset h1 {
  font-weight: 700;
  color: inherit;
  font-size: 1.9em;
  letter-spacing: -0.02em;
  margin-bottom: 0.6em;
}
.md-typeset h2 {
  font-weight: 600;
  color: inherit;
  letter-spacing: -0.01em;
  border-bottom: 1px solid rgba(128, 128, 128, 0.2);
  padding-bottom: 0.3em;
}
.md-typeset h3,
.md-typeset h4 {
  font-weight: 600;
  color: inherit;
}

/* No logo or page-title clutter in the header — just search + theme toggle */
.md-header__button.md-logo,
.md-header__title {
  display: none;
}

/* Header bar: white with subtle border, like GitBook's top bar */
[data-md-color-scheme="default"] .md-header {
  color: #1f2937;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}
[data-md-color-scheme="default"] .md-header .md-search__input {
  background-color: rgba(0, 0, 0, 0.05);
  color: #1f2937;
  border-radius: 8px;
}
[data-md-color-scheme="default"] .md-header .md-search__input::placeholder,
[data-md-color-scheme="default"] .md-header .md-search__icon {
  color: #6b7280;
}

/* Left nav: GitBook's quiet gray items, rounded hover pill, section caps */
.md-nav {
  font-size: 0.68rem;
}
.md-nav__item .md-nav__link {
  border-radius: 6px;
  padding: 0.15rem 0.4rem;
  margin: 0.05rem 0;
}
.md-nav__link:hover {
  background: rgba(128, 128, 128, 0.12);
}
.md-nav__link--active {
  background: rgba(52, 109, 219, 0.1);
  font-weight: 600;
}
.md-nav--primary .md-nav__title,
.md-nav__item--section > .md-nav__link {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
}

/* Code: GitBook's soft gray chip for inline, rounded blocks */
.md-typeset code {
  border-radius: 4px;
  font-size: 0.85em;
  padding: 0.1em 0.35em;
}
[data-md-color-scheme="default"] .md-typeset code {
  background: #f3f4f6;
  color: #1f2937;
}
.md-typeset pre > code {
  border-radius: 8px;
  padding: 0.8em 1em;
  font-size: 0.78em;
}
[data-md-color-scheme="default"] .md-typeset pre > code {
  background: #f9fafb;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* Tables: full-width, light borders, GitBook header row */
.md-typeset table:not([class]) {
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(128, 128, 128, 0.25);
  font-size: 0.75rem;
}
.md-typeset table:not([class]) th {
  font-weight: 600;
  background: rgba(128, 128, 128, 0.08);
}

/* Admonitions: GitBook "hint" blocks — flat, rounded, tinted background */
.md-typeset .admonition,
.md-typeset details {
  border-radius: 8px;
  border-width: 0 0 0 3px;
  box-shadow: none;
  font-size: 0.75rem;
}

/* Content column: GitBook's ~720px measure */
.md-content__inner {
  max-width: 46rem;
  margin-left: auto;
  margin-right: auto;
}
