/*
 * A colour as a chip with its name and value beside it: every token on
 * /styleguide, and the four brand colours on /brand (BrandKit). The chip's
 * colour is handed in as `--swatch`.
 *
 *   .swatches        the grid they sit in
 *   .swatch__note    what the token is for, where there is a note
 */
@layer components {
  .swatches {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
    gap: var(--space-sm);
  }

  .swatch {
    display: grid;
    grid-template-columns: 2.75rem 1fr;
    gap: var(--space-2xs) var(--space-sm);
    align-items: center;
    font-size: var(--text-meta);
    line-height: var(--leading-meta);
  }

  .swatch__chip {
    grid-row: span 3;
    block-size: 2.75rem;
    border: var(--rule-width) solid var(--color-rule);
    border-radius: var(--radius-md);
    background-color: var(--swatch);
  }

  .swatch__name {
    color: var(--color-ink);
    font-weight: var(--weight-semibold);
  }

  .swatch__value,
  .swatch__note {
    color: var(--color-ink-muted);
  }
}
