@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,500;0,8..60,600;1,8..60,400&display=swap');

/* Palette and typography for the data site.
   Primary and accent are set here rather than in mkdocs.yml so that both
   colour schemes use the same restrained set. */

:root,
[data-md-color-scheme="default"] {
  --md-primary-fg-color: #1f3a5f;        /* ink blue: header, tabs */
  --md-primary-fg-color--light: #4a6a93;
  --md-primary-fg-color--dark: #142843;
  --md-primary-bg-color: #ffffff;
  --md-accent-fg-color: #8a4b1f;         /* rust: links on hover, focus */
  --md-accent-fg-color--transparent: rgba(138, 75, 31, 0.08);
  --md-typeset-a-color: #1f3a5f;
  --md-default-fg-color: #1d2127;
  --md-default-fg-color--light: #4c535c;
  --md-default-fg-color--lighter: #6b727b;
  --md-default-bg-color: #fdfcfa;        /* warm paper, not pure white */
  --md-code-bg-color: #f1efea;
  --md-typeset-table-color: rgba(0, 0, 0, 0.1);
  --md-typeset-table-color--light: rgba(0, 0, 0, 0.035);
  --site-card-rule: #1f3a5f;
  --site-note-bg: rgba(31, 58, 95, 0.08);
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #16253a;
  --md-primary-fg-color--light: #4a6a93;
  --md-primary-fg-color--dark: #0f1a2a;
  --md-accent-fg-color: #d9a066;
  --md-accent-fg-color--transparent: rgba(217, 160, 102, 0.1);
  --md-typeset-a-color: #9ab8dc;
  --md-hue: 215;
  --site-card-rule: #9ab8dc;
  --site-note-bg: rgba(154, 184, 220, 0.12);
}

/* Type: a serif for titles and section heads, the sans body set in mkdocs.yml. */
.md-typeset h1,
.md-typeset h2 {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--md-default-fg-color);
}
.md-typeset h1 { font-size: 2em; margin-bottom: 0.8em; }
.md-typeset h2 { font-size: 1.45em; margin-top: 1.8em; }
.md-typeset h3 { font-size: 1.12em; font-weight: 600; }
.md-typeset { font-size: 0.78rem; line-height: 1.6; }

/* Tables: the site is mostly tables, so keep them quiet and compact. */
.md-typeset table:not([class]) {
  font-size: 0.7rem;
  border: none;
  border-top: 2px solid var(--md-default-fg-color--light);
  border-bottom: 1px solid var(--md-default-fg-color--light);
  box-shadow: none;
  border-radius: 0;
}
.md-typeset table:not([class]) th {
  background: transparent;
  color: var(--md-default-fg-color);
  font-weight: 600;
  border-bottom: 1px solid var(--md-default-fg-color--light);
}
.md-typeset table:not([class]) td,
.md-typeset table:not([class]) th { padding: 0.5em 0.9em; vertical-align: top; }
.md-typeset table:not([class]) tr:nth-child(even) td {
  background: var(--md-typeset-table-color--light);
}
/* Key–value tables on the literature pages have an empty header row:
   hide it visually but leave it in the accessibility tree. */
.md-typeset table:not([class]) thead:has(th:empty + th:empty) {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Figure captions on the literature index: the italic paragraph after an image. */
.md-typeset img { max-width: 100%; }
.md-typeset p:has(> img) + p > em:only-child { color: var(--md-default-fg-color--light); font-size: 0.7rem; }

/* Breadcrumb inserted by site_hooks/literature_nav.py, placed after the title. */
.md-typeset .crumb {
  font-size: 0.68rem;
  color: var(--md-default-fg-color--light);
  margin: -1.4em 0 1.4em 0;
}
.md-typeset .crumb a { color: var(--md-default-fg-color--light); }

/* Header: the site title in the serif, the tab bar quieter. */
.md-header__topic { font-family: "Source Serif 4", Georgia, serif; font-weight: 500; }
.md-tabs__link { font-size: 0.7rem; opacity: 0.8; }
.md-tabs__link--active, .md-tabs__link:hover { opacity: 1; }

/* Sidebars: lighter weight, smaller caps for section labels. */
.md-nav__title, .md-nav--secondary .md-nav__title { font-size: 0.68rem; }
.md-nav__item--section > .md-nav__link {
  font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--md-default-fg-color--light);
}
.md-nav__link { font-size: 0.7rem; }

/* Admonitions in the palette, not Material's default blues. */
.md-typeset .admonition, .md-typeset details { font-size: 0.72rem; }
.md-typeset .admonition.note, .md-typeset details.note { border-color: var(--md-primary-fg-color--light); }
.md-typeset .note > .admonition-title, .md-typeset .note > summary {
  background-color: var(--site-note-bg);
}
.md-typeset .note > .admonition-title::before, .md-typeset .note > summary::before {
  background-color: var(--md-primary-fg-color--light);
}

/* Home page: the three entry cards. */
.entry-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; margin: 1.2rem 0 1.6rem; }
@media screen and (max-width: 44.9375em) { .entry-cards { grid-template-columns: 1fr; } }
.entry-cards > div {
  border: 1px solid var(--md-typeset-table-color);
  border-top: 2px solid var(--site-card-rule);
  padding: 0.7rem 0.9rem 0.8rem;
  background: var(--md-code-bg-color);
}
.entry-cards p { margin: 0; font-size: 0.7rem; color: var(--md-default-fg-color--light); }
.entry-cards p:first-child { margin-bottom: 0.3rem; font-size: 0.85rem; }
.entry-cards p:first-child a { color: var(--md-typeset-a-color); }
