.csg-compare-selector-wrap,
.csg-comparison-wrap {
    max-width: 1100px;
    margin: 40px auto;
    padding: 24px;
    font-family: inherit;
}

.csg-compare-filter-form,
.csg-compare-select-form {
    background: #ffffff;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.08);
    margin-bottom: 24px;
}

.csg-compare-filter-form label,
.csg-compare-select-form label {
    display: block;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #18345e;
    font-weight: 800;
    margin-bottom: 8px;
}

.csg-compare-filter-form select,
.csg-compare-select-form select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #dce7ef;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 16px;
    color: #243447;
    background: #fff;
}

.csg-select-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 22px;
}

.csg-compare-button {
    display: inline-block;
    border: 0;
    background: #f6c945;
    color: #18345e;
    font-weight: 900;
    padding: 13px 22px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 16px;
}

.csg-compare-button:hover,
.csg-compare-button:focus {
    filter: brightness(.96);
}

.csg-comparison-heading {
    text-align: center;
    margin-bottom: 30px;
}

.csg-comparison-heading h2 {
    font-size: 34px;
    line-height: 1.2;
    margin-bottom: 8px;
    color: #18345e;
    font-weight: 800;
}

.csg-comparison-heading p {
    color: #4d5b6a;
    font-size: 18px;
}


.csg-results-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.csg-view-school-button,
.csg-compare-another-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 48px;
    padding: 12px 16px;
    border-radius: 999px;
    font-weight: 900;
    text-decoration: none;
    line-height: 1.2;
}

.csg-view-school-button {
    background: #18345e;
    color: #ffffff;
}

.csg-view-school-button:hover,
.csg-view-school-button:focus {
    background: #0f2544;
    color: #ffffff;
}

.csg-compare-another-button {
    background: #f6c945;
    color: #18345e;
}

.csg-compare-another-button:hover,
.csg-compare-another-button:focus {
    filter: brightness(.96);
    color: #18345e;
}

.csg-comparison-table thead th a {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.csg-comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0,0,0,0.08);
}

.csg-comparison-table thead th {
    background: #18345e;
    color: #ffffff;
    padding: 22px;
    font-size: 20px;
    text-align: left;
    width: 50%;
}

.csg-comparison-table tbody tr:nth-child(even) {
    background: #f4f8fb;
}

.csg-comparison-table td {
    padding: 18px 22px;
    vertical-align: top;
    border-bottom: 1px solid #e4edf3;
    font-size: 16px;
    color: #243447;
}

.csg-field-label {
    display: block;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #5c7896;
    font-weight: 800;
    margin-bottom: 6px;
}

.csg-field-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #18345e;
}

.csg-field-value a {
    color: #18345e;
    text-decoration: underline;
}

.csg-score {
    display: inline-block;
    background: #f6c945;
    color: #18345e;
    font-weight: 900;
    padding: 6px 12px;
    border-radius: 999px;
}

.csg-empty-value {
    color: #8a98a8;
    font-style: italic;
    font-weight: 400;
}

.csg-field-audit {
    max-width: 1100px;
    margin: 30px auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #dce7ef;
}

.csg-field-audit table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.csg-field-audit th,
.csg-field-audit td {
    border: 1px solid #dce7ef;
    padding: 8px;
    text-align: left;
}

@media (max-width: 700px) {
    .csg-results-actions {
        grid-template-columns: 1fr;
    }

    .csg-select-grid {
        grid-template-columns: 1fr;
    }

    .csg-comparison-table,
    .csg-comparison-table thead,
    .csg-comparison-table tbody,
    .csg-comparison-table tr,
    .csg-comparison-table th,
    .csg-comparison-table td {
        display: block;
        width: 100%;
    }

    .csg-comparison-table thead th {
        width: 100%;
    }

    .csg-comparison-table td {
        border-bottom: 1px solid #dce7ef;
    }
}

/* Comparison polish: lower/higher highlighting, indicators, and subtle animation */
.csg-comparison-table td.csg-lower {
    background-color: #f2f4f7 !important;
}

.csg-comparison-table td.csg-better {
    background-color: #edf8f1 !important;
}

.csg-compare-indicator {
    display: inline-flex;
    align-items: center;
    margin-top: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .02em;
    line-height: 1;
}

.csg-indicator-better {
    background: #dff3e6;
    color: #1d6b3a;
}

.csg-indicator-lower {
    background: #e7ebf0;
    color: #536273;
}

.csg-animate-compare {
    animation: csgComparePulse 700ms ease-out both;
}

@keyframes csgComparePulse {
    0% {
        transform: scale(0.985);
        box-shadow: inset 0 0 0 0 rgba(24, 52, 94, 0);
    }
    45% {
        transform: scale(1.01);
        box-shadow: inset 0 0 0 2px rgba(24, 52, 94, 0.12);
    }
    100% {
        transform: scale(1);
        box-shadow: inset 0 0 0 0 rgba(24, 52, 94, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .csg-animate-compare {
        animation: none;
    }
}
