/* Wider content for tables of parameters and methods. */
.md-grid {
  max-width: 1280px;
}

/* Keep long display equations scrollable on small screens. */
.md-typeset div.arithmatex {
  overflow-x: auto;
}

/* JavaScript reference from jsdoc-to-markdown: tidy type badges. */
.md-typeset h3 code,
.md-typeset td code {
  white-space: nowrap;
}

/* Link buttons. */
.md-typeset .md-button {
  margin: 0.2rem 0.3rem 0.2rem 0;
}

/* Small logo mark inline with a page's H1. */
.md-typeset h1 .title-mark {
  height: 1.2em;
  width: auto;
  vertical-align: -0.22em;
  margin-right: 0.15em;
}

/* Short subtitle line under a page's H1. */
.md-typeset .page-subtitle {
  margin-top: -0.6em;
  font-size: 1.05rem;
  color: var(--md-default-fg-color--light);
}

/* Figures: full width, with a muted caption. */
.md-typeset figure.doc-figure {
  margin: 1.5em 0;
}

.md-typeset figure.doc-figure img {
  width: 100%;
  max-width: 100%;
}

.md-typeset figure.doc-figure figcaption {
  max-width: 100%;
  font-style: normal;
  color: var(--md-default-fg-color--light);
}

.md-typeset figure.doc-figure > br {
  display: none;
}

.md-typeset .page-subtitle code {
  font-size: 0.8em;
}

/* Wordmark as the home page H1. */
.md-typeset h1 .title-logo {
  height: 44px;
  width: auto;
  max-width: 100%;
  vertical-align: middle;
}

/* Live preview of the interactive page on the home page. */
.md-typeset .interactive-embed {
  position: relative;
  margin: 1.5em 0;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.2rem;
  overflow: hidden;
}

.md-typeset .interactive-embed iframe {
  display: block;
  width: 100%;
  height: 720px;
  max-height: 80vh;
  border: 0;
  background: var(--md-default-bg-color);
}

.md-typeset .interactive-embed__open {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  padding: 0.3rem 0.7rem;
  border-radius: 0.1rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--md-accent-bg-color);
  background: var(--md-accent-fg-color);
  box-shadow: var(--md-shadow-z2);
}

.md-typeset .interactive-embed__open:hover,
.md-typeset .interactive-embed__open:focus {
  color: var(--md-accent-bg-color);
  background: var(--md-typeset-a-color);
}

/* package cards: compact, and the whole card links to the guide */
.md-typeset .pkg-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.6rem;
  margin: 1rem 0;
}
.md-typeset .pkg-cards > a.pkg-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 4px;
  color: var(--md-default-fg-color);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.md-typeset .pkg-cards > a.pkg-card:hover,
.md-typeset .pkg-cards > a.pkg-card:focus {
  border-color: var(--md-accent-fg-color);
  box-shadow: var(--md-shadow-z1);
}
.md-typeset .pkg-cards .pkg-head { display: flex; align-items: center; gap: 0.5rem; }
.md-typeset .pkg-cards .pkg-wordmark {
  height: 30px;
  width: auto;
  max-width: 100%;
  margin: 0;
}
/* The wordmark shows the name; keep it as text for screen readers. */
.md-typeset .pkg-cards .pkg-name {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.md-typeset .pkg-cards .pkg-desc { font-size: 0.7rem; color: var(--md-default-fg-color--light); }
.md-typeset .pkg-cards .pkg-open { font-size: 0.7rem; color: var(--md-typeset-a-color); margin-top: 0.2rem; }
[data-md-color-scheme="default"] .md-typeset .pkg-cards .pkg-dark,
[data-md-color-scheme="slate"] .md-typeset .pkg-cards .pkg-light { display: none; }
