.textbox {
  border: 1px solid #ccc;
  padding: 1em;
  font-size: 0.95rem;
  margin: 1.5em 0;
  border-radius: 4px;
}

pre > code.sourceCode {
  font-size: 0.8rem;
}

.quarto-grid-item .card-img-top {
  object-fit: cover;
}

.quarto-grid-item .card-title {
  font-size: 1rem;
  line-height: 1.3;
}

.quarto-grid-item .listing-author {
  font-size: 0.85rem;
  color: #666;
}

.chapter-downloads {
  margin: -0.5em 0 2em 0;
  padding-bottom: 1em;
  border-bottom: 1px solid #e5e5e5;
  font-size: 0.85rem;
}

.chapter-downloads a {
  text-decoration: none;
  color: #555;
}

.chapter-downloads a:hover { text-decoration: underline; }

.sidebar-title {
  display: block;
  margin-bottom: 0.5em;
}

.sidebar-tools-main {
  display: flex;
  flex-direction: row;
  gap: 0.5em;
  margin-top: 0.25em;
}

.abstract-box {
  background: #f0f0f0;
  padding: 1em 1.25em;
  border-radius: 4px;
  margin: 1.5em 0;
}

/* the Open Access label (an "info" announcement): plain text, right-aligned */
#quarto-announcement.alert-info {
  background: none !important;
  border: none !important;
  display: flex !important;
  justify-content: flex-end !important;
}

#quarto-announcement.alert-info .quarto-announcement-content {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  margin: 0;
  text-align: right;
}

.columns {
  margin-top: 0.3em;
}
h2 + .columns {
  margin-top: 0.5em;
}

.spaced > h2,
h2.spaced {
  padding-left: 8em;
}
/* ── Keyword index (keywords.qmd, built by chapter-blocks.lua) ───────────── */

.kw-summary {
  color: #6c757d;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* one block per letter: the letter on the left, its keywords on the right */
.kw-group {
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  column-gap: 1rem;
  margin-bottom: 1.75rem;
  scroll-margin-top: 5rem;
}
.kw-group h2.kw-letter {
  margin: 0;
  padding: 0.35rem 0 0;
  border: 0;
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1.3;
  color: #adb5bd;
}
.kw-list { margin: 0; }

/* one row per keyword: term | chapters */
.kw-row {
  display: grid;
  grid-template-columns: minmax(10rem, 17rem) 1fr;
  column-gap: 1.5rem;
  padding: 0.55rem 0;
  border-top: 1px solid #e9ecef;
}
.kw-row dt { font-weight: 600; line-height: 1.4; }
.kw-row dd { margin: 0; display: flex; flex-direction: column; gap: 0.3rem; }

/* a chapter: number, short title, authors */
a.kw-ref {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  column-gap: 0.5rem;
  align-items: baseline;
  color: inherit;
  text-decoration: none;
  line-height: 1.4;
}
.kw-num {
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  color: #6c757d;
  background: #f1f3f5;
  border-radius: 3px;
  line-height: 1.35rem;
}
.kw-by {
  grid-column: 2;
  font-size: 0.8rem;
  color: #6c757d;
}
a.kw-ref:hover .kw-title { text-decoration: underline; }
a.kw-ref:hover .kw-num { background: #dee2e6; color: #343a40; }

@media (max-width: 575.98px) {
  .kw-group { grid-template-columns: 1fr; }
  .kw-row { grid-template-columns: 1fr; row-gap: 0.35rem; }
}

/* ── Call-outs: the title reads like the bold label on the authors page ──── */

.callout.callout-style-simple > div.callout-header,
.callout.callout-style-simple .callout-title-container {
  font-weight: 600;
  font-size: inherit;
  color: var(--bs-body-color, #343a40);
  opacity: 1;
}

/* photo essay: three photos per row on the website; the PDF is not affected */
.photo-essay {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0;
}
.photo-essay .quarto-figure { margin: 0; }
.photo-essay figure { margin: 0; }
.photo-essay figure p { margin: 0; }
.photo-essay img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}
.photo-essay figcaption {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
@media (max-width: 767px) { .photo-essay { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 479px) { .photo-essay { grid-template-columns: 1fr; } }

/* "Read more" box: shows the first lines, the rest on click */
.readmore {
  max-height: 8em;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 20%, transparent);
          mask-image: linear-gradient(to bottom, #000 20%, transparent);
}
.readmore.open {
  max-height: none;
  -webkit-mask-image: none;
          mask-image: none;
}
.readmore-toggle {
  background: none;
  border: 0;
  padding: 0;
  margin-top: 0.4rem;
  color: var(--bs-link-color, #2a76dd);
  font-weight: 600;
  cursor: pointer;
}
.readmore-toggle:hover { text-decoration: underline; }
