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

/*
  LIGHT-MODE COLOUR REFERENCE
  These variables set global Material-for-MkDocs colours. Uncomment and change
  a value when you want an exact custom colour rather than a named palette
  colour in mkdocs.yml.

  --md-default-bg-color: page background
  --md-default-fg-color: ordinary body text
  --md-default-fg-color--light: muted/secondary text
  --md-primary-fg-color: top header and navigation bar
  --md-primary-bg-color: text and icons on the top header
  --md-accent-fg-color: links, active navigation, and highlights
*/
[data-md-color-scheme="default"] {
  /* Page background (the light grey behind the content and specialty cards). */
  --md-default-bg-color: #f2f4f7;
  --md-primary-fg-color: #710202;
  --md-accent-fg-color: #710202;
  --md-accent-fg-color--transparent: #7102021a;
  --md-accent-bg-color: #ffffff;
  --md-accent-bg-color--light: #ffffffb3;
  /* Examples for precise global colours:
  --md-default-fg-color: #202938;
  --md-default-fg-color--light: #667085;
  --md-primary-fg-color: #121826;
  --md-primary-bg-color: #ffffff;
  --md-accent-fg-color: #2457a6;
  */
}
[data-md-color-scheme="slate"] {
  /* Inherit Material's dark text, code, table, search and diagram styles. */
  /* Background */
  --md-default-bg-color: #17191c;

  /* Header */
  --md-primary-fg-color: #710202;

  /* Text */
  --md-default-fg-color: #f1f2f4;
  --md-default-fg-color--light: #a7adb8;
  --md-default-fg-color--lighter: #818894;
  --md-default-fg-color--lightest: #525863;

  /* Links and accents */
  --md-accent-fg-color: #e09a9a;
  --md-accent-fg-color--transparent: #e09a9a1a;
  --md-accent-bg-color: #17191c;
  --md-accent-bg-color--light: #17191cb3;
  --md-typeset-a-color: #e09a9a;
}

/* Material passes these variables into Mermaid's SVGs, including HTML labels.
   They update immediately when the palette changes, without re-rendering. */
[data-md-color-scheme] {
  --md-mermaid-label-fg-color: var(--md-default-fg-color);
  --md-mermaid-edge-color: var(--md-default-fg-color--light);
}

.md-grid { max-width: 78rem; }
.md-header__title { color: inherit; min-width: 0; }
.md-header__title:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
/* Top-right link to the main website. Label and URL are in mkdocs.yml. */
.md-header__website {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: 0.35rem;
  min-height: 2.2rem;
  margin: 0 0.4rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid currentColor;
  border-radius: 0.25rem;
  color: inherit;
  font-size: 0.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; }
.md-typeset { font-size: 0.8rem; line-height: 1.6; }
.md-typeset h1 { font-weight: 650; letter-spacing: -0.025em; margin-bottom: 0.65em; }
.md-typeset h2 { font-weight: 650; border-bottom: 1px solid var(--md-default-fg-color--lightest); padding-bottom: 0.25em; }
.md-typeset h3 { font-weight: 650; }
.source-meta { color: var(--md-default-fg-color--light); font-size: 0.72rem; } /* Muted source/secondary text */
.md-typeset .specialty-grid > ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 0.75rem; list-style: none; padding: 0; margin-left: 0; }
/* Specialty-card box: add `background: #...;` or change `border-color` here. */
.md-typeset .specialty-grid li { margin: 0; padding: 1rem; border: 1px solid var(--md-default-fg-color--lightest); border-radius: 0.5rem; }
/* Specialty name/link: add `color: #...;` here for a card-specific link colour. */
.specialty-grid a { display: block; font-weight: 650; margin-bottom: 0.25rem; }
.md-typeset .clinical-figure { display: block; height: auto; width: 100%; max-width: 100%; margin: 1rem auto 0.4rem; background: white; border: 1px solid #d9e1e7; border-radius: 0.25rem; }
.md-typeset figure { margin: 1rem 0; }
.md-typeset .admonition.additional,
.md-typeset details.additional {
  border-color: #8a939d;
}
.md-typeset .additional > .admonition-title,
.md-typeset .additional > summary { background: #8a939d20; }
.md-typeset table:not([class]) { font-size: 0.72rem; }
.md-typeset table:not([class]) th { background: #497d9b18; white-space: normal; }
.md-typeset table:not([class]) td { min-width: 7.5rem; }
.md-typeset .md-typeset__table { max-width: 100%; }
.md-typeset .mermaid { overflow-x: auto; }
.md-typeset details { font-size: inherit; }
@media (max-width: 600px) {
  .md-typeset h1 {
    font-size: 1.65rem;
  }
  .md-typeset {
    font-size: 0.8rem;
  }
}
@media print {
  .md-typeset details > * {
    display: block !important;
  }
  .md-typeset .clinical-figure {
    max-height: 24cm;
    object-fit: contain;
  }
}
