.cmp-search-wrap {
    display: block;
    margin: 1.5rem 0;
}

.cmp-panel {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin: 0 0 1.25rem;
    box-sizing: border-box;
}

.cmp-search-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr) auto;
    gap: 1rem;
    align-items: end;
}

.cmp-search-form label {
    display: block;
    font-weight: 600;
    margin: 0 0 .35rem;
}

.cmp-search-form input[type="search"],
.cmp-search-form select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 42px;
    padding: .55rem .7rem;
}

.cmp-search-actions {
    display: flex;
    gap: .75rem;
    align-items: center;
    flex-wrap: wrap;
}

.cmp-search-actions button {
    min-height: 42px;
    padding: .55rem 1rem;
    cursor: pointer;
}

.cmp-reset-link {
    text-decoration: none;
}

.cmp-count-grid,
.cmp-result-list {
    display: grid;
    gap: .85rem;
}

.cmp-count-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    margin-top: 1rem;
}

.cmp-count-card {
    border: 1px solid #e2e4e7;
    border-radius: 6px;
    padding: .85rem 1rem;
    background: #fafafa;
}

.cmp-count-card strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: .2rem;
}

.cmp-results-group + .cmp-results-group,
.cmp-related-section + .cmp-related-section {
    margin-top: 1.5rem;
}

.cmp-result-card {
    border: 1px solid #e2e4e7;
    border-radius: 6px;
    padding: .9rem 1rem;
    background: #fafafa;
}

.cmp-result-card h4,
.cmp-results-panel h2,
.cmp-results-group h3,
.cmp-related-section h3,
.cmp-detail-panel h2 {
    margin-top: 0;
}

.cmp-meta,
.cmp-muted,
.cmp-detail-actions {
    color: #50575e;
    font-size: .95rem;
}

.cmp-detail-actions {
    margin-bottom: 1rem;
}

.cmp-record-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.cmp-record-table th,
.cmp-record-table td {
    border-top: 1px solid #e2e4e7;
    padding: .7rem .75rem;
    vertical-align: top;
    text-align: left;
}

.cmp-record-table th {
    width: 220px;
    font-weight: 600;
}

@media (max-width: 782px) {
    .cmp-search-grid {
        grid-template-columns: 1fr;
    }

    .cmp-record-table,
    .cmp-record-table tbody,
    .cmp-record-table tr,
    .cmp-record-table th,
    .cmp-record-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .cmp-record-table th {
        border-top: 1px solid #e2e4e7;
        padding-bottom: .25rem;
    }

    .cmp-record-table td {
        border-top: 0;
        padding-top: 0;
        margin-bottom: .75rem;
    }
}
