/**
 * Enable native browser dark mode support for scrollbars and form controls.
 * This tells the browser to adjust its native UI elements based on the current theme.
 */
:root {
  color-scheme: light;
}

:root.dark {
  color-scheme: dark;
}

/**
 * Styles for anchor links in headings (generated by GitHub markdown parser)
 */

/* Initial state: hide anchor links in headings */
.prose > h1 > a.anchor,
.prose > h2 > a.anchor,
.prose > h3 > a.anchor,
.prose > h4 > a.anchor,
.prose > h5 > a.anchor,
.prose > h6 > a.anchor {
  display: inline-block;
  opacity: 0.5;
  transition: opacity 0.2s ease-in-out;
  padding-right: 8px;
}

/* On hover: show anchor links in headings */
.prose > h1:hover > a.anchor,
.prose > h2:hover > a.anchor,
.prose > h3:hover > a.anchor,
.prose > h4:hover > a.anchor,
.prose > h5:hover > a.anchor,
.prose > h6:hover > a.anchor {
  opacity: 1;
}

/* Prevent code blocks from overflowing on mobile */
.prose pre {
  max-width: 100%;
  overflow-x: auto;
}

/* Allow inline code to wrap */
.prose :not(pre) > code {
  overflow-wrap: break-word;
  word-break: break-word;
}
