/* Mermaid arrowheads on dark theme — force white tips for both
   flowchart (.arrowheadPath) and sequence (marker) diagrams. */

body[data-md-color-scheme="slate"] .mermaid .arrowheadPath,
body[data-md-color-scheme="slate"] .mermaid .edgePath .path,
body[data-md-color-scheme="slate"] .mermaid .flowchart-link,
html[data-md-color-scheme="slate"] .mermaid .arrowheadPath {
  fill: #ffffff !important;
  stroke: #ffffff !important;
}

body[data-md-color-scheme="slate"] .mermaid svg marker path,
body[data-md-color-scheme="slate"] .mermaid svg marker polygon,
html[data-md-color-scheme="slate"] .mermaid svg marker path,
html[data-md-color-scheme="slate"] .mermaid svg marker polygon {
  fill: #ffffff !important;
  stroke: #ffffff !important;
}

body[data-md-color-scheme="slate"] .mermaid .edgePath .path,
body[data-md-color-scheme="slate"] .mermaid .flowchart-link {
  fill: none !important;
}

/* Match marketapp site header only — keep Material blue for links/accents */
.md-header,
.md-tabs {
  background-color: #212a33;
}

/* Mobile drawer header color; hide the same title in the desktop sidebar */
.md-nav--primary .md-nav__title,
.md-nav--primary .md-nav__title[for="__drawer"] {
  background-color: #212a33;
  color: #fff;
}

@media screen and (min-width: 76.25em) {
  .md-nav--primary > .md-nav__title[for="__drawer"] {
    display: none;
  }
}

/* Header logo: white mark on dark header bar */
.md-header__button.md-logo img,
.md-header__button.md-logo svg,
.md-nav__button.md-logo img,
.md-nav__button.md-logo svg {
  height: 1.6rem;
  width: auto;
}

/* Sidebar: make nested sections read as a group */
.md-nav--primary > .md-nav__list > .md-nav__item--nested {
  margin-top: 0.75rem;
  padding-top: 0.35rem;
}

.md-nav--primary > .md-nav__list > .md-nav__item--nested > .md-nav__link {
  font-weight: 700;
}

.md-nav--primary > .md-nav__list > .md-nav__item--nested > .md-nav {
  margin-left: 0.35rem;
  padding-left: 0.65rem;
  border-left: 1px solid var(--md-default-fg-color--lightest);
}

/* Content headings: Material defaults to light weight — force bold */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  font-weight: 700 !important;
  letter-spacing: -0.01em;
}

.md-typeset h2 {
  margin-top: 1.75em;
  padding-bottom: 0.25em;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

.md-typeset h3 {
  margin-top: 1.4em;
}
