/* Quarto gives all numbered environments the theorem class. */
main.content div.theorem {
  --environment-background: #f2ecff;
  --environment-accent: #594188;
}

main.content div.definition {
  --environment-background: #eaf3ff;
  --environment-accent: #24578a;
}

main.content div.proposition {
  --environment-background: #eaf7f4;
  --environment-accent: #20645c;
}

main.content div.corollary {
  --environment-background: #f5f1fb;
  --environment-accent: #695884;
}

main.content div.example {
  --environment-background: #fff5de;
  --environment-accent: #795216;
}

main.content div.proof {
  --environment-background: #f6f7fa;
  --environment-accent: #566174;
}

/* Remarks also carry the proof class, so apply their colors last. */
main.content div.remark {
  --environment-background: #f4f0eb;
  --environment-accent: #65564a;
}

main.content div:is(.theorem, .proof, .remark) {
  margin-block: 1.25rem;
  padding: 0.75rem clamp(0.625rem, 2.5vw, 1rem);
  border-inline-start: 3px solid var(--environment-accent);
  border-radius: 0.25rem;
  background-color: var(--environment-background);
  color: #252b35;
}

main.content div:is(.theorem, .proof, .remark) > :first-child {
  margin-block-start: 0;
}

main.content div:is(.theorem, .proof, .remark) > :last-child {
  margin-block-end: 0;
}

main.content div:is(.theorem, .proof, .remark) > p > :is(.theorem-title, .proof-title) {
  color: var(--environment-accent);
}

main.content div:is(.theorem, .proof, .remark) mjx-container[display="true"] {
  max-inline-size: 100%;
  overflow-x: auto;
}
