:root {
  --md-primary-fg-color: #0d3b5e;
  --md-primary-bg-color: #ffffff;
  --md-accent-fg-color: #33D6FF;
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #0d3b5e;
  --md-primary-bg-color: #ffffff;
  --md-accent-fg-color: #33D6FF;
  --md-typeset-a-color: #33D6FF;
  --md-mermaid-label-bg-color: transparent;
}

/* Make active/selected nav links more visible */
.md-nav__link--active,
.md-nav__link--active:is(.md-nav__link--index) {
  color: #33D6FF !important;
  font-weight: 600;
}

/* Mermaid diagrams on dark theme */
.mermaid {
  --mermaid-font-family: Roboto, sans-serif;
}

/* All node shapes */
.mermaid .node rect,
.mermaid .node polygon,
.mermaid .node circle,
.mermaid .node ellipse,
.mermaid .node path {
  fill: #1a2a3a !important;
  stroke: #33D6FF !important;
  stroke-width: 1.5px !important;
}

/* Node text */
.mermaid .node .label,
.mermaid .nodeLabel {
  color: #e8e8e8 !important;
  fill: #e8e8e8 !important;
}

/* Edge labels - no visible box */
.mermaid .edgeLabel {
  background-color: transparent !important;
  color: #9ca3af !important;
}

.mermaid .edgeLabel rect {
  fill: transparent !important;
  stroke: transparent !important;
}

.mermaid .edgeLabel span {
  background-color: transparent !important;
}

/* Override mermaid's ID-scoped .labelBkg inline style.
   Mermaid generates #__mermaid_N .labelBkg { background-color: rgba(232,232,232,0.5) }
   which has high specificity from the ID selector. */
[id^="__mermaid"] .labelBkg,
.mermaid .labelBkg {
  background-color: transparent !important;
  background: none !important;
}

/* Arrows */
.mermaid .edgePath .path {
  stroke: #6b7280 !important;
}

.mermaid marker path {
  fill: #6b7280 !important;
}

/* Prevent inline code in table cells from wrapping */
.md-typeset table code {
  white-space: nowrap;
}

/* Allow tables to expand beyond content width */
.md-typeset table:not([class]) {
  min-width: 100%;
  width: max-content;
}
