/* docs-tokens.css holds the paper, ink, accent and fonts. The accent colours links, which the
   theme would otherwise take from its palette's primary, and keeps selected links readable over
   the theme's tinted background; the dark one needs a lighter value for the same contrast. A project that kept its own zensical.toml adds docs-tokens.css to `extra_css`;
   until then the fallbacks give the same look. */
:root > * {
  --md-default-bg-color: var(--docs-paper, #ffffff);
  --md-default-fg-color: var(--docs-ink, #1f2328);
  --md-accent-fg-color: var(--docs-accent, #4051b5);
  --md-typeset-a-color: var(--docs-accent, #4051b5);
  --md-accent-fg-color--transparent: color-mix(in srgb, var(--docs-accent, #4051b5) 10%, transparent);
  --md-text-font-family: var(--docs-font, system-ui, sans-serif);
  --md-code-font-family: var(--docs-mono, ui-monospace, monospace);
}

:root > [data-md-color-scheme="slate"] {
  --md-default-bg-color: var(--docs-paper-dark, #2e303e);
  --md-default-fg-color: var(--docs-ink-dark, #e4e5ea);
  --md-accent-fg-color: var(--docs-accent-dark, #a5b4fc);
  --md-typeset-a-color: var(--docs-accent-dark, #a5b4fc);
  --md-accent-fg-color--transparent: color-mix(in srgb, var(--docs-accent-dark, #a5b4fc) 10%, transparent);
}

.md-header__button[data-docs-toggle] {
  background: transparent;
  border: 0;
  color: inherit;
}

.md-header__button[data-docs-toggle]:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

@media screen and (min-width: 60em) {
  .md-header__button[data-docs-toggle="__search"] {
    display: none;
  }
}

@media screen and (min-width: 76.25em) {
  .md-header__button[data-docs-toggle="__drawer"] {
    display: none;
  }
}

/* Translation alone leaves the closed drawer's links in the tab order. The theme makes an
   open section's nested list visible again, so its descendants are hidden too. */
@media screen and (max-width: 76.234375em) {
  [data-md-toggle="drawer"]:not(:checked) ~ .md-container .md-sidebar--primary,
  [data-md-toggle="drawer"]:not(:checked) ~ .md-container .md-sidebar--primary * {
    visibility: hidden;
  }
}

/* Keep identifiers whole in a table's first column; a table that gets too wide scrolls. */
.md-typeset td:first-child code {
  white-space: nowrap;
}

/* Edge shadows show that a table scrolls sideways. The `local` layers cover them at the ends. */
.md-typeset__scrollwrap {
  background:
    linear-gradient(to right, var(--md-default-bg-color) 30%, transparent) left / 2rem 100% no-repeat local,
    linear-gradient(to left, var(--md-default-bg-color) 30%, transparent) right / 2rem 100% no-repeat local,
    linear-gradient(to right, var(--md-default-fg-color--lighter), transparent) left / 0.6rem 100% no-repeat scroll,
    linear-gradient(to left, var(--md-default-fg-color--lighter), transparent) right / 0.6rem 100% no-repeat scroll;
}

.md-typeset .md-typeset__table table:not([class]) {
  background: transparent;
}
