// Abbreviations
abbr[title] {
  cursor: help;
}

// Keyboard / Mouse "instructions"
kbd {
  margin: 0 0.2rem;
  padding: 0 0.2rem;
  border-radius: 0.2rem;
  border: 1px solid var(--color-foreground-border);
  color: var(--color-foreground-primary);
  vertical-align: text-bottom;

  font-size: var(--font-size--small--3);
  display: inline-block;

  box-shadow: 0 0.0625rem 0 rgba(0, 0, 0, 0.2),
    inset 0 0 0 0.125rem var(--color-background-primary);

  background-color: var(--color-background-secondary);

  > kbd {
    margin: 0;
  }
}

// Inline code
code.literal {
  background: var(--color-background-secondary);
  border-radius: 0.2em;
  // Make the font smaller, and use padding to recover.
  font-size: var(--font-size--small--2);
  padding: 0.1em 0.2em;
}

// Footnote References
.footnote-reference {
  font-size: var(--font-size--small--4);
  vertical-align: super;
}

// Permalinks
//    Adapted from Sphinx-RTD-theme's corresponding CSS
//    https://github.com/readthedocs/sphinx_rtd_theme/blob/1a32899b/src/sass/_theme_rst.sass#L201
h1,
h2,
h3,
h4,
h5,
h6,
dl dt,
p.caption,
table > caption,
.code-block-caption {
  > .headerlink {
    font-weight: 100;
    margin-left: 0.5rem;
    visibility: hidden;
  }
  &:hover > .headerlink {
    visibility: visible;
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  :target > &:first-child > .headerlink {
    visibility: visible;
  }
}

// Captions
article p.caption,
table > caption,
.code-block-caption {
  font-size: var(--font-size--small);
  text-align: center;
}

.toctree-wrapper.compound {
  .caption {
    text-align: initial;
    font-size: 1em;
    margin-bottom: 0;
  }
  > ul {
    margin-top: 0;
    margin-bottom: 0;
  }
}
