pre.r-example {
	display: block;
	margin-top: 0;
	margin-bottom: 1rem;
	overflow: auto;
	color: #000;
	background-color: #f6f6f6;
	border: 1px solid #dee2e6;
	border-radius: .375rem;
  word-break: break-word;
	font-size: 0.7rem;
}

.md-typeset pre > code {
	font-size: 0.73rem;
}

.md-typeset code {
  font-size: inherit;
}

.md-typeset h2 > code {
	font-size: 1.2rem;
}

/*
Fonts are the same as pkgdown websites (otherwise tables not properly formatted)
*/
[data-md-color-scheme="default"] {
  --md-code-font: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --md-primary-fg-color: #ecf4ff;
  --md-primary-bg-color: #646464;

  --md-typeset-a-color-custom: #459db9;
  --md-typeset-a-color-hover: #8fc5d6;

  --search-bar-border: #cccccc;

  --custom-scrollbar-col: var(--md-typeset-a-color-custom) white;

  --span-op-color: #24292e;
  --span-fu-color: #6f42c1;
  --span-fl-color: #005cc5;
  --span-st-color: #032f62;
}

/* Dark theme */
[data-md-color-scheme="slate"] {
  --md-code-font: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --md-primary-fg-color: #333333;
  --md-primary-bg-color: #a6a6a6;
  --md-default-bg-color: #121212;

  --md-typeset-a-color-custom: #79a6d2;
  --md-typeset-a-color-hover: #538cc6;

  --search-bar-border: #666666;

  --custom-scrollbar-col: var(--md-typeset-a-color-custom) #000;

  --span-op-color: #d9d9d9;
  --span-fu-color: #a78bda;
  --span-fl-color: #3392ff;
  --span-st-color: #39ac73;
}

.md-search__form {
  background-color: transparent;
  border: solid 1px var(--search-bar-border);
}

.md-search__input::placeholder {
	color: var(--md-primary-bg-color);
}

.md-tabs__link--active, .md-nav__item .md-nav__link--active,
.md-tabs__link:is(:focus, :hover), .md-typeset a {
	color: var(--md-typeset-a-color-custom);
}

.md-typeset a:focus, .md-typeset a:hover,
.md-nav__link:focus, .md-nav__link:hover {
	color: var(--md-typeset-a-color-hover);
}

.md-tabs__link--active {
  font-weight: bold;
}

.md-sidebar__scrollwrap:hover {
	scrollbar-color: var(--custom-scrollbar-col);
}

.md-top:hover {
	background: var(--md-typeset-a-color-hover);
}

.md-typeset pre > code:hover {
  scrollbar-color: var(--custom-scrollbar-col);
}

/*

For syntax highlighting after evaluating the examples in "reference"

https://github.com/r-lib/pkgdown/blob/main/inst/highlight-styles/github-light.scss

*/

span.al /* Alert          */ {color:#ff5555; font-weight: bold}
span.an /* Annotation     */ {color:#6a737d}
span.at /* Attribute      */ {color:#d73a49}
span.bn /* BaseN          */ {color:#005cc5}
span.bu /* BuiltIn        */ {color:#d73a49}
span.cf /* ControlFlow    */ {color:#d73a49}
span.ch /* Char           */ {color:var(--span-st-color)}
span.cn /* Constant       */ {color:#005cc5}
span.co /* Comment        */ {color:#6a737d}
span.cv /* CommentVar     */ {color:#6a737d}
span.do /* Documentation  */ {color:#6a737d}
span.dt /* DataType       */ {color:#d73a49}
span.dv /* DecVal         */ {color:#005cc5}
span.er /* Error          */ {color:#ff5555; text-decoration: underline}
span.ex /* Extension      */ {color:#d73a49; font-weight: bold}
span.fl /* Float          */ {color:var(--span-fl-color)}
span.fu, span.fu > a /* Function       */ {color:var(--span-fu-color)}
span.im /* Import         */ {color:var(--span-st-color)}
span.in /* Information    */ {color:#6a737d}
span.kw /* Keyword        */ {color:#d73a49}
span.op /* Operator       */ {color:var(--span-op-color)}
span.ot /* Others         */ {color:var(--span-fu-color)}
span.pp /* Preprocessor   */ {color:#d73a49}
span.re /* RegionMarker   */ {color:#6a737d}
span.sc /* SpecialChar    */ {color:#005cc5}
span.ss /* SpecialString  */ {color:var(--span-st-color)}
span.st /* String         */ {color:var(--span-st-color)}
span.va /* Variable       */ {color:#e36209}
span.vs /* VerbatimString */ {color:var(--span-st-color)}
span.wa /* Warning        */ {color:#ff5555}
