:root {
    --school-teal: #498383;
    --school-text: #202326;
    --school-muted: #858a90;
    --school-border: #e5e7e9;
    --school-soft: #f7f8f8;
}

.school-page {
    min-height: 100vh;
    background: #f5f6f6;
    color: var(--school-text);
}

.school-shell {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 36px 0 60px;
}

.school-breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 24px;
    color: #9a9ea3;
    font-size: .76rem;
}

.school-breadcrumb a {
    color: #73787e;
    text-decoration: none;
}

.school-breadcrumb a:hover {
    color: var(--school-teal);
}

.school-breadcrumb i {
    font-size: .55rem;
    color: #b8bbbf;
}

.school-hero {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    align-items: flex-start;
    padding: 32px;
    border: 1px solid var(--school-border);
    border-radius: 18px;
    background: #fff;
}

.school-hero-kicker,
.school-panel-kicker {
    color: var(--school-teal);
    font-size: .68rem;
    font-weight: 750;
    letter-spacing: .11em;
}

.school-hero h1 {
    margin: 7px 0 13px;
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    line-height: 1.08;
    letter-spacing: -.045em;
}

.school-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.school-hero-meta span {
    padding: 7px 10px;
    border-radius: 8px;
    background: #f3f4f4;
    color: #71767c;
    font-size: .76rem;
}

.school-status {
    display: inline-flex;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
}

.school-status.open {
    background: #edf6f3;
    color: #39766d;
}

.school-status.closed {
    background: #f5eeee;
    color: #9a5656;
}

.school-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.school-summary-card {
    padding: 20px;
    border: 1px solid var(--school-border);
    border-radius: 14px;
    background: #fff;
}

.school-summary-card > span,
.school-details-grid span,
.school-mini-stats span {
    display: block;
    color: #92979d;
    font-size: .72rem;
}

.school-summary-card > strong {
    display: block;
    margin-top: 8px;
    font-size: 1.6rem;
    letter-spacing: -.035em;
}

.school-summary-card small {
    display: block;
    margin-top: 5px;
    color: #a0a4a9;
    font-size: .67rem;
}

.school-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 14px;
    margin-top: 14px;
}

.school-main-column,
.school-side-column {
    display: grid;
    align-content: start;
    gap: 14px;
}

.school-panel,
.school-side-card {
    border: 1px solid var(--school-border);
    border-radius: 16px;
    background: #fff;
}

.school-panel {
    padding: 24px;
}

.school-side-card {
    padding: 20px;
}

.school-panel-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

.school-panel-heading h2,
.school-side-card h3 {
    margin: 5px 0 0;
    letter-spacing: -.025em;
}

.school-panel-heading h2 {
    font-size: 1.15rem;
}

.school-side-card h3 {
    font-size: .95rem;
}

.school-date-badge,
.framework-badge {
    padding: 6px 9px;
    border-radius: 7px;
    background: #f2f3f3;
    color: #777c82;
    font-size: .68rem;
}

.ofsted-headline {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 22px;
    padding: 20px;
    border-radius: 12px;
    background: var(--school-soft);
}

.ofsted-label {
    display: block;
    margin-bottom: 5px;
    color: #92969b;
    font-size: .7rem;
}

.ofsted-outcome {
    font-size: 1.35rem;
    letter-spacing: -.025em;
}

.positive {
    color: #39796f;
}

.good {
    color: #498383;
}

.warning {
    color: #a37435;
}

.negative {
    color: #a65454;
}

.neutral {
    color: #60656b;
}

.ofsted-standards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 12px;
}

.ofsted-standard {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 14px;
    border: 1px solid #eaebec;
    border-radius: 10px;
}

.ofsted-standard span {
    color: #7f848a;
    font-size: .75rem;
}

.ofsted-standard strong {
    font-size: .76rem;
    text-align: right;
}

.ofsted-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid #eceeef;
    color: #999da2;
    font-size: .72rem;
}

.ofsted-footer a,
.school-action {
    color: var(--school-teal);
    font-weight: 650;
    text-decoration: none;
}

.school-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin-top: 18px;
    border-top: 1px solid #eceeef;
}

.school-details-grid > div {
    padding: 15px 8px 15px 0;
    border-bottom: 1px solid #eceeef;
}

.school-details-grid strong {
    display: block;
    margin-top: 5px;
    font-size: .84rem;
}

.school-side-card address {
    margin: 15px 0;
    color: #6f747a;
    font-size: .8rem;
    font-style: normal;
    line-height: 1.65;
}

.school-action {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid #eceeef;
    font-size: .76rem;
}

.school-mini-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 15px;
}

.school-mini-stats div {
    padding: 12px;
    border-radius: 10px;
    background: var(--school-soft);
}

.school-mini-stats strong {
    display: block;
    margin-top: 5px;
    font-size: 1.05rem;
}

.school-back-card {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    padding: 20px;
    border-radius: 16px;
    background: #498383;
    color: #fff;
    text-decoration: none;
}

.school-back-card span {
    display: block;
    margin-bottom: 5px;
    font-size: .62rem;
    letter-spacing: .1em;
    opacity: .72;
}

.school-back-card strong {
    font-size: .88rem;
}

.school-empty-state {
    display: flex;
    gap: 13px;
    margin-top: 20px;
    padding: 18px;
    border-radius: 12px;
    background: var(--school-soft);
}

.school-empty-state i {
    color: #969ba0;
}

.school-empty-state strong {
    font-size: .82rem;
}

.school-empty-state p {
    margin: 4px 0 0;
    color: #92969b;
    font-size: .74rem;
}

.school-source-note {
    margin-top: 15px;
    color: #9a9ea3;
    font-size: .68rem;
}

@media (max-width: 850px) {
    .school-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .school-content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .school-shell {
        width: min(100% - 24px, 1180px);
        padding-top: 20px;
    }

    .school-hero {
        padding: 22px;
    }

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

    .ofsted-standards-grid,
    .school-details-grid {
        grid-template-columns: 1fr;
    }

    .ofsted-headline,
    .ofsted-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

.inspection-history {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #eceeef;
}

.inspection-history-heading h3 {
    margin: 5px 0 14px;
    font-size: .95rem;
    letter-spacing: -.02em;
}

.inspection-history-list {
    display: grid;
    gap: 8px;
}

.inspection-history-row {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 13px 14px;
    border: 1px solid #eaebec;
    border-radius: 10px;
    background: #fafafa;
}

.inspection-history-date {
    color: #666c72;
    font-size: .74rem;
    font-weight: 650;
}

.inspection-history-copy strong {
    display: block;
    font-size: .78rem;
}

.inspection-history-copy span {
    display: block;
    margin-top: 3px;
    color: #7d8288;
    font-size: .72rem;
}

.inspection-history-published {
    color: #9a9ea3;
    font-size: .68rem;
    text-align: right;
}

@media (max-width: 700px) {
    .inspection-history-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .inspection-history-published {
        text-align: left;
    }
}


/* =========================================================
   CouncilMetrics application-shell integration
   ========================================================= */

.school-profile-content {
    padding-top: 0;
}

.school-profile-content .school-page {
    min-height: auto;
    background: transparent;
    color: #18303b;
    font-family: Inter, Arial, sans-serif;
}

.school-profile-content .school-shell {
    width: 100%;
    max-width: 1450px;
    margin: 0 auto;
    padding: 24px 38px 45px;
}


/*
 * Breadcrumb
 */

.school-profile-content .school-breadcrumb {
    margin: 0 0 20px;
    font-family: Inter, Arial, sans-serif;
    font-size: 9px;
    font-weight: 600;
}

.school-profile-content .school-breadcrumb a {
    color: #77858b;
}

.school-profile-content .school-breadcrumb span {
    color: #65747b;
}


/*
 * Hero
 */

.school-profile-content .school-hero {
    padding: 25px 28px;
    border-radius: 12px;
}

.school-profile-content .school-hero-kicker,
.school-profile-content .school-panel-kicker {
    font-family: Inter, Arial, sans-serif;
    color: #12918c;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .09em;
}

.school-profile-content .school-hero h1 {
    margin: 6px 0 12px;
    color: #132a35;
    font-family: Inter, Arial, sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.035em;
}

.school-profile-content .school-hero-meta span {
    font-family: Inter, Arial, sans-serif;
    font-size: 9px;
    font-weight: 600;
}


/*
 * Summary cards
 */

.school-profile-content .school-summary-card {
    min-height: 112px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.school-profile-content .school-summary-card > span {
    font-family: Inter, Arial, sans-serif;
    font-size: 9px;
    font-weight: 600;
}

.school-profile-content .school-summary-card > strong {
    font-family: Inter, Arial, sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #132a35;
}

.school-profile-content .school-summary-card small {
    font-family: Inter, Arial, sans-serif;
    font-size: 8px;
}


/*
 * Panels
 */

.school-profile-content .school-panel-heading h2,
.school-profile-content .school-side-card h3,
.school-profile-content .inspection-history-heading h3 {
    font-family: Inter, Arial, sans-serif;
    color: #132a35;
    font-weight: 700;
}

.school-profile-content .school-panel-heading h2 {
    font-size: 15px;
}

.school-profile-content .school-side-card h3 {
    font-size: 12px;
}

.school-profile-content .ofsted-outcome {
    font-family: Inter, Arial, sans-serif;
    font-size: 18px;
    font-weight: 700;
}

.school-profile-content .school-details-grid strong,
.school-profile-content .school-mini-stats strong,
.school-profile-content .ofsted-standard strong {
    font-family: Inter, Arial, sans-serif;
}


/*
 * Keep the lower navigation anchored consistently
 * with the main CouncilMetrics sidebar.
 */

.school-secondary-nav {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 22px;
}


/*
 * Responsive shell
 */

@media (max-width: 900px) {

    .school-profile-content .school-shell {
        padding: 20px;
    }

}

@media (max-width: 600px) {

    .school-profile-content .school-shell {
        padding: 16px 12px 35px;
    }

    .school-profile-content .school-hero h1 {
        font-size: 24px;
    }

}


/* Clean Ofsted outcome presentation */
.school-profile-content .ofsted-outcome {
    display: inline-block;
    width: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
    line-height: 1.25;
}

.school-profile-content .ofsted-outcome.positive,
.school-profile-content .ofsted-outcome.good {
    background: transparent !important;
    color: #168b72;
}

.school-profile-content .ofsted-outcome.warning {
    background: transparent !important;
    color: #a37435;
}

.school-profile-content .ofsted-outcome.negative {
    background: transparent !important;
    color: #a65454;
}

.school-profile-content .ofsted-outcome.neutral {
    background: transparent !important;
    color: #606b71;
}


/* =========================================================
   School comparisons
   ========================================================= */

.school-comparison-intro {
    margin: 6px 0 0;
    color: #829097;
    font-size: 10px;
    line-height: 1.5;
}

.school-comparison-metric {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid #e7ecee;
}

.school-comparison-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 15px;
}

.school-comparison-title span {
    color: #8a979d;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .09em;
}

.school-comparison-title h3 {
    margin: 4px 0 0;
    color: #18303b;
    font-size: 13px;
    font-weight: 700;
}

.school-comparison-title > strong {
    color: #18303b;
    font-size: 22px;
    line-height: 1;
    letter-spacing: -.04em;
}

.school-comparison-rows {
    display: grid;
    gap: 10px;
}

.school-comparison-row {
    display: grid;
    grid-template-columns:
        minmax(150px, 220px)
        minmax(160px, 1fr)
        58px;

    gap: 13px;
    align-items: center;
}

.school-comparison-name {
    overflow: hidden;
    color: #63747c;
    font-size: 9px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.school-comparison-track {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf1f2;
}

.school-comparison-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #9eafb4;
}

.school-comparison-track span.primary {
    background: #16aaa5;
}

.school-comparison-value {
    color: #51646d;
    font-size: 10px;
    font-weight: 700;
    text-align: right;
}

.school-comparison-note {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-top: 20px;
    padding: 12px 13px;
    border-radius: 8px;
    background: #f6f8f8;
    color: #849198;
    font-size: 8px;
    line-height: 1.5;
}

.school-comparison-note i {
    margin-top: 2px;
    color: #149c98;
}

@media (max-width: 700px) {

    .school-comparison-row {
        grid-template-columns:
            minmax(100px, 1fr)
            minmax(100px, 1.4fr)
            50px;
    }

}


/* =========================================================
   School profile typography refinement
   ========================================================= */

.school-profile-content .school-breadcrumb {
    font-size: 10px;
}

.school-profile-content .school-hero-kicker,
.school-profile-content .school-panel-kicker {
    font-size: 10px;
}

.school-profile-content .school-hero-meta span {
    font-size: 10px;
}

.school-profile-content .school-summary-card > span {
    font-size: 10px;
}

.school-profile-content .school-summary-card small {
    font-size: 9px;
}

.school-profile-content .school-date-badge,
.school-profile-content .framework-badge {
    font-size: 9px;
}

.school-profile-content .ofsted-label {
    font-size: 9px;
}

.school-profile-content .ofsted-footer {
    font-size: 9px;
}

.school-profile-content .school-details-grid span,
.school-profile-content .school-mini-stats span {
    font-size: 10px;
}

.school-profile-content .school-details-grid strong {
    font-size: 12px;
}

.school-profile-content .school-side-card address {
    font-size: 11px;
}

.school-profile-content .school-action {
    font-size: 10px;
}

.school-profile-content .school-back-card span {
    font-size: 8px;
}

.school-profile-content .school-back-card strong {
    font-size: 11px;
}

.school-profile-content .school-source-note {
    font-size: 9px;
}

.school-profile-content .school-comparison-intro {
    font-size: 10px;
}

.school-profile-content .school-comparison-name {
    font-size: 10px;
}

.school-profile-content .school-comparison-value {
    font-size: 11px;
}

.school-profile-content .school-comparison-title span {
    font-size: 9px;
}

.school-profile-content .school-comparison-note {
    font-size: 9px;
}


/* Sidebar lower navigation was particularly small */
.school-secondary-nav a {
    font-size: 10px;
}


/* Main navigation and topbar slightly easier to read */
.school-profile-content ~ * {
    font-family: Inter, Arial, sans-serif;
}

body .main-nav a {
    font-size: 12px;
}

body .top-actions a,
body .global-search input {
    font-size: 11px;
}


/* =========================================================
   School profile readability pass
   ========================================================= */

.school-profile-content .school-breadcrumb {
    font-size: 11px;
}

.school-profile-content .school-hero-kicker,
.school-profile-content .school-panel-kicker {
    font-size: 11px;
}

.school-profile-content .school-hero-meta span {
    font-size: 11px;
    padding: 7px 10px;
}

.school-profile-content .school-summary-card > span {
    font-size: 11px;
}

.school-profile-content .school-summary-card > strong {
    font-size: 24px;
}

.school-profile-content .school-summary-card small {
    font-size: 10px;
}

.school-profile-content .school-date-badge,
.school-profile-content .framework-badge {
    font-size: 10px;
}

.school-profile-content .ofsted-label {
    font-size: 10px;
}

.school-profile-content .ofsted-footer {
    font-size: 10px;
}

.school-profile-content .school-details-grid span,
.school-profile-content .school-mini-stats span {
    font-size: 11px;
}

.school-profile-content .school-details-grid strong {
    font-size: 13px;
}

.school-profile-content .school-side-card address {
    font-size: 12px;
    line-height: 1.7;
}

.school-profile-content .school-action {
    font-size: 11px;
}

.school-profile-content .school-side-card h3 {
    font-size: 13px;
}

.school-profile-content .school-panel-heading h2 {
    font-size: 16px;
}

.school-profile-content .school-back-card span {
    font-size: 9px;
}

.school-profile-content .school-back-card strong {
    font-size: 12px;
}

.school-profile-content .school-source-note {
    font-size: 10px;
}

.school-profile-content .school-comparison-intro {
    font-size: 11px;
}

.school-profile-content .school-comparison-name {
    font-size: 11px;
}

.school-profile-content .school-comparison-value {
    font-size: 12px;
}

.school-profile-content .school-comparison-title span {
    font-size: 10px;
}

.school-profile-content .school-comparison-title h3 {
    font-size: 14px;
}

.school-profile-content .school-comparison-note {
    font-size: 10px;
}


/* Sidebar and header readability */

body .main-nav a {
    font-size: 13px;
}

body .secondary-nav a {
    font-size: 11px;
}

body .global-search input,
body .top-actions a {
    font-size: 12px;
}

body .brand-subtitle {
    font-size: 8px;
}

/* =========================================================
   School comparison panel refinement
   ========================================================= */

.school-profile-content .school-comparison-panel {
    background: #ffffff;
    border: 1px solid #dfe7ea;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(20, 45, 56, 0.04);
}

.school-profile-content .school-comparison-intro {
    margin: 4px 0 22px;
    max-width: 720px;
    color: #63747c;
    font-size: 12px;
    line-height: 1.6;
}

.school-profile-content .school-comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.school-profile-content .school-comparison-metric {
    border: 1px solid #e5ecef;
    border-radius: 15px;
    padding: 18px;
    background: #fbfcfc;
}

.school-profile-content .school-comparison-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.school-profile-content .school-comparison-title span {
    display: block;
    color: #8a989e;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 3px;
}

.school-profile-content .school-comparison-title h3 {
    margin: 0;
    color: #17323d;
    font-size: 15px;
    line-height: 1.25;
    font-weight: 650;
}

.school-profile-content .school-comparison-row {
    margin-bottom: 15px;
}

.school-profile-content .school-comparison-row:last-child {
    margin-bottom: 0;
}

.school-profile-content .school-comparison-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 7px;
}

.school-profile-content .school-comparison-name {
    color: #5f7078;
    font-size: 12px;
    font-weight: 500;
}

.school-profile-content .school-comparison-value {
    color: #193541;
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.school-profile-content .school-comparison-track {
    width: 100%;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9eef0;
}

.school-profile-content .school-comparison-bar {
    display: block;
    height: 100%;
    min-width: 3px;
    border-radius: inherit;
    background: #9aaeb6;
}

/* Emphasise the school itself */
.school-profile-content .school-comparison-row:first-of-type
.school-comparison-name {
    color: #17323d;
    font-weight: 700;
}

.school-profile-content .school-comparison-row:first-of-type
.school-comparison-value {
    color: #168b72;
    font-size: 14px;
}

.school-profile-content .school-comparison-row:first-of-type
.school-comparison-bar {
    background: #168b72;
}

/* Council benchmark */
.school-profile-content .school-comparison-row:nth-of-type(2)
.school-comparison-bar {
    background: #597b89;
}

/* Region + England kept intentionally quieter */
.school-profile-content .school-comparison-row:nth-of-type(3)
.school-comparison-bar,
.school-profile-content .school-comparison-row:nth-of-type(4)
.school-comparison-bar {
    background: #b2c1c7;
}

.school-profile-content .school-comparison-note {
    margin: 18px 0 0;
    padding-top: 15px;
    border-top: 1px solid #e7edef;
    color: #76868d;
    font-size: 10px;
    line-height: 1.55;
}

@media (max-width: 900px) {
    .school-profile-content .school-comparison-grid {
        grid-template-columns: 1fr;
    }
}


/* School comparison headline interpretation */
.school-profile-content .school-comparison-headline {
    min-width: 150px;
    text-align: right;
}

.school-profile-content .school-comparison-headline strong {
    display: block;
    margin: 0;
    color: #102f3e;
    font-size: 27px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.035em;
    font-variant-numeric: tabular-nums;
}

.school-profile-content .school-comparison-headline small {
    display: block;
    margin-top: 7px;
    color: #70838b;
    font-size: 10px;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: 0;
    white-space: nowrap;
}

@media (max-width: 620px) {
    .school-profile-content .school-comparison-headline {
        min-width: 0;
    }

    .school-profile-content .school-comparison-headline strong {
        font-size: 23px;
    }

    .school-profile-content .school-comparison-headline small {
        white-space: normal;
    }
}



/* =========================================================
   Academic performance
   ========================================================= */

.school-profile-content .school-performance-panel {
    margin-top: 18px;
}

.school-performance-panel .school-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.school-performance-intro {
    max-width: 620px;
    margin: 5px 0 0;
    color: #6d7f86;
    font-size: 11px;
    line-height: 1.55;
}

.school-performance-year {
    flex: 0 0 auto;
    padding: 7px 11px;
    border: 1px solid #dce5e8;
    border-radius: 999px;
    background: #f7f9fa;
    color: #526b74;
    font-size: 10px;
    font-weight: 700;
}

.school-performance-highlight {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #dfe7ea;
    border-radius: 15px;
    background: #fafcfc;
}

.school-performance-highlight-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.school-performance-label {
    display: block;
    margin-bottom: 5px;
    color: #829299;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
}

.school-performance-highlight h3,
.school-performance-subject h3 {
    margin: 0;
    color: #18323d;
}

.school-performance-highlight h3 {
    font-size: 15px;
    font-weight: 650;
}

.school-performance-main-value {
    text-align: right;
}

.school-performance-main-value strong {
    display: block;
    color: #168b72;
    font-size: 30px;
    line-height: 1;
    letter-spacing: -.04em;
}

.school-performance-main-value small {
    display: block;
    margin-top: 7px;
    color: #5e737b;
    font-size: 10px;
    font-weight: 600;
}

.school-performance-bar-row {
    margin-bottom: 13px;
}

.school-performance-bar-row:last-child {
    margin-bottom: 0;
}

.school-performance-bar-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.school-performance-bar-meta span {
    color: #63767e;
    font-size: 10px;
}

.school-performance-bar-meta strong {
    color: #304a54;
    font-size: 11px;
}

.school-performance-track {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8edef;
}

.school-performance-track > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #aab9bf;
}

.school-performance-track > span.is-school {
    background: #168b72;
}

.school-performance-subject-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 13px;
}

.school-performance-subject {
    padding: 17px;
    border: 1px solid #e0e8eb;
    border-radius: 14px;
    background: #fff;
}

.school-performance-subject-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.school-performance-subject h3 {
    font-size: 13px;
    font-weight: 650;
}

.school-performance-subject-top > strong {
    color: #168b72;
    font-size: 20px;
    line-height: 1;
}

.school-performance-delta {
    margin: 7px 0 0;
    color: #61757d;
    font-size: 10px;
    font-weight: 600;
}

.school-performance-values {
    margin-top: 14px;
    padding-top: 11px;
    border-top: 1px solid #e8edef;
}

.school-performance-values > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
}

.school-performance-values span {
    overflow: hidden;
    color: #74858b;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.school-performance-values strong {
    color: #344d57;
    font-size: 10px;
    font-weight: 700;
}

.school-performance-panel .school-comparison-note {
    margin-top: 16px;
}

@media (max-width: 900px) {
    .school-performance-subject-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {

    .school-performance-panel .school-panel-heading,
    .school-performance-highlight-top {
        flex-direction: column;
    }

    .school-performance-main-value {
        text-align: left;
    }
}



/* =========================================================
   Attendance & absence
   ========================================================= */

.school-profile-content .school-attendance-panel {
    margin-top: 18px;
}

.school-attendance-panel .school-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.school-attendance-intro {
    max-width: 620px;
    margin: 5px 0 0;
    color: #6d7f86;
    font-size: 11px;
    line-height: 1.55;
}

.school-attendance-year {
    flex: 0 0 auto;
    padding: 7px 11px;
    border: 1px solid #dce5e8;
    border-radius: 999px;
    background: #f7f9fa;
    color: #526b74;
    font-size: 10px;
    font-weight: 700;
}

.school-attendance-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.school-attendance-card {
    padding: 18px;
    border: 1px solid #e0e8eb;
    border-radius: 14px;
    background: #fff;
}

.school-attendance-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.school-attendance-label {
    display: block;
    margin-bottom: 5px;
    color: #829299;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
}

.school-attendance-card h3 {
    margin: 0;
    color: #18323d;
    font-size: 13px;
    font-weight: 650;
}

.school-attendance-card-head > strong {
    color: #18323d;
    font-size: 21px;
    line-height: 1;
    letter-spacing: -.02em;
}

.school-attendance-description {
    min-height: 30px;
    margin: 9px 0 0;
    color: #718188;
    font-size: 10px;
    line-height: 1.45;
}

.school-attendance-delta {
    display: inline-flex;
    align-items: center;
    margin-top: 10px;
    padding: 5px 8px;
    border-radius: 999px;
    background: #f2f5f6;
    color: #60747c;
    font-size: 9px;
    font-weight: 650;
}

.school-attendance-delta.is-positive {
    background: #edf8f4;
    color: #168b72;
}

.school-attendance-delta.is-negative {
    background: #fbf1ef;
    color: #a65a4b;
}

.school-attendance-values {
    margin-top: 15px;
    padding-top: 11px;
    border-top: 1px solid #e8edef;
}

.school-attendance-values > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
}

.school-attendance-values span {
    overflow: hidden;
    color: #74858b;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.school-attendance-values strong {
    color: #344d57;
    font-size: 10px;
    font-weight: 700;
}

.school-attendance-values .is-school span,
.school-attendance-values .is-school strong {
    color: #168b72;
}

.school-attendance-panel .school-comparison-note {
    margin-top: 16px;
}

@media (max-width: 900px) {
    .school-attendance-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .school-attendance-panel .school-panel-heading {
        flex-direction: column;
    }
}


/* ==========================================================
   PUPIL PROFILE
   ========================================================== */

.school-pupil-profile-panel {
    margin-top: 24px;
}

.school-pupil-year {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;
    border-radius: 999px;
    background: #eef4f4;
    color: #42686b;
    font-size: 12px;
    font-weight: 700;
}

.school-pupil-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.school-pupil-summary-card {
    padding: 18px;
    border: 1px solid #e3eaec;
    border-radius: 16px;
    background: #f9fbfb;
}

.school-pupil-summary-card span {
    display: block;
    margin-bottom: 8px;
    color: #70838a;
    font-size: 12px;
    font-weight: 600;
}

.school-pupil-summary-card strong {
    display: block;
    color: #18303b;
    font-size: 25px;
    line-height: 1.1;
}

.school-pupil-summary-card small {
    display: block;
    margin-top: 7px;
    color: #829197;
    font-size: 12px;
}

.school-pupil-comparison-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.school-pupil-metric-card {
    padding: 18px;
    border: 1px solid #e3eaec;
    border-radius: 16px;
    background: #fff;
}

.school-pupil-metric-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.school-pupil-metric-header h3 {
    margin: 0 0 5px;
    color: #203943;
    font-size: 14px;
    font-weight: 700;
}

.school-pupil-metric-header p {
    margin: 0;
    color: #7a8c92;
    font-size: 12px;
    line-height: 1.45;
}

.school-pupil-metric-header > strong {
    flex: 0 0 auto;
    color: #245f62;
    font-size: 22px;
}

.school-pupil-delta {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eef2f3;
    color: #687b81;
    font-size: 12px;
    font-weight: 600;
}

.school-pupil-values {
    margin-top: 14px;
}

.school-pupil-values > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid #f0f3f4;
}

.school-pupil-values > div:last-child {
    border-bottom: 0;
}

.school-pupil-values span {
    color: #7d8e94;
    font-size: 12px;
}

.school-pupil-values strong {
    color: #334c55;
    font-size: 12px;
    font-weight: 700;
}

.school-pupil-values .is-school span,
.school-pupil-values .is-school strong {
    color: #247075;
}

.school-ethnicity-block {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid #e9eef0;
}

.school-ethnicity-heading h3 {
    margin: 0;
    color: #203943;
    font-size: 15px;
}

.school-ethnicity-heading p {
    margin: 4px 0 0;
    color: #7e8f95;
    font-size: 12px;
}

.school-ethnicity-list {
    margin-top: 14px;
}

.school-ethnicity-row {
    display: grid;
    grid-template-columns: minmax(170px, 1.3fr)
                           minmax(150px, 2fr)
                           60px
                           50px;
    gap: 12px;
    align-items: center;
    padding: 8px 0;
}

.school-ethnicity-name {
    color: #425860;
    font-size: 12px;
    font-weight: 600;
}

.school-ethnicity-bar {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf2f3;
}

.school-ethnicity-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #5d8f91;
}

.school-ethnicity-value {
    text-align: right;
    color: #294b54;
    font-size: 12px;
    font-weight: 700;
}

.school-ethnicity-count {
    text-align: right;
    color: #8a999e;
    font-size: 11px;
}

@media (max-width: 980px) {
    .school-pupil-summary-grid,
    .school-pupil-comparison-grid {
        grid-template-columns: 1fr;
    }

    .school-ethnicity-row {
        grid-template-columns: minmax(130px, 1fr) 1.5fr 52px;
    }

    .school-ethnicity-count {
        display: none;
    }
}


/* ==========================================================
   PUPIL PROFILE — POLISH
   ========================================================== */

.school-pupil-profile-panel {
    margin-top: 24px;
    padding: 24px;
}

.school-pupil-profile-panel .school-panel-heading {
    margin-bottom: 18px;
}

.school-pupil-intro {
    margin-top: 6px;
    margin-bottom: 0;
    color: #7a8c92;
    font-size: 13px;
    line-height: 1.5;
}

.school-pupil-summary-grid {
    gap: 16px;
    margin-top: 18px;
}

.school-pupil-summary-card {
    min-height: 116px;
    padding: 20px;
    border-radius: 14px;
    background: #fbfcfc;
}

.school-pupil-summary-card strong {
    margin-top: 2px;
    font-size: 27px;
    line-height: 1.05;
}

.school-pupil-summary-card small {
    margin-top: 9px;
    line-height: 1.45;
}

.school-pupil-comparison-grid {
    gap: 16px;
    margin-top: 16px;
    align-items: stretch;
}

.school-pupil-metric-card {
    display: flex;
    flex-direction: column;
    min-height: 250px;
    padding: 20px;
    border-radius: 14px;
}

.school-pupil-metric-header {
    min-height: 72px;
}

.school-pupil-metric-header h3 {
    font-size: 13px;
    line-height: 1.35;
}

.school-pupil-metric-header p {
    max-width: 210px;
    font-size: 11px;
}

.school-pupil-metric-header > strong {
    font-size: 20px;
    line-height: 1;
}

.school-pupil-delta {
    margin-top: 12px;
    padding-top: 10px;
    font-size: 11px;
}

.school-pupil-values {
    margin-top: auto;
    padding-top: 12px;
}

.school-pupil-values > div {
    min-height: 31px;
    padding: 6px 0;
}

.school-pupil-values span,
.school-pupil-values strong {
    font-size: 11px;
}

.school-ethnicity-block {
    margin-top: 20px;
    padding-top: 18px;
}

.school-ethnicity-heading {
    margin-bottom: 10px;
}

.school-ethnicity-row {
    grid-template-columns: 260px minmax(220px, 1fr) 58px 42px;
    gap: 14px;
    min-height: 32px;
    padding: 4px 0;
}

.school-ethnicity-name {
    font-size: 11px;
    line-height: 1.25;
}

.school-ethnicity-bar {
    height: 6px;
}

.school-ethnicity-value {
    font-size: 11px;
}

.school-ethnicity-count {
    font-size: 10px;
}

.school-pupil-profile-panel .school-panel-note {
    margin-top: 18px;
    padding: 11px 13px;
    border-radius: 8px;
    background: #f4f7f8;
    color: #7d8d92;
    font-size: 11px;
    line-height: 1.45;
}

.school-pupil-profile-panel + .school-panel,
.school-pupil-profile-panel + section {
    margin-top: 26px;
}

@media (max-width: 1100px) {
    .school-ethnicity-row {
        grid-template-columns: 210px minmax(160px, 1fr) 52px 38px;
    }
}

@media (max-width: 760px) {
    .school-pupil-profile-panel {
        padding: 18px;
    }

    .school-pupil-summary-grid,
    .school-pupil-comparison-grid {
        grid-template-columns: 1fr;
    }

    .school-pupil-metric-card {
        min-height: auto;
    }

    .school-ethnicity-row {
        grid-template-columns: minmax(130px, 1fr) 1fr 48px;
        gap: 10px;
    }

    .school-ethnicity-count {
        display: none;
    }
}



/* =========================================================
   KS4 ACADEMIC PERFORMANCE
   ========================================================= */

.ks4-comparison-rows {
    display: grid;
    gap: 13px;
    margin-top: 24px;
}

.ks4-comparison-row {
    display: grid;
    gap: 7px;
}

.ks4-comparison-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 13px;
    color: #667983;
}

.ks4-comparison-meta strong {
    color: #314b57;
    font-size: 14px;
    font-weight: 700;
}

.ks4-comparison-row.is-school .ks4-comparison-meta span,
.ks4-comparison-row.is-school .ks4-comparison-meta strong {
    color: #116d70;
}

.ks4-comparison-track {
    position: relative;
    width: 100%;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9eff1;
}

.ks4-comparison-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #80959d;
}

.ks4-comparison-row.is-school .ks4-comparison-track span {
    background: #498383;
}


.ks4-metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.ks4-metric-card {
    min-width: 0;
    padding: 20px;
    border: 1px solid #e1e9eb;
    border-radius: 14px;
    background: #fff;
}

.ks4-metric-title {
    display: block;
    min-height: 34px;
    margin-bottom: 12px;
    color: #667983;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.ks4-metric-value {
    display: block;
    margin-bottom: 6px;
    color: #173844;
    font-size: 27px;
    line-height: 1.05;
    font-weight: 700;
}

.ks4-metric-comparison {
    display: block;
    color: #788b94;
    font-size: 12px;
}

.ks4-metric-delta {
    display: inline-block;
    margin-top: 10px;
    color: #498383;
    font-size: 12px;
    font-weight: 700;
}


.ks4-secondary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.ks4-secondary-card {
    padding: 18px 20px;
    border: 1px solid #e1e9eb;
    border-radius: 14px;
    background: #f8fafb;
}

.ks4-secondary-card > span {
    display: block;
    margin-bottom: 8px;
    color: #687c86;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.ks4-secondary-card > strong {
    display: block;
    color: #173844;
    font-size: 24px;
    line-height: 1.1;
}

.ks4-secondary-card > small {
    display: block;
    margin-top: 5px;
    color: #819199;
    font-size: 12px;
}

.ks4-secondary-card p {
    margin: 12px 0 0;
    color: #657983;
    font-size: 13px;
    line-height: 1.5;
}

.ks4-progress-unavailable {
    font-size: 18px !important;
    color: #566c76 !important;
}


.school-performance-source-note {
    margin: 16px 0 0;
    color: #7b8d95;
    font-size: 12px;
    line-height: 1.55;
}


@media (max-width: 780px) {

    .ks4-metric-grid {
        grid-template-columns: 1fr;
    }

    .ks4-secondary-grid {
        grid-template-columns: 1fr;
    }

    .ks4-metric-title {
        min-height: auto;
    }
}

/* ==========================================================
   SEN / ADDITIONAL NEEDS
   ========================================================== */

.school-sen-panel {
    overflow: hidden;
}

.sen-headline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin: 24px 0;
    padding: 24px 26px;
    background: #f5f9f9;
    border: 1px solid #dfeaea;
    border-radius: 16px;
}

.sen-headline-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sen-headline-label {
    color: #627780;
    font-size: 13px;
    font-weight: 600;
}

.sen-headline-copy strong {
    color: #163b45;
    font-size: 38px;
    line-height: 1;
    letter-spacing: -1.4px;
}

.sen-headline-copy > span:last-child {
    margin-top: 4px;
    color: #71838a;
    font-size: 13px;
}

.sen-headline-delta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    text-align: right;
}

.sen-headline-delta strong {
    color: #376d6c;
    font-size: 14px;
}

.sen-headline-delta span {
    color: #849399;
    font-size: 12px;
}

.sen-comparison {
    display: grid;
    gap: 14px;
    margin-bottom: 24px;
}

.sen-comparison-row {
    display: grid;
    gap: 7px;
}

.sen-comparison-meta {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    color: #73848b;
    font-size: 12px;
}

.sen-comparison-meta strong {
    color: #40565f;
    font-weight: 600;
}

.sen-comparison-row.is-school .sen-comparison-meta {
    color: #255f61;
    font-weight: 600;
}

.sen-comparison-row.is-school .sen-comparison-meta strong {
    color: #174f52;
}

.sen-comparison-track,
.sen-need-track {
    height: 7px;
    overflow: hidden;
    background: #e9eeee;
    border-radius: 999px;
}

.sen-comparison-track span,
.sen-need-track span {
    display: block;
    height: 100%;
    background: #9eafb2;
    border-radius: inherit;
}

.sen-comparison-row.is-school .sen-comparison-track span {
    background: #4f8785;
}

.sen-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 26px;
}

.sen-metric-card {
    display: flex;
    flex-direction: column;
    min-height: 150px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e2e8e9;
    border-radius: 14px;
}

.sen-metric-label {
    color: #64777e;
    font-size: 13px;
    font-weight: 600;
}

.sen-metric-value {
    margin-top: 12px;
    color: #193d47;
    font-size: 29px;
    line-height: 1;
    letter-spacing: -0.7px;
}

.sen-metric-count {
    margin-top: 6px;
    color: #8a999e;
    font-size: 12px;
}

.sen-metric-comparison {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 18px;
    color: #839297;
    font-size: 11px;
}

.sen-metric-comparison strong {
    color: #526d73;
    font-weight: 600;
}

.sen-needs-section {
    padding-top: 22px;
    border-top: 1px solid #e8eded;
}

.sen-needs-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 19px;
}

.sen-needs-kicker {
    display: block;
    margin-bottom: 5px;
    color: #769091;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.sen-needs-heading h3 {
    margin: 0;
    color: #263f48;
    font-size: 16px;
    font-weight: 600;
}

.sen-needs-heading > span {
    color: #9aa6aa;
    font-size: 11px;
}

.sen-needs-list {
    display: grid;
    gap: 14px;
}

.sen-need-row {
    display: grid;
    gap: 7px;
}

.sen-need-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: #60737a;
    font-size: 12px;
}

.sen-need-meta strong {
    color: #354e57;
    font-weight: 600;
}

.sen-need-track span {
    background: #719695;
}

@media (max-width: 780px) {
    .sen-headline {
        align-items: flex-start;
        flex-direction: column;
    }

    .sen-headline-delta {
        align-items: flex-start;
        text-align: left;
    }

    .sen-metric-grid {
        grid-template-columns: 1fr;
    }

    .sen-metric-comparison {
        flex-direction: column;
        gap: 3px;
    }
}


/* ==========================================================
   SEN / ADDITIONAL NEEDS — POLISHED
   ========================================================== */

.school-sen-panel {
    padding: 28px;
    background: #ffffff;
    border: 1px solid #e4e9eb;
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(20, 45, 55, 0.02);
}

/* Main headline card */

.sen-headline {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 32px;
    margin: 24px 0 28px;
    padding: 26px 28px;
    background:
        linear-gradient(
            135deg,
            rgba(73, 131, 131, 0.08),
            rgba(73, 131, 131, 0.025)
        );
    border: 1px solid rgba(73, 131, 131, 0.16);
    border-radius: 16px;
}

.sen-headline-copy {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sen-headline-label {
    color: #61777e;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.sen-headline-copy strong {
    margin-top: 2px;
    color: #153d46;
    font-size: 42px;
    font-weight: 650;
    line-height: 1;
    letter-spacing: -1.6px;
}

.sen-headline-copy > span:last-child {
    margin-top: 4px;
    color: #7b8e94;
    font-size: 12px;
}

.sen-headline-delta {
    min-width: 170px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(73, 131, 131, 0.12);
    border-radius: 12px;
    text-align: right;
}

.sen-headline-delta strong {
    display: block;
    color: #315f61;
    font-size: 13px;
    font-weight: 650;
}

.sen-headline-delta span {
    display: block;
    margin-top: 4px;
    color: #8b999e;
    font-size: 11px;
}


/* Comparison */

.sen-comparison {
    display: grid;
    gap: 12px;
    margin-bottom: 26px;
    padding: 20px 22px;
    background: #f8fafb;
    border: 1px solid #e8edef;
    border-radius: 14px;
}

.sen-comparison-row {
    display: grid;
    grid-template-columns: 165px 1fr 54px;
    align-items: center;
    gap: 14px;
}

.sen-comparison-meta {
    display: contents;
}

.sen-comparison-meta span {
    color: #687b82;
    font-size: 12px;
    font-weight: 500;
}

.sen-comparison-meta strong {
    grid-column: 3;
    grid-row: 1;
    color: #3f555d;
    font-size: 12px;
    font-weight: 650;
    text-align: right;
}

.sen-comparison-track {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    height: 8px;
    overflow: hidden;
    background: #e5eaec;
    border-radius: 999px;
}

.sen-comparison-track span {
    display: block;
    height: 100%;
    background: #a6b5b8;
    border-radius: 999px;
}

.sen-comparison-row.is-school .sen-comparison-meta span,
.sen-comparison-row.is-school .sen-comparison-meta strong {
    color: #245d60;
    font-weight: 650;
}

.sen-comparison-row.is-school .sen-comparison-track span {
    background: #4f8383;
}


/* SEN support + EHC cards */

.sen-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.sen-metric-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 164px;
    padding: 21px 22px;
    background: #fbfcfc;
    border: 1px solid #e5eaeb;
    border-radius: 14px;
}

.sen-metric-card::before {
    content: "";
    position: absolute;
    top: 20px;
    left: 0;
    width: 3px;
    height: 35px;
    background: #6f9998;
    border-radius: 0 3px 3px 0;
}

.sen-metric-label {
    color: #697b81;
    font-size: 12px;
    font-weight: 600;
}

.sen-metric-value {
    margin-top: 13px;
    color: #193f48;
    font-size: 31px;
    font-weight: 650;
    line-height: 1;
    letter-spacing: -0.8px;
}

.sen-metric-count {
    margin-top: 7px;
    color: #8b999e;
    font-size: 11px;
}

.sen-metric-comparison {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: auto;
    padding-top: 17px;
    border-top: 1px solid #edf0f1;
    color: #8a999e;
    font-size: 11px;
}

.sen-metric-comparison strong {
    color: #526d72;
    font-weight: 600;
}


/* Primary needs */

.sen-needs-section {
    padding: 22px 22px 20px;
    background: #fafbfb;
    border: 1px solid #e7ebec;
    border-radius: 14px;
}

.sen-needs-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.sen-needs-kicker {
    display: block;
    margin-bottom: 5px;
    color: #6f8e8e;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.11em;
}

.sen-needs-heading h3 {
    margin: 0;
    color: #29444d;
    font-size: 15px;
    font-weight: 600;
}

.sen-needs-heading > span {
    padding-bottom: 2px;
    color: #9aa6aa;
    font-size: 10px;
}

.sen-needs-list {
    display: grid;
    gap: 16px;
}

.sen-need-row {
    display: grid;
    gap: 7px;
}

.sen-need-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.sen-need-meta span {
    color: #5d7077;
    font-size: 12px;
}

.sen-need-meta strong {
    min-width: 30px;
    color: #344f58;
    font-size: 12px;
    font-weight: 650;
    text-align: right;
}

.sen-need-track {
    height: 6px;
    overflow: hidden;
    background: #e8eded;
    border-radius: 999px;
}

.sen-need-track span {
    display: block;
    height: 100%;
    background: #6e9695;
    border-radius: 999px;
}


/* Footer note */

.school-sen-panel .school-performance-source-note {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #edf0f1;
    color: #94a0a4;
    font-size: 10px;
    line-height: 1.6;
}


/* Responsive */

@media (max-width: 820px) {

    .school-sen-panel {
        padding: 22px;
    }

    .sen-headline {
        grid-template-columns: 1fr;
    }

    .sen-headline-delta {
        width: 100%;
        text-align: left;
    }

    .sen-comparison-row {
        grid-template-columns: 120px 1fr 48px;
    }
}

@media (max-width: 620px) {

    .sen-metric-grid {
        grid-template-columns: 1fr;
    }

    .sen-comparison {
        padding: 18px;
    }

    .sen-comparison-row {
        grid-template-columns: 1fr 48px;
        gap: 6px 10px;
    }

    .sen-comparison-meta span {
        grid-column: 1;
    }

    .sen-comparison-meta strong {
        grid-column: 2;
    }

    .sen-comparison-track {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .sen-headline-copy strong {
        font-size: 36px;
    }
}


/* ==========================================================
   SCHOOL SECTION NAVIGATION
   ========================================================== */

.school-section-nav {
    position: sticky;
    top: 58px;
    z-index: 30;
    margin: 0 0 22px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #e3e9eb;
    border-radius: 14px;
    box-shadow: 0 5px 18px rgba(21, 48, 58, 0.045);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.school-section-nav-inner {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.school-section-nav-inner::-webkit-scrollbar {
    display: none;
}

.school-section-nav a {
    position: relative;
    flex: 0 0 auto;
    padding: 10px 13px;
    color: #718289;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 9px;
    transition:
        color 160ms ease,
        background 160ms ease;
}

.school-section-nav a:hover {
    color: #254d57;
    background: #f4f7f7;
}

.school-section-nav a.is-active {
    color: #176d70;
    background: #edf6f5;
}

.school-section-nav a.is-active::after {
    content: "";
    position: absolute;
    right: 13px;
    bottom: 4px;
    left: 13px;
    height: 2px;
    background: #4f8988;
    border-radius: 999px;
}

/* Keep anchored sections below sticky header/navigation. */

#ofsted,
#pupils,
#sen,
#performance,
#attendance,
#context,
#details {
    scroll-margin-top: 130px;
}

@media (max-width: 780px) {
    .school-section-nav {
        top: 54px;
        margin-right: -4px;
        margin-left: -4px;
        border-radius: 11px;
    }

    .school-section-nav a {
        padding: 10px 11px;
        font-size: 10px;
    }
}

