/* Barntree's own components. Everything shared by every Barn website is in
 * base/ (see base/base.css); this file is unlayered, so it wins over base/. */

.maturity {
  max-width: 40rem;
  margin: 28px auto 0;
  text-align: left;
}

.ways {
  & .card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border-top: 4px solid var(--brand);

    &:hover {
      border-color: var(--brand);
    }

    & h3 {
      margin-top: 0;
    }

    & .more {
      margin-top: auto;
      padding-top: 12px;
      color: var(--brand-text);
      font-weight: 650;

      &::after {
        content: " →";
      }
    }
  }
}

.in-barn {
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
  color: var(--text-muted);
}

.prose {
  max-width: 46rem;

  & h1 {
    margin-bottom: 0.4em;
  }

  & :is(h2, h3)[id] {
    scroll-margin-top: 5rem;
  }

  & h2 {
    margin-top: 2em;
  }

  & :is(ul, ol) {
    padding-left: 1.4em;
  }

  & li {
    margin-bottom: 0.4em;
  }

  & pre,
  & .table-wrap {
    max-width: 100%;
  }
}

.in-barn-left {
  margin-top: 2.5em;
  color: var(--text-muted);
}

.prose pre {
  margin-bottom: 1.2em;
}

.tree {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;

  & .d {
    color: var(--text-muted);
  }

  & .m {
    color: var(--brand-text);
    font-weight: 650;
  }
}
