/* Layout chrome and typography. */

/* Drawer: the primary sidebar as a right overlay panel (main.html), colored
   like the header (javascripts/scroll-color.js). */
.md-sidebar--nav-overlay,
[dir=ltr] .md-sidebar--nav-overlay {
  position: fixed;
  top: 0;
  right: -3px;
  bottom: 0;
  left: auto;
  width: 100%;
  max-width: min(22rem, 85vw);
  height: 100%;
  margin: 0;
  padding: 5rem 1.75rem 2rem;
  background-color: var(--md-default-bg-color);
  color: var(--color-white);
  box-shadow: calc(-1 * var(--stroke-width)) var(--stroke-width) 0 0 var(--color-white);
  border-radius: 0;
  transform: translateX(100%);
  transition: transform var(--transition-normal, 300ms ease), var(--transition-bg);
  pointer-events: none;
  z-index: 1100;
  overflow-y: auto;
}

[data-md-toggle="drawer"]:checked ~ .md-container .md-sidebar--nav-overlay,
[dir=ltr] [data-md-toggle="drawer"]:checked ~ .md-container .md-sidebar--nav-overlay {
  transform: translateX(0);
  pointer-events: auto;
}

.drawer__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  color: inherit;
}
.drawer__close:hover { opacity: .7; }

.drawer__close svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.5;
}

.md-sidebar--nav-overlay .md-sidebar__scrollwrap { display: contents; }
.md-sidebar--nav-overlay .md-sidebar__inner      { display: contents; }
.md-sidebar--nav-overlay .md-nav { width: 100%; }
.md-sidebar--nav-overlay .md-nav__title { display: none; }
.md-sidebar--nav-overlay .md-nav .md-nav__list { display: flex; flex-direction: column; gap: 1.25rem; padding: 0; }
.md-sidebar--nav-overlay .md-nav__item { margin: 0; padding: 0; }
.md-sidebar--nav-overlay .drawer__sections {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: var(--stroke-width) solid currentColor;
}

.md-sidebar--nav-overlay .md-nav__container > label { display: none; }
.md-sidebar--nav-overlay .md-nav[data-md-level="1"] {
  margin-top: .9rem;
  padding-left: 1rem;
  border-left: var(--stroke-width) solid currentColor;
}
.md-sidebar--nav-overlay .md-nav[data-md-level="1"] .md-nav__list { gap: .9rem; }

/* Material's mobile nav is sliding absolute panels: keep the flat list. */
@media screen and (max-width: 76.1875em) {
  .md-sidebar--nav-overlay .md-nav,
  .md-sidebar--nav-overlay .md-nav--primary,
  .md-sidebar--nav-overlay .md-nav--primary > .md-nav__list {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    transform: none !important;
    overflow: visible !important;
  }

  .md-sidebar--nav-overlay .md-nav[data-md-level="1"] {
    opacity: 1 !important;
    visibility: visible !important;
  }

  .md-sidebar--nav-overlay .md-nav--secondary {
    display: none !important;
  }
  .md-sidebar--nav-overlay .md-nav__link--active .md-nav__icon {
    display: none;
  }

  .md-sidebar--nav-overlay .md-nav--primary .md-nav__item {
    border: 0;
  }
  .md-sidebar--nav-overlay .md-nav--primary .md-nav__list {
    box-shadow: none;
  }
}

.md-sidebar--nav-overlay .md-nav__link,
.md-sidebar--nav-overlay .md-nav__link[href]:hover:not(.md-nav__link--active),
.md-sidebar--nav-overlay .md-nav__link--active {
  background: transparent !important;
  color: inherit !important;
  border-radius: 0;
  margin: 0;
  padding: 0;
  font-size: 1.05rem;
  font-weight: var(--font-weight-body);
  line-height: 1.3;
  text-decoration: none;
}

/* On the span: a flex <a> ignores text-decoration-thickness. */
.md-sidebar--nav-overlay .md-nav__link .md-ellipsis {
  overflow: visible;
}
.md-sidebar--nav-overlay .md-nav__link:hover .md-ellipsis {
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: .2em;
  text-decoration-thickness: var(--stroke-width);
}

/* Backdrop at every width (Material: mobile only). */
.md-overlay {
  background-color: rgba(0, 0, 0, 0.5);
  height: 0;
  opacity: 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  z-index: 1050;
  transition: width 0ms .25s, height 0ms .25s, opacity var(--transition-normal, 300ms ease);
  cursor: pointer;
}
[data-md-toggle="drawer"]:checked ~ .md-overlay {
  width: 100%;
  height: 100%;
  opacity: 1;
  transition: width 0ms, height 0ms, opacity .25s;
}

@media screen and (min-width: 76.25em) {
  /* TOC on the left (main.html renders it first) */
  .md-sidebar--toc-left {
    order: 0;
    padding-left: 0;
    padding-right: 1.2rem;
  }

  /* The drawer is out of flow: pages without a TOC stay centered. */
  [dir=ltr] .md-sidebar--primary:not([hidden]) ~ .md-content > .md-content__inner {
    margin-left: 0;
  }

  [dir=ltr] .md-sidebar--secondary:not([hidden]) ~ .md-content > .md-content__inner {
    margin-left: 1.2rem;
    margin-right: 0;
  }

  .md-content {
    flex: 1 1 auto;
    min-width: 0;
  }
}

/* Header (partials/header.html): javascripts/scroll-color.js gives it the
   page's screen--bg-* class. */
.md-header {
  background-color: var(--md-default-bg-color);
  box-shadow: none;
  transition: var(--transition-bg);
}
/* The theme's autohide slide, plus the color change */
.md-header--shadow {
  transition: transform .25s cubic-bezier(.1, .7, .1, 1), var(--transition-bg);
}
.md-header[hidden] {
  transition: transform .25s cubic-bezier(.8, 0, .6, 1), var(--transition-bg);
}
.md-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: .5rem;
  align-items: center;
  padding-block: 1rem;
  min-height: 4.5rem;
}

.md-header__title {
  margin: 0;
  padding: 0 .5rem;
  display: flex;
  align-items: center;
  gap: .3rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  flex: 0 1 auto;
  height: auto;
  line-height: normal;
  letter-spacing: .04em;
}

.md-header__site-link {
  color: inherit;
  text-decoration: none;
  font-family: var(--font-sans);
  letter-spacing: inherit;
}

.md-header__signin {
  display: flex;
  gap: .5rem;
  margin-inline-end: .6rem;
}
.md-header__signin-link {
  padding: .5em 1.5em;
  border: var(--stroke-width) solid currentColor;
  border-radius: 9999px;
  color: inherit;
  font-size: .7rem;
  font-weight: var(--font-weight-bold);
  line-height: normal;
  white-space: nowrap;
  transition: box-shadow var(--transition-fast);
}
.md-header__signin-link--primary {
  border-color: var(--color-white);
  background-color: var(--color-white);
  color: var(--color-black);
}
.md-header__signin-link:hover {
  box-shadow: var(--shadow-button);
}

.md-header > .md-header__inner > .md-logo {
  justify-self: center;
  margin: 0;
  padding: 0;
  display: inline-flex !important;
  align-items: center;
}

/* The logo sets the header's height; anchors stop below it. */
:root { --header-logo: 4.4rem; }
.md-typeset :target { --md-scroll-margin: calc(var(--header-logo) + 3.2rem); }

.md-header > .md-header__inner > .md-logo img {
  height: var(--header-logo);
  width: auto;
}

.md-header__actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}

.md-header__burger {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

/* Header variants (`header:` in the front matter) are CSS on page markers,
   as instant navigation keeps the header. */
body:not(:has(.md-sidebar--primary)) .md-header__burger,
body:not(:has(.page--header-zone)) .md-header__signin {
  display: none !important;
}
/* Light surfaces (components.css) swap the logos. */
.md-logo img.md-logo__img--neg { display: var(--logo-neg, block); }
.md-logo img.md-logo__img--pos { display: var(--logo-pos, none); }

/* zone: a smaller logo on the left, lined up with the content */
body:has(.page--header-zone) .md-header__inner {
  grid-template-columns: auto 1fr;
  max-width: calc(var(--container-xl) + 2 * var(--page-x));
  padding-inline: var(--page-x);
}
body:has(.page--header-zone) .md-header__inner > :first-child {
  display: none;
}
body:has(.page--header-zone) .md-header > .md-header__inner > .md-logo {
  justify-self: start;
}
body:has(.page--header-zone) .md-header__signin {
  margin-inline-end: 0;
}
body:has(.page--header-zone) {
  --header-logo: min(2.8rem, 14vw);
}

@media screen and (max-width: 30em) {
  .md-header__title { display: none; }
  .md-header__signin-link { padding-inline: .8em; }
  :root { --header-logo: min(3.2rem, 16vw); }
}

/* Material grows the root size on wide screens. */
html {
  font-size: 125%;
}

.md-typeset {
  font-size: .9rem;
}

/* Material dims body text. */
body { --font-weight-body: 400; }

.md-typeset,
.md-typeset p,
.md-typeset li,
.md-typeset blockquote,
.md-typeset .footnote {
  color: var(--color-white);
  font-weight: var(--font-weight-body);
}

/* Sligoil has a single weight. */
.md-typeset .admonition-title {
  font-weight: 400;
}

/* Component and blog h2s are bold Inter. */
.md-typeset h2 {
  font-family: var(--font-mono);
  font-weight: 400;
}
.md-typeset :is(.hero, .card--feature) h2 {
  font-family: inherit;
  font-weight: 700;
}

:is(.md-post, .md-content--post) .md-typeset h2 {
  font-family: inherit;
  font-weight: 700;
}
.md-typeset h3,
.md-typeset h4 {
  font-weight: 700;
}

.md-typeset a,
.md-typeset a:hover {
  color: inherit;
}

/* Content only: the footer and drawer are .md-typeset too. */
.md-content a:not(.btn):not(.headerlink):not(.toclink) {
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
  text-underline-offset: .2em;
}

/* Blog excerpts are blockquotes. */
.md-post__content.md-typeset blockquote {
  border-left: 0;
  border-right: 0;
  padding-left: 0;
  padding-right: 0;
}

.md-content--post blockquote {
  font-style: italic;
}

/* Blog pages on paper, not the landing page's News */
body:has(.md-content__inner > .md-post, .md-content--post) .md-main {
  background-color: var(--bg-white);
}

.md-typeset .blog-categories {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

.md-post .md-meta__link,
.md-post .md-meta__link:hover {
  color: inherit;
}

/* Check-mark bullets */
.md-content .md-typeset ul > li {
  list-style: none;
}
.md-content .md-typeset ul > li::before {
  content: "";
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  margin-left: -1.6em;
  margin-right: .55em;
  vertical-align: -.2em;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 72' fill='none'><path d='M61.4999 23.3001L53.4869 15.2871L27.7769 40.9971L18.5169 31.7371L10.5039 39.7501L27.9239 57.1901L61.4999 23.3001Z' fill='white'/><path d='M10.5 39.7599L27.92 57.1999L61.5 23.3099L53.487 15.2969L27.777 41.0069L18.517 31.7469L10.5 39.7599Z' stroke='%231A1A1A' stroke-width='3' stroke-miterlimit='10' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
}

.md-content .md-typeset .grid li::before,
.md-content .md-typeset .task-list-item::before {
  content: none;
}

/* DARC black, not upstream's #000 */
.md-footer,
.md-footer-meta {
  background-color: var(--bg-black);
}
