
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f3f6f7;
    color: #18303b;
    font-family:
        Inter,
        Arial,
        sans-serif;
}

.schools-page-main {
    width: 100%;
    min-width: 0;
}

.schools-topbar {
    height: 58px;
    padding: 0 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: #fff;
    border-bottom: 1px solid #e4e9eb;
}

.schools-global-search {
    width: 46%;
    max-width: 580px;
    min-height: 35px;
    padding: 0 13px;

    display: flex;
    align-items: center;
    gap: 10px;

    border: 1px solid #d9e0e3;
    border-radius: 7px;

    color: #849097;
    font-size: 10px;
}

.schools-topbar > a {
    display: flex;
    align-items: center;
    gap: 7px;

    color: #172d38;
    font-size: 10px;
    font-weight: 800;
    text-decoration: none;
}

.schools-content {
    max-width: 1450px;
    margin: 0 auto;
    padding: 24px 38px 45px;
}

.schools-back-row {
    margin-bottom: 22px;
}

.schools-back-row a {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    color: #77858b;
    font-size: 9px;
    font-weight: 700;
    text-decoration: none;
}

.schools-hero {
    margin-bottom: 22px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
}

.schools-kicker {
    color: #12918c;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .09em;
}

.schools-hero h1 {
    margin: 5px 0 7px;

    color: #132a35;
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: -.035em;
}

.schools-hero p {
    max-width: 720px;
    margin: 0;

    color: #75838a;
    font-size: 12px;
    line-height: 1.5;
}

.schools-hero-code {
    padding: 7px 10px;

    background: #eaf2f2;
    border-radius: 20px;

    color: #45817c;
    font-size: 9px;
    font-weight: 800;
}

.schools-summary {
    margin-bottom: 17px;

    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 11px;
}

.schools-summary article {
    min-height: 91px;
    padding: 17px 18px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    background: #fff;
    border: 1px solid #e1e7e9;
    border-radius: 13px;
}

.schools-summary span {
    margin-bottom: 6px;

    color: #829097;
    font-size: 9px;
    font-weight: 750;
}

.schools-summary strong {
    color: #17303b;
    font-size: 23px;
    letter-spacing: -.025em;
}

.schools-filter-bar {
    margin-bottom: 18px;
    padding: 10px;

    display: grid;
    grid-template-columns:
        minmax(260px, 1fr)
        180px
        210px
        auto
        auto;

    gap: 8px;

    background: #fff;
    border: 1px solid #e0e6e8;
    border-radius: 13px;
}

.school-search-field {
    min-height: 38px;
    padding: 0 11px;

    display: flex;
    align-items: center;
    gap: 9px;

    background: #f8fafb;
    border: 1px solid #e1e7e9;
    border-radius: 8px;
}

.school-search-field i {
    color: #8c999f;
    font-size: 11px;
}

.school-search-field input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;

    color: #2e444e;
    font: inherit;
    font-size: 10px;
}

.schools-filter-bar select {
    min-height: 38px;
    padding: 0 10px;

    border: 1px solid #e1e7e9;
    border-radius: 8px;
    background: #f8fafb;

    color: #55676f;
    font-size: 10px;
}

.schools-filter-bar button {
    min-height: 38px;
    padding: 0 17px;

    border: 0;
    border-radius: 8px;

    background: #159e9b;
    color: white;

    font-size: 10px;
    font-weight: 800;

    cursor: pointer;
}

.clear-school-filters {
    min-height: 38px;
    padding: 0 12px;

    display: flex;
    align-items: center;

    color: #75858b;
    font-size: 9px;
    font-weight: 750;
    text-decoration: none;
}

.schools-directory-panel {
    overflow: hidden;

    background: #fff;
    border: 1px solid #e0e6e8;
    border-radius: 15px;
}

.schools-directory-head {
    min-height: 73px;
    padding: 17px 18px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;

    border-bottom: 1px solid #e7ecee;
}

.schools-directory-head h2 {
    margin: 4px 0 0;

    color: #213842;
    font-size: 17px;
}

.schools-directory-head > span {
    color: #8a979c;
    font-size: 9px;
}

.full-school-table-wrap {
    overflow-x: auto;
}

.full-school-table {
    width: 100%;
    border-collapse: collapse;
}

.full-school-table th {
    padding: 12px 14px;

    background: #f8fafb;
    border-bottom: 1px solid #e8edef;

    color: #8a969c;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .035em;
    text-align: left;
    text-transform: uppercase;
}

.full-school-table td {
    padding: 14px;

    border-bottom: 1px solid #edf0f1;

    color: #5d6c73;
    font-size: 10px;
    vertical-align: middle;
}

.full-school-table tbody tr:last-child td {
    border-bottom: 0;
}

.full-school-table tbody tr:hover {
    background: #fafcfc;
}

.full-school-name {
    min-width: 300px;
}

.full-school-name a {
    display: block;

    color: #223941;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

.full-school-name a:hover {
    color: #168f8b;
}

.full-school-name span {
    display: block;
    margin-top: 4px;

    color: #9aa4a9;
    font-size: 8px;
}

.school-used {
    min-width: 90px;
}

.school-used strong {
    color: #41545d;
    font-size: 9px;
}

.school-used > div {
    width: 78px;
    height: 5px;
    margin-top: 5px;

    overflow: hidden;

    background: #edf0f1;
    border-radius: 10px;
}

.school-used > div span {
    display: block;
    height: 100%;

    background: #5c9990;
    border-radius: inherit;
}

.school-ofsted-pill {
    display: inline-flex;
    align-items: center;

    min-height: 24px;
    padding: 4px 9px;

    border-radius: 20px;

    background: #eff2f3;
    color: #68777e;

    font-size: 8.5px;
    font-weight: 800;
    white-space: nowrap;
}

.school-ofsted-pill.outstanding {
    background: #e3f2ed;
    color: #286e5b;
}

.school-ofsted-pill.good {
    background: #edf6f2;
    color: #4a7c6e;
}

.school-ofsted-pill.requires-improvement {
    background: #fff3df;
    color: #9a681b;
}

.school-ofsted-pill.inadequate {
    background: #fbe7e5;
    color: #a84d44;
}

.school-ofsted-pill.renewed {
    background: #e4f3f1;
    color: #267970;
}

.school-ofsted-pill.ungraded {
    background: #f3f0ea;
    color: #806d4e;
}

.schools-pagination {
    min-height: 65px;
    padding: 12px 16px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    border-top: 1px solid #edf0f1;
}

.schools-pagination > a {
    min-height: 32px;
    padding: 0 11px;

    display: inline-flex;
    align-items: center;
    gap: 7px;

    border: 1px solid #e0e6e8;
    border-radius: 7px;

    color: #5c6d74;
    font-size: 9px;
    font-weight: 750;
    text-decoration: none;
}

.schools-pagination div {
    display: flex;
    gap: 5px;
}

.schools-pagination div a {
    width: 31px;
    height: 31px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 7px;

    color: #66777e;
    font-size: 9px;
    font-weight: 800;
    text-decoration: none;
}

.schools-pagination div a.active {
    background: #168f8b;
    color: white;
}

.schools-empty-state {
    padding: 55px 20px;
    text-align: center;
}

.schools-empty-state i {
    margin-bottom: 12px;

    color: #b4c0c4;
    font-size: 28px;
}

.schools-empty-state strong {
    display: block;
    margin-bottom: 5px;

    color: #3b5059;
    font-size: 14px;
}

.schools-empty-state p {
    margin: 0;
    color: #879399;
    font-size: 10px;
}

.schools-data-note {
    margin-top: 12px;

    display: flex;
    align-items: flex-start;
    gap: 7px;

    color: #929da2;
    font-size: 8.5px;
    line-height: 1.5;
}

.schools-data-note i {
    margin-top: 2px;
    color: #8eaaa8;
}

@media (max-width: 1100px) {

    .schools-summary {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .schools-filter-bar {
        grid-template-columns:
            1fr 1fr;
    }

    .school-search-field {
        grid-column: 1 / -1;
    }

}

@media (max-width: 760px) {

    

    .schools-content {
        padding: 20px 15px 40px;
    }

    .schools-global-search {
        width: 70%;
    }

    .schools-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .schools-summary {
        grid-template-columns: 1fr 1fr;
    }

    .schools-filter-bar {
        grid-template-columns: 1fr;
    }

    .school-search-field {
        grid-column: auto;
    }

    .full-school-table th:nth-child(4),
    .full-school-table td:nth-child(4),
    .full-school-table th:nth-child(5),
    .full-school-table td:nth-child(5) {
        display: none;
    }

}


/* =========================================================
   School directory readability improvements
   ========================================================= */

/* Summary cards */
.schools-summary-card .label,
.schools-summary-card__label {
    font-size: 0.78rem;
    line-height: 1.35;
}

.schools-summary-card .value,
.schools-summary-card__value {
    font-size: 1.75rem;
    line-height: 1.1;
}

/* Directory heading */
.schools-directory h2,
.school-directory h2 {
    font-size: 1.25rem;
    line-height: 1.25;
}

/* Search/filter controls */
.schools-filters input,
.schools-filters select,
.schools-filters button,
.school-filters input,
.school-filters select,
.school-filters button {
    font-size: 0.88rem;
}

/* Table */
.schools-table {
    font-size: 0.9rem;
}

.schools-table thead th {
    font-size: 0.72rem;
    line-height: 1.3;
    letter-spacing: 0.055em;
}

/* Main school name */
.schools-table .school-name,
.schools-table td:first-child a,
.schools-table td:first-child strong {
    font-size: 0.95rem;
    line-height: 1.35;
    font-weight: 700;
}

/* URN / postcode secondary line */
.schools-table .school-meta,
.schools-table td:first-child small {
    font-size: 0.75rem;
    line-height: 1.4;
}

/* Standard table values */
.schools-table tbody td {
    font-size: 0.86rem;
    line-height: 1.4;
}

/* Capacity utilisation percentage */
.schools-table .capacity-value,
.schools-table .utilisation-value {
    font-size: 0.82rem;
    font-weight: 700;
}

/* Ofsted status pills */
.schools-table .ofsted-pill,
.schools-table .status-pill {
    font-size: 0.76rem;
    line-height: 1.2;
    padding: 0.42rem 0.68rem;
    font-weight: 700;
}

/* Give rows a little more breathing room */
.schools-table tbody td {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

@media (max-width: 900px) {
    .schools-table {
        font-size: 0.86rem;
    }

    .schools-table tbody td {
        font-size: 0.82rem;
    }
}


/* =========================================================
   Larger school directory typography
   ========================================================= */

.schools-page,
.schools-page main {
    font-size: 16px;
}

/* Page heading area */
.schools-page h1 {
    font-size: 2rem !important;
}

.schools-page .page-intro,
.schools-page .page-subtitle {
    font-size: 1rem !important;
    line-height: 1.55;
}

/* Summary cards */
.schools-summary-card .label,
.schools-summary-card__label {
    font-size: 0.9rem !important;
}

.schools-summary-card .value,
.schools-summary-card__value {
    font-size: 2rem !important;
}

/* Filters */
.schools-filters input,
.schools-filters select,
.schools-filters button,
.school-filters input,
.school-filters select,
.school-filters button {
    font-size: 1rem !important;
    min-height: 46px;
}

/* Directory title */
.schools-directory h2,
.school-directory h2 {
    font-size: 1.45rem !important;
}

.schools-directory .eyebrow,
.school-directory .eyebrow {
    font-size: 0.78rem !important;
}

/* Table headings */
.schools-table thead th {
    font-size: 0.82rem !important;
    line-height: 1.35 !important;
    letter-spacing: 0.055em;
    padding-top: 0.95rem !important;
    padding-bottom: 0.95rem !important;
}

/* All table values */
.schools-table tbody td {
    font-size: 1rem !important;
    line-height: 1.5 !important;
    padding-top: 1.05rem !important;
    padding-bottom: 1.05rem !important;
}

/* School name */
.schools-table td:first-child a,
.schools-table td:first-child strong,
.schools-table .school-name {
    font-size: 1.08rem !important;
    line-height: 1.35 !important;
    font-weight: 700 !important;
}

/* URN and postcode */
.schools-table td:first-child small,
.schools-table .school-meta {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.82rem !important;
    line-height: 1.35 !important;
}

/* Phase / pupil / capacity values */
.schools-table td:nth-child(2),
.schools-table td:nth-child(3),
.schools-table td:nth-child(4) {
    font-size: 0.98rem !important;
}

/* Capacity percentage */
.schools-table td:nth-child(5),
.schools-table .capacity-value,
.schools-table .utilisation-value {
    font-size: 0.94rem !important;
    font-weight: 700 !important;
}

/* Ofsted pills */
.schools-table .ofsted-pill,
.schools-table .status-pill,
.schools-table td:last-child span {
    font-size: 0.88rem !important;
    line-height: 1.2 !important;
    padding: 0.5rem 0.78rem !important;
}

/* Result count / showing text */
.schools-directory .result-count,
.schools-directory .showing-count,
.school-directory .result-count,
.school-directory .showing-count {
    font-size: 0.88rem !important;
}

/* Make rows easier to scan */
.schools-table tbody tr {
    min-height: 64px;
}

@media (max-width: 1100px) {
    .schools-table tbody td {
        font-size: 0.94rem !important;
    }

    .schools-table td:first-child a,
    .schools-table td:first-child strong {
        font-size: 1rem !important;
    }
}

/* =========================================================
   Larger school directory typography
   ========================================================= */

.schools-page,
.schools-page main {
    font-size: 16px;
}

/* Page heading area */
.schools-page h1 {
    font-size: 2rem !important;
}

.schools-page .page-intro,
.schools-page .page-subtitle {
    font-size: 1rem !important;
    line-height: 1.55;
}

/* Summary cards */
.schools-summary-card .label,
.schools-summary-card__label {
    font-size: 0.9rem !important;
}

.schools-summary-card .value,
.schools-summary-card__value {
    font-size: 2rem !important;
}

/* Filters */
.schools-filters input,
.schools-filters select,
.schools-filters button,
.school-filters input,
.school-filters select,
.school-filters button {
    font-size: 1rem !important;
    min-height: 46px;
}

/* Directory title */
.schools-directory h2,
.school-directory h2 {
    font-size: 1.45rem !important;
}

.schools-directory .eyebrow,
.school-directory .eyebrow {
    font-size: 0.78rem !important;
}

/* Table headings */
.schools-table thead th {
    font-size: 0.82rem !important;
    line-height: 1.35 !important;
    letter-spacing: 0.055em;
    padding-top: 0.95rem !important;
    padding-bottom: 0.95rem !important;
}

/* All table values */
.schools-table tbody td {
    font-size: 1rem !important;
    line-height: 1.5 !important;
    padding-top: 1.05rem !important;
    padding-bottom: 1.05rem !important;
}

/* School name */
.schools-table td:first-child a,
.schools-table td:first-child strong,
.schools-table .school-name {
    font-size: 1.08rem !important;
    line-height: 1.35 !important;
    font-weight: 700 !important;
}

/* URN and postcode */
.schools-table td:first-child small,
.schools-table .school-meta {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.82rem !important;
    line-height: 1.35 !important;
}

/* Phase / pupil / capacity values */
.schools-table td:nth-child(2),
.schools-table td:nth-child(3),
.schools-table td:nth-child(4) {
    font-size: 0.98rem !important;
}

/* Capacity percentage */
.schools-table td:nth-child(5),
.schools-table .capacity-value,
.schools-table .utilisation-value {
    font-size: 0.94rem !important;
    font-weight: 700 !important;
}

/* Ofsted pills */
.schools-table .ofsted-pill,
.schools-table .status-pill,
.schools-table td:last-child span {
    font-size: 0.88rem !important;
    line-height: 1.2 !important;
    padding: 0.5rem 0.78rem !important;
}

/* Result count / showing text */
.schools-directory .result-count,
.schools-directory .showing-count,
.school-directory .result-count,
.school-directory .showing-count {
    font-size: 0.88rem !important;
}

/* Make rows easier to scan */
.schools-table tbody tr {
    min-height: 64px;
}

@media (max-width: 1100px) {
    .schools-table tbody td {
        font-size: 0.94rem !important;
    }

    .schools-table td:first-child a,
    .schools-table td:first-child strong {
        font-size: 1rem !important;
    }
}

/* =========================================================
   READABILITY OVERRIDE — actual council-schools.php classes
   ========================================================= */

/* Main page */
.schools-content {
    font-size: 16px;
}

/* Hero */
.schools-hero h1 {
    font-size: 2rem !important;
    line-height: 1.2 !important;
}

.schools-hero p {
    font-size: 1rem !important;
    line-height: 1.55 !important;
}

.schools-kicker {
    font-size: 0.82rem !important;
    letter-spacing: 0.08em;
}

/* Summary cards */
.schools-summary > div {
    font-size: 0.95rem !important;
}

.schools-summary > div strong {
    font-size: 1.85rem !important;
    line-height: 1.15 !important;
}

/* Filter bar */
.schools-filter-bar input,
.schools-filter-bar select,
.schools-filter-bar button,
.clear-school-filters {
    font-size: 0.95rem !important;
}

/* Directory header */
.schools-directory-head h2 {
    font-size: 1.35rem !important;
    line-height: 1.25 !important;
}

.schools-directory-head > span {
    font-size: 0.85rem !important;
}

/* TABLE HEADINGS */
.full-school-table thead th {
    font-size: 0.82rem !important;
    line-height: 1.35 !important;
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
    letter-spacing: 0.05em !important;
}

/* ALL TABLE VALUES */
.full-school-table tbody td {
    font-size: 1rem !important;
    line-height: 1.45 !important;
    padding-top: 1.1rem !important;
    padding-bottom: 1.1rem !important;
}

/* School name */
.full-school-name > a {
    font-size: 1.08rem !important;
    line-height: 1.35 !important;
    font-weight: 700 !important;
}

/* URN + postcode */
.full-school-name > span {
    font-size: 0.82rem !important;
    line-height: 1.45 !important;
    margin-top: 0.25rem !important;
}

/* Phase */
.full-school-table tbody td:nth-child(2) {
    font-size: 0.98rem !important;
}

/* Pupils and capacity */
.full-school-table tbody td:nth-child(3),
.full-school-table tbody td:nth-child(4) {
    font-size: 1rem !important;
    font-weight: 500;
}

/* Capacity used */
.full-school-table tbody td:nth-child(5) {
    font-size: 0.95rem !important;
}

.school-used {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
}

/* Ofsted badges */
.school-ofsted-pill {
    font-size: 0.86rem !important;
    line-height: 1.2 !important;
    padding: 0.5rem 0.75rem !important;
    font-weight: 700 !important;
}

/* Data source note */
.schools-data-note {
    font-size: 0.9rem !important;
    line-height: 1.55 !important;
}

/* Pagination */
.schools-pagination a,
.schools-pagination span {
    font-size: 0.95rem !important;
}


/* =========================================================
   FINAL SCHOOL DIRECTORY TYPOGRAPHY
   ========================================================= */

/* Slightly reduce overall table size from previous override */
.full-school-table thead th {
    font-size: 0.76rem !important;
    padding-top: 0.85rem !important;
    padding-bottom: 0.85rem !important;
}

.full-school-table tbody td {
    font-size: 0.92rem !important;
    line-height: 1.4 !important;
    padding-top: 0.9rem !important;
    padding-bottom: 0.9rem !important;
}

/* School name */
.full-school-name > a {
    font-size: 1rem !important;
    line-height: 1.3 !important;
}

/* URN + postcode */
.full-school-name > span {
    font-size: 0.76rem !important;
    line-height: 1.35 !important;
    margin-top: 0.15rem !important;
}

/* Phase */
.full-school-table tbody td:nth-child(2) {
    font-size: 0.92rem !important;
}

/* Pupils + capacity */
.full-school-table tbody td:nth-child(3),
.full-school-table tbody td:nth-child(4) {
    font-size: 0.92rem !important;
}

/* Make capacity-used percentage the visual focus */
.full-school-table tbody td:nth-child(5) {
    font-size: 0.92rem !important;
}

.school-used {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.28rem;
}

.school-used strong,
.school-used > span:first-child {
    font-size: 1.18rem !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
    color: #09293a;
}

/* Slightly wider utilisation bar */
.school-used-bar,
.school-used .bar,
.school-used-track {
    width: 110px !important;
}

/* Ofsted badges */
.school-ofsted-pill {
    font-size: 0.8rem !important;
    padding: 0.42rem 0.7rem !important;
}

/* Filters */
.schools-filter-bar input,
.schools-filter-bar select,
.schools-filter-bar button,
.clear-school-filters {
    font-size: 0.9rem !important;
}

/* Directory heading */
.schools-directory-head h2 {
    font-size: 1.25rem !important;
}

/* Result counter */
.schools-directory-head > span {
    font-size: 0.8rem !important;
}

/* =========================================================
   FINAL COMPACT ADJUSTMENT
   ========================================================= */

/* Slightly more compact table */
.full-school-table tbody td {
    font-size: 0.87rem !important;
    padding-top: 0.78rem !important;
    padding-bottom: 0.78rem !important;
}

/* School names */
.full-school-name > a {
    font-size: 0.94rem !important;
}

/* URN / postcode */
.full-school-name > span {
    font-size: 0.72rem !important;
}

/* Phase */
.full-school-table tbody td:nth-child(2) {
    font-size: 0.87rem !important;
}

/* Pupils / capacity */
.full-school-table tbody td:nth-child(3),
.full-school-table tbody td:nth-child(4) {
    font-size: 0.87rem !important;
}

/* Keep utilisation percentage prominent */
.school-used strong,
.school-used > span:first-child {
    font-size: 1.08rem !important;
}

/* Slightly smaller Ofsted pills */
.school-ofsted-pill {
    font-size: 0.76rem !important;
    padding: 0.38rem 0.62rem !important;
}

/* Column headings */
.full-school-table thead th {
    font-size: 0.72rem !important;
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}
