/*
 * Titles at least as strong as the text under them, in both schemes.
 * Material draws h1 at 54-56% opacity in weight 300, which measured 4.6:1
 * (light) and 4.9:1 (dark) against body text at 16:1 and 8.9:1: the title
 * was fainter than the paragraph below it.
 */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4 {
  color: var(--md-default-fg-color);
  font-weight: 500;
}

.md-typeset h1 {
  font-weight: 600;
}

/*
 * Links in dark mode. Material's indigo measured 4.65:1 on slate, only just
 * over WCAG AA; indigo 200 is comfortably over it. Same two attributes as
 * Material's own rule, so this one wins on order, not on specificity tricks.
 */
[data-md-color-scheme="slate"][data-md-color-primary="indigo"] {
  --md-typeset-a-color: #9fa8da;
}

/*
 * A published file longer than a screen scrolls inside its block, so opening
 * it does not push the rest of the page down by hundreds of lines.
 */
.md-typeset details .highlight {
  max-height: 36rem;
  overflow-y: auto;
}

/*
 * The legend at the top of an annotated file block: Material's own
 * annotation icon, drawn inline, so the reader knows what the markers in the
 * code look like before meeting one.
 */
.md-typeset .file-note-marker {
  display: inline-block;
  width: 2.2ch;
  height: 2.2ch;
  vertical-align: text-bottom;
  background-color: var(--md-default-fg-color--lighter);
  -webkit-mask-image: var(--md-annotation-icon);
  mask-image: var(--md-annotation-icon);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

/*
 * The legend and download line sits close to the code it describes: the
 * code table already brings its own top margin.
 */
.md-typeset .file-legend {
  margin-bottom: 0;
}

/* the "started as a gist" line at the foot of a page (overrides/partials/comments.html) */
.md-typeset .source-gist {
  margin-top: 2.5em;
  font-size: 0.8em;
  color: var(--md-default-fg-color--light);
}

/*
 * The access table on the auth page (includes/access/table.md). Each access
 * path's columns carry their own tint and a rule on their left, so a cell
 * reads as direct, lan or outside without tracing it back to the header.
 * Tighter padding and type let the eight columns fit beside the sidebar.
 * The selectors repeat Material's `table:not([class])` so these win on
 * specificity.
 */
.md-typeset .access-table table:not([class]) {
  font-size: 0.6rem;
}

.md-typeset .access-table table:not([class]) th,
.md-typeset .access-table table:not([class]) td {
  padding: 0.5em 0.7em;
}

.md-typeset .access-table table:not([class]) .path-lan {
  background-color: rgb(63 81 181 / 12%);
}

.md-typeset .access-table table:not([class]) .path-outside {
  background-color: rgb(255 152 0 / 12%);
}

.md-typeset .access-table table:not([class]) .path-start {
  border-left: 0.1rem solid var(--md-default-fg-color--light);
}
