.loading[hidden],
.resources-error[hidden],
.resources-detail-view[hidden],
#main-content[hidden] {
    display: none !important;
}

.resources-error {
    background: #fff1eb;
    border: 1px solid #ffb896;
    color: #9a3412;
    font-weight: 700;
    margin-bottom: 24px;
    padding: 16px 18px;
}

.resources-period-line {
    align-items: center;
    color: var(--gray-600);
    display: flex;
    font-size: 0.9rem;
    font-weight: 650;
    gap: 12px;
    justify-content: space-between;
    margin: -10px 0 20px;
}

.resources-verified {
    background: #eaf6f1;
    border: 1px solid #b8dfce;
    border-radius: 6px;
    color: #176b4d;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 5px 8px;
    text-transform: uppercase;
}

.resources-kpi-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 32px;
}

.resources-kpi {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-top: 5px solid var(--edutopia-orange);
    min-height: 156px;
    padding: 24px;
}

.resources-kpi-resources {
    border-top-color: var(--pacific-blue);
}

.resources-kpi-pages {
    border-top-color: var(--midnight-blue);
}

.resources-kpi-qualified {
    border-top-color: #178a61;
}

.resources-kpi-label {
    color: var(--gray-600);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.resources-kpi-value {
    color: var(--midnight-blue);
    font-size: 2.35rem;
    font-weight: 800;
    line-height: 1.15;
    margin-top: 13px;
}

.resources-kpi-note {
    color: var(--gray-600);
    font-size: 0.84rem;
    margin-top: 8px;
}

.resources-section {
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    margin-bottom: 32px;
    padding: 0 0 8px;
}

.resources-section-heading {
    align-items: flex-end;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 15px 18px 13px;
}

.resources-section-heading h2 {
    color: var(--midnight-blue);
    font-size: 1.2rem;
    font-weight: 800;
}

.resources-section-heading p {
    color: var(--gray-600);
    font-size: 0.88rem;
    margin-top: 3px;
}

.resources-blue-heading {
    background: #eaf7fb;
}

.resources-blue-heading h2 {
    color: #007ea8;
}

.resources-orange-heading {
    background: #fff1eb;
}

.resources-orange-heading h2 {
    color: var(--edutopia-orange);
}

.resources-green-heading {
    background: #eaf6f1;
}

.resources-green-heading h2 {
    color: #178a61;
}

.resources-summary-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: minmax(0, 1.4fr) minmax(360px, 0.8fr);
}

.resources-summary-grid > div,
.resources-lower-grid > div,
.resources-lower-grid > aside {
    min-width: 0;
}

.resources-chart-panel {
    align-items: center;
    display: flex;
    padding: 14px 18px 18px 0;
}

.resources-chart-frame {
    height: 430px;
    min-height: 430px;
    position: relative;
    width: 100%;
}

.resources-lower-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
}

.resources-findings ul {
    color: var(--gray-700);
    display: grid;
    gap: 18px;
    line-height: 1.55;
    list-style: none;
    padding: 8px 24px 24px;
}

.resources-findings li {
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 16px;
}

.resources-findings li:last-child {
    border-bottom: 0;
}

.resources-table-wrap {
    overflow-x: auto;
    width: 100%;
}

.resources-table {
    border-collapse: collapse;
    color: var(--gray-700);
    font-size: 0.86rem;
    width: 100%;
}

.resources-table th {
    background: var(--gray-100);
    color: var(--midnight-blue);
    font-size: 0.74rem;
    font-weight: 800;
    padding: 10px 12px;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.resources-table td {
    border-bottom: 1px solid var(--gray-200);
    padding: 10px 12px;
    vertical-align: top;
}

.resources-table tbody tr:hover {
    background: #f8fbfc;
}

.resources-table .numeric {
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

.resources-table a {
    color: var(--space-blue);
    font-weight: 650;
    text-decoration: none;
}

.resources-table a:hover,
.resources-table a:focus-visible {
    color: var(--edutopia-orange);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.resources-table-wrap-compact {
    max-height: 640px;
    overflow-y: auto;
}

.resources-table-wrap-compact thead,
.resources-detail-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

.resources-median-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: minmax(0, 1.35fr) minmax(430px, 0.9fr);
    padding: 0 18px 18px;
}

.resources-median-chart-frame {
    height: 320px;
    min-height: 320px;
}

.resources-view-tabs {
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 0 18px;
}

.resources-view-tab {
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
    color: var(--gray-600);
    cursor: pointer;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 750;
    padding: 12px 16px 10px;
    white-space: nowrap;
}

.resources-view-tab:hover,
.resources-view-tab:focus-visible {
    color: var(--midnight-blue);
    outline: none;
}

.resources-view-tab.active {
    border-bottom-color: var(--edutopia-orange);
    color: var(--edutopia-orange);
}

.resources-detail-view {
    padding: 18px;
}

.resources-detail-table {
    min-width: 1120px;
}

.resources-detail-table th button {
    background: none;
    border: 0;
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-weight: inherit;
    padding: 0;
    text-transform: inherit;
}

.resources-detail-table th button:hover,
.resources-detail-table th button:focus-visible {
    color: var(--edutopia-orange);
    outline: none;
}

.resources-median-chip {
    border-radius: 4px;
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 4px 6px;
    white-space: nowrap;
}

.resources-median-above {
    background: #eaf6f1;
    color: #176b4d;
}

.resources-median-below {
    background: #fff1eb;
    color: #9a3412;
}

.resources-median-at {
    background: #eaf7fb;
    color: #075985;
}

.resources-median-unqualified {
    background: var(--gray-100);
    color: var(--gray-600);
}

.resources-daily-grid {
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.65fr);
}

.resources-daily-chart-frame {
    height: 380px;
    min-height: 380px;
}

.resources-daily-table-wrap {
    max-height: 380px;
    overflow-y: auto;
}

.resources-method-grid {
    display: grid;
    gap: 32px;
    grid-template-columns: 1fr 1fr;
}

.resources-method-grid h3,
.resources-method-notes h3 {
    color: var(--midnight-blue);
    font-size: 1rem;
    margin-bottom: 10px;
}

.resources-method-table td:first-child {
    color: var(--gray-600);
    font-weight: 700;
}

.resources-method-table td:last-child {
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.resources-pass {
    background: #eaf6f1;
    color: #176b4d;
    font-weight: 800;
}

.resources-method-notes {
    border-top: 1px solid var(--gray-200);
    margin-top: 24px;
    padding-top: 20px;
}

.resources-method-notes ul {
    color: var(--gray-700);
    display: grid;
    gap: 8px;
    padding-left: 20px;
}

@media (max-width: 1100px) {
    .resources-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .resources-summary-grid,
    .resources-lower-grid,
    .resources-median-grid {
        grid-template-columns: 1fr;
    }

    .resources-chart-panel {
        padding: 0 18px 18px;
    }
}

@media (max-width: 720px) {
    .resources-kpi-grid {
        grid-template-columns: 1fr;
    }

    .resources-kpi {
        min-height: 0;
    }

    .resources-period-line {
        align-items: flex-start;
        flex-direction: column;
    }

    .resources-chart-frame {
        height: 350px;
        min-height: 350px;
    }

    .resources-daily-grid,
    .resources-method-grid {
        grid-template-columns: 1fr;
    }
}
