/* ─── DESIGN SYSTEM PREVIEW BLOCKS ─────────────────────────────────────── */
/*
 * tt-ds-block  — framed example card: [label] > [preview] > [class pills]
 * tt-ds-grid   — auto-fill grid for laying out multiple ds-blocks
 * tt-ds-section — groups a set of blocks under a labelled heading
 * tt-ds-class  — monospace pill for a single CSS class name
 */

.tt-ds-block {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-muted);
    border-radius: 0.375rem;
    background: var(--bg-color);
}

.tt-ds-block__label {
    padding: 0.2rem 0.6rem;
    font-size: var(--step--2);
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-muted);
    border-bottom: 1px solid var(--border-muted);
    border-radius: 0.375rem 0.375rem 0 0;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.tt-ds-block__preview {
    flex: 1;
    padding: var(--space-xs) var(--space-s);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2xs);
    min-height: 3rem;
}

.tt-ds-block__preview--column {
    flex-direction: column;
    align-items: flex-start;
}

.tt-ds-block__classes {
    padding: 0.3rem 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    border-top: 1px solid var(--border-muted);
    background: var(--bg-muted);
    border-radius: 0 0 0.375rem 0.375rem;
}

/* ─── CLASS PILL ─────────────────────────────────────────────────────────── */
.tt-ds-class {
    font-family: monospace;
    font-size: var(--step--2);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    background: var(--bg-color);
    border: 1px solid var(--border-muted);
    color: var(--primary-color);
    white-space: nowrap;
    line-height: 1.6;
}

/* ─── GRID ───────────────────────────────────────────────────────────────── */
.tt-ds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-xs);
}

.tt-ds-grid--wide {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* ─── SECTION ────────────────────────────────────────────────────────────── */
.tt-ds-section {
    margin-bottom: var(--space-m);
}

.tt-ds-section__title {
    font-family: "PP Valve Plain", sans-serif;
    font-size: var(--step-0);
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: var(--space-2xs);
    padding-bottom: var(--space-3xs);
    border-bottom: 2px solid var(--primary-color);
}

.tt-ds-section__desc {
    font-size: var(--step--1);
    color: var(--text-muted);
    margin-bottom: var(--space-2xs);
    max-width: 60ch;
}
