/* Material owns navigation and theme switching; these tokens style the book. */
:root { --book-radius: 12px; }

.external-link-icon {
  display: inline-block;
  margin-inline-start: .3em;
  font-size: .85em;
  white-space: nowrap;
}

[data-md-color-scheme="default"][data-md-color-primary] {
  --md-primary-fg-color: #115e59;
  --md-accent-fg-color: #0f766e;
  --md-default-bg-color: #fafbf9;
  --book-surface: #ffffff;
  --book-tint: #edf5f1;
  --book-border: #d9e4df;
  --book-muted: #52665e;
  --book-heading: #183c32;
  --md-typeset-a-color: #0f766e;
}

[data-md-color-scheme="slate"][data-md-color-primary] {
  --md-primary-fg-color: #163d37;
  --md-accent-fg-color: #80d6bd;
  --md-default-bg-color: #172320;
  --book-surface: #1d2d28;
  --book-tint: #20372f;
  --book-border: #3a5047;
  --book-muted: #b0c4ba;
  --book-heading: #e0f0e7;
  --md-typeset-a-color: #80d6bd;
}

.md-header { box-shadow: 0 1px 0 rgb(0 0 0 / 12%); }
.md-typeset { line-height: 1.75; }
.md-typeset h1, .md-typeset h2, .md-typeset h3 {
  color: var(--book-heading);
  font-weight: 650;
  letter-spacing: -.025em;
  line-height: 1.25;
}
.md-typeset h1 { margin-bottom: 1em; }
.md-typeset h2 { margin-top: 1.8em; }
.md-typeset hr { border-color: var(--book-border); }
.md-typeset a:not(.md-button):hover {
  text-decoration: underline;
  text-underline-offset: .2em;
}
.md-nav__link--active { font-weight: 700; }
.md-typeset .admonition, .md-typeset details, .md-typeset pre > code {
  border-radius: 8px;
}
.md-typeset table:not([class]) {
  border-color: var(--book-border);
  border-radius: 8px;
  background: var(--book-surface);
}
.md-typeset table:not([class]) th { background: var(--book-tint); }

.md-typeset .book-intro {
  padding: 1rem 0 1.5rem;
  border-bottom: 1px solid var(--book-border);
}
.md-typeset .book-intro h1 {
  max-width: 20em;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  margin: .65em 0;
  letter-spacing: -.04em;
}
.md-typeset .book-intro > p { max-width: 48rem; }
.md-typeset .book-contents { padding-bottom: 1rem; border-bottom: 1px solid var(--book-border); }
.md-typeset .book-contents li { padding: .25rem 0; }
.md-typeset .book-contents a { font-weight: 600; }

/* Underline the current section, keeping the desktop navigation compact. */
.md-tabs__link { opacity: .85; padding-bottom: .55rem; }
.md-tabs__item--active .md-tabs__link {
  opacity: 1;
  font-weight: 700;
  border-bottom: 2px solid currentColor;
}
.md-tabs__link:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.md-nav--primary .md-nav__link { padding-top: .2rem; padding-bottom: .2rem; }

.md-typeset .book-eyebrow {
  margin: 0;
  color: var(--md-typeset-a-color);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.md-typeset .book-byline {
  margin: 1.4rem 0 0;
  font-size: .7rem;
  color: var(--book-muted);
}
.md-typeset .md-button {
  padding: .55em 1.1em;
  border-radius: 6px;
  font-size: .75rem;
  margin: .3rem .3rem .3rem 0;
}
.md-typeset .md-button--primary {
  background: var(--md-primary-fg-color);
  border-color: var(--md-primary-fg-color);
  color: #fff;
}
.md-typeset .md-button:hover, .md-typeset .md-button:focus {
  background: var(--md-accent-fg-color);
  border-color: var(--md-accent-fg-color);
  color: var(--md-default-bg-color);
}
.md-typeset .tutorial-frame {
  display: block;
  width: 100%;
  border: 1px solid var(--book-border);
  border-radius: var(--book-radius);
  background: var(--book-surface);
}
.md-typeset a:focus-visible {
  outline: 2px solid var(--md-accent-fg-color);
  outline-offset: 4px;
}

/* Material defines link colors on the typeset container as well as the body. */
[data-md-color-scheme="default"] .md-typeset { --md-typeset-a-color: #0f766e; }
[data-md-color-scheme="slate"] .md-typeset { --md-typeset-a-color: #80d6bd; }
.md-typeset .md-button:not(.md-button--primary):not(:hover):not(:focus) {
  color: var(--md-typeset-a-color);
}

@media (min-width: 76.25em) {
  body:has(.book-intro) .md-sidebar--primary { display: none; }
}
