/* Header icons (the GitHub mark .vn-gh and the sun/moon .vn-theme-toggle__button) turn the gold accent on hover and
   while pressed, on the landing page and the components pages alike. Load after the page's own styles.
   The GitHub mark is an <img> (black or white), so on hover a copy of the mark is painted in the accent
   through a CSS mask and the <img> is hidden. */
/* The landing page does not load tokens.css, where --vn-color-accent is defined. */
:root { --vn-color-accent: color-mix(in srgb, #1976d2 calc((1 - var(--vn-theme-t, 0)) * 100%), #a5d4f7 calc(var(--vn-theme-t, 0) * 100%)); }

/* Sun/moon: every stroke and fill reads one of these, so point them all at the accent for the button. */
html .vn-theme-toggle__button:is(:hover, :active) {
  --vn-color-ink: var(--vn-color-accent);
  --vn-color-contrast: var(--vn-color-accent);
  --quiet: var(--vn-color-accent);
  color: var(--vn-color-accent);
  opacity: 1;
}

html .vn-gh { position: relative; }
html .vn-gh::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 28px;
  height: 28px;
  background: var(--vn-color-accent);
  -webkit-mask: url("../assets/github/GitHub_Invertocat_Black_Clearspace.svg") center / contain no-repeat;
  mask: url("../assets/github/GitHub_Invertocat_Black_Clearspace.svg") center / contain no-repeat;
  opacity: 0;
  pointer-events: none;
}
html .vn-gh:is(:hover, :active) { opacity: 1; }
html .vn-gh:is(:hover, :active) img { visibility: hidden; }
html .vn-gh:is(:hover, :active)::after { opacity: 1; }
