/*
 * School visual refresh, 2026-10-26.
 * Presentation only: retain the existing columns, block order, banner and breakpoints.
 * :has() gates decoration off when either reading plugin is active. Browsers without
 * :has() retain the original theme plus the independent mobile accessibility layers.
 * No global resets, remote fonts, animations or changes to editorial inline colours.
 */

body.custom-background:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls)) {
    background-color: #edf2f4;
}

:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page {
    color: #263d4b;
    background-color: #fff;
    box-shadow: 0 8px 48px rgba(24, 55, 73, .09);
}

/* Brand colours. Existing header image and its dimensions stay untouched. */
:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page .top-bar,
:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page #site-search-panel,
:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page #colophon {
    background: #193c50;
    color: #f5f9fc;
}

:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page .blog-title-wrapper {
    color: #fff;
    text-shadow: none;
}

:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page .top-bar button {
    color: #fff;
    background: #294f65;
    border-color: #7792a3;
    border-radius: 8px;
    box-shadow: none;
    text-shadow: none;
}

:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page .top-bar button:hover,
:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page .top-bar button[aria-expanded="true"] {
    background: #36647a;
    border-color: #d7e9f1;
}

/* Preserve type sizes and spacing; make the hierarchy calmer and more legible. */
:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page .entry-header .entry-title,
:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page .entry-header .entry-title a,
:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page .entry-content :is(h1, h2, h3, h4, h5, h6) {
    color: #193c50;
    font-weight: 700;
    text-shadow: none;
}

:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page .widget-title {
    color: #193c50;
    text-transform: none;
    font-weight: 700;
    background: #f3f7f8;
    border-color: #dbe5e9;
    border-radius: 6px;
    box-shadow: inset 3px 0 #087b83;
    padding-left: 12px;
    padding-right: 8px;
}

:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page .prefix-widget-title,
:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page .term-icon {
    color: #087b83;
}

:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page :is(.entry-content, .entry-summary, .comment-content, .textwidget) a {
    color: #086778;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: .18em;
}

:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page :is(.entry-content, .entry-summary, .comment-content, .textwidget) a:visited {
    color: #65517b;
}

:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page :is(.entry-content, .entry-summary, .comment-content) a:hover {
    color: #16465b;
    text-decoration-thickness: 2px;
}

/* Override the legacy Customizer's important widget hover rule only in normal mode. */
:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page #secondary .widget a:hover {
    color: #16465b !important;
    text-decoration: underline;
    text-underline-offset: .18em;
}

:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page :is(.entry-meta, .sub-title, .wp-caption-text, .zg-table-hint) {
    color: #526572;
    border-color: #dbe5e9;
}

/* Accordion: same nesting, arrows, paddings and event handlers, without grey gradients. */
:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page #dc_jqaccordion_widget-5-item {
    border-color: #dbe5e9;
    border-radius: 8px;
    background: #f7fafb;
}

:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page #dc_jqaccordion_widget-5-item :is(ul, li) {
    background: transparent;
}

:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page #dc_jqaccordion_widget-5-item ul a {
    color: #263d4b;
    background: #f7fafb;
    border-top-color: transparent;
    border-bottom-color: #dbe5e9;
    text-shadow: none;
    font-family: inherit;
}

:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page #dc_jqaccordion_widget-5-item ul ul a {
    background: #fff;
}

:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page #dc_jqaccordion_widget-5-item ul a:hover,
:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page #dc_jqaccordion_widget-5-item ul a.dcjq-parent.active {
    background: #e7f1f3;
    color: #16465b;
}

:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page #dc_jqaccordion_widget-5-item :is(.current-menu-item, .current_page_item) > a {
    background: #e1eef0;
    color: #16465b;
    box-shadow: inset 3px 0 #087b83;
    text-decoration: underline;
    text-underline-offset: .18em;
}

:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page #site-navigation,
:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page #site-navigation ul ul {
    background: #f3f7f8;
}

:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page #site-navigation a {
    color: #193c50;
}

/* Input colours do not alter validation, mandatory markers or submission logic. */
:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page :is(input[type="text"], input[type="search"], input[type="email"], input[type="tel"], textarea, select) {
    color: #263d4b;
    background-color: #fff;
    border-color: #839ba8;
    border-radius: 7px;
    box-shadow: inset 0 1px 2px rgba(24, 55, 73, .04);
}

:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page input::placeholder,
:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page textarea::placeholder {
    color: #596e7b;
    opacity: 1;
}

:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page :is(.site-search-fields, .sidebar-search-form) button,
:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page .iphorm-submit-wrap button :is(span, em),
:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page .iphorm-submit-wrap button {
    color: #fff;
    background: #086778;
    border-color: #086778;
    border-radius: 7px;
    box-shadow: none;
    text-shadow: none;
}

:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page input[type="submit"] {
    background-color: #086778 !important;
    border-color: #086778;
    border-radius: 7px;
    text-shadow: none;
}

:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page :is(.wrapper-search-form, fieldset, .wrapper-form-comments) {
    border-color: #dbe5e9;
    border-radius: 8px;
}

/* Only data tables receive row shading; image and biography tables retain their surfaces. */
:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page #content table.zg-table-wide {
    color: #263d4b;
    border-color: #cddde4;
    background: #fff;
}

:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page #content .zg-table-wide :is(td, th) {
    border-color: #cddde4;
}

:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page #content .zg-table-wide > tbody > tr:nth-child(even) > td {
    background-color: #f3f7f8;
}

:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page #content .zg-table-wide th {
    background: #e7f0f3;
    color: #193c50;
}

:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page .entry-content :is(img, .wp-caption) {
    border-radius: 7px;
}

:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page #colophon {
    border-top-color: #31596e;
}

:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page #colophon a {
    color: #c6e9ee;
    text-decoration: underline;
    text-underline-offset: .18em;
}

/* Light mobile drawer; reuse the existing accessible controls and their dimensions. */
@media screen and (max-width: 959px) {
    :where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page #menu-movil {
        color: #193c50;
        background: #f3f7f8;
        box-shadow: inset 0 -1px #dbe5e9;
    }

    :where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page #menu-movil a {
        color: #193c50;
        background: transparent;
        border-color: #cddde4;
    }

    :where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page #menu-movil a:hover,
    :where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page #menu-movil .current-menu-item > a {
        color: #16465b;
        background: #e1eef0;
        text-decoration: underline;
    }

    :where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page #menu-movil button {
        color: #16465b;
        background: #fff;
        border-color: #839ba8;
        border-radius: 7px;
        box-shadow: none;
        text-shadow: none;
    }

    :where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page #menu-movil ul ul {
        border-color: #a4c4cd;
    }

    :where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page #menu-movil :is(:focus, :focus-visible) {
        outline: 3px solid #075e87;
        outline-offset: -3px;
    }
}

/* Keep focus visible on the dark chrome as well as light content surfaces. */
:where(body:not(:has(#bt_is_visually-on, #special-version-container, #special-version-controls))) #page :is(.top-bar, #colophon) :focus-visible {
    outline: 3px solid #ffdb67 !important;
    outline-offset: 3px;
}
