/* Slightly wider global content containers used on lists/home. */
.measure-wide,
.measure-wide-l {
  max-width: 50em;
}

/* Wider article wrapper on single pages. */
body.is-page article.mw7 {
  max-width: 62rem;
}

body.is-page article.mw8 {
  max-width: 74rem;
}

/* Widen actual article text column when TOC/related aside is shown. */
@media screen and (min-width: 60em) {
  body.is-page article .nested-copy-line-height.w-two-thirds-l {
    width: 76%;
  }
}

/* Keep article page titles more prominent than in-body H2 headings. */
body.is-page article > header h1 {
  font-weight: 600;
}

body.is-page article .nested-copy-line-height h2 {
  font-size: 1.6em;
  line-height: 1.25;
  margin-top: 1.8em;
}

/* Index/list post cards: make the post title stronger than headings inside excerpts. */
article.bb .blah > h1.lh-title {
  font-weight: 600;
}

article.bb .blah > h1.lh-title > a.color-inherit.link {
  font-weight: inherit;
}

article.bb .blah .nested-copy-line-height h2 {
  font-size: 1.15em;
  font-weight: 500;
  line-height: 1.3;
  margin-top: 1em;
  margin-bottom: 0.5em;
}

/* Page-bundle gallery: stacked on mobile, matrix on desktop. */
.article-gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.article-gallery-item {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.25rem;
  overflow: hidden;
}

.article-gallery-item img {
  display: block;
  width: 100%;
  height: auto;
}

@media screen and (min-width: 60em) {
  .article-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Inline media + text blocks for travel/article storytelling. */
.media-text-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
  align-items: start;
}

.media-text-figure {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.25rem;
  overflow: hidden;
}

.media-text-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.media-text-copy > :first-child {
  margin-top: 0;
}

.media-text-copy > :last-child {
  margin-bottom: 0;
}

@media screen and (min-width: 60em) {
  .media-text-block {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 1.25rem;
  }

  .media-text-right .media-text-figure {
    order: 2;
  }

  .media-text-right .media-text-copy {
    order: 1;
  }
}

/* Home header portrait treatment. */
body.home .home-header-portrait,
body.is-home .home-header-portrait {
  filter: grayscale(100%);
  width: 4rem;
  height: 4rem;
}

@media screen and (min-width: 30em) and (max-width: 59.99em) {
  body.home .home-header-portrait,
  body.is-home .home-header-portrait {
    width: 6rem;
    height: 6rem;
  }
}

@media screen and (min-width: 60em) {
  body.home .home-header-portrait,
  body.is-home .home-header-portrait {
    width: 12rem !important;
    height: 12rem !important;
    min-width: 8rem;
    min-height: 8rem;
  }
}

/* Compact in-article table of contents block. */
#TableOfContents {
  font-size: 0.95rem;
  line-height: 1.25;
  margin: 0.75rem 0 1.25rem;
  padding: 0.5rem 0.75rem;
  border-left: 2px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.55);
}

#TableOfContents ul,
#TableOfContents ol {
  margin: 0.2rem 0;
  padding-left: 1rem;
}

#TableOfContents li {
  margin: 0.15rem 0;
}

#TableOfContents a {
  text-decoration: none;
}

#TableOfContents a:hover {
  text-decoration: underline;
}
