.article-gallery,
.article-carousel {
  --article-media-gap: var(--spacing-150, 1.5rem);
  margin-block: var(--spacing-300, 3rem);
}
.article-gallery figure,
.article-carousel figure {
  margin: 0;
}
.article-gallery,
.article-carousel {
  /*
    Height from the width, and no wider than the column. The width is deliberately not set to
    100%: the pictures in the articles are 600px and less, and filling the column would scale them
    up past their own resolution.
  */
}
.article-gallery img,
.article-carousel img {
  display: block;
  max-inline-size: 100%;
  height: auto;
}
.article-gallery figcaption,
.article-carousel figcaption {
  margin-block-start: var(--spacing-050, 0.5rem);
  font-size: var(--font-size-200, 0.875rem);
  line-height: 1.4;
}

.article-gallery {
  /*
    The narrowest a picture may become before the row gives up a column. At 14rem three of them
    stand side by side in the content column, which is what the galleries in the articles are set
    up for; raising it drops the row to two. min() keeps a single narrow column from overflowing on
    a phone, and 100% would put one picture per row at the full width of the column.
  */
  --article-gallery-min: 14rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(var(--article-gallery-min), 100%), 1fr));
  gap: var(--article-media-gap);
  align-items: start;
  /*
    Two rows per line of figures - pictures, then captions - taken from this grid rather than laid
    out inside each figure, so that all the pictures share one row and all the captions the next. A
    caption that wraps then lengthens that row downwards for every figure at once and no picture
    moves, and the pictures keep their own proportions because the row is as tall as the tallest of
    them rather than a shape they all have to be cropped to.

    Only for a figure whose picture is a child of its own. An editor can end up with the picture
    inside the figcaption instead - two of the pictures on the pension page stand like that - and
    such a figure has a single child covering both rows. Spanning it over two rows anyway put a
    whole picture and its caption into the picture row, which made that row as tall as an entire
    figure and left the well-formed pictures beside it stranded at the bottom of it. Those figures
    are left to lay themselves out; they occupy one row and read as they did before.
  */
}
.article-gallery figure:has(> picture, > img) {
  display: grid;
  grid-row: span 2;
  grid-template-rows: subgrid;
  align-content: start;
  gap: 0;
}

/*
  A pair, centred rather than filling the row. Two columns are set explicitly instead of left to
  auto-fit, which counts the columns from the available width and would put a third one beside them
  in a wide column; the grid is then only as wide as the two pictures need and the auto margins
  centre it in the content column.

  Below the phone breakpoint the pair stacks - two pictures side by side there leave each of them
  narrower than a thumbnail.
*/
.article-gallery--pair {
  grid-template-columns: repeat(2, minmax(0, auto));
  inline-size: fit-content;
  max-inline-size: 100%;
  margin-inline: auto;
}
@media (width < 30em) {
  .article-gallery--pair {
    grid-template-columns: minmax(0, auto);
  }
}

.article-carousel .splide__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.article-carousel .splide__slide + .splide__slide {
  margin-block-start: var(--article-media-gap);
}
.article-carousel.is-initialized .splide__slide + .splide__slide {
  margin-block-start: 0;
}
.article-carousel {
  /*
    A carousel with nothing to navigate to - an editor who inserted the snippet for one picture, or
    a row that fits whole. Splide leaves its arrows standing in that case and only disables them,
    and draws a pagination of one dot; the class comes from jcrafts-carousel.js, which asks the
    mounted instance again after every resize. Ahead of the styling of those same controls, so the
    plainer selector does not follow the more specific one.
  */
}
.article-carousel--static .splide__arrows,
.article-carousel--static .splide__arrow,
.article-carousel--static .splide__pagination {
  display: none;
}
.article-carousel .splide__arrow {
  background-color: var(--color-surface-primary-bg, #1f3325);
  fill: var(--color-surface-primary-fg, #fbfbee);
  opacity: 0.8;
}
.article-carousel .splide__arrow:hover:not(:disabled) {
  opacity: 1;
}
.article-carousel .splide__pagination button.is-active {
  background-color: var(--color-surface-primary-bg, #1f3325);
}

/*# sourceMappingURL=jcrafts-carousel.css.map */
