/* ========================================================================
   spec-list.css -- clinical key/value specification list

   Component layer of the modular CSS bundle. Consumes tokens from
   tokens.css. Renders a <dl> in the spec-sheet register used on the
   attorney-facing page, where the reader is scanning for a specific
   line item rather than reading prose:

     .spec-list          -- the <dl> wrapper
     .spec-list__key     -- <dt>, the item name
     .spec-list__value   -- <dd>, the specification

   Stacked on mobile so a long value never compresses the key column to
   an unreadable width; two columns from md, where the key column is
   sized to its content and the value takes the remainder.

   Breakpoints (inlined per project convention -- CSS custom properties
   cannot appear inside @media queries):
       md: 768px

   Bundle order: tokens -> base -> layout -> components/* -> pages/*
   ======================================================================== */

.spec-list {
    margin: var(--space-6) 0 0;
    max-width: var(--measure-wide);
}

.spec-list__key {
    margin-top: var(--space-5);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-wide);
    text-transform: uppercase;
    line-height: var(--line-height-snug);
    color: var(--color-muted);
}

.spec-list__value {
    margin: var(--space-1) 0 0;
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-border);
    color: var(--color-ink);
}

@media (min-width: 768px) {
    .spec-list {
        display: grid;
        grid-template-columns: minmax(12rem, max-content) minmax(0, 1fr);
        column-gap: var(--space-8);
    }

    /* In the grid the row rule belongs to the whole row, so the key cell
       carries the matching border and the vertical rhythm moves to padding
       -- margins on grid items would not align the two columns' baselines. */
    .spec-list__key {
        margin-top: 0;
        padding: var(--space-4) 0;
        border-bottom: 1px solid var(--color-border);
    }

    .spec-list__value {
        margin: 0;
        padding: var(--space-4) 0;
    }
}
