:root {
  --md-text-font: system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* LIGHT THEME: page background, body text, muted headings, header, links.
   Edit these values to change the colours across the whole guide. */
[data-md-color-scheme="default"] {
  --md-default-bg-color: #f2f4f7;
  --md-default-fg-color: #242424;
  --md-default-fg-color--light: #707070;
  --md-primary-fg-color: #710202;
  --md-primary-bg-color: #ffffff;
  --md-primary-bg-color--light: #ffffffb3;
  --md-typeset-a-color: #710202;
  --md-accent-fg-color: #710202;
  --md-accent-fg-color--transparent: #7102021a;
  --md-accent-bg-color: #ffffff;
  --md-accent-bg-color--light: #ffffffb3;
}

/* DARK THEME: keep the burgundy header and use softer rose links.
   Material supplies matching dark styles for search, tables and code. */
[data-md-color-scheme="slate"] {
  --md-default-bg-color: #17191c;
  --md-default-fg-color: #f1f2f4;
  --md-default-fg-color--light: #a7adb8;
  --md-default-fg-color--lighter: #818894;
  --md-default-fg-color--lightest: #525863;
  --md-primary-fg-color: #710202;
  --md-primary-bg-color: #ffffff;
  --md-primary-bg-color--light: #ffffffb3;
  --md-typeset-a-color: #e09a9a;
  --md-accent-fg-color: #e09a9a;
  --md-accent-fg-color--transparent: #e09a9a1a;
  --md-accent-bg-color: #17191c;
  --md-accent-bg-color--light: #17191cb3;
}

.md-grid {
  max-width: 76rem;
}

/* Clickable site title; the home destination is in overrides/partials/header.html. */
.md-header__title {
  color: inherit;
  min-width: 0;
}

.md-header__title:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -2px;
}

/* Website button appearance. Its label and URL are in mkdocs.yml. */
.md-header__website {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 2.2rem;
  margin: 0 .4rem;
  padding: .3rem .55rem;
  border: 1px solid currentColor;
  border-radius: .25rem;
  color: inherit;
  font-size: .65rem;
  font-weight: 600;
  white-space: nowrap;
}

.md-header__website:hover {
  background: #ffffff1a;
}

.md-header__website:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.clinical-figure {
  display: block;
  height: auto;
  margin: 1.5rem auto;
  max-height: 38rem;
  max-width: min(100%, 48rem);
  object-fit: contain;
}

.md-typeset h1 {
  font-weight: 650;
  letter-spacing: -.025em;
  margin-bottom: 1.5rem;
}

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

.md-typeset .specialty-grid > ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: .75rem;
  padding: 0;
  margin-left: 0;
  list-style: none;
}

.md-typeset .specialty-grid li {
  margin: 0;
  padding: .8rem 1rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: .4rem;
}

.specialty-grid a {
  display: block;
  font-weight: 600;
  padding-block: .25rem;
}

.md-typeset table:not([class]) td {
  min-width: 6rem;
}

@media (max-width: 600px) {
  .md-typeset h1 { font-size: 1.65em; }
  .md-typeset .specialty-grid li { padding: .65rem .85rem; }
}
