/* Tutorial callouts (::: {.callout-note title="..."}): a coloured left rule and
   the title on top; the same colours as the PDF boxes (Okabe-Ito). */
.callout-note, .callout-tip, .callout-warning, .callout-important, .callout-caution {
  border-left: 4px solid var(--callout-colour);
  background: color-mix(in srgb, var(--callout-colour) 7%, transparent);
  padding: 0.6rem 1rem 0.2rem;
  margin: 1rem 0;
  border-radius: 0 4px 4px 0;
}
.callout-note      { --callout-colour: #0072B2; }
.callout-tip       { --callout-colour: #009E73; }
.callout-warning,
.callout-caution   { --callout-colour: #E69F00; }
.callout-important { --callout-colour: #D55E00; }
.callout-note[title]::before, .callout-tip[title]::before,
.callout-warning[title]::before, .callout-important[title]::before,
.callout-caution[title]::before {
  content: attr(title);
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: color-mix(in srgb, var(--callout-colour) 75%, black);
}

/* Plots of one chunk drawn side by side (out.width below 100%) sit in a row. */
.section .figure, main .figure { display: inline-block; vertical-align: top; }
/* knitr writes the side-by-side width as an attribute, which the theme's
   img { width: 100% } would override */
main img[width="49.0%"] { width: 49% !important; display: inline-block; }
main img[width="32.7%"] { width: 32.7% !important; display: inline-block; }
