/*
  Styles of the CoBaseKRM documentation theme. The look follows the Material for MkDocs
  theme these docs used before: the brand blue header and tabs, the navigation on the
  left, Gabarito text, and Material's admonitions, tables and code.

  Contents: settings, base, header, tabs, search, layout, navigation, page content,
  admonitions, Markdown extensions, footer, back to top, print.
*/

/* Settings ------------------------------------------------------------------------- */

:root {
  --primary: #054e81;
  --primary-fg: #fff;
  --accent: #526cfe;

  --fg: rgba(0, 0, 0, 0.87);
  --fg-light: rgba(0, 0, 0, 0.54);
  --fg-lighter: rgba(0, 0, 0, 0.32);
  --fg-lightest: rgba(0, 0, 0, 0.07);
  --bg: #fff;
  --code-bg: #f5f5f5;
  --code-fg: #36464e;

  /* Mermaid diagram colours, read by js/theme.js. Use hex colours: Mermaid works out
     other shades from them. */
  --mermaid-node-bg: #eef0ff;
  --mermaid-node-border: var(--accent);
  --mermaid-line: var(--code-fg);
  --mermaid-text: var(--code-fg);
  --mermaid-bg: #ffffff;

  --font: "Gabarito", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "Roboto Mono", SFMono-Regular, Consolas, Menlo, monospace;

  --shadow-z1: 0 4px 10px rgba(0, 0, 0, 0.05), 0 0 1px rgba(0, 0, 0, 0.1);
  --shadow-z2: 0 4px 10px rgba(0, 0, 0, 0.1), 0 0 1px rgba(0, 0, 0, 0.25);
  --shadow-z3: 0 8px 20px rgba(0, 0, 0, 0.2), 0 0 1px rgba(0, 0, 0, 0.35);
  --ease: cubic-bezier(0.1, 0.7, 0.1, 1);

  --container-width: 1220px;
  --sidebar-width: 242px;
  --header-height: 48px;
  /* Height of everything that stays at the top of the window while scrolling */
  --sticky-height: var(--header-height);

  /* Admonition icons, from Material Design Icons (Pictogrammers, Apache License 2.0) */
  --icon-note: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m3.1 5.07c.14 0 .28.05.4.16l1.27 1.27c.23.22.23.57 0 .78l-1 1-2.05-2.05 1-1c.1-.11.24-.16.38-.16m-1.97 1.74 2.06 2.06-6.06 6.06H7.07v-2.06z"/></svg>');
  --icon-abstract: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17 9H7V7h10m0 6H7v-2h10m-3 6H7v-2h7M12 3a1 1 0 0 1 1 1 1 1 0 0 1-1 1 1 1 0 0 1-1-1 1 1 0 0 1 1-1m7 0h-4.18C14.4 1.84 13.3 1 12 1s-2.4.84-2.82 2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2"/></svg>');
  --icon-info: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 9h-2V7h2m0 10h-2v-6h2m-1-9A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2"/></svg>');
  --icon-tip: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17.66 11.2c-.23-.3-.51-.56-.77-.82-.67-.6-1.43-1.03-2.07-1.66C13.33 7.26 13 4.85 13.95 3c-.95.23-1.78.75-2.49 1.32-2.59 2.08-3.61 5.75-2.39 8.9.04.1.08.2.08.33 0 .22-.15.42-.35.5-.23.1-.47.04-.66-.12a.6.6 0 0 1-.14-.17c-1.13-1.43-1.31-3.48-.55-5.12C5.78 10 4.87 12.3 5 14.47c.06.5.12 1 .29 1.5.14.6.41 1.2.71 1.73 1.08 1.73 2.95 2.97 4.96 3.22 2.14.27 4.43-.12 6.07-1.6 1.83-1.66 2.47-4.32 1.53-6.6l-.13-.26c-.21-.46-.77-1.26-.77-1.26m-3.16 6.3c-.28.24-.74.5-1.1.6-1.12.4-2.24-.16-2.9-.82 1.19-.28 1.9-1.16 2.11-2.05.17-.8-.15-1.46-.28-2.23-.12-.74-.1-1.37.17-2.06.19.38.39.76.63 1.06.77 1 1.98 1.44 2.24 2.8.04.14.06.28.06.43.03.82-.33 1.72-.93 2.27"/></svg>');
  --icon-success: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 7 9 19l-5.5-5.5 1.41-1.41L9 16.17 19.59 5.59z"/></svg>');
  --icon-question: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m15.07 11.25-.9.92C13.45 12.89 13 13.5 13 15h-2v-.5c0-1.11.45-2.11 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41a2 2 0 0 0-2-2 2 2 0 0 0-2 2H8a4 4 0 0 1 4-4 4 4 0 0 1 4 4 3.2 3.2 0 0 1-.93 2.25M13 19h-2v-2h2M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10c0-5.53-4.5-10-10-10"/></svg>');
  --icon-warning: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 14h-2V9h2m0 9h-2v-2h2M1 21h22L12 2z"/></svg>');
  --icon-failure: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>');
  --icon-danger: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m11.5 20 4.86-9.73H13V4l-5 9.73h3.5zM12 2c2.75 0 5.1 1 7.05 2.95S22 9.25 22 12s-1 5.1-2.95 7.05S14.75 22 12 22s-5.1-1-7.05-2.95S2 14.75 2 12s1-5.1 2.95-7.05S9.25 2 12 2"/></svg>');
  --icon-bug: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11 13h2v1h-2zm10-8v6c0 5.5-3.8 10.7-9 12-5.2-1.3-9-6.5-9-12V5l9-4zm-4 5h-2.2c-.2-.6-.6-1.1-1.1-1.5l1.2-1.2-.7-.7L12.8 8H12c-.2 0-.5 0-.7.1L9.9 6.6l-.8.8 1.2 1.2c-.5.3-.9.8-1.1 1.4H7v1h2v1H7v1h2v1H7v1h2.2c.4 1.2 1.5 2 2.8 2s2.4-.8 2.8-2H17v-1h-2v-1h2v-1h-2v-1h2zm-6 2h2v-1h-2z"/></svg>');
  --icon-example: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 2v2h1v14a4 4 0 0 0 4 4 4 4 0 0 0 4-4V4h1V2zm4 14c-.6 0-1-.4-1-1s.4-1 1-1 1 .4 1 1-.4 1-1 1m2-4c-.6 0-1-.4-1-1s.4-1 1-1 1 .4 1 1-.4 1-1 1m1-5h-4V4h4z"/></svg>');
  --icon-quote: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 17h3l2-4V7h-6v6h3M6 17h3l2-4V7H5v6h3z"/></svg>');
  --icon-chevron: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6z"/></svg>');
}

@media (min-width: 1220px) {
  :root {
    --sticky-height: calc(var(--header-height) * 2); /* header and tabs */
  }
}

/* Base ----------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-y: scroll;
  /* Keeps headings jumped to from a link below the header */
  scroll-padding-top: calc(var(--sticky-height) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  color: var(--fg);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.icon {
  display: block;
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-right: auto;
  margin-left: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 10;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--primary);
  background-color: var(--bg);
  border-radius: 2px;
  box-shadow: var(--shadow-z2);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* Header --------------------------------------------------------------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 4;
  color: var(--primary-fg);
  background-color: var(--primary);
  transition: box-shadow 0.25s;
}

.header--shadow {
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.2);
}

.header :focus-visible {
  outline-color: currentColor;
}

.header__bar {
  display: flex;
  align-items: center;
  height: var(--header-height);
  padding: 0 4px;
}

.header__button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex-shrink: 0;
  margin: 4px;
  padding: 8px;
  color: inherit;
  background: none;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
}

.header__logo {
  display: flex;
  flex-shrink: 0;
  margin: 4px;
  padding: 8px;
  border-radius: 2px;
}

.header__logo img {
  display: block;
  width: auto;
  height: 24px;
}

.header__title {
  position: relative;
  flex-grow: 1;
  min-width: 0;
  height: var(--header-height);
  margin: 0 8px 0 20px;
  overflow: hidden;
  font-size: 18px;
  font-weight: 700;
  line-height: var(--header-height);
}

/* The site name, swapped for the page title once the page heading scrolls away */
.header__topic {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: transform 0.4s var(--ease), opacity 0.15s;
}

.header__topic--page,
.header--title-swap .header__topic:first-child {
  opacity: 0;
  pointer-events: none;
}

.header__topic--page {
  transform: translateX(25px);
}

.header--title-swap .header__topic:first-child {
  transform: translateX(-25px);
}

.header--title-swap .header__topic--page {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.header__menu,
.header__search-button {
  display: none;
}

@media (max-width: 1219.98px) {
  .header__menu {
    display: inline-flex;
  }

  .header__logo {
    display: none;
  }

  .header__title {
    margin-left: 8px;
  }
}

@media (max-width: 959.98px) {
  .header__search-button {
    display: inline-flex;
  }
}

/* Tabs ----------------------------------------------------------------------------- */

.tabs {
  overflow: auto hidden;
  color: var(--primary-fg);
  background-color: var(--primary);
  scrollbar-width: none;
}

.tabs__list {
  display: flex;
  margin-top: 0;
  margin-bottom: 0;
  padding: 0 0 0 4px;
  list-style: none;
  white-space: nowrap;
}

.tabs__item {
  height: var(--header-height);
  padding: 0 12px;
}

.tabs__link {
  display: block;
  margin-top: 15px;
  font-size: 14px;
  font-weight: 500;
  color: inherit;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.25s;
}

.tabs__link:hover,
.tabs__link:focus-visible,
.tabs__link--active {
  opacity: 1;
}

@media (max-width: 1219.98px) {
  .tabs {
    display: none;
  }
}

/* Search --------------------------------------------------------------------------- */

.search {
  position: relative;
  flex-shrink: 0;
  margin: 0 4px 0 auto;
}

.search__form {
  position: relative;
  display: flex;
  align-items: center;
  width: 234px;
  height: 36px;
  margin: 0;
  color: inherit;
  background-color: rgba(0, 0, 0, 0.26);
  border-radius: 2px;
  transition: width 0.25s var(--ease), background-color 0.25s, color 0.25s;
}

.search__form:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

.search__icon,
.search__back {
  position: absolute;
  top: 6px;
  left: 8px;
}

.search__icon {
  pointer-events: none;
}

.search__back,
.search__reset {
  display: flex;
  padding: 0;
  color: inherit;
  background: none;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
}

.search__back {
  display: none;
}

.search__reset {
  position: absolute;
  top: 6px;
  right: 6px;
}

.search__reset[hidden] {
  display: none;
}

.search__input {
  width: 100%;
  height: 100%;
  padding: 0 36px 0 44px;
  font-size: 18px;
  color: inherit;
  background: transparent;
  border: 0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.search__input::placeholder {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.25s;
}

.search__input::-webkit-search-cancel-button,
.search__input::-webkit-search-decoration {
  -webkit-appearance: none;
}

.search__panel {
  position: absolute;
  top: 100%;
  right: 0;
  display: none;
  width: 100%;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  color: var(--fg);
  background-color: var(--bg);
  border-radius: 0 0 2px 2px;
  box-shadow: var(--shadow-z3);
  scrollbar-width: thin;
}

.search--active .search__form {
  width: 560px;
  color: var(--fg);
  background-color: var(--bg);
  border-radius: 2px 2px 0 0;
}

.search--active .search__input::placeholder {
  color: var(--fg-light);
}

.search--active .search__panel {
  display: block;
}

.search__meta {
  margin: 0;
  padding: 0 16px;
  font-size: 12.8px;
  line-height: 36px;
  color: var(--fg-light);
  border-top: 1px solid var(--fg-lightest);
  scroll-snap-align: start;
}

.search__results {
  margin: 0;
  padding: 0;
  list-style: none;
}

.search__results a {
  display: block;
  padding: 10px 16px 12px;
  color: inherit;
  text-decoration: none;
  border-top: 1px solid var(--fg-lightest);
  outline-offset: -2px;
  transition: background-color 0.25s;
}

.search__results a:hover,
.search__results a:focus {
  background-color: rgba(82, 108, 254, 0.1);
}

.search__result-path {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  color: var(--fg-light);
}

.search__result-title {
  display: block;
  font-size: 16px;
  line-height: 1.4;
  color: var(--primary);
}

.search__result-text {
  display: -webkit-box;
  margin-top: 4px;
  overflow: hidden;
  font-size: 12.8px;
  line-height: 1.6;
  color: var(--fg-light);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.search__results mark {
  color: var(--accent);
  background-color: transparent;
  text-decoration: underline;
}

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 3;
  background-color: rgba(0, 0, 0, 0.54);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0s 0.25s;
}

.search-open .search-overlay {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s;
}

@media (max-width: 1219.98px) {
  .search--active .search__form {
    width: min(460px, 50vw);
  }
}

/* Below 960px the search opens over the whole window from the header's search button */
@media (max-width: 959.98px) {
  .search {
    display: none;
  }

  .search-open .search {
    position: fixed;
    inset: 0;
    z-index: 6;
    display: block;
    margin: 0;
    background-color: var(--bg);
  }

  .search-open .search__form,
  .search--active .search__form {
    width: 100%;
    height: var(--header-height);
    border-radius: 0;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.2);
  }

  .search__icon {
    display: none;
  }

  .search__back {
    top: 12px;
    left: 12px;
    display: flex;
  }

  .search__reset {
    top: 12px;
    right: 12px;
  }

  .search__input {
    padding: 0 48px 0 56px;
  }

  .search__panel {
    position: static;
    max-height: calc(100% - var(--header-height));
    border-radius: 0;
    box-shadow: none;
  }

  .search__meta {
    border-top: 0;
  }

  .search-open .search-overlay {
    display: none;
  }

  body.search-open {
    overflow: hidden;
  }
}

/* Layout --------------------------------------------------------------------------- */

.main {
  display: flex;
  flex-grow: 1;
  margin-top: 30px;
}

.content {
  flex-grow: 1;
  min-width: 0;
  outline: none;
}

.typeset {
  margin: 0 24px 24px;
  padding-top: 20px;
}

@media (max-width: 959.98px) {
  .typeset {
    margin-right: 16px;
    margin-left: 16px;
  }
}

/* Sidebar and navigation ----------------------------------------------------------- */

.sidebar {
  position: sticky;
  top: var(--sticky-height);
  align-self: flex-start;
  flex-shrink: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--sticky-height));
  padding: 24px 0;
}

.sidebar__header {
  display: none;
}

.sidebar__scroll {
  height: 100%;
  margin: 0 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: transparent transparent;
  scrollbar-width: thin;
}

.sidebar__scroll:hover,
.sidebar__scroll:focus-within {
  scrollbar-color: var(--fg-lighter) transparent;
}

.nav {
  font-size: 14px;
  line-height: 1.3;
}

.nav__list,
.nav__toc {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav > .nav__list {
  padding: 0 12px 24px;
}

/* Each level of the navigation is indented, except the pages under a level 2 heading */
.nav__list .nav__list {
  padding-left: 12px;
}

.nav__item--level-2.nav__item--section > .nav__list {
  padding-left: 0;
}

.nav__link,
.nav__row,
.nav__section-title,
.nav__toc-link {
  margin-top: 0.625em;
}

.nav__link,
.nav__toc-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: color 125ms;
}

.nav__link:hover,
.nav__toc-link:hover {
  color: var(--accent);
}

.nav__link--current,
.nav__toc-link--active {
  color: var(--primary);
}

.nav__row {
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

.nav__row > * {
  margin-top: 0;
}

.nav__row > .nav__link {
  flex-grow: 1;
}

.nav__section-title {
  display: block;
}

.nav__item--level-2.nav__item--section {
  margin-top: 1.25em;
}

.nav__item--level-2.nav__item--section > .nav__row .nav__section-title {
  font-weight: 700;
}

.nav__toggle {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  color: inherit;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
}

.nav__toggle:hover {
  color: var(--accent);
}

.nav__toggle--label {
  flex-grow: 1;
  gap: 4px;
}

.nav__toggle .icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  transition: transform 0.25s;
}

.nav__toggle[aria-expanded="true"] .icon {
  transform: rotate(90deg);
}

.nav__item--collapsed > .nav__list {
  display: none;
}

/* The current page's table of contents, with a line on its left */
.nav__item > .nav__toc,
.nav__row + .nav__toc {
  margin-bottom: 0.5em;
  padding-left: 12px;
  border-left: 1px solid var(--primary);
}

.nav__toc .nav__toc {
  padding-left: 12px;
}

.nav__toc-link--passed {
  color: var(--fg-light);
}

/*
  Wide screens: the tabs pick the top-level section and the sidebar shows only that
  one, with its title at the top and always expanded.
*/
@media (min-width: 1220px) {
  .nav__list--level-1:has(> .nav__item--active) > .nav__item:not(.nav__item--active) {
    display: none;
  }

  .nav__item--level-1 > .nav__list {
    display: block;
    padding-left: 0;
  }

  .nav__item--level-1.nav__item--section > .nav__row {
    position: sticky;
    top: 0;
    z-index: 1;
    font-weight: 700;
    background-color: var(--bg);
    /* Fades out the links scrolling under the title */
    box-shadow: 0 0 8px 8px var(--bg);
  }

  .nav__item--level-1 > .nav__row .nav__toggle {
    pointer-events: none;
  }

  .nav__item--level-1 > .nav__row .nav__toggle .icon {
    display: none;
  }

  .nav__item--level-1:first-child > .nav__link,
  .nav__item--level-1:first-child > .nav__row,
  .nav__list--level-1:has(> .nav__item--active) > .nav__item--active > .nav__link,
  .nav__list--level-1:has(> .nav__item--active) > .nav__item--active > .nav__row {
    margin-top: 0;
  }
}

/* Narrow screens: the sidebar is a drawer that slides in from the left */
@media (max-width: 1219.98px) {
  .main {
    margin-top: 0;
  }

  .typeset {
    padding-top: 32px;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    width: 290px;
    max-width: 85vw;
    height: 100%;
    padding: 0;
    background-color: var(--bg);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.25s var(--ease), visibility 0s 0.25s, box-shadow 0.25s;
  }

  .drawer-open .sidebar {
    transform: none;
    visibility: visible;
    box-shadow: var(--shadow-z3);
    transition: transform 0.25s var(--ease), box-shadow 0.25s;
  }

  .sidebar__header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    padding: 0 4px 0 16px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--primary-fg);
    background-color: var(--primary);
  }

  .sidebar__header :focus-visible {
    outline-color: currentColor;
  }

  .sidebar__scroll {
    flex-grow: 1;
    height: auto;
    margin: 0;
    padding-top: 12px;
    scrollbar-color: var(--fg-lighter) transparent;
  }

  .nav {
    font-size: 15px;
  }

  .nav__item--level-1.nav__item--section > .nav__row {
    font-weight: 700;
  }

  .drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 4;
    background-color: rgba(0, 0, 0, 0.54);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0s 0.25s;
  }

  .drawer-open .drawer-overlay {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s;
  }

  body.drawer-open {
    overflow: hidden;
  }
}

/* Page content --------------------------------------------------------------------- */

.typeset {
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

.typeset h1,
.typeset h2,
.typeset h3,
.typeset h4,
.typeset h5,
.typeset h6 {
  letter-spacing: -0.01em;
}

.typeset h1 {
  margin: 0 0 1.25em;
  font-size: 2em;
  font-weight: 400;
  line-height: 1.3;
  color: var(--fg-light);
}

.typeset h2 {
  margin: 1.6em 0 0.64em;
  font-size: 1.5625em;
  font-weight: 400;
  line-height: 1.4;
}

.typeset h3 {
  margin: 1.6em 0 0.8em;
  font-size: 1.25em;
  font-weight: 400;
  line-height: 1.5;
}

.typeset h2 + h3 {
  margin-top: 0.8em;
}

.typeset h4 {
  margin: 1em 0;
  font-size: 1em;
  font-weight: 700;
}

.typeset h5,
.typeset h6 {
  margin: 1.25em 0;
  font-size: 0.8em;
  font-weight: 700;
  color: var(--fg-light);
}

.typeset h5 {
  text-transform: uppercase;
}

.typeset p,
.typeset ul,
.typeset ol,
.typeset dl,
.typeset blockquote,
.typeset pre,
.typeset figure {
  margin-top: 1em;
  margin-bottom: 1em;
}

.typeset > :first-child {
  margin-top: 0;
}

.typeset a {
  color: var(--primary);
  text-decoration: none;
  transition: color 125ms;
}

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

.typeset strong {
  font-weight: 700;
}

.typeset hr {
  margin: 1.5em 0;
  border: 0;
  border-bottom: 1px solid var(--fg-lightest);
}

.typeset ul,
.typeset ol {
  margin-left: 0.625em;
  padding: 0;
}

.typeset ol {
  list-style-type: decimal;
}

.typeset ol ol {
  list-style-type: lower-alpha;
}

.typeset ol ol ol {
  list-style-type: lower-roman;
}

.typeset ul {
  list-style-type: disc;
}

.typeset ul ul {
  list-style-type: circle;
}

.typeset li {
  margin-bottom: 0.5em;
  margin-left: 1.25em;
}

.typeset li p,
.typeset li blockquote {
  margin: 0.5em 0;
}

.typeset li:last-child {
  margin-bottom: 0;
}

.typeset li ul,
.typeset li ol {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.typeset dd {
  margin: 1em 0 1.5em 1.875em;
}

.typeset dd > :first-child {
  margin-top: 0;
}

.typeset blockquote {
  margin-left: 0;
  padding-left: 12px;
  color: var(--fg-light);
  border-left: 4px solid var(--fg-lighter);
}

.typeset img,
.typeset svg,
.typeset video {
  max-width: 100%;
  height: auto;
}

.typeset figure {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.typeset figcaption {
  max-width: 24rem;
  margin: 1em auto;
  font-style: italic;
}

/* The ¶ link shown next to a heading when hovering it */
.typeset .headerlink {
  display: inline-block;
  margin-left: 0.5rem;
  color: var(--fg-lighter);
  opacity: 0;
  transition: color 0.25s, opacity 125ms;
}

.typeset :hover > .headerlink,
.typeset :target > .headerlink,
.typeset .headerlink:focus {
  opacity: 1;
}

.typeset .headerlink:hover,
.typeset :target > .headerlink {
  color: var(--accent);
}

/* Code */
.typeset code,
.typeset pre,
.typeset kbd {
  font-family: var(--font-mono);
  font-feature-settings: "kern";
}

.typeset code {
  padding: 0 0.294em;
  font-size: 0.85em;
  color: var(--code-fg);
  word-break: break-word;
  background-color: var(--code-bg);
  border-radius: 2px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.typeset pre {
  position: relative;
  line-height: 1.4;
}

.typeset pre > code {
  display: block;
  margin: 0;
  padding: 0.772em 1.176em;
  overflow: auto;
  word-break: normal;
  scrollbar-width: thin;
}

.typeset a code {
  color: currentColor;
}

/* Tables */
.typeset table:not([class]) {
  display: inline-block;
  max-width: 100%;
  overflow: auto;
  font-size: 12.8px;
  background-color: var(--bg);
  border: 1px solid var(--fg-lightest);
  border-radius: 2px;
  border-spacing: 0;
  touch-action: auto;
}

.typeset table:not([class]) th,
.typeset table:not([class]) td {
  padding: 0.9375em 1.25em;
  vertical-align: top;
}

.typeset table:not([class]) th {
  min-width: 5rem;
  font-weight: 700;
  text-align: left;
}

.typeset table:not([class]) td {
  border-top: 1px solid var(--fg-lightest);
}

.typeset table:not([class]) tbody tr {
  transition: background-color 125ms;
}

.typeset table:not([class]) tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.035);
  box-shadow: 0 1px 0 var(--bg) inset;
}

.typeset table:not([class]) th[align="center"],
.typeset table:not([class]) td[align="center"] {
  text-align: center;
}

.typeset table:not([class]) th[align="right"],
.typeset table:not([class]) td[align="right"] {
  text-align: right;
}

/* Buttons, written in Markdown as [Text](page.md){.btn .btn-primary} */
.typeset .btn {
  display: inline-block;
  padding: 0.625em 2em;
  font-weight: 700;
  color: var(--primary);
  border: 2px solid currentColor;
  border-radius: 2px;
  transition: color 125ms, background-color 125ms, border-color 125ms;
}

.typeset .btn-primary {
  color: var(--primary-fg);
  background-color: var(--primary);
  border-color: var(--primary);
}

.typeset .btn:hover,
.typeset .btn:focus {
  color: var(--primary-fg);
  background-color: var(--accent);
  border-color: var(--accent);
}

/* Admonitions (!!! note) and collapsible blocks (??? note) ------------------------- */

.typeset .admonition,
.typeset details {
  --admonition-color: #448aff;
  --admonition-icon: var(--icon-note);
  display: flow-root;
  margin: 1.5625em 0;
  padding: 0 12px;
  font-size: 12.8px;
  color: var(--fg);
  background-color: var(--bg);
  border: 1px solid var(--admonition-color);
  border-radius: 4px;
  box-shadow: var(--shadow-z1);
  page-break-inside: avoid;
}

.typeset .admonition-title,
.typeset summary {
  position: relative;
  margin: 0 -12px;
  padding: 8px 12px 8px 40px;
  font-weight: 700;
  background-color: color-mix(in srgb, var(--admonition-color) 10%, transparent);
  border-radius: 3px 3px 0 0;
}

.typeset .admonition-title::before,
.typeset summary::before {
  content: "";
  position: absolute;
  top: 0.625em;
  left: 12px;
  width: 20px;
  height: 20px;
  background-color: var(--admonition-color);
  -webkit-mask: var(--admonition-icon) center / contain no-repeat;
  mask: var(--admonition-icon) center / contain no-repeat;
}

.typeset .admonition > :last-child,
.typeset details > :last-child {
  margin-bottom: 12px;
}

.typeset .admonition-title:last-child,
.typeset summary:last-child {
  margin-bottom: 0;
}

.typeset .admonition-title + *,
.typeset summary + * {
  margin-top: 12px;
}

.typeset summary {
  display: block;
  min-height: 20px;
  padding-right: 36px;
  cursor: pointer;
  list-style: none;
}

.typeset summary::-webkit-details-marker {
  display: none;
}

.typeset summary::after {
  content: "";
  position: absolute;
  top: 0.625em;
  right: 8px;
  width: 20px;
  height: 20px;
  background-color: var(--admonition-color);
  -webkit-mask: var(--icon-chevron) center / contain no-repeat;
  mask: var(--icon-chevron) center / contain no-repeat;
  transition: transform 0.25s;
}

.typeset details[open] > summary::after {
  transform: rotate(90deg);
}

.typeset details:not([open]) {
  box-shadow: none;
}

.typeset details:not([open]) > summary {
  border-radius: 3px;
}

.typeset summary:focus-visible {
  outline-offset: -2px;
}

.typeset :is(.admonition, details):is(.abstract, .summary, .tldr) {
  --admonition-color: #00b0ff;
  --admonition-icon: var(--icon-abstract);
}

.typeset :is(.admonition, details):is(.info, .todo) {
  --admonition-color: #00b8d4;
  --admonition-icon: var(--icon-info);
}

.typeset :is(.admonition, details):is(.tip, .hint, .important) {
  --admonition-color: #00bfa5;
  --admonition-icon: var(--icon-tip);
}

.typeset :is(.admonition, details):is(.success, .check, .done) {
  --admonition-color: #00c853;
  --admonition-icon: var(--icon-success);
}

.typeset :is(.admonition, details):is(.question, .help, .faq) {
  --admonition-color: #64dd17;
  --admonition-icon: var(--icon-question);
}

.typeset :is(.admonition, details):is(.warning, .caution, .attention) {
  --admonition-color: #ff9100;
  --admonition-icon: var(--icon-warning);
}

.typeset :is(.admonition, details):is(.failure, .fail, .missing) {
  --admonition-color: #ff5252;
  --admonition-icon: var(--icon-failure);
}

.typeset :is(.admonition, details):is(.danger, .error) {
  --admonition-color: #ff1744;
  --admonition-icon: var(--icon-danger);
}

.typeset :is(.admonition, details).bug {
  --admonition-color: #f50057;
  --admonition-icon: var(--icon-bug);
}

.typeset :is(.admonition, details).example {
  --admonition-color: #7c4dff;
  --admonition-icon: var(--icon-example);
}

.typeset :is(.admonition, details):is(.quote, .cite) {
  --admonition-color: #9e9e9e;
  --admonition-icon: var(--icon-quote);
}

/* Markdown extensions -------------------------------------------------------------- */

/* Keyboard keys: ++ctrl+c++ */
.typeset kbd {
  display: inline-block;
  padding: 0 0.667em;
  font-size: 0.75em;
  color: var(--fg);
  word-break: break-word;
  vertical-align: text-top;
  background-color: #fafafa;
  border-radius: 2px;
  box-shadow: 0 2px 0 1px #b8b8b8, 0 2px 0 #b8b8b8, 0 -2px 4px #fff inset;
}

.typeset .keys span {
  padding: 0 0.2em;
  color: var(--fg-light);
}

/* ==marked==, ^^inserted^^, ~~deleted~~ and Critic Markup */
.typeset mark {
  color: inherit;
  background-color: rgba(255, 255, 0, 0.5);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.typeset ins.critic {
  text-decoration: underline;
  background-color: rgba(0, 200, 83, 0.15);
}

.typeset del.critic {
  background-color: rgba(255, 23, 68, 0.15);
}

.typeset .critic.comment {
  color: var(--fg-light);
}

.typeset .critic.comment::before {
  content: "\201C";
}

.typeset .critic.comment::after {
  content: "\201D";
}

.typeset abbr {
  text-decoration: none;
  border-bottom: 1px dotted var(--fg-light);
  cursor: help;
}

/* Footnotes */
.typeset .footnote {
  font-size: 12.8px;
  color: var(--fg-light);
}

.typeset .footnote > ol {
  margin-left: 0;
}

.typeset .footnote-backref {
  margin-left: 4px;
}

/* Task lists: - [x] Done */
.typeset .task-list-item {
  position: relative;
  list-style-type: none;
}

.typeset .task-list-item [type="checkbox"] {
  position: absolute;
  top: 0.45em;
  left: -2em;
  opacity: 0;
}

.typeset .task-list-indicator::before {
  content: "";
  position: absolute;
  top: 0.15em;
  left: -1.5em;
  width: 1.25em;
  height: 1.25em;
  background-color: var(--fg-lightest);
  -webkit-mask: var(--icon-success) center / contain no-repeat;
  mask: var(--icon-success) center / contain no-repeat;
}

.typeset [type="checkbox"]:checked + .task-list-indicator::before {
  background-color: #00e676;
}

/* Content tabs: === "Tab" */
.typeset .tabbed-set {
  position: relative;
  display: flex;
  flex-flow: column wrap;
  margin: 1em 0;
  border-radius: 2px;
}

.typeset .tabbed-set > input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.typeset .tabbed-labels {
  display: flex;
  max-width: 100%;
  overflow: auto;
  box-shadow: 0 -1px 0 var(--fg-lightest) inset;
  scrollbar-width: none;
}

.typeset .tabbed-labels > label {
  flex-shrink: 0;
  padding: 0.78em 1.25em 0.62em;
  font-size: 0.8em;
  font-weight: 700;
  color: var(--fg-light);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
}

.typeset .tabbed-labels > label:hover {
  color: var(--accent);
}

.typeset .tabbed-block {
  display: none;
}

.typeset .tabbed-set > input:nth-child(1):checked ~ .tabbed-labels > :nth-child(1),
.typeset .tabbed-set > input:nth-child(2):checked ~ .tabbed-labels > :nth-child(2),
.typeset .tabbed-set > input:nth-child(3):checked ~ .tabbed-labels > :nth-child(3),
.typeset .tabbed-set > input:nth-child(4):checked ~ .tabbed-labels > :nth-child(4),
.typeset .tabbed-set > input:nth-child(5):checked ~ .tabbed-labels > :nth-child(5),
.typeset .tabbed-set > input:nth-child(6):checked ~ .tabbed-labels > :nth-child(6),
.typeset .tabbed-set > input:nth-child(7):checked ~ .tabbed-labels > :nth-child(7),
.typeset .tabbed-set > input:nth-child(8):checked ~ .tabbed-labels > :nth-child(8) {
  color: var(--primary);
  border-color: var(--primary);
}

.typeset .tabbed-set > input:nth-child(1):checked ~ .tabbed-content > :nth-child(1),
.typeset .tabbed-set > input:nth-child(2):checked ~ .tabbed-content > :nth-child(2),
.typeset .tabbed-set > input:nth-child(3):checked ~ .tabbed-content > :nth-child(3),
.typeset .tabbed-set > input:nth-child(4):checked ~ .tabbed-content > :nth-child(4),
.typeset .tabbed-set > input:nth-child(5):checked ~ .tabbed-content > :nth-child(5),
.typeset .tabbed-set > input:nth-child(6):checked ~ .tabbed-content > :nth-child(6),
.typeset .tabbed-set > input:nth-child(7):checked ~ .tabbed-content > :nth-child(7),
.typeset .tabbed-set > input:nth-child(8):checked ~ .tabbed-content > :nth-child(8) {
  display: block;
}

.typeset .tabbed-set > input:focus-visible ~ .tabbed-labels > label {
  outline-offset: -2px;
}

/* Mermaid diagrams: ``` mermaid code blocks, drawn by js/theme.js */
.typeset .mermaid {
  margin: 1em 0;
  line-height: normal;
}

.typeset div.mermaid svg {
  display: block;
}

/* Footer --------------------------------------------------------------------------- */

.footer {
  color: rgba(255, 255, 255, 0.7);
  background-color: rgba(0, 0, 0, 0.87);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 0 4px;
}

.footer__copyright {
  margin: auto 12px;
  padding: 16px 0;
  font-size: 12.8px;
  font-weight: 500;
}

/* Back to top ---------------------------------------------------------------------- */

.back-to-top {
  position: fixed;
  top: calc(var(--sticky-height) + 12px);
  left: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 16px 6px 10px;
  font-size: 14px;
  color: var(--fg-light);
  background-color: var(--bg);
  border: 0;
  border-radius: 32px;
  box-shadow: var(--shadow-z2);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -8px);
  transition: color 125ms, background-color 125ms, transform 125ms var(--ease), opacity 125ms, visibility 0s 125ms;
}

.back-to-top .icon {
  width: 18px;
  height: 18px;
}

.back-to-top--visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition: color 125ms, background-color 125ms, transform 125ms var(--ease), opacity 125ms;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  color: var(--primary-fg);
  background-color: var(--primary);
}

/* Motion and print ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
  }
}

@media print {
  .skip-link,
  .header,
  .search-overlay,
  .sidebar,
  .drawer-overlay,
  .back-to-top,
  .footer,
  .typeset .headerlink {
    display: none;
  }

  .main {
    margin: 0;
  }

  .typeset {
    margin: 0;
    padding: 0;
  }

  .typeset .admonition,
  .typeset details {
    box-shadow: none;
  }
}
