/* Brand: the README art tokens in scripts/readme-art/generate.mjs. Ink on
   paper with cobalt links, and the header on the same sheet as the page. */
:root > * {
  --md-text-font-family: -apple-system, BlinkMacSystemFont,
    "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --md-code-font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo,
    Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;
}

[data-md-color-scheme="default"] {
  --md-primary-fg-color: #f5f4ee;
  --md-primary-fg-color--light: #f5f4ee;
  --md-primary-fg-color--dark: #ebeae2;
  --md-primary-bg-color: #161713;
  --md-primary-bg-color--light: #66685f;
  --md-accent-fg-color: #3155f5;
  --md-accent-fg-color--transparent: #3155f514;
  --md-default-fg-color: #161713;
  --md-default-fg-color--light: #66685f;
  --md-default-fg-color--lighter: #66685f80;
  --md-default-fg-color--lightest: #d8d8cf;
  --md-default-bg-color: #f5f4ee;
  --md-code-bg-color: #ebeae2;
  --md-code-fg-color: #161713;
  --md-typeset-color: #161713;
  --md-typeset-a-color: #3155f5;
  --md-typeset-table-color: #d8d8cf;
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #171915;
  --md-primary-fg-color--light: #171915;
  --md-primary-fg-color--dark: #10110e;
  --md-primary-bg-color: #f5f4ee;
  --md-primary-bg-color--light: #9b9d94;
  --md-accent-fg-color: #7390ff;
  --md-accent-fg-color--transparent: #7390ff1f;
  --md-default-fg-color: #f5f4ee;
  --md-default-fg-color--light: #9b9d94;
  --md-default-fg-color--lighter: #9b9d9480;
  --md-default-fg-color--lightest: #3a3c35;
  --md-default-bg-color: #171915;
  --md-code-bg-color: #21231e;
  --md-code-fg-color: #f5f4ee;
  --md-typeset-color: #f5f4ee;
  --md-typeset-a-color: #7390ff;
  --md-typeset-table-color: #3a3c35;
}

.md-header {
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
  box-shadow: none;
}

.md-logo img {
  border-radius: 0.3rem;
}

/* Readability. The docs mix prose with many inline code spans, so body text
   is a size up, code spans are light and tight enough not to stack into
   blocks, and prose lines stop near 80 characters. Tables and code blocks
   keep the full width. */
.md-typeset {
  font-size: 0.8rem;
  line-height: 1.7;
}

.md-typeset :is(p, ul, ol, dl, blockquote, .admonition, details) {
  max-width: 38rem;
}

.md-typeset :is(p, li) > code,
.md-typeset :is(td, th) code,
.md-typeset :is(h1, h2, h3, h4, h5, h6) code {
  font-size: 0.85em;
  padding: 0.05em 0.3em;
  border-radius: 0.2rem;
  background-color: var(--md-code-bg-color);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  word-break: normal;
  overflow-wrap: anywhere;
}

.md-typeset p,
.md-typeset :is(ul, ol) {
  margin-block: 0.9em;
}

.md-typeset li {
  margin-bottom: 0.35em;
}

.md-typeset li > p {
  margin-block: 0.4em;
}

.md-typeset :is(h2, h3) {
  margin-top: 1.8em;
}

/* Flag names in the first column of reference tables stay on one line;
   a narrow table scrolls instead of breaking `--trace-dir` mid-word. */
.md-typeset td:first-child code {
  white-space: nowrap;
  overflow-wrap: normal;
}

.md-typeset table:not([class]) {
  font-size: 0.75rem;
  line-height: 1.6;
}
