/*
 * Styleguide page (WP9; UI-Design-Principles Sec. 13). Layout helpers for the living
 * reference page: token swatches, component specimen sections. Only used by
 * /styleguide.
 *
 * Class schema: gtx-sg__section, gtx-sg__grid, gtx-sg__swatch, gtx-sg__swatch-chip,
 * gtx-sg__swatch-meta, gtx-sg__specimen, gtx-sg__label.
 */

.gtx-sg__section {
    margin-top: var(--gtx-s7);
}

.gtx-sg__section:first-of-type {
    margin-top: var(--gtx-s5);
}

.gtx-sg__section > h2 {
    padding-bottom: var(--gtx-s2);
    border-bottom: 1px solid var(--gtx-line);
    margin-bottom: var(--gtx-s4);
}

.gtx-sg__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--gtx-s4);
}

.gtx-sg__swatch {
    border: 1px solid var(--gtx-line);
    border-radius: var(--gtx-r-s);
    overflow: hidden;
    background: var(--gtx-surface);
}

.gtx-sg__swatch-chip {
    height: 64px;
}

.gtx-sg__swatch-meta {
    padding: var(--gtx-s2) var(--gtx-s3);
    font-size: var(--gtx-fs-meta);
}

.gtx-sg__swatch-name {
    font-weight: 600;
}

.gtx-sg__swatch-hex {
    font-family: var(--gtx-font-mono);
    color: var(--gtx-text-dim);
}

/* A specimen block: a labelled row of component instances. */
.gtx-sg__specimen {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--gtx-s3);
    padding: var(--gtx-s4);
    background: var(--gtx-surface);
    border: 1px solid var(--gtx-line);
    border-radius: var(--gtx-r-m);
}

.gtx-sg__specimen + .gtx-sg__specimen {
    margin-top: var(--gtx-s3);
}

.gtx-sg__label {
    width: 100%;
    color: var(--gtx-text-dim);
    font-size: var(--gtx-fs-meta);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
