/*
 * OpenD brand theme. The built-in styles already follow the OpenD design
 * system, so this file only pins the brand tokens and adds a few touches. It
 * loads after the built-in styles and also styles the help panel and the PDF
 * publications. The header logo is theme/logo.svg (`logo` in opend.config.yaml).
 */
:root {
  --opend-accent: #187f65;
  --opend-text: #1d2733;
  --opend-heading: #15202b;
  --opend-muted: #5a6673;
  --opend-surface: #ffffff;
  --opend-surface-alt: #f5f7f6;
  --opend-border: #e1e7e4;
  /* Brand emerald for the PDF cover and chapter rules. */
  --opend-brand: #187f65;
}

@media (prefers-color-scheme: dark) {
  :root {
    --opend-accent: #3fbf98;
    --opend-text: #dfe7e3;
    --opend-heading: #f2f6f4;
    --opend-muted: #9aa8a2;
    --opend-surface: #111816;
    --opend-surface-alt: #141c19;
    --opend-border: #233029;
    --opend-brand: #3fbf98;
  }
}

/* Diagrams have their own white background; give them a frame. */
article img[src$='.svg'] {
  border: 1px solid var(--opend-border);
  border-radius: 12px;
}

/* PDF publications: brand-coloured cover and chapter titles. */
.publication .pub-cover h1 {
  color: var(--opend-brand);
}
.publication .pub-chapter h1 {
  border-bottom: 2px solid var(--opend-brand);
  padding-bottom: 4pt;
}
