.Prose {
  @include font(body);
  max-width: 44em;
  font-feature-settings: 'liga', 'dlig', 'kern', 'onum';
  hanging-punctuation: first;

  > *:not(:last-child):not(hr) {
    margin-bottom: 0.75em;
  }

  ul,
  ol {
    @include padding-inline(start, 1.25em);
  }

  li,
  li > ul,
  li > ol {
    margin-bottom: 0.25em;
  }

  ul > li {
    list-style-type: square;
  }

  ol > li {
    list-style-type: decimal;
  }

  h1 {
    @include font(title);
  }

  h2 {
    @include font(heading);
    margin-bottom: 1em;
    color: $color-heading;
  }

  *:not(hr) + h2 {
    margin-top: 2em;
  }

  h3 {
    @include font(subHeading);
    margin-bottom: 0.75em;
    opacity: 0.8;
  }

  * + h3 {
    margin-top: 2.25em;
  }

  hr {
    height: 0;
    border: 0;
    border-top: 0.125rem solid $color-frame-border;
    margin: 2em 0;
  }

  abbr {
    font-feature-settings: 'c2sc';
  }

  blockquote {
    @include border-inline(start, solid rgba($color-text, 0.25));
    @include padding-inline(start, 1em);
    opacity: 0.75;
  }

  pre {
    overflow: scroll;
    padding: 0.4rem 0.3rem;
    background-color: rgba($color-text, 0.075);
  }

  code,
  code pre {
    background-color: transparent;
  }

  img {
    max-width: 100%;
  }

  p code,
  li code {
    padding: 0.125rem;
  }

  code pre {
    padding: 0.125rem 0.5rem;
    margin: 1rem -0.5rem;
    overflow: auto;
  }

  table {
    width: 100%;
    margin: 1rem -0.5rem;
    border-collapse: collapse;
    font-size: 0.875rem;
    font-feature-settings: 'lnum' 1, 'tnum' 1;
  }

  caption {
    @include font(caption);
    padding: 0 0.5rem;
    font-style: italic;
    text-align: start;
    color: rgba($color-text, 0.75);
    opacity: 0.8;
  }

  td,
  th {
    padding: 0.75em 0.5rem;
    text-align: start;

    // text-align: start isn't fully supported for th elements
    [dir='ltr'] & {
      text-align: left;
    }
    [dir='rtl'] & {
      text-align: right;
    }
  }

  tr:nth-child(even) {
    background-color: rgba($color-text, 0.05);
  }

  th {
    background-color: rgba($color-text, 0.075);
    border-bottom: 1px solid rgba($color-text, 0.1);
  }
}

.Prose--condensed {
  > * {
    margin-bottom: 0.5em;
  }

  li,
  li > ul,
  li > ol {
    margin-bottom: 0.15em;
  }

  *:not(hr) + h2 {
    margin-top: 1em;
  }

  h3 {
    margin-bottom: 0.55em;
    opacity: 0.8;
  }

  * + h3 {
    margin-top: 1.25em;
  }

  hr {
    margin: 1em 0;
  }
}

.grid {
  display: flex;
  flex-wrap: wrap;
  margin: -0.5rem;
}

.item {
  width: 14rem;
  height: 12rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  margin: 0.5rem;
  box-shadow: rgba(0, 0, 0, 0.25) 0 0 0.1rem;
  overflow: hidden;

  svg {
    width: 8rem;
    height: 8rem;
    padding: 0 !important;
    color: black;
  }
}

.item figcaption {
  background: #f6f6f6;
  width: 100%;
  padding: 1rem;
  box-shadow: rgba(0, 0, 0, 0.25) 0 0 0.1rem;
}

.item figcaption pre {
  background-color: transparent;
  padding: 0;
  overflow: scroll;
}

.item figcaption pre.title {
  color: black;
}

.item figcaption pre.subtitle {
  color: rgba(0, 0, 0, 0.4);
}
