/* Reading surfaces follow the selected site theme, including legacy articles. */
:root .prose {
  --tw-prose-body: var(--foreground);
  --tw-prose-headings: var(--foreground);
  --tw-prose-lead: var(--muted-foreground);
  --tw-prose-links: var(--foreground);
  --tw-prose-bold: var(--foreground);
  --tw-prose-counters: var(--muted-foreground);
  --tw-prose-bullets: var(--muted-foreground);
  --tw-prose-hr: var(--border);
  --tw-prose-quotes: var(--foreground);
  --tw-prose-quote-borders: var(--border);
  --tw-prose-captions: var(--muted-foreground);
  --tw-prose-code: var(--foreground);
  --tw-prose-pre-code: var(--foreground);
  --tw-prose-pre-bg: var(--surface-1);
  --tw-prose-th-borders: var(--border);
  --tw-prose-td-borders: var(--border);
}

:root body .toc-item a[href]:is(.active, :hover, :focus-visible) {
  color: var(--foreground);
  background-color: var(--surface-2);
}

:root body .toc-item a[href].active {
  font-weight: 600;
}

:root body .toc-item a[href]:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 2px;
}

/* The saved site preference takes precedence over the operating system theme. */
:root .theme-logo--dark,
:root.dark .theme-logo--light {
  display: none;
}

:root .theme-logo--light,
:root.dark .theme-logo--dark {
  display: block;
}
