/* Layout overrides for the Quarto Cosmo theme. */
html { scroll-padding-top: 85px; }
body { font-size: 1.0625rem; }
.navbar { border-bottom: 1px solid #eeeeee; }
.navbar-title { font-size: 1.25rem; }
#title-block-header { margin-bottom: 2rem; }
h2 { margin-top: 2.6rem; }
h3 { margin-top: 2rem; }
.result-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 1.4rem 0; }
.result-grid.cols-1 { grid-template-columns: minmax(0, 1fr); }
.result-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.result-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.result-grid figure { margin: 0; min-width: 0; }
.result-grid img { display: block; width: 100%; height: auto; }
.result-grid figcaption { text-align: center; font-size: .875rem; line-height: 1.35; color: #62676d; margin-top: .5rem; }
.result-grid a { display: block; }
.figure-caption { font-size: .9rem; }
.math.display { display: block; max-width: 100%; overflow-x: auto; }
mjx-container[display="true"] { max-width: 100%; overflow-x: auto; overflow-y: hidden; padding: .3rem 0; }
.figure-img { max-width: 100%; }
/* Correspondences and mosaics. */
.course-figure { margin: 1.6rem auto 2rem; max-width: 760px; }
.course-figure > a { display: block; }
.course-figure img { display: block; width: 100%; height: auto; }
.course-figure figcaption { text-align: center; font-size: .875rem; line-height: 1.45; color: #62676d; margin: .65rem auto 0; max-width: 720px; }
/* Figures grow slightly on hover; clicking opens the lightbox. */
a.lightbox { cursor: zoom-in; transition: transform .3s ease; }
@media (hover: hover) {
  a.lightbox:hover { transform: scale(1.05); position: relative; z-index: 1; }
}
#part-b { border-top: 1px solid #eeeeee; padding-top: 2.2rem; margin-top: 3.5rem; }
@media (max-width: 767px) {
  .result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
  .result-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  h1.title { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  a.lightbox { transition: none; }
}
@media print {
  @page { margin: 16mm; }
  body { font-size: 10pt; }
  #quarto-header, #quarto-margin-sidebar, #quarto-search-results, .nav-footer { display: none !important; }
  #quarto-content { display: block !important; padding: 0 !important; }
  main.content { max-width: 100%; margin: 0; }
  h2, h3, h4 { break-after: avoid; }
  /* Keep bold subject labels with the grids they introduce. */
  p:has(+ .result-grid), p:has(+ .course-figure) { break-after: avoid; }
  figure, .result-grid { break-inside: avoid; }
  .course-figure { max-width: 155mm; margin: 5mm auto; }
  .result-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
  .result-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  a { color: inherit; text-decoration: none; }
}
