/* Make body-text links and active-nav typography use the accent (red) color
   across all schemes. Specificity matches Material's per-primary rule
   ([data-md-color-primary=black]) which otherwise sets a hardcoded indigo. */
:root,
[data-md-color-primary=black],
[data-md-color-scheme="slate"][data-md-color-primary=black] {
  --md-typeset-a-color: var(--md-accent-fg-color);
}

/* Resting and hover both use accent (red), so add a non-color hover signal. */
.md-typeset a:hover,
.md-typeset a:focus {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Force primary buttons to use the accent (red) color, matching landing. */
.md-button--primary {
  background-color: var(--md-accent-fg-color) !important;
  border-color: var(--md-accent-fg-color) !important;
  color: var(--md-accent-bg-color) !important;
}

.md-button--primary:hover {
  background-color: var(--md-accent-fg-color) !important;
  border-color: var(--md-accent-fg-color) !important;
  opacity: 0.85;
}

/* External-link icon on nav items pointing off-site (e.g. the API reference tab). */
.md-tabs__link[href^="http://"]::after,
.md-tabs__link[href^="https://"]::after,
.md-nav__link[href^="http://"]:not(.md-nav__link--index)::after,
.md-nav__link[href^="https://"]:not(.md-nav__link--index)::after {
  content: "";
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  margin-left: 0.3em;
  vertical-align: baseline;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z'/></svg>") no-repeat center / contain;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z'/></svg>") no-repeat center / contain;
  opacity: 0.7;
}
