[data-md-color-scheme="default"] {
  --md-primary-fg-color: #233237;
  --md-primary-fg-color--light: #334950;
  --md-primary-fg-color--dark: #11191b;

  --md-accent-fg-color: hsla(191, 100%, 50%, 1);
  --md-accent-fg-color--transparent: hsl(191, 100%, 50%, 0.1);

  --md-footer-bg-color: #233237;

  --md-typeset-a-color: rgb(0, 130, 160) !important;

  --feedback-button-bg-color: #fff;
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #233237;
  --md-primary-fg-color--light: #334950;
  --md-primary-fg-color--dark: #11191b;

  --md-accent-fg-color: hsla(191, 100%, 50%, 1);
  --md-accent-fg-color--transparent: hsl(191, 100%, 50%, 0.1);

  --md-typeset-a-color: #bfffff !important;

  --feedback-button-bg-color: #233237;
}

.md-grid {
  max-width: 95%;
}

/* make all paragraphs justified */
.md-content p {
  text-align: justify;
}

.md-content p img {
  display: block;
  margin: 0 auto;
}

/* convenience classes */
.nobr {
  white-space: nowrap;
}

/* Feedback button */
.feedback-button {
  position: fixed;
  right: 10px;
  bottom: 134px;
  display: block;
  height: 44px;
  padding: 4px;
  border: solid 2px #00d1ff;
  border-radius: 4px;
  background: var(--feedback-button-bg-color);
}

.feedback-button:hover {
  box-shadow: 0px 0px 8px #00d1ff;
}

@media (max-width: 640px) {
  .feedback-button {
    bottom: 183px;
  }
}

/* Fix excessive vertical space around display equations in .md files.
   The .arithmatex div contains whitespace text nodes alongside the block
   .katex-display span. Those text nodes create anonymous block boxes sized
   by font-size × line-height (~20px each). Setting line-height: 0 collapses
   them to nothing. overflow: visible overrides Material's overflow: auto so
   the collapsed wrapper doesn't trigger a scrollbar; wide-equation horizontal
   scroll is preserved by moving overflow-x: auto down to .katex-display. */
.md-typeset div.arithmatex {
  margin: 0.75em 0;
  padding: 0;
  line-height: 0;
  overflow: visible;
}

.md-typeset div.arithmatex .katex-display {
  margin: 0;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
}
