/* Main school pages: a photographic prospectus, with useful actions close to the title. */
body:not(.home) .section--canvas-pages {
    padding-block: clamp(32px, 4vw, 58px) clamp(48px, 6vw, 84px);
}

body:not(.home) .page-shell--canvas {
    display: block;
    width: min(calc(100% - 80px), 1360px);
}

body:not(.home) .canvas-page {
    padding: 0;
    min-width: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    animation: none;
}

body:not(.home) .canvas-page-opening {
    margin: 0 0 clamp(36px, 4.4vw, 64px);
    padding: 0;
}

body:not(.home) .canvas-page-opening--photo {
    display: grid;
    grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
    align-items: center;
    gap: clamp(32px, 4.5vw, 64px);
}

body:not(.home) .canvas-page-opening__copy {
    min-width: 0;
}

body:not(.home) .canvas-page-opening h1 {
    max-width: 12ch;
    margin: 0 0 24px;
    color: var(--egps-red);
    font-family: var(--egps-displayfont);
    font-size: clamp(48px, 6.4vw, 92px);
    font-weight: 500;
    font-optical-sizing: none;
    font-variation-settings: "opsz" 16;
    line-height: 1.08;
    letter-spacing: -.035em;
    text-wrap: balance;
}

body:not(.home) .canvas-page-opening__intro {
    max-width: 40ch;
    margin: 0;
    color: var(--egps-ink, var(--egps-charcoal));
    font-family: var(--egps-prosefont, var(--egps-bodyfont));
    font-size: clamp(16px, 1.35vw, 19px);
    line-height: 1.65;
    font-weight: 400;
    text-wrap: pretty;
}

body:not(.home) .canvas-page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px 24px;
    margin-top: 30px;
}

body:not(.home) .canvas-page-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 44px;
    margin: 0;
    font-family: var(--egps-bodyfont);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
}

body:not(.home) .canvas-page-actions .button--primary {
    padding: 14px 20px;
    color: #fff;
    background: var(--egps-red);
    border: 1px solid var(--egps-red);
    border-radius: 0;
    box-shadow: none;
}

body:not(.home) .canvas-page-actions .button--primary:hover {
    background: var(--egps-red-deep, var(--egps-red));
    border-color: var(--egps-red-deep, var(--egps-red));
}

body:not(.home) .canvas-page-action {
    color: var(--egps-red);
    padding: 6px 0;
    border-bottom: 1px solid currentColor;
}

body:not(.home) .canvas-page-action:hover {
    text-decoration: underline;
    text-underline-offset: 5px;
}

body:not(.home) .canvas-page-actions a > span {
    font-family: var(--egps-bodyfont);
    font-size: 21px;
    font-weight: 400;
}

body:not(.home) .canvas-page-opening__media {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    background: transparent;
}

body:not(.home) .canvas-page-opening__media img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    aspect-ratio: auto;
    object-fit: contain;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

/* Practical destinations start with the task and move straight into useful information. */
body:not(.home) .canvas-page-opening--practical {
    max-width: 900px;
    margin-bottom: 40px;
}

body:not(.home) .canvas-page-opening--practical h1 {
    max-width: 18ch;
    font-size: clamp(46px, 5.6vw, 80px);
}

body:not(.home) .canvas-page-opening--practical .canvas-page-opening__intro {
    max-width: 58ch;
}

body:not(.home) .canvas-page--parents .canvas-page-opening {
    margin-bottom: 42px;
}

body:not(.home) .canvas-page--contact .page-contact-directions {
    margin-top: 0;
}

body:not(.home) .canvas-page--contact .page-contact-cards {
    margin-top: 0;
    padding-block: 24px;
}

body:not(.home) .canvas-page--contact .page-contact-card p:not(.page-contact-card__label) {
    font-family: var(--egps-prosefont, var(--egps-bodyfont));
    font-size: 17px;
    line-height: 1.7;
}

body:not(.home) .canvas-page--contact .page-contact-map {
    margin-top: 36px;
}

body:not(.home) .canvas-page--contact .page-contact-map__header h2 {
    max-width: 28ch;
    font-size: clamp(30px, 3.5vw, 46px);
    font-weight: 500;
}

/* The original route list remains complete; it reads like the contents of a prospectus. */
body:not(.home) .canvas-page .page-section-routes {
    margin: 0 0 46px;
    padding: 0;
}

body:not(.home) .canvas-page .page-section-routes > h2 {
    margin: 0 0 20px;
    font-family: var(--egps-displayfont);
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 500;
    line-height: 1.2;
    color: var(--egps-red);
    letter-spacing: -.025em;
    text-transform: none;
}

body:not(.home) .canvas-page .page-section-routes__grid {
    gap: 0 40px;
}

body:not(.home) .canvas-page .page-section-route {
    padding: 20px 32px 22px 0;
    min-height: 0;
    border-top: 1px solid var(--egps-line);
    background: transparent;
}

body:not(.home) .canvas-page .page-section-route__title {
    color: var(--egps-red);
    font-family: var(--egps-displayfont);
    font-size: clamp(25px, 2.7vw, 36px);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -.02em;
}

body:not(.home) .canvas-page .page-section-route__copy {
    max-width: 50ch;
    margin-top: 9px;
    color: var(--egps-muted);
    font-family: var(--egps-bodyfont);
    font-size: 13px;
    line-height: 1.75;
}

body:not(.home) .canvas-page .entry-content {
    max-width: none;
    padding: 0;
    font-family: var(--egps-prosefont, var(--egps-bodyfont));
    font-size: 17px;
    line-height: 1.8;
}

body:not(.home) .canvas-page .entry-content :is(p, ul, ol, blockquote) {
    max-width: 62ch;
}

body:not(.home) .canvas-page .entry-content p {
    margin-block: 0 1.35em;
}

body:not(.home) .canvas-page .entry-content h2 {
    margin-top: 1.2em;
    font-weight: 500;
    font-size: clamp(30px, 3.6vw, 48px);
    font-optical-sizing: none;
    font-variation-settings: "opsz" 16;
    letter-spacing: -.025em;
    line-height: 1.2;
}

body:not(.home) .canvas-page .entry-content > h2:first-child {
    margin-top: 0;
}

body:not(.home) .canvas-page .entry-content :is(h3, h4) {
    font-weight: 500;
    line-height: 1.3;
}

body:not(.home) .canvas-page .entry-content a.egps-document-link {
    font-family: var(--egps-bodyfont);
    font-size: 14px;
}

body:not(.home) .canvas-page .canvas-news-archive {
    padding-top: 28px;
    border-top: 1px solid var(--egps-line);
}

body:not(.home) .canvas-page--vacancies .entry-content {
    padding-top: 28px;
    border-top: 1px solid var(--egps-line);
}

body:not(.home) .canvas-page--vacancies .entry-content p:first-child {
    font-size: 19px;
    line-height: 1.7;
}

/* Dropdowns use the same quiet red, clear type and generous pointer targets. */
@media (min-width: 1201px) {
    .primary-menu > li > .sub-menu {
        min-width: 238px;
        padding: 12px 16px;
        border-top: 3px solid var(--egps-red);
    }

    .primary-menu .sub-menu a {
        min-height: 42px;
        padding: 10px 8px;
        font-family: var(--egps-bodyfont);
        font-size: 13px;
        font-weight: 500;
        color: var(--egps-ink, var(--egps-charcoal));
    }

    .primary-menu .sub-menu a:hover,
    .primary-menu .sub-menu .current-menu-item > a {
        color: var(--egps-red);
        background: var(--egps-paper);
    }
}

@media (max-width: 1040px) {
    body:not(.home) .page-shell--canvas {
        width: calc(100% - 48px);
    }

    body:not(.home) .canvas-page-opening--photo {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 32px;
    }

    body:not(.home) .canvas-page-opening h1 {
        font-size: clamp(44px, 6.1vw, 64px);
    }

    body:not(.home) .canvas-page-actions {
        gap: 12px 20px;
        margin-top: 24px;
    }
}

@media (max-width: 760px) {
    body:not(.home) .section--canvas-pages {
        padding-block: 30px 48px;
    }

    body:not(.home) .page-shell--canvas {
        width: calc(100% - 40px);
    }

    body:not(.home) .canvas-page-opening--photo {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 28px;
    }

    body:not(.home) .canvas-page-opening {
        margin-bottom: 34px;
    }

    body:not(.home) .canvas-page-opening h1 {
        max-width: 16ch;
        margin-bottom: 18px;
        font-size: clamp(44px, 8.7vw, 64px);
        line-height: 1.12;
        letter-spacing: -.03em;
    }

    body:not(.home) .canvas-page-opening__intro {
        max-width: 46ch;
        font-size: 16px;
        line-height: 1.65;
    }

    body:not(.home) .canvas-page-actions {
        margin-top: 22px;
        gap: 12px 24px;
    }

    body:not(.home) .canvas-page-actions .button--primary {
        padding: 12px 17px;
    }

    body:not(.home) .canvas-page .page-section-routes {
        margin-bottom: 34px;
    }

    body:not(.home) .canvas-page .page-section-routes__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    body:not(.home) .canvas-page .page-section-route {
        padding-block: 18px;
    }

    body:not(.home) .canvas-page .page-section-route__title {
        font-size: 29px;
    }

    body:not(.home) .canvas-page .entry-content {
        font-size: 16px;
        line-height: 1.8;
    }

    body:not(.home) .canvas-page--contact .page-contact-cards {
        padding-block: 20px;
        gap: 20px;
    }

    body:not(.home) .canvas-page--contact .page-contact-card p:not(.page-contact-card__label) {
        font-size: 16px;
    }

    body:not(.home) .canvas-page--contact .page-contact-map {
        margin-top: 28px;
    }
}

body:not(.home) .canvas-page :is(a, button, input, select, textarea):focus-visible {
    outline: 3px solid var(--egps-red);
    outline-offset: 5px;
}

@media (prefers-reduced-motion: reduce) {
    body:not(.home) .canvas-page,
    body:not(.home) .canvas-page *,
    .primary-menu .sub-menu,
    .primary-menu .sub-menu a {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
