/* Post list: the post image sits left of the header and the excerpt. */
.md-post--thumb {
  display: grid;
  grid-template-columns: 11rem 1fr;
  grid-template-areas:
    "thumb header"
    "thumb content";
  column-gap: 1.4rem;
  align-items: start;
}

.md-post--thumb .md-post__thumb {
  grid-area: thumb;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 0.4rem;
  overflow: hidden;
}

.md-post--thumb .md-post__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.md-post--thumb .md-post__header { grid-area: header; }
.md-post--thumb .md-post__content { grid-area: content; }

@media screen and (max-width: 44.9375em) {
  .md-post--thumb {
    grid-template-columns: 1fr;
    grid-template-areas:
      "thumb"
      "header"
      "content";
  }

  .md-post--thumb .md-post__thumb {
    aspect-ratio: 16 / 9;
    margin-bottom: 0.8rem;
  }
}

/* The post list has no navigation tree and no table of contents: drop the two empty sidebars and widen the column. */
@media screen and (min-width: 60em) {
  .md-main__inner:has(.md-post--excerpt) .md-sidebar--secondary {
    display: none;
  }

  /* The extra selectors outrank the theme rule that sets the left margin next to a visible primary sidebar. */
  [dir="ltr"] .md-main__inner:has(.md-post--excerpt) > .md-content > .md-content__inner {
    max-width: 45rem;
    margin-left: auto;
    margin-right: auto;
  }
}

@media screen and (min-width: 76.25em) {
  .md-main__inner:has(.md-post--excerpt) .md-sidebar--primary {
    display: none;
  }
}

/* Inline flag after a place name; the border keeps the white stripe visible. */
.md-typeset img.flag {
  height: 0.9em;
  vertical-align: -0.1em;
  border-radius: 0.1em;
  box-shadow: 0 0 0 1px rgba(128, 128, 128, 0.35);
}
