/* Shared typography and content primitives. */

body,
.md-typeset {
  font-family: var(--opi-font-body);
  font-feature-settings: "kern", "liga";
  color: var(--opi-text);
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4,
.md-typeset h5,
.md-typeset h6 {
  font-family: var(--opi-font-heading);
  font-weight: 700;
  letter-spacing: 0;
  color: var(--opi-heading);
}

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

.md-typeset h1 {
  font-size: 2.1rem;
  border-bottom: 2px solid var(--opi-gold);
  padding-bottom: 0.4rem;
  margin-bottom: 1.2rem;
}

.md-typeset h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  border-left: 4px solid var(--opi-gold);
  padding-left: 0.6rem;
}

.md-typeset h3 {
  font-size: 1.2rem;
  color: var(--opi-text);
}

.md-typeset a {
  color: var(--opi-link-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.md-typeset a:hover {
  border-bottom-color: var(--opi-link-hover);
}

/* Inline links retain a non-color affordance in both theme schemes. Component
   links such as cards and breadcrumbs own their presentation separately. */
.md-typeset :where(p, li, dd, dt, blockquote, figcaption, summary, td, th) a {
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.14em;
}

.md-typeset table:not([class]) {
  border: 1px solid var(--opi-border);
  font-size: 0.85rem;
}

.md-typeset table:not([class]) th {
  background-color: var(--opi-gold-soft);
  color: var(--opi-heading);
  font-weight: 600;
  border-bottom: 2px solid var(--opi-gold);
}

.md-typeset table:not([class]) td {
  border-top: 1px solid var(--opi-border);
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  color: var(--opi-gold);
}

/* Material creates this overflow wrapper around wide tables after load. The
   theme hook makes it keyboard-focusable; keep that focus visibly apparent. */
.md-typeset .md-typeset__scrollwrap {
  max-width: 100%;
}

.md-typeset .md-typeset__scrollwrap:focus-visible,
.md-typeset pre > code:focus-visible {
  outline: 2px solid var(--opi-link-hover);
  outline-offset: -2px;
}

@media (max-width: 640px) {
  .md-typeset table:not([class]) {
    min-width: 34rem;
  }
}

/* Pygments otherwise renders Markdown strong tokens at 4.47:1 against its
   light code surface. The theme's code foreground clears AA in both schemes. */
.md-typeset .highlight .gs {
  color: var(--md-code-fg-color);
  font-weight: 700;
}

/* Material's default light-scheme comment color reaches only 4.47:1 against
   the code surface. One token keeps every Pygments comment form above AA
   without collapsing comments into the primary code foreground. */
.md-typeset .highlight .c,
.md-typeset .highlight .ch,
.md-typeset .highlight .cm,
.md-typeset .highlight .c1,
.md-typeset .highlight .cs {
  color: var(--opi-code-comment);
}

.md-typeset .admonition,
.md-typeset details {
  border-left-width: 4px;
  border-radius: 2px;
  font-size: 0.85rem;
}

.md-typeset .admonition.note,
.md-typeset details.note {
  border-left-color: var(--opi-gold);
}

.md-typeset .note > .admonition-title,
.md-typeset .note > summary {
  background-color: var(--opi-gold-soft);
}

@media print {
  .md-header,
  .md-tabs,
  .md-sidebar,
  .md-footer {
    display: none;
  }

  .md-main__inner {
    margin: 0;
  }
}
