@media screen and (min-width: 76.25em) {
  nav.md-nav.md-nav--primary.md-nav--lifted > ul.md-nav__list > li.md-nav__item.md-nav__item--active > nav.md-nav > ul.md-nav__list > li.md-nav__item:not(:last-child) {
    border-bottom: 1px solid #ababab;
    padding: 10px 0 20px;
  }

  nav.md-nav.md-nav--primary.md-nav--lifted > ul.md-nav__list > li.md-nav__item.md-nav__item--active > nav.md-nav > ul.md-nav__list > li.md-nav__item:last-child {
    padding: 10px 0 20px;
  }

  nav.md-nav.md-nav--primary.md-nav--lifted > ul.md-nav__list > li.md-nav__item.md-nav__item--active > nav.md-nav > ul.md-nav__list > li.md-nav__item.md-nav__item--nested > nav.md-nav {
    padding-left: 17px;
  }

  nav.md-nav.md-nav--primary.md-nav--lifted > ul.md-nav__list > li.md-nav__item.md-nav__item--active > nav.md-nav > ul.md-nav__list > li.md-nav__item.md-nav__item--active > div.md-nav__link.md-nav__container {
    background-color: #E5E0FF;
    padding: 10px;
    border-radius: 5px;
    color: #000000;
  }

  nav.md-nav.md-nav--primary.md-nav--lifted > ul.md-nav__list > li.md-nav__item.md-nav__item--active > nav.md-nav > ul.md-nav__list > li.md-nav__item.md-nav__item--active > div.md-nav__link.md-nav__container a {
    color: #000000;
  }

  nav.md-nav.md-nav--primary.md-nav--lifted > ul.md-nav__list > li.md-nav__item.md-nav__item--active > nav.md-nav > ul.md-nav__list > li.md-nav__item.md-nav__item--active > a.md-nav__link.md-nav__link--active  {
    background-color: #E5E0FF;
    padding: 10px;
    border-radius: 5px;
    color: #000000;
  }

  nav.md-nav.md-nav--primary.md-nav--lifted > ul.md-nav__list > li.md-nav__item.md-nav__item--active > div.md-nav__link.md-nav__container {
    display: none;
  }
}

div.grid.cards > ul > li {
  border-radius: 12px !important;
  border: 2px solid #eae8f6 !important;
}

div.grid.cards > ul > li > p:first-child {
  color: var(--md-typeset-a-color);
  font-size: larger;
}

.md-typeset__table table:not([class]) {
  font-size: .8rem;
}

.md-typeset .admonition {
  font-size: .7rem;
}

.md-typeset > p > .md-button {
  margin-bottom: 24px;
}



[data-md-color-scheme="slate"] {
  --md-typeset-color: #ffffff;
  --md-admonition-fg-color: #ffffff;
}

.md-header {
  background-color: #6450DC !important;
}

.md-tabs {
  background-color: #6450DC !important;
}

[data-md-color-scheme="slate"] .md-header h1 {
  color: #D7DCF0 !important;
}

/* Card layout for tool list */
.tool-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem; /* space between cards */
  list-style: none;
  padding: 0;
  margin: 0;
}

.tool-card {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 8px;
  padding: 1rem;
  flex: 1 1 300px; /* Flex properties for responsiveness */
  display: flex;
  flex-direction: column;
  background-color: var(--md-default-bg-color);
}

.tool-card h3 {
  margin-top: 0;
  font-size: 1.2rem;
}

.tool-card h3 a {
  text-decoration: none;
  color: inherit;
}

.tool-card p {
  margin-bottom: 0.5rem;
  flex-grow: 1; /* Allow description to grow */
}

.tool-card .tool-details-link {
    margin-top: auto; /* Pushes the link to the bottom */
    align-self: flex-start; /* Aligns link to the left */
    background-color: var(--md-primary-fg-color);
    color: var(--md-primary-bg-color);
    padding: 8px 12px;
    border-radius: 4px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.md-content__inner h2 {
    font-weight: bold;
    text-decoration: underline;
}

/* Hide left sidebar on desktop only */
@media screen and (min-width: 76.25em) {
    .md-sidebar--primary {
        display: none;
    }
}

/* Hide TOC headings in content but show in sidebar */
.hidden-toc {
    display: none;
}

/* Mobile-friendly tables */
@media screen and (max-width: 76.25em) {
    .md-typeset__table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .md-typeset table:not([class]) {
        font-size: 0.65rem;
        display: block;
        width: 100%;
        overflow-x: auto;
    }

    .md-typeset table:not([class]) td,
    .md-typeset table:not([class]) th {
        padding: 0.4rem 0.6rem;
        white-space: normal;
        min-width: 80px;
    }

    /* Make first column sticky on mobile for easier reference */
    .md-typeset table:not([class]) th:first-child,
    .md-typeset table:not([class]) td:first-child {
        position: sticky;
        left: 0;
        background-color: var(--md-default-bg-color);
        z-index: 1;
        min-width: 100px;
    }
}
