/* Weirling docs: readable line length, calmer tables, roomy diagrams. */

/* Same look as the app and landing page (#159): near-black, copper accent. */
[data-md-color-scheme="slate"] {
  --md-hue: 0;
  --md-default-bg-color: #0a0a0a;
  --md-default-fg-color: rgba(245, 245, 244, 0.92);
  --md-default-fg-color--light: rgba(245, 245, 244, 0.68);
  --md-default-fg-color--lighter: rgba(245, 245, 244, 0.4);
  --md-default-fg-color--lightest: rgba(245, 245, 244, 0.12);
  --md-code-bg-color: #151515;
  --md-footer-bg-color: #000000;
  --md-footer-bg-color--dark: #000000;
  --md-typeset-a-color: #f08a24;
}
:root,
[data-md-color-primary="custom"] {
  --md-primary-fg-color: #000000;
  --md-primary-fg-color--light: #151515;
  --md-primary-fg-color--dark: #000000;
  --md-primary-bg-color: #ffffff;
  --md-primary-bg-color--light: rgba(255, 255, 255, 0.7);
}
[data-md-color-accent="custom"] {
  --md-accent-fg-color: #f08a24;
  --md-accent-fg-color--transparent: rgba(240, 138, 36, 0.12);
  --md-accent-bg-color: #ffffff;
}
.md-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.md-header__topic:first-child,
.md-typeset h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
}

:root {
  --md-text-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --md-code-font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* Body text at a comfortable size and line height. */
.md-typeset {
  font-size: 0.8rem;
  line-height: 1.7;
}

.md-typeset h1 {
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.6em;
}

.md-typeset h2 {
  font-weight: 650;
  margin-top: 2.2em;
  padding-top: 0.6em;
  border-top: 1px solid var(--md-default-fg-color--lightest);
}

.md-typeset h3 {
  font-weight: 600;
  margin-top: 1.6em;
}

/* The lead paragraph right under the title. */
.md-typeset .lead {
  font-size: 0.95rem;
  color: var(--md-default-fg-color--light);
}

/* Tables: full width, zebra rows, no heavy borders. */
.md-typeset table:not([class]) {
  display: table;
  width: 100%;
  font-size: 0.75rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 6px;
}

.md-typeset table:not([class]) th {
  background: var(--md-default-fg-color--lightest);
  font-weight: 600;
}

.md-typeset table:not([class]) tr:nth-child(even) td {
  background: color-mix(in srgb, var(--md-default-fg-color--lightest) 40%, transparent);
}

/* Diagrams: centred, with room around them, scroll instead of shrink. */
.md-typeset .mermaid {
  display: flex;
  justify-content: center;
  margin: 1.5em 0;
  padding: 1em;
  overflow-x: auto;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 8px;
  background: var(--md-code-bg-color);
}

/* Inline code that doesn't shout. */
.md-typeset code {
  font-size: 0.85em;
  border-radius: 4px;
}

/* Grid cards on the home page. */
.md-typeset .grid.cards > ul > li {
  border-radius: 8px;
}
