@layer components {
  .server-list {
    display: grid;
    gap: .75rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .server-card {
    display: grid;
    grid-template-columns: 10rem 1fr 3rem;
    align-items: center;
    gap: 1rem;
    padding: .9rem 1.1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-inline-start: 4px solid var(--color-accent);
    border-radius: .5rem;
    font-family: ui-monospace, monospace;
    font-size: .9rem;
  }

  /* attr() has always been able to read a plain string into content on a
     pseudo-element, that part is not new. It only reads from the element
     the pseudo-element itself belongs to, so this has to live on
     .server-card (which carries data-load), not on a descendant span. */
  .server-card::after {
    color: var(--color-muted);
    font-size: .8rem;
    text-align: end;
    content: attr(data-load);
  }

  .server-load-track {
    display: block;
    inline-size: 100%;
    block-size: .6rem;
    border-radius: 999px;
    background: var(--color-bg);
    overflow: hidden;
  }

  .server-load-fill {
    display: block;
    block-size: 100%;
    inline-size: 40%;
    background: var(--color-accent);
  }

  /* Typed attr() lets the same two data attributes feed the border color
     and the fill's width and color too, one source of truth in the
     markup instead of a class per row. */
  @supports (background: attr(data-accent type(<color>))) {
    .server-card {
      border-inline-start-color: attr(data-accent type(<color>));
    }

    .server-load-fill {
      inline-size: attr(data-load type(<percentage>));
      background: attr(data-accent type(<color>));
    }
  }
}
