@layer components {

  /* Big numbers that count up as they come into view (site.js). */
  .stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
    margin: 0 0 3rem;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-large);
    background: var(--color-surface);
  }

  .stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    padding: 1.6rem 1.25rem;
    text-align: center;

    &+& {
      border-left: 1px solid var(--color-line);
    }

    dt {
      color: var(--color-ink-muted);
      font-size: 0.85rem;
    }

    dd {
      order: -1;
      margin: 0;
      color: var(--color-primary);
      font-family: var(--font-display);
      font-size: clamp(1.8rem, 3.4vw, 2.4rem);
      font-variant-numeric: tabular-nums;
      font-weight: 750;
      letter-spacing: -0.03em;
      line-height: 1;
    }


    /* The symbol is small beside figures in most fonts: larger, on the same line height. */
    .stat__infinity {
      font-size: clamp(2.4rem, 4.6vw, 3.2rem);
      line-height: 0.75;
    }
  }

  /* A footnote mark that explains itself on hover or focus. */
  .hint {
    position: relative;
    margin-left: 0.2em;
    padding: 0 0.3em;
    border-radius: 4px;
    background: var(--color-primary-surface);
    color: var(--color-primary);
    font-size: 0.68em;
    font-weight: 600;
    cursor: help;
  }

  .hint::after {
    content: attr(data-hint);
    position: absolute;
    bottom: calc(100% + 0.6rem);
    left: 50%;
    z-index: 1;
    width: max-content;
    max-width: 15rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--color-line);
    border-radius: 10px;
    background: var(--color-surface-raised);
    color: var(--color-ink);
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    opacity: 0;
    translate: -50% 4px;
    transition: opacity 0.15s, translate 0.15s;
    pointer-events: none;
  }

  .hint:hover::after,
  .hint:focus-visible::after {
    opacity: 1;
    translate: -50% 0;
  }

  /* A spec sheet: mono labels, plain text, hairlines between. */
  .specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 0 2.5rem;
  }

  .spec {
    padding: 1.4rem 0;
    border-top: 1px solid var(--color-line);

    h3 {
      display: flex;
      align-items: baseline;
      gap: 0.6rem;
      font-size: 1.1rem;
    }

    h3::before {
      content: "▸";
      color: var(--color-primary);
      font-size: 0.8em;
    }

    p {
      margin-top: 0.45rem;
      color: var(--color-ink-muted);
      font-size: 0.95rem;
    }
  }

  code {
    padding: 0.05em 0.35em;
    border-radius: 6px;
    background: var(--color-primary-surface);
    color: var(--color-primary);
    font: 0.88em ui-monospace, "SF Mono", Menlo, monospace;
  }
}
