/* ==========================================================================
   FORCE SCREEN CANVAS TO BE WHITE
   ========================================================================== */
body {
    background-color: #ffffff !important;
}

/* ==========================================================================
   FORCE HIGH-PRIORITY IPAD RENDERING PIPELINE RESET
   ========================================================================== */

/* 1. Smash the native iOS control font override engine */
:root .frm_forms input,
:root .frm_forms select,
:root .frm_forms textarea,
:root .frm_forms label,
:root .frm_forms .frm_html_field,
:root .frm_forms .frm_html_field * {
    font-family: 'Concourse 4', sans-serif !important;
}

/* 2. Instant hardware acceleration to kill the 10-second Safari paint lag */
:root .frm_forms {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
}

/* 3. High-priority mobile logic visibility enforcement */
@media screen and (max-width: 1024px) {

    :root .frm_forms .frm_invisible,
    :root .frm_forms .frm_logic_hide,
    :root .frm_forms .frm_hidden_placeholder {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
    }
}

/* ==========================================================================
1. ROOT BASE SETUP, FONTS, & VISIBILITY CONTROLS
========================================================================== */
body {
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

header,
.menu-container {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
}

body {
    max-width: 100%;
    background-color: #ffffff;
}

.mobile {
    display: block;
}

.desktop {
    display: none;
}

#match {
    display: flex;
}

#match section {
    padding: 10px;
}

.photo {
    width: 20%;
}

.blurb {
    width: 80%;
}

.frm_forms .frm_submit.frm2,
.frm_forms .frm_submit[class*="\Frm"] {
    width: 100% !important;
    max-width: 100% !important;
    flex: 100% !important;
    clear: both !important;
    float: none !important;
}

.frm_forms .frm_submit button[type="submit"] {
    width: 100% !important;
}


/* ==========================================================================
   TYPEFACE REGISTRATION (STANDARD FRIENDLY NAMES and FALLBACK UGLY ONES)
   ========================================================================== */

/* Equity A */
@font-face {
    font-family: 'Equity A';
    src: url('https://humaneditors.org/wp-content/plugins/human-editors/assets/fonts/equity_a_regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap; /* Tells the browser to display system text first, then swap */
}
@font-face {
    font-family: 'equity-a';
    src: url('https://humaneditors.org/wp-content/plugins/human-editors/assets/fonts/equity_a_regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap; /* Tells the browser to display system text first, then swap */
}
@font-face {
    font-family: 'Equity A';
    src: url('https://humaneditors.org/wp-content/plugins/human-editors/assets/fonts/equity_a_bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
    font-display: swap; /* Tells the browser to display system text first, then swap */
}
@font-face {
    font-family: 'equity-a';
    src: url('https://humaneditors.org/wp-content/plugins/human-editors/assets/fonts/equity_a_bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
    font-display: swap; /* Tells the browser to display system text first, then swap */
}
@font-face {
    font-family: 'Equity A';
    src: url('https://humaneditors.org/wp-content/plugins/human-editors/assets/fonts/equity_a_italic.woff2') format('woff2');
    font-weight: normal;
    font-style: italic;
    font-display: swap; /* Tells the browser to display system text first, then swap */
}
@font-face {
    font-family: 'equity-a';
    src: url('https://humaneditors.org/wp-content/plugins/human-editors/assets/fonts/equity_a_italic.woff2') format('woff2');
    font-weight: normal;
    font-style: italic;
    font-display: swap; /* Tells the browser to display system text first, then swap */
}
@font-face {
    font-family: 'Equity A';
    src: url('https://humaneditors.org/wp-content/plugins/human-editors/assets/fonts/equity_a_bold_italic.woff2') format('woff2');
    font-weight: bold;
    font-style: italic;
    font-display: swap; /* Tells the browser to display system text first, then swap */
}
@font-face {
    font-family: 'equity-a';
    src: url('https://humaneditors.org/wp-content/plugins/human-editors/assets/fonts/equity_a_bold_italic.woff2') format('woff2');
    font-weight: bold;
    font-style: italic;
    font-display: swap; /* Tells the browser to display system text first, then swap */
}

/* Concourse 4 */
@font-face {
    font-family: 'Concourse 4';
    src: url('https://humaneditors.org/wp-content/plugins/human-editors/assets/fonts/concourse_4_regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap; /* Tells the browser to display system text first, then swap */
}
@font-face {
    font-family: 'concourse-4';
    src: url('https://humaneditors.org/wp-content/plugins/human-editors/assets/fonts/concourse_4_regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap; /* Tells the browser to display system text first, then swap */
}
@font-face {
    font-family: 'Concourse 4';
    src: url('https://humaneditors.org/wp-content/plugins/human-editors/assets/fonts/concourse_4_bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
    font-display: swap; /* Tells the browser to display system text first, then swap */
}
@font-face {
    font-family: 'concourse-4';
    src: url('https://humaneditors.org/wp-content/plugins/human-editors/assets/fonts/concourse_4_bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
    font-display: swap; /* Tells the browser to display system text first, then swap */
}
@font-face {
    font-family: 'Concourse 4';
    src: url('https://humaneditors.org/wp-content/plugins/human-editors/assets/fonts/concourse_4_italic.woff2') format('woff2');
    font-weight: normal;
    font-style: italic;
    font-display: swap; /* Tells the browser to display system text first, then swap */
}
@font-face {
    font-family: 'concourse-4';
    src: url('https://humaneditors.org/wp-content/plugins/human-editors/assets/fonts/concourse_4_italic.woff2') format('woff2');
    font-weight: normal;
    font-style: italic;
    font-display: swap; /* Tells the browser to display system text first, then swap */
}
@font-face {
    font-family: 'Concourse 4';
    src: url('https://humaneditors.org/wp-content/plugins/human-editors/assets/fonts/concourse_4_bold_italic.woff2') format('woff2');
    font-weight: bold;
    font-style: italic;
    font-display: swap; /* Tells the browser to display system text first, then swap */
}
@font-face {
    font-family: 'concourse-4';
    src: url('https://humaneditors.org/wp-content/plugins/human-editors/assets/fonts/concourse_4_bold_italic.woff2') format('woff2');
    font-weight: bold;
    font-style: italic;
    font-display: swap; /* Tells the browser to display system text first, then swap */
}

/* ==========================================================================
   UNBREAKABLE FRONT-END TYPOGRAPHY ALIGNMENT
   ========================================================================== */

/* 1. Reset Formidable containers to use Concourse 4 by default */
.frm_forms, 
.frm_forms * {
    font-family: 'Concourse 4', sans-serif;
}

/* 2. Force Equity A onto your custom body copy paragraphs, lists, and formatted text elements */
body .bodytext,
body .bodytext p,
body .bodytext span,
body .bodytext li,
.bodytext,
.bodytext p,
.bodytext li,
.bodytext ul li,
.bodytext ol li,
.frm_forms .bodytext p,
.frm_forms .bodytext li,
.frm_forms textarea,
.frm_forms .frm_form_field textarea,
#tinymce-visual,
#tinymce-visual *,
/* Targeted bold elements */
.bodytext strong, .bodytext b,
.bodytext p strong, .bodytext p b,
/* Targeted italic elements */
.bodytext em, .bodytext i,
.bodytext p em, .bodytext p i,
/* Targeted nested combinations (Bold + Italic combined) */
.bodytext strong em, .bodytext em strong,
.bodytext b i, .bodytext i b,
.frm_forms .bodytext strong, .frm_forms .bodytext b,
.frm_forms .bodytext em, .frm_forms .bodytext i {
    font-family: 'Equity A', serif !important;
}

/* 3. Pull paragraph headings and Formidable description elements back to Concourse */
body .bodytext h1, body .bodytext h1 *,
body .bodytext h2, body .bodytext h2 *,
body .bodytext p.h1, body .bodytext p.h1 *,
body .bodytext p.h2, body .bodytext p.h2 *,
.bodytext p.h1, .bodytext p.h2,
p.h1, p.h2, h1, h2, h1 *, h2 *,
/* Target the precise native Formidable description structural classes and IDs */
.frm_forms .frm_description,
.frm_forms [id^="frm_desc_field_"],
div[id^="frm_desc_field_"],
.frm_opt_container ~ .frm_description {
    font-family: 'Concourse 4', 'concourse-4', sans-serif !important;
    font-weight: normal !important;
    display: block !important;
    margin-top: 4px !important; /* Establishes a clean, uniform gap spacing below the select field */
}

html,
body,
body.mce-content-body {
    font-size: 16px;
}

/* Force sans-serif for front-end text and menu furniture */
html body p,
html body span {
    font-family: 'Concourse 4', sans-serif !important;
    font-size: 1rem;
    line-height: 1.4;
    margin-top: 0;
    margin-bottom: 0.7em;
}

/* Maintain serif fonts exclusively inside backend editor window text */
body.mce-content-body p,
body.mce-content-body span {
    font-family: 'Equity A', serif !important;
    font-size: 1rem;
    line-height: 1.4;
    margin-top: 0;
    margin-bottom: 0.7em;
}

/* Keep menu lists sans-serif so screen buttons look sleek */
html body ul,
html body ol {
    font-family: 'Concourse 4', sans-serif !important;
    margin-top: 0;
    margin-bottom: 0.7em;
}

/* Force list entry bullet points to use your signature serif style */
body.mce-content-body ul,
body.mce-content-body ol,
html body div div div ul li,
html body div div div ol li,
body.mce-content-body li {
    font-family: 'Equity A', serif !important;
    font-size: 1rem;
    line-height: 1.4;
    margin-top: 0;
    padding-top: 0;
    margin-bottom: 0.6em;
    padding-bottom: 2px;
}

html .bodytext h1,
html body#tinymce.mce-content-body h1,
html body .frm_html_container h1,
html body .frm_blank_field.frm_rte_field h1 {
    font-family: 'Concourse 4', sans-serif;
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1.2;
    margin-top: 2em !important;
    margin-bottom: 0.7em !important;
    color: #330066;
}

html .bodytext h2,
html body#tinymce.mce-content-body h2,
html body .frm_html_container h2,
html body .frm_blank_field.frm_rte_field h2 {
    font-family: 'Concourse 4', sans-serif;
    font-size: 1.3rem;
    font-weight: bold;
    line-height: 1.2;
    margin-top: 1.5em !important;
    margin-bottom: 0.7em !important;
    color: #330066;
}

.page-heading {
    font-size: 1.7rem;
    font-weight: bold;
    text-align: center;
    color: #330066;
}

.standout {
    font-size: 1.3rem;
    font-weight: normal;
    text-align: center;
    color: #cc0000;
}

.bodytext,
.bodytext *,
.bodytext p,
.bodytext span,
.bodytext li,
.bodytext textarea {
    font-family: 'Equity A', serif !important;
    font-size: 1rem;
}

.service-list {
    background-color: rgb(237, 234, 239);
    padding: 1rem;
}

.disclaimer {
    line-height: 1.2rem;
}

.mce-menu-item-text,
.mce-listbox button span,
.mce-menu-item .mce-text {
    font-family: 'Concourse 4', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

.wp-admin .mce-listbox.mce-btn button span,
.wp-admin .mce-listbox.mce-btn button span.mce-text,
.wp-admin div.mce-menu .mce-menu-item span.mce-p,
.wp-admin div.mce-menu .mce-menu-item span.mce-h1,
.wp-admin div.mce-menu .mce-menu-item span.mce-h2,
.mce-menu-item span.mce-p,
.mce-menu-item span.mce-h1,
.mce-menu-item span.mce-h2,
div.mce-menu .mce-menu-item span.mce-p {
    font-size: 15px !important;
    font-weight: 400 !important;
    font-family: 'Concourse 4', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-style: normal !important;
    color: #1a1a1a !important;
    text-transform: none !important;
}


body.logged-in .logged-out-only {
    display: none !important;
}

body:not(.logged-in) .logged-in-only,
body:not(.logged-in) .subscriber-only,
body:not(.logged-in) .editor-only {
    display: none !important;
}

body.logged-in:not(.editor) .editor-only {
    display: none !important;
}

body.logged-in:not(.subscriber):not(.editor) .subscriber-only {
    display: none !important;
}

/* ==========================================================================
   2. FORM ELEMENT HEIGHTS & INJECTED IMAGE CHECKBOXES
   ========================================================================== */
.frm_forms input[readonly],
.frm_forms textarea[readonly],
.frm_forms select[disabled] {
    background-color: #e9ecef !important;
    color: #6c757d !important;
    cursor: not-allowed;
}

.scrollable-container {
    height: 100vh;
    overflow-y: auto;
    padding: 20px;
}

.profile p {
    margin-bottom: 0 !important;
}

.force-spacing p {
    margin-bottom: 1em !important;
}

p:first-child {
    margin-top: 0;
}

p:last-child {
    margin-bottom: 0;
}

.listing {
    line-height: 120%;
    display: flex;
}

.custom_highlight {
    background-color: lightyellow;
}

.detail {
    line-height: 120%;
}

.text {
    line-height: 100%;
}

.profile-image-container {
    width: 100%;
    max-width: 200px;
}

.profile-image-container img {
    width: 100%;
    height: auto;
    display: block;
}

html body .with_frm_style input[type="text"],
html body .with_frm_style input[type="email"],
html body .with_frm_style input[type="number"],
html body .with_frm_style input[type="tel"],
html body .with_frm_style input[type="password"],
.with_frm_style input[type="url"],
.with_frm_style input.frm_url_field,
.with_frm_style .frm_form_field input[type="url"] {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    line-height: 1.2 !important;
    box-sizing: border-box !important;
}

html body select,
html body select option,
html body .frm_forms select,
html body .frm_forms select option,
html body .frm_forms .ss-main,
html body .frm_forms .ss-main *,
html body .ss-content,
html body .ss-content * {
    font-size: 15px !important;
}

html body .explainer,
html body .explainer p,
html body .explainer em,
html body .explainer strong {
    font-size: 17px !important;
    background-color: #f4f1f1;
}

html body .explainer {
    padding: 15px;
}

.wp-site-blocks,
main,
#page {
    display: block !important;
    min-height: 0 !important;
    height: auto !important;
}

.wp-block-post-content,
.entry-content {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    height: auto !important;
    min-height: 0 !important;
}

footer,
.wp-block-template-part {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

a {
    color: inherit !important;
    text-decoration: underline;
}

a:hover {
    color: #333333;
}

hr,
.wp-block-separator {
    margin-top: 15px !important;
    margin-bottom: 15px !important;
}

.entry-header,
.page-header,
.entry-title,
.page-title,
header.entry-header {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 1. Target the Autocomplete container box text */
.frm_forms .ss-main,
.frm_forms .ss-single-selected,
.frm_forms .ss-value-text {
    font-family: 'Concourse 4', sans-serif !important;
}

/* 2. Target the open, expanded dropdown option lists list items */
.ss-content,
.ss-content .ss-list,
.ss-content .ss-option,
.ss-search input {
    font-family: 'Concourse 4', sans-serif !important;
}


/* ==========================================================================
   3. IPAD PIPELINE ENGINE CORRECTION: FONTS & RESPONSIVE LOGIC
   ========================================================================== */

/* 3. Forces iOS Safari to drop font overrides and apply Concourse 4 instantly */
.frm_forms,
.frm_forms label,
.frm_forms input,
.frm_forms select,
.frm_forms textarea,
.frm_forms button,
.frm_forms .frm_html_field,
.frm_forms .frm_html_field * {
    font-family: 'Concourse 4', sans-serif !important;
}

/* 4. Instant structural hiding for mobile and tablet unconditional menus */
@media only screen and (max-width: 1024px) {

    .frm_forms .frm_invisible,
    .frm_forms .frm_logic_hide,
    .frm_forms .frm_hidden_placeholder {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
    }
}

/* ==========================================================================
   3. RESPONSIVE ALIGNMENT & DEEP GENERATEPRESS HAMBURGER OVERRIDES
   ========================================================================== */
.with_frm_style,
.frm_form_fields_container,
form.frm_form_fields_style,
#frm_form_fields_container,
.with_frm_style .frm_form_fields {
    margin-left: auto !important;
    margin-right: auto !important;
    float: none !important;
    clear: both !important;
    position: relative !important;
}

/* DESKTOP RULES (Screens 1024px and wider) */
@media (min-width: 1024px) {

    header,
    .menu-container {
        position: relative !important;
        max-width: 1024px !important;
        margin: 0 auto !important;
    }

    body {
        max-width: 100% !important;
        width: 100% !important;
    }

    #page,
    .site-content {
        max-width: 1024px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .separate-containers .inside-article,
    .one-container .inside-article,
    #main article.page {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .entry-content .frm_forms {
        padding-left: 20px !important;
        padding-right: 20px !important;
        box-sizing: border-box !important;
    }

    .site-content,
    #content,
    #primary,
    .content-area,
    main#main,
    .separate-containers .inside-article,
    #main article,
    .entry-content {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    header.site-header,
    .site-header .inside-header {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    .frm_forms {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .with_frm_style .frm_form_fields {
        width: 100% !important;
        max-width: 100% !important;
    }

    .with_frm_style .frm_section_heading.frm_form_field .frm_grid_container,
    .with_frm_style .frm_section_heading.frm_form_field .frm_grid_row {
        width: 100% !important;
        max-width: 100% !important;
    }

    .with_frm_style .frm_section_heading.frm_form_field .frm_fields_container {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        width: 100% !important;
    }

    .with_frm_style .frm_section_heading.frm_form_field .frm11,
    .with_frm_style .frm_form_field.frm11 {
        width: calc(100% - 40px) !important;
        max-width: calc(100% - 40px) !important;
        flex-basis: calc(100% - 40px) !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .with_frm_style .frm_section_heading.frm_form_field .frm1 {
        width: 40px !important;
        max-width: 40px !important;
        flex-basis: 40px !important;
        flex-shrink: 0 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .main-navigation .menu-toggle,
    .main-navigation button.menu-toggle {
        display: block !important;
        width: auto !important;
        background: transparent !important;
    }

    .main-navigation ul.nav-menu,
    .main-navigation .main-nav>ul {
        display: none !important;
    }

    .main-navigation.toggled ul.nav-menu,
    .main-navigation.toggled .main-nav>ul {
        display: block !important;
        position: absolute !important;
        top: 100% !important;
        right: 0 !important;
        background-color: #ffffff !important;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
        z-index: 99999 !important;
        min-width: 200px !important;
        padding: 10px 0 !important;
    }

    .menu-toggle .mobile-menu {
        display: none !important;
    }

    .main-navigation {
        position: fixed !important;
        top: 25px !important;
        right: calc((100vw - 1024px) / 2) !important;
        z-index: 99999 !important;
        background: transparent !important;
    }

    .mobile {
        display: none;
    }

    .desktop {
        display: block;
    }
}

/* UNIFIED TABLET PORTRAIT & MOBILE LANDSCAPE REGIME (601px to 1023px wide) */
@media screen and (min-width: 601px) and (max-width: 1023px) {

    .with_frm_style,
    .frm_form_fields_container,
    .with_frm_style .frm_form_fields,
    div[class*="frm_form_fields_style"] {
        max-width: 600px !important;
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        float: none !important;
        clear: both !important;
    }

    .with_frm_style .frm_section_heading.frm_form_field .frm_grid_container,
    .with_frm_style .frm_section_heading.frm_form_field .frm_grid_row {
        width: 100% !important;
        max-width: 100% !important;
    }

    .with_frm_style .frm_section_heading.frm_form_field .frm_fields_container {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        width: 100% !important;
    }

    .with_frm_style .frm_section_heading.frm_form_field .frm11,
    .with_frm_style .frm_form_field.frm11 {
        width: calc(100% - 40px) !important;
        max-width: calc(100% - 40px) !important;
        flex-basis: calc(100% - 40px) !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .with_frm_style .frm_section_heading.frm_form_field .frm1 {
        width: 40px !important;
        max-width: 40px !important;
        flex-basis: 40px !important;
        flex-shrink: 0 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .mobile {
        display: none;
    }

    .desktop {
        display: block;
    }
}

/* MOBILE PORTRAIT CONFIGURATION (600px and below) */
@media screen and (max-width: 600px) {
    .with_frm_style .frm_section_heading.frm_form_field .frm1 {
        display: none !important;
    }

    .with_frm_style .frm_section_heading.frm_form_field .frm11,
    .with_frm_style .frm_form_field.frm11 {
        width: 100% !important;
        max-width: 100% !important;
        flex-basis: 100% !important;
        display: block !important;
        margin: auto !important;
        float: none !important;
    }

    .mobile {
        display: block;
    }

    .desktop {
        display: none;
    }
}

/* ==========================================================================
   FIXED GENERATEPRESS MOBILE MENU BOUNDS & SCROLL COMPRESSION
   ========================================================================== */
@media screen and (max-width: 1024px) {

    /* 1. Base hidden state for structural menu list content when NOT clicked */
    .main-navigation:not(.toggled) .main-nav ul li,
    .main-navigation:not(.toggled) #primary-menu > li {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
    }

    /* 2. Anchor the inline-bounds container box tightly to the top-right view boundary */
    #site-navigation.main-navigation.grid-container,
    #site-navigation.main-navigation {
        position: fixed !important;
        top: 15px !important;
        right: 15px !important;
        left: auto !important;
        width: auto !important; 
        max-width: calc(100vw - 30px) !important;
        background: transparent !important;
        box-shadow: none !important;
        box-sizing: border-box !important;
        z-index: 99999 !important;
        
        /* Forces the container box to break out of the :root hardware layers */
        transform: none !important;
        -webkit-transform: none !important;
        will-change: auto !important;
    }

    #site-navigation .menu-toggle {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 44px !important;
        min-width: 44px !important;
    }

    #site-navigation .menu-toggle .menu-toggle-text,
    #site-navigation .menu-toggle span:not(.gp-icon),
    #site-navigation .menu-toggle-text,
    .menu-toggle .mobile-menu {
        display: none !important;
        visibility: hidden !important;
        font-size: 0 !important;
        text-indent: -9999px !important;
    }

    #site-navigation .menu-toggle .gp-icon {
        display: inline-block !important;
        visibility: visible !important;
        font-size: 24px !important;
    }

    #site-navigation .main-nav {
        width: 100% !important;
    }

    #site-navigation:not(.toggled) .main-nav {
        display: none !important;
    }

    /* 3. Style the open dropdown menu list container tray */
    #site-navigation.toggled .main-nav,
    #site-navigation.toggled .main-nav > ul,
    #site-navigation.toggled ul.nav-menu,
    .main-navigation.toggled .main-nav,
    .main-navigation.toggled ul.nav-menu {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: absolute !important;
        top: 100% !important;        /* Aligns the drop tray directly underneath your navigation menu button bar */
        right: 0 !important;
        width: 220px !important;       /* Tightens menu frame wrapper widths */
        max-width: calc(100vw - 30px) !important;
        
        /* SCROLL ENGINE ENFORCEMENT */
        max-height: 75vh !important;       
        overflow-y: auto !important;       
        -webkit-overflow-scrolling: touch !important; 
        
        background: #ffffff !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
        z-index: 99999 !important;
        padding: 5px 0 !important;     /* Reduces inner spacing top and bottom edges */
        box-sizing: border-box !important;
        transform: none !important;
        -webkit-transform: none !important;
        will-change: auto !important;
    }

    /* 4. TOTAL RECOVERY ENGINE: Unmasks your theme link wrappers while respecting active user role configurations */
    #site-navigation.toggled .main-nav ul li,
    #site-navigation.toggled #primary-menu li,
    .main-navigation.toggled .main-nav ul li,
    .main-navigation.toggled ul.nav-menu li,
    #site-navigation.toggled .desktop,
    .main-navigation.toggled .desktop,
    #site-navigation.toggled .main-nav {
        display: block !important; 
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        width: 100% !important;
        float: none !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
        -webkit-transform: none !important;
        will-change: auto !important;
    }

    /* SPECIFICITY SHIELD: Explicitly forces conditional link exclusions to hide when the menu tray is expanded */
    body.logged-in #site-navigation.toggled .main-nav ul li.logged-out-only,
    body:not(.logged-in) #site-navigation.toggled .main-nav ul li.logged-in-only,
    body:not(.logged-in) #site-navigation.toggled .main-nav ul li.subscriber-only,
    body:not(.logged-in) #site-navigation.toggled .main-nav ul li.editor-only,
    body.logged-in .main-navigation.toggled .main-nav ul li.logged-out-only,
    body:not(.logged-in) .main-navigation.toggled .main-nav ul li.logged-in-only,
    body:not(.logged-in) #site-navigation.toggled #primary-menu li.logged-in-only,
    body:not(.logged-in) #site-navigation.toggled #primary-menu li.subscriber-only,
    body:not(.logged-in) #site-navigation.toggled #primary-menu li.editor-only {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        max-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
    }

    /* 5. Individual menu link layout sizing parameters */
    #site-navigation.toggled .main-nav ul li a,
    #site-navigation.toggled #primary-menu li a,
    .main-navigation.toggled .main-nav ul li a,
    .main-navigation.toggled ul.nav-menu li a {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        padding: 10px 16px !important; /* Cleans text vertical margins */
        text-align: left !important;
        font-size: 15px !important;
        color: #333333 !important;
        border-bottom: none !important; /* REMOVES THE FAINT RULE SEPARATOR LINES BETWEEN LINK ITEMS */
        background-color: #ffffff !important; 
        text-decoration: none !important;
        box-sizing: border-box !important;
    }
}

/* SAFE RESPONSIVE COMPRESSION SHIELD: ONLY HIDE CONDITIONAL ROWS BELOW 1024PX */
@media screen and (max-width: 1024px) {
    /* Only collapse the exact row section wrapper IDs that should hide when untriggered */
    div[id^="frm_field_3850_container"], /* Direct match for Non-fiction category container row */
    div[id^="frm_field_3851_container"]  /* Direct match for Publication type container row */ {
        display: none !important;
        visibility: hidden !important;
        position: absolute !important; /* Pulls elements completely out of screen layout flow */
        width: 0 !important;
        height: 0 !important;
        max-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

/* ==========================================================================
   ISOLATED CUSTOM QUERY CHECKBOX ENGINE (RESTORED PERFECT BALANCE)
   ========================================================================== */

/* 1. Hide the native browser box entirely so only your custom images show */
.query-checkbox input[type="checkbox"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
}

/* 2. Format containers to align neatly next to text elements */
.with_frm_style .query-checkbox .frm_checkbox,
.with_frm_style .query-checkbox .frm_opt_container,
.query-checkbox .frm_checkbox,
.query-checkbox .frm_opt_container,
.query-checkbox .frm_checkbox label {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
    min-height: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

/* 3. Strip mobile layout transformations that freeze rendering updates */
.with_frm_style .query-checkbox input[type="checkbox"],
.with_frm_style .query-checkbox .frm_checkbox label::before {
    transform: none !important;
    -webkit-transform: none !important;
    will-change: auto !important;
}

/* 4. BASE UNCHECKED STATE: Map out the default graphic background and shape */
.with_frm_style .query-checkbox .frm_checkbox label::before {
    content: "" !important;
    display: inline-block !important;
    vertical-align: middle !important;
    width: 20px !important;
    height: 20px !important;
    cursor: pointer !important;
    background-image: url('help_unchecked.png') !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: contain !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    
    /* THE HORIZONTAL AXIS OVERRIDE: Preserves your perfect horizontal location */
    margin-right: 35px !important; 
    
    /* THE UNBREAKABLE VERTICAL CORRECTION ENGINE */
    transform: translateY(10px) !important; /* Pushes Checkboxes 1, 2, and 3 down by 10px onto their perfect center lines */
    -webkit-transform: translateY(10px) !important;
}

/* 5. CORRECTED ACTIVE CHECKED STATE */
.with_frm_style .query-checkbox .frm_checkbox label:has(input[type="checkbox"]:checked)::before {
    background-image: url('help_checked.png') !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: contain !important;
    background-color: transparent !important;
}

/* 6. Clean up Formidable's native injected element layer overrides */
.with_frm_style .query-checkbox .frm_custom_check {
    display: none !important;
}

/* ==========================================================================
   CHECKBOX 4 SPECIFIC VERTICAL BALANCER (SIBLING COMPONENT OFFSET)
   ========================================================================== */

/* Overrides the baseline transform specifically for the 4th row to drop it down a full 35px total */
.frm_forms input[type="text"] ~ .query-checkbox .frm_checkbox label::before,
.frm_forms input ~ .query-checkbox .frm_checkbox label::before,
.frm_form_field input ~ .frm_checkbox label::before,
input ~ .frm_checkbox label::before {
    transform: translateY(35px) !important; /* Increased from 30px to 35px to drop Checkbox 4 exactly 5px lower */
    -webkit-transform: translateY(35px) !important;
}

/* ==========================================================================
   SURGICAL NAVIGATION LAYOUT FORCE DEBUGGER
   ========================================================================== */
@media screen and (max-width: 1024px) {
    /* 1. Force the container list layout out of any hidden states */
    .main-navigation.toggled .main-nav > ul,
    #site-navigation.toggled #primary-menu {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        max-height: 500px !important;
    }

    /* 2. Strip every layout parameter from child lists when open */
    .main-navigation.toggled ul li,
    .main-navigation.toggled ul li a {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        color: #333333 !important;
    }
}

/* Clean iPad Fix: Snaps layouts flush without breaking long pages */
@media (max-width: 1024px) {
    /* 1. Prevent the main content area from collapsing or dropping down */
    .site-content {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    /* 2. Target the specific GeneratePress wrapper layout structure */
    .separate-containers .site-main {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    /* 3. Strip the theme's built-in top spacing block on tablet screen contents */
    .separate-containers .inside-article {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    /* 4. Ensure Formidable Forms wrapper is pulled tight up to the top line */
    .entry-content > .frm_forms {
        margin-top: 0 !important;
    }
}

/* Strip hidden WordPress paragraph buffers from Formidable shortcodes */
@media (max-width: 1024px) {
    /* 1. Hide empty auto-generated paragraphs at the top of the form content */
    .frm_forms > p:first-child:empty,
    .frm_forms > br:first-child,
    .entry-content > p:first-child:empty {
        display: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* 2. Pull the custom HTML container up to override text-node layout offsets */
    .frm_custom_html, 
    .frm_form_fields {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}

/* Collapse standard page container margins under the header on tablet layouts */
@media (max-width: 1024px) {
    /* Target the primary page block and force it flush against the navigation */
    .page .site-content {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
    
    /* Zero out the separate container layout gap for non-homepage templates */
    .page.separate-containers .site-main {
        margin-top: 0 !important;
    }

    /* Force the inner article element box tight against the header menu line */
    .page .inside-article {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}

/* Collapse core Gutenberg block spacing underneath headers on subpages */
@media (max-width: 1024px) {
    /* 1. Strip the default top margin from standard editor blocks on internal pages */
    .page .entry-content > *,
    .page .wp-block-group,
    .page .wp-block-shortcode {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    /* 2. Remove the built-in top padding from the main page wrapper container */
    .page #content {
        padding-top: 0 !important;
    }
}

/* Zero out the 40px container top padding on shortcode page layouts */
.page .site-content .content-area .inside-article {
    padding-top: 0px !important;
}

/* Hard collapse the main layout wrapper boundary for standard pages */
.page .site-main {
    padding-top: 0px !important;
    margin-top: 0px !important;
}

/* Hard collapse the GeneratePress separate-container layout spacing */
@media (max-width: 1024px) {
    /* 1. Kill the 40px separator margin pushing the main content block down */
    .separate-containers .site-main,
    .page.separate-containers #main {
        margin-top: 0px !important;
        padding-top: 0px !important;
    }

    /* 2. Flatten the header wrapper bottom border push */
    .site-header,
    #mobile-header {
        margin-bottom: 0px !important;
        padding-bottom: 0px !important;
    }

    /* 3. Strip any residual structural padding from the page container */
    .separate-containers .site-content {
        padding-top: 0px !important;
    }
}

/* Definitively strip layout gaps from shortcode block wrappers on tablets */
@media (max-width: 1024px) {
    /* 1. Reset browser flex/grid gaps on the parent content wrappers */
    .page .site-main,
    .page .entry-content,
    .page .inside-article {
        gap: 0px !important;
        row-gap: 0px !important;
    }

    /* 2. Target the generic block containers injected by the editor */
    .page .entry-content > .wp-block-group,
    .page .entry-content > .wp-block-columns,
    .page .entry-content > div:first-child {
        margin-top: 0px !important;
        padding-top: 0px !important;
    }
}

/* Hard pull shortcode custom HTML blocks past the browser navigation bug */
@media (max-width: 1024px) {
    /* Target standard subpages rendering a Formidable shortcode directly */
    .page:not(.home) #content.site-content {
        margin-top: -40px !important;
        position: relative !important;
        z-index: 1 !important;
    }

    /* Keep the header navigation block safely pinned above the pulled content */
    .site-header,
    #mobile-header {
        position: relative !important;
        z-index: 10 !important;
    }
}

/* don't show the 'Protected by reCaptcha' popup */
.frm_form_field .grecaptcha-badge { 
    visibility: hidden !important; 
}

/* FOOTER */

/* Restored Footer Base Group */
footer, 
.site-footer, 
#colophon, 
.footer-wrap,
div[class*="footer-"] {
  background-color: #330066 !important;
  background: #330066 !important;
  color: #ffffff !important;
  padding: 20px 20px !important; /* Restored to original spacing */
  display: block !important;
  width: 100% !important;
  clear: both !important;
  box-sizing: border-box !important;
}

/* Restored Content Alignment Row */
.footer-container {
  max-width: 1100px !important;
  margin: 0 auto !important;
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: flex-end !important; /* Anchors items cleanly along the baseline row */
  flex-wrap: wrap !important;
  gap: 15px 30px !important;
  text-align: left !important;
}

/* Left Column: Identity block formatting */
.footer-identity {
  flex: 1 1 450px !important;
  min-width: 280px !important;
}

.footer-identity p, 
.footer-identity span, 
.footer-identity div {
  color: #f5f5f5 !important;
  font-family: "Concourse 4", "Concourse", sans-serif !important;
  font-size: 14px !important;
  line-height: 1.4 !important; /* Restored line spacing */
  margin: 0 0 6px 0 !important; /* Restored margin padding */
}

.footer-identity p:last-child {
  margin-bottom: 0 !important;
}

.company-name {
  font-size: 16px !important; /* Restored font size */
  color: #ffffff !important;
  font-weight: 600 !important;
  margin-bottom: 8px !important;
}

/* Right Column: Links & Copyright text positioning */
.footer-navigation {
  flex: 1 1 400px !important;
  min-width: 280px !important;
  text-align: right !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
}

.footer-links {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 0 10px 0 !important; /* Restored gap above copyright text */
  display: flex !important;
  justify-content: flex-end !important;
  gap: 20px !important;
  flex-wrap: wrap !important;
}

/* Accessible Hyperlink Styling */
.footer-links li a,
.site-footer a {
  color: #ffd700 !important; /* High contrast gold/amber */
  text-decoration: none !important;
  font-family: "Concourse 4", "Concourse", sans-serif !important;
  font-weight: 500 !important;
}

.footer-links li a:hover,
.site-footer a:hover {
  color: #ffffff !important;
  text-decoration: underline !important;
}

.copyright-notice {
  font-size: 12px !important;
  color: #bfaecf !important;
  font-family: "Concourse 4", "Concourse", sans-serif !important;
  margin: 0 !important;
}

/* Mobile Stacking System adjustments */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 20px !important;
  }
  .footer-navigation {
    text-align: left !important;
    width: 100% !important;
  }
  .footer-links {
    justify-content: flex-start !important;
    gap: 10px 20px !important;
  }
}

/* Force .page-heading elements to display on small smart devices */
@media screen and (max-width: 768px) {
  .page-heading,
  h1.page-heading,
  h2.page-heading {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #330066 !important; /* Forces your brand purple (or swap to #ffffff if it sits on a dark banner) */
    font-size: 24px !important; /* Keeps the text scale optimized for phone displays */
    line-height: 1.3 !important;
    height: auto !important;
    width: 100% !important;
  }
}

/* Unhide the page-heading specifically across all iPad & Tablet layouts */
@media screen and (min-width: 600px) and (max-width: 1024px) {
  .page-heading,
  h1.page-heading,
  header .page-heading,
  div[class*="heading"] .page-heading {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #330066 !important; /* Forces your brand purple - change to #ffffff if your banner is dark */
    font-size: 28px !important; /* Optimised title sizing for tablet screens */
    line-height: 1.3 !important;
    text-align: center !important; /* Polished layout focus for tablet headers */
    margin: 20px auto !important;
    position: relative !important;
    z-index: 999 !important; /* Prevents background layers from sliding on top of it */
  }
}

/* avoid page heading being clipped by header image on tablets */
@media screen and (min-width: 600px) and (max-width: 1024px) {
  .page-heading {
    margin-top: 25px !important; /* Pushes text down safely clear of the overlapping header image */
    padding-top: 10px !important;
    clear: both !important;       /* Forces the layout container to reset below upper content */
  }
}

/* Tablet Layout: Force zero vertical margin on the home search page only */
@media screen and (min-width: 600px) and (max-width: 1024px) {
  .home .page-heading,
  body.home .page-heading,
  .home #main .page-heading {
    margin-top: 0 !important;   /* Wipes out the remaining gap entirely */
    padding-top: 0 !important;
  }
}

/* Force .page-heading visibility on all mobile phones except the home page if required */
@media screen and (max-width: 599px) {
  /* Targets inner utility structures directly */
  .page-heading,
  h1.page-heading,
  .entry-content .page-heading,
  #main .page-heading {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    
    /* Ensure high contrast positioning */
    color: #330066 !important; /* Your brand purple - change to #ffffff if your layout header box is dark */
    font-size: 22px !important; /* Crisp, optimized phone header scaling */
    line-height: 1.3 !important;
    text-align: center !important;
    
    /* Vertical positioning safety margin clear of mobile menus */
    margin-top: 30px !important;
    margin-bottom: 15px !important;
    clear: both !important;
  }
}

/* Mobile Phones: Eliminate excessive space above page heading on the homepage only */
@media screen and (max-width: 599px) {
  /* Targets the page-heading specifically inside the .home wrapper */
  .home .page-heading,
  body.home .page-heading,
  .home #main .page-heading {
    margin-top: 5px !important; /* Forces the header up to fit tight mobile screens */
    padding-top: 0 !important;
  }
}

/* DROPDOWNS */
/* Force Formidable Autocomplete Panel wrapper to dynamically expand */
.ss-content, 
.frm_style_formidable-style .ss-main .ss-content {
    max-height: 300px !important;
    height: auto !important;
}
/* Ensure the option scrolling list container expands cleanly */
.ss-list, .frm_chzn .chzn-drop {
    max-height: 280px !important;
    height: auto !important;
}

/* SECTIONS - reduce space when label hidden */
/* 1. EDIT THIS VALUE TO ALTER THE SPACE BETWEEN FIELDS */
.with_frm_style .frm_fields_container {
    row-gap: 15px !important; /* Decrease to 5px or 0px to make fields tighter; increase to 20px+ to add space */
}

/* 2. Remove the heavy outer spacing on your targeted sections */
.tight-hidden-label.frm_form_field,
div.frm_form_field.tight-hidden-label {
    margin-bottom: 0px !important;
    padding-bottom: 0px !important;
}

/* 3. KEEP LABELS VISIBLE: Reduce padding around labels to save vertical room */
.tight-hidden-label label.frm_primary_label {
    display: block !important;
    visibility: visible !important;
    font-size: inherit !important;   /* Keeps text regular size */
    color: inherit !important;       /* Keeps text regular color */
    height: auto !important;         /* Keeps text box container normal */
    margin-top: 0px !important;
    margin-bottom: 4px !important;   /* Gap between the label and its input box */
    padding: 0px !important;
}

/* CONTROL LABELS */
/* Change all control label text colors sitewide to bold in our blue */
.with_frm_style label.frm_primary_label,
.with_frm_style .frm_primary_label {
    color: #330066 !important;
    font-weight: bold !important;
}

/* 1. Force the menu toggle into a perfect square box */
.main-navigation button.menu-toggle,
#site-navigation button.menu-toggle,
.mobile-menu-control-wrapper .menu-toggle {
    background-color: #ffffff !important; 
    color: #000000 !important;            
    
    /* Set equal dimensions to create a square */
    width: 44px !important;
    height: 44px !important;
    
    /* Reset theme paddings and center the icon perfectly inside */
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    border-radius: 4px !important;        
    box-shadow: 0px 2px 8px rgba(0,0,0,0.1) !important; 
    
    position: relative !important;
    z-index: 999999 !important;
}

/* 2. Keep the inner icon lines black */
.menu-toggle .gp-icon svg,
button.menu-toggle .gp-icon {
    fill: #000000 !important;
    color: #000000 !important;
    margin: 0 !important; /* Removes any default theme side-margins */
}

