/* How deep each location goes (site/snippets/blocks/depthlevels.php, the
   Network tier page). Three level cards, each a small page-tree drawing in
   the tier diagram style (site/snippets/diagrams/depth-level-*.php, drawn
   by blocks.css's .diagram rules), a label pill, a title and one line; then
   one row of points that apply to every level. Linked by the block itself
   (peanut_page_css), once per page. Every selector names a depthlv class.
   Tokens only. Phones: everything stacks; from 40rem each card sets its
   drawing beside its words; from 60rem the three cards sit side by side. */

@layer blocks {
  .depthlv__head {
    max-width: 44rem;
    margin-block-end: var(--space-5);
  }

  .depthlv__title {
    margin: 0;
  }

  .depthlv__intro {
    margin: var(--space-3) 0 0;
  }

  /* ---------- the three levels ---------- */
  .depthlv__levels {
    display: grid;
    gap: var(--space-3);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .depthlv__level {
    display: grid;
    align-content: start;
    gap: var(--space-2);
    min-width: 0;
    padding: var(--space-3);
    border: var(--border);
    border-radius: var(--radius-sm);
    background: var(--color-paper);
    color: var(--color-ink);
  }

  .depthlv__level > * {
    margin: 0;
  }

  .depthlv__drawing {
    width: 100%;
    max-width: 15rem;
    margin-inline: auto;
    margin-block-end: var(--space-1);
  }

  .depthlv__label {
    justify-self: start;
    padding: 0.35em 0.9em;
    border: var(--border);
    border-radius: var(--radius-pill);
    background: var(--accent);
    font-size: var(--pill-font-size);
    font-weight: var(--pill-weight);
    letter-spacing: var(--pill-tracking);
    line-height: 1.4;
    text-transform: uppercase;
  }

  .depthlv__name {
    font-size: var(--step-2);
  }

  /* tablets: the drawing on the left, the words beside it */
  @media (min-width: 40rem) and (max-width: 59.99rem) {
    .depthlv__level {
      grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
      column-gap: var(--space-4);
      align-items: center;
    }

    .depthlv__drawing {
      grid-row: 1 / span 3;
      margin: 0;
    }

    .depthlv__label,
    .depthlv__name,
    .depthlv__line {
      grid-column: 2;
    }
  }

  @media (min-width: 60rem) {
    .depthlv__levels {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .depthlv__level {
      padding: var(--space-4) var(--space-3);
    }

    .depthlv__drawing {
      max-width: 17rem;
    }
  }

  /* ---------- the row that applies to every level ---------- */
  .depthlv__row {
    margin-block-start: var(--space-4);
    padding: var(--space-4) var(--space-3);
    border: var(--border);
    border-radius: var(--radius-sm);
    background: var(--accent-pale);
    color: var(--color-ink);
  }

  .depthlv__rowtitle {
    margin: 0 0 var(--space-3);
    font-size: var(--step-2);
  }

  .depthlv__points {
    display: grid;
    gap: var(--space-3);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .depthlv__point {
    min-width: 0;
    padding-block-start: var(--space-2);
    border-block-start: var(--border);
  }

  .depthlv__pointtitle {
    margin: 0;
    font-size: var(--step-1);
  }

  .depthlv__pointline {
    margin: var(--space-1) 0 0;
  }

  @media (min-width: 40rem) {
    .depthlv__points {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      column-gap: var(--space-4);
    }
  }

  @media (min-width: 64rem) {
    .depthlv__row {
      padding: var(--space-4);
    }

    .depthlv__points {
      grid-template-columns: repeat(4, minmax(0, 1fr));
      column-gap: var(--space-3);
    }
  }
}
