/*
 * The overview's health check (companies/keystats/_health_check, M17-D4):
 * five rows, each a light, a label and the sentence saying why. The light is
 * a dot in the gain, caution or loss colour, or the subtlest ink for a light
 * with too little to go on; its colour is also said in words (the row's
 * accessible name, and the word beside the label), so it is never the only
 * signal.
 */
@layer components {
  .health-check {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .health-check__row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-3xs) var(--space-xs);
    padding-block: var(--space-xs);
    border-block-end: var(--rule-hairline);
  }

  .health-check__label {
    font-family: var(--font-ui);
    font-weight: 600;
  }

  .health-check__sentence {
    grid-column: 2;
    margin: 0;
    color: var(--color-ink-soft);
    font-size: var(--text-ui-sm);
  }

  .health-light {
    display: inline-block;
    inline-size: var(--space-sm);
    block-size: var(--space-sm);
    margin-block-start: var(--space-3xs);
    border-radius: var(--radius-pill);
    background-color: var(--color-ink-subtle);
  }

  .health-light--green {
    background-color: var(--color-gain);
  }

  .health-light--amber {
    background-color: var(--color-caution);
  }

  .health-light--red {
    background-color: var(--color-loss);
  }

  /* Hollow: no colour to read, only an outline. */
  .health-light--grey {
    border: var(--rule-hairline);
    border-color: var(--color-ink-subtle);
    background-color: transparent;
  }
}
