/* F13 · Metric (design-system.md, Card type=metric): no boxes, the figures set large between
   rules like the setup checklist, and stamps per day as plain bars. */
@layer components {
  .metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
    margin: 0;
    border-block-start: 1px solid var(--color-border-strong);

    & > div {
      display: flex;
      flex-direction: column;
      gap: var(--block-space-half);
      padding-block: var(--block-space-double);
      padding-inline-end: var(--inline-space-double);
      border-block-end: 1px solid var(--color-border-strong);
    }

    & dt { font-weight: 600; color: var(--color-subtle); font-size: var(--text-small); }
    & dd { margin: 0; font-size: var(--text-small); color: var(--color-subtle); }
  }

  .metrics .metrics__figure { /* beats `.metrics dd` */
    order: -1; /* the number reads first, its label under it */
    font-size: clamp(2.5rem, 1.5rem + 4vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: var(--color-text);
  }

  .bars {
    margin: 0;

    & figcaption { font-weight: 600; color: var(--color-subtle); font-size: var(--text-small); margin-block-end: var(--block-space); }

    & ol {
      display: flex;
      align-items: end;
      gap: 2px;
      block-size: 8rem;
      margin: 0;
      padding: 0;
      list-style: none;
      border-block-end: 1px solid var(--color-border-strong);
    }

    & li {
      flex: 1;
      min-block-size: 1px;
      block-size: calc(100% * var(--count) / var(--max));
      background: var(--color-link);
      border-radius: 2px 2px 0 0;
    }
  }
}
