/* css styles */

/* Sidebar logo: centre it and cap its size so the hex sticker stays compact */
.sidebar-header-stacked {
  text-align: center;
}

.sidebar-logo {
  max-width: 120px;
  max-height: 140px;
  margin: 0.25rem auto 0.5rem;
}

/* Lightbox: scale up SVG figures.
   SVGs converted from PDFs (pdf2svg) and CeTZ output have small intrinsic
   sizes in pt, so GLightbox would otherwise display them at that tiny natural
   size. Vector images can be upscaled without quality loss. */
.gslide-image img[src$=".svg"] {
  width: min(90vw, 1600px);
  height: auto;
  max-height: 90vh;
  object-fit: contain;
}

/* Theorem-like environments (HTML only; the PDF keeps the jsbook look).
   A quiet callout: a coloured rule on the left, a faint tint of the same
   colour, and the label on its own line. The colours come from the course
   palette (_brand.yml): teal for statements, rust for definitions, plum for
   algorithms. Examples and remarks only get a thin grey rule. */
.theorem {
  --thm-rgb: 15, 106, 129;   /* teal #0f6a81 */
  --thm-label: #0f6a81;
  margin: 1.5rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid rgb(var(--thm-rgb));
  border-radius: 0 0.25rem 0.25rem 0;
  background: rgba(var(--thm-rgb), 0.045);
}

.theorem.definition {
  --thm-rgb: 153, 80, 65;    /* rust #995041 */
  --thm-label: #995041;
}

.theorem.algorithm {
  --thm-rgb: 92, 54, 58;     /* plum #5c363a */
  --thm-label: #5c363a;
}

.theorem.example,
.theorem.exercise {
  --thm-rgb: 108, 117, 125;
  --thm-label: #495057;
  border-left-width: 2px;
  background: none;
}

.theorem .theorem-title {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--thm-label);
}

.theorem > :last-child {
  margin-bottom: 0;
}

.proof.remark {
  margin: 1.25rem 0;
  padding-left: 1rem;
  border-left: 2px solid #ced4da;
}

/* End of proof, so that the text after a proof is not read as part of it. */
.proof:not(.remark)::after {
  content: "∎";
  display: block;
  text-align: right;
  color: #adb5bd;
  line-height: 1;
}
