/* Card grids: shared surface tint (light/dark via theme variables) */
.md-typeset .grid.cards > ul > li {
  background-color: var(--md-code-bg-color);
}

/* Link icons: main article only (see exclusions below) */
.md-content__inner.md-typeset a[href^="http://localhost"],
.md-content__inner.md-typeset a[href^="https://localhost"],
.md-content__inner.md-typeset a[href^="http://127.0.0.1"],
.md-content__inner.md-typeset a[href^="https://127.0.0.1"],
.md-main .md-content .md-typeset a[href^="http://localhost"],
.md-main .md-content .md-typeset a[href^="https://localhost"],
.md-main .md-content .md-typeset a[href^="http://127.0.0.1"],
.md-main .md-content .md-typeset a[href^="https://127.0.0.1"],
.md-content__inner .md-typeset a[href^="http://localhost"],
.md-content__inner .md-typeset a[href^="https://localhost"],
.md-content__inner .md-typeset a[href^="http://127.0.0.1"],
.md-content__inner .md-typeset a[href^="https://127.0.0.1"] {
  font-weight: 500;
}

.md-main .md-content .md-typeset a[href^="http://localhost"]::before,
.md-main .md-content .md-typeset a[href^="https://localhost"]::before,
.md-main .md-content .md-typeset a[href^="http://127.0.0.1"]::before,
.md-main .md-content .md-typeset a[href^="https://127.0.0.1"]::before,
.md-content__inner .md-typeset a[href^="http://localhost"]::before,
.md-content__inner .md-typeset a[href^="https://localhost"]::before,
.md-content__inner .md-typeset a[href^="http://127.0.0.1"]::before,
.md-content__inner .md-typeset a[href^="https://127.0.0.1"]::before,
.md-content__inner.md-typeset a[href^="http://localhost"]::before,
.md-content__inner.md-typeset a[href^="https://localhost"]::before,
.md-content__inner.md-typeset a[href^="http://127.0.0.1"]::before,
.md-content__inner.md-typeset a[href^="https://127.0.0.1"]::before {
  content: "";
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  margin-right: 0.2em;
  vertical-align: -0.15em;
  background-color: currentColor;
  opacity: 0.9;
  -webkit-mask: url("../assets/icons/material-home.svg") no-repeat center / contain;
  mask: url("../assets/icons/material-home.svg") no-repeat center / contain;
}

.md-content__inner.md-typeset a[href^="https://beancount.github.io/docs"],
.md-content__inner.md-typeset a[href^="http://beancount.github.io/docs"],
.md-main .md-content .md-typeset a[href^="https://beancount.github.io/docs"],
.md-main .md-content .md-typeset a[href^="http://beancount.github.io/docs"],
.md-content__inner .md-typeset a[href^="https://beancount.github.io/docs"],
.md-content__inner .md-typeset a[href^="http://beancount.github.io/docs"] {
  font-weight: 500;
}

.md-main .md-content .md-typeset a[href^="https://beancount.github.io/docs"]::before,
.md-main .md-content .md-typeset a[href^="http://beancount.github.io/docs"]::before,
.md-content__inner .md-typeset a[href^="https://beancount.github.io/docs"]::before,
.md-content__inner .md-typeset a[href^="http://beancount.github.io/docs"]::before,
.md-content__inner.md-typeset a[href^="https://beancount.github.io/docs"]::before,
.md-content__inner.md-typeset a[href^="http://beancount.github.io/docs"]::before {
  content: "";
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  margin-right: 0.2em;
  vertical-align: -0.15em;
  background-color: currentColor;
  opacity: 0.9;
  -webkit-mask: url("../assets/icons/material-book-4.svg") no-repeat center / contain;
  mask: url("../assets/icons/material-book-4.svg") no-repeat center / contain;
}

.md-content__inner.md-typeset a[href^="https://github.com"],
.md-content__inner.md-typeset a[href^="http://github.com"],
.md-content__inner.md-typeset a[href^="https://www.github.com"],
.md-content__inner.md-typeset a[href^="http://www.github.com"],
.md-main .md-content .md-typeset a[href^="https://github.com"],
.md-main .md-content .md-typeset a[href^="http://github.com"],
.md-main .md-content .md-typeset a[href^="https://www.github.com"],
.md-main .md-content .md-typeset a[href^="http://www.github.com"],
.md-content__inner .md-typeset a[href^="https://github.com"],
.md-content__inner .md-typeset a[href^="http://github.com"],
.md-content__inner .md-typeset a[href^="https://www.github.com"],
.md-content__inner .md-typeset a[href^="http://www.github.com"] {
  font-weight: 500;
}

.md-main .md-content .md-typeset a[href^="https://github.com"]::before,
.md-main .md-content .md-typeset a[href^="http://github.com"]::before,
.md-main .md-content .md-typeset a[href^="https://www.github.com"]::before,
.md-main .md-content .md-typeset a[href^="http://www.github.com"]::before,
.md-content__inner .md-typeset a[href^="https://github.com"]::before,
.md-content__inner .md-typeset a[href^="http://github.com"]::before,
.md-content__inner .md-typeset a[href^="https://www.github.com"]::before,
.md-content__inner .md-typeset a[href^="http://www.github.com"]::before,
.md-content__inner.md-typeset a[href^="https://github.com"]::before,
.md-content__inner.md-typeset a[href^="http://github.com"]::before,
.md-content__inner.md-typeset a[href^="https://www.github.com"]::before,
.md-content__inner.md-typeset a[href^="http://www.github.com"]::before {
  content: "";
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  margin-right: 0.2em;
  vertical-align: -0.15em;
  background-color: currentColor;
  opacity: 0.9;
  -webkit-mask: url("../assets/icons/fontawesome-brands-github.svg") no-repeat center / contain;
  mask: url("../assets/icons/fontawesome-brands-github.svg") no-repeat center / contain;
}

.md-content__inner.md-typeset a[href^="/"]:not([href^="//"])::before,
.md-content__inner.md-typeset a[href^="./"]::before,
.md-content__inner.md-typeset a[href^="../"]::before,
.md-content__inner.md-typeset a[href^="https://lazy-beancount.xyz"]::before,
.md-content__inner.md-typeset a[href^="http://lazy-beancount.xyz"]::before,
.md-content__inner.md-typeset a[href]:not([href^="#"]):not([href^="http://"]):not([href^="https://"]):not([href^="//"]):not([href^="mailto:"]):not([href^="tel:"])::before,
.md-main .md-content .md-typeset a[href^="/"]:not([href^="//"])::before,
.md-main .md-content .md-typeset a[href^="./"]::before,
.md-main .md-content .md-typeset a[href^="../"]::before,
.md-main .md-content .md-typeset a[href^="https://lazy-beancount.xyz"]::before,
.md-main .md-content .md-typeset a[href^="http://lazy-beancount.xyz"]::before,
.md-main .md-content .md-typeset a[href]:not([href^="#"]):not([href^="http://"]):not([href^="https://"]):not([href^="//"]):not([href^="mailto:"]):not([href^="tel:"])::before,
.md-content__inner .md-typeset a[href^="/"]:not([href^="//"])::before,
.md-content__inner .md-typeset a[href^="./"]::before,
.md-content__inner .md-typeset a[href^="../"]::before,
.md-content__inner .md-typeset a[href^="https://lazy-beancount.xyz"]::before,
.md-content__inner .md-typeset a[href^="http://lazy-beancount.xyz"]::before,
.md-content__inner .md-typeset a[href]:not([href^="#"]):not([href^="http://"]):not([href^="https://"]):not([href^="//"]):not([href^="mailto:"]):not([href^="tel:"])::before {
  content: "";
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  margin-right: 0.2em;
  vertical-align: -0.15em;
  background-color: currentColor;
  opacity: 0.9;
  -webkit-mask: url("../assets/icons/material-book.svg") no-repeat center / contain;
  mask: url("../assets/icons/material-book.svg") no-repeat center / contain;
}

/* Card feature titles (first line): no link icons */
.md-main .md-content .md-typeset .grid.cards > ul > li > p:first-child a::before,
.md-content__inner .md-typeset .grid.cards > ul > li > p:first-child a::before,
.md-content__inner.md-typeset .grid.cards > ul > li > p:first-child a::before {
  content: none !important;
}

.md-main .md-content .md-typeset .grid.cards > ul > li > p:first-child a,
.md-content__inner .md-typeset .grid.cards > ul > li > p:first-child a,
.md-content__inner.md-typeset .grid.cards > ul > li > p:first-child a {
  font-weight: inherit !important;
}

/* Do not show link icons inside code contexts */
.md-main .md-content .md-typeset pre a::before,
.md-main .md-content .md-typeset code a::before,
.md-main .md-content .md-typeset .highlight a::before,
.md-content__inner .md-typeset pre a::before,
.md-content__inner .md-typeset code a::before,
.md-content__inner .md-typeset .highlight a::before,
.md-content__inner.md-typeset pre a::before,
.md-content__inner.md-typeset code a::before,
.md-content__inner.md-typeset .highlight a::before {
  content: none !important;
}

.md-main .md-content .md-typeset pre a,
.md-main .md-content .md-typeset code a,
.md-main .md-content .md-typeset .highlight a,
.md-content__inner .md-typeset pre a,
.md-content__inner .md-typeset code a,
.md-content__inner .md-typeset .highlight a,
.md-content__inner.md-typeset pre a,
.md-content__inner.md-typeset code a,
.md-content__inner.md-typeset .highlight a {
  font-weight: inherit !important;
}

/* Sidebar, header, footer, heading permalinks */
.md-nav a::before,
.md-header a::before,
.md-footer a::before,
.md-main .md-content .md-typeset :is(h1, h2, h3, h4, h5, h6) a::before,
.md-content__inner .md-typeset :is(h1, h2, h3, h4, h5, h6) a::before,
.md-content__inner.md-typeset :is(h1, h2, h3, h4, h5, h6) a::before,
.md-typeset a.headerlink::before {
  content: none !important;
}

.md-nav a,
.md-header a,
.md-footer a,
.md-main .md-content .md-typeset :is(h1, h2, h3, h4, h5, h6) a,
.md-content__inner .md-typeset :is(h1, h2, h3, h4, h5, h6) a,
.md-content__inner.md-typeset :is(h1, h2, h3, h4, h5, h6) a,
.md-typeset a.headerlink {
  font-weight: inherit !important;
}

/* medium-zoom overlay follows light/dark palette */
.medium-zoom-overlay {
  background-color: var(--md-default-bg-color) !important;
}
