/* ------------------------------------------------------------------ brand */
/* CibaLab red (#D1282B, from the logo) + the link blue used on cibalab.com */
:root,
[data-md-color-scheme="default"] {
  --cl-red: #d1282b;
  --cl-red-dark: #a81f22;
  --cl-blue: #337ab7;
}
[data-md-color-scheme="slate"] {
  --cl-red: #ff4d52;
  --cl-red-dark: #ff7a7e;
  --cl-blue: #6fa8dc;
}
[data-md-color-primary="custom"] {
  --md-primary-fg-color: var(--cl-red);
  --md-primary-fg-color--light: var(--cl-red);
  --md-primary-fg-color--dark: var(--cl-red-dark);
  --md-primary-bg-color: #fff;
  --md-primary-bg-color--light: rgba(255, 255, 255, .7);
  --md-typeset-a-color: var(--cl-blue);
}
[data-md-color-accent="custom"] {
  --md-accent-fg-color: var(--cl-red);
  --md-accent-fg-color--transparent: rgba(209, 40, 43, .1);
  --md-accent-bg-color: #fff;
  --md-accent-bg-color--light: rgba(255, 255, 255, .7);
}

/* Header: wordmark logo followed by "Wiki" instead of the site name */
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  height: 1.3rem;
  width: auto;
}
/* only where the theme shows the header logo (wide screens); phones keep "Cibalab Wiki" */
@media screen and (min-width: 76.25em) {
  .md-header__title .md-header__topic:first-child .md-ellipsis {
    font-size: 0;
  }
  .md-header__title .md-header__topic:first-child .md-ellipsis::after {
    content: "Wiki";
    font-size: .9rem;
    font-weight: 700;
    color: var(--md-default-fg-color--light);
  }
}
.md-nav--primary > .md-nav__title .md-logo img {
  height: 1.6rem;
  width: auto;
}

/* Less empty space between the tabs and the page (theme default ~52px -> ~24px);
   sidebar padding matches the article so the menu lines up with the page title */
.md-main__inner {
  margin-top: 10px;
}
.md-content__inner {
  padding-top: 14px;
}
.md-content__inner::before {
  height: 0;
}
.md-sidebar {
  padding-top: 14px;
}

/* Active tab / nav item in brand red */
.md-tabs__item--active .md-tabs__link,
.md-nav__link--active,
.md-nav__item .md-nav__link--active {
  color: var(--cl-red);
}

/* Tables migrated from DokuWiki (support colspan/rowspan) */
.md-typeset .dw-table .md-typeset__table {
  margin: .5em 0;
}
.md-typeset .dw-table table:not([class]) {
  border-collapse: collapse;
  border: 1px solid var(--md-default-fg-color--lighter);
  border-radius: 0;
  font-size: .7rem;
  display: table;
}
.md-typeset .dw-table table:not([class]) th,
.md-typeset .dw-table table:not([class]) td {
  border: 1px solid var(--md-default-fg-color--lighter);
  padding: .3em .6em;
  vertical-align: top;
  min-width: 0;
}
.md-typeset .dw-table table:not([class]) th {
  background: var(--md-default-fg-color--lightest);
  font-weight: 700;
}
.md-typeset .dw-table table:not([class]) th:not([style]) {
  text-align: left;
}
.md-typeset .dw-table table:not([class]) tr:hover {
  background: inherit;
  box-shadow: none;
}

/* Alphabetic page index (nspages plugin replacement) */
.md-typeset .nspages {
  column-width: 14rem;
  column-gap: 2rem;
}
.md-typeset .nspages-group {
  break-inside: avoid-column;
}
.md-typeset .nspages-letter {
  font-weight: 700;
  margin: .8em 0 .2em;
}
.md-typeset .nspages ul {
  margin-top: 0;
}
