/*
 * The content pages’ own pieces: the link columns of the indicator index and
 * the summary archive, the indicator glossary, and the affiliate hub's
 * blurbs and logo grids.
 */
@layer pages {
  .link-columns {
    columns: 1;
    column-gap: var(--space-xl);
    font-size: var(--text-ui);

    & > :is(a, li, span) {
      display: block;
      padding-block: var(--space-3xs);
      break-inside: avoid;
    }

    @media (width >= 768px) {
      columns: 3;
    }
  }

  /* The glossary (M09-D8, pages/indicators/glossary): Core as a list of
     terms — the name, what it means, how it is worked out in the data face —
     and every other indicator in a table per group. */
  .glossary__intro {
    margin-block-end: var(--space-lg);
    color: var(--color-ink-soft);
    font-family: var(--font-prose);
    font-size: var(--text-lead);
    line-height: var(--leading-lead);
  }

  .glossary__terms {
    display: grid;
    gap: var(--space-md);
    margin: 0;

    @media (width >= 1024px) {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: var(--space-md) var(--space-xl);
    }
  }

  .glossary__term {
    display: grid;
    gap: var(--space-3xs);
    align-content: start;

    & dt {
      font-weight: var(--weight-semibold);
    }

    & dd {
      margin: 0;
      color: var(--color-ink-soft);
      font-size: var(--text-ui-sm);
    }
  }

  .glossary__formula {
    font-family: var(--font-data);
    color: var(--color-ink-muted);
  }

  /* Meanings are sentences: the table lets them wrap. */
  .glossary__table td:last-child {
    min-inline-size: 18rem;
    white-space: normal;
  }

  /* A ready-to-use blurb, set apart as something to copy. */
  .blurb {
    margin-block-end: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-inline-start: 3px solid var(--color-accent-line);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    background-color: var(--color-surface-raised);
  }

  /* One row of logo variants; the count arrives as --columns. The light
     variants are white on transparent, so they sit on a dark tile. */
  .logo-grid {
    display: grid;
    grid-template-columns: repeat(var(--columns, 3), minmax(0, 1fr));
    gap: var(--space-lg);
    margin-block-end: var(--space-lg);
  }

  .logo-grid__tile {
    padding: var(--space-sm);
    border-radius: var(--radius-md);
  }

  .logo-grid__tile--dark {
    background-color: var(--color-ink-muted);
  }
}
