@layer components {
  /* Its filter is a short field a word's gap after the views, under them where they leave it no room, and its rows 35px. */
  .assignments {
    --filter-input-width: 8rem;

    .filter-bar {
      flex-wrap: wrap;
      gap: var(--inline-space);

      > .segments {
        flex-basis: auto;
        order: 0;
      }
    }

    .row {
      min-block-size: 2.1875rem; /* 35px */

      @media (min-width: 100ch) {
        min-block-size: 1.842rem; /* 35px */
      }
    }
  }

  /* The site whose rows follow: its name on a dark pill that opens it, and under it the kind of thing they are. */
  .assignments__site,
  .assignments .rows__subheading {
    font-size: 1rem; /* 16px */

    @media (min-width: 100ch) {
      font-size: 0.842rem; /* 16px */
    }
  }

  .assignments__site {
    font-weight: 500;
    line-height: 1.2;
    margin: 0;

    > a {
      border-radius: 2em;
      display: inline-block;
      max-inline-size: 100%;
      overflow: hidden;
      padding: 0.4em 0.8em;
      text-decoration: none;
      text-overflow: ellipsis;
      vertical-align: top;
    }

    + .rows__subheading {
      margin-block-start: var(--block-space-half);
    }
  }

  .assignments .rows__subheading {
    color: var(--color-ink);
  }

  /* What is at a site hangs a little in from its pill. */
  .assignments .rows:has(.assignments__site) {
    margin-inline-start: 0.75rem; /* 12px */

    .assignments__site {
      margin-inline-start: -0.75rem;
    }

    @media (min-width: 100ch) {
      margin-inline-start: 0.63rem; /* 12px */

      .assignments__site {
        margin-inline-start: -0.63rem;
      }
    }
  }

  /* Over what else waits on the reader, the label a day of the trail has. */
  .assignments .history__day {
    margin-block: var(--block-space) var(--block-space-half);

    + .rows {
      margin-block-start: 0;
    }
  }

  /* A waiting line names a firm and a count: on a phone it wraps before either is cut. */
  @container layout (inline-size < 640px) {
    .row__title.assignments__line {
      white-space: normal;
    }
  }

  /* The glyph before a waiting line's words. */
  .assignments__icon {
    --icon-size: 1.1em;

    margin-inline-end: 0.45em;
    vertical-align: -0.18em;
  }
}
