/*
 * SJH Typography Normalizer — temporary enforcement layer.
 * This stylesheet is loaded only while Temporary Enforcement Mode is active.
 * Elementor widgets are tagged server-side with semantic role classes so this
 * layer stays deliberately scoped and does not become a general theme reset.
 */

body.sjh-typography-enforced {
    --sjh-font-family: Arial, Helvetica, sans-serif;
}

/* Arial across the Elementor text controls managed by this plugin. */
body.sjh-typography-enforced .sjh-typo-managed,
body.sjh-typography-enforced .sjh-typo-managed input,
body.sjh-typography-enforced .sjh-typo-managed textarea,
body.sjh-typography-enforced .sjh-typo-managed select,
body.sjh-typography-enforced .sjh-typo-managed button,
body.sjh-typography-enforced .sjh-typo-managed a {
    font-family: var(--sjh-font-family) !important;
}

/* Heading widget roles. */
body.sjh-typography-enforced .sjh-typo-role-institutional-h1 .elementor-heading-title {
    font-size: 60px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
}
body.sjh-typography-enforced .sjh-typo-role-utility-h1 .elementor-heading-title {
    font-size: 48px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
}
body.sjh-typography-enforced .sjh-typo-role-h2 .elementor-heading-title {
    font-size: 32px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}
body.sjh-typography-enforced .sjh-typo-role-h3 .elementor-heading-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
}
body.sjh-typography-enforced .sjh-typo-role-card-heading .elementor-heading-title {
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
}
body.sjh-typography-enforced .sjh-typo-role-eyebrow .elementor-heading-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    letter-spacing: 1.6px !important;
    text-transform: uppercase !important;
}
body.sjh-typography-enforced .sjh-typo-role-metadata .elementor-heading-title {
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
}
body.sjh-typography-enforced .sjh-typo-role-control .elementor-heading-title {
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
}
/* preserve-display intentionally receives Arial only; Home/History sizing stays intact. */

/* ElementsKit Heading: title role + fixed subtitle/body roles used by the migration. */
body.sjh-typography-enforced .sjh-typo-title-role-institutional-h1 :is(.elementskit-section-title,.ekit-heading--title,h1) {
    font-size: 60px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
}
body.sjh-typography-enforced .sjh-typo-title-role-utility-h1 :is(.elementskit-section-title,.ekit-heading--title,h1) {
    font-size: 48px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
}
body.sjh-typography-enforced .sjh-typo-title-role-h2 :is(.elementskit-section-title,.ekit-heading--title,h2) {
    font-size: 32px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}
body.sjh-typography-enforced .sjh-typo-title-role-h3 :is(.elementskit-section-title,.ekit-heading--title,h3) {
    font-size: 24px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
}
body.sjh-typography-enforced .sjh-typo-title-role-card-heading :is(.elementskit-section-title,.ekit-heading--title,h1,h2,h3,h4) {
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
}
body.sjh-typography-enforced .sjh-typo-widget-elementskit-heading :is(.elementskit-section-subtitle,.ekit-heading__subtitle) {
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    letter-spacing: 1.6px !important;
    text-transform: uppercase !important;
}
body.sjh-typography-enforced .sjh-typo-widget-elementskit-heading :is(.elementskit-section-title-wrap > p,.ekit-heading__description,.elementskit-section-title-wrap .elementskit-section-title + p) {
    font-size: var(--sjh-extra-desktop) !important;
    font-weight: 400 !important;
    line-height: var(--sjh-extra-line-height) !important;
}

/* Standard body-copy widgets. This is intentionally scoped to supported widget types. */
body.sjh-typography-enforced .sjh-typo-widget-body .elementor-widget-container {
    font-size: var(--sjh-body-desktop) !important;
    font-weight: 400 !important;
    line-height: var(--sjh-body-line-height) !important;
}

/* Icon/image boxes: title = card heading, description = normal body. */
body.sjh-typography-enforced .sjh-typo-widget-card-copy :is(.elementor-icon-box-title,.elementor-image-box-title) {
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
}
body.sjh-typography-enforced .sjh-typo-widget-card-copy :is(.elementor-icon-box-description,.elementor-image-box-description) {
    font-size: var(--sjh-description-desktop) !important;
    font-weight: 400 !important;
    line-height: var(--sjh-description-line-height) !important;
}

/* Forms. */
body.sjh-typography-enforced .sjh-typo-widget-form :is(input:not([type="submit"]),textarea,select) {
    font-size: var(--sjh-field-desktop) !important;
    font-weight: 400 !important;
    line-height: var(--sjh-field-line-height) !important;
}
body.sjh-typography-enforced .sjh-typo-widget-form :is(label,.elementor-field-label) {
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
}
body.sjh-typography-enforced .sjh-typo-widget-form :is(button,.elementor-button,input[type="submit"]) {
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
}

/* Accordion content. */
body.sjh-typography-enforced .sjh-typo-widget-accordion :is(.elementskit-card-header,.ekit-accordion--toggler,.elementor-accordion-title,.e-n-accordion-item-title) {
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
}
body.sjh-typography-enforced .sjh-typo-widget-accordion :is(.elementskit-card-body,.ekit-accordion--content,.elementor-tab-content,.e-n-accordion-item-content) {
    font-size: var(--sjh-accordion-desktop) !important;
    font-weight: 400 !important;
    line-height: var(--sjh-accordion-line-height) !important;
}

/* Navigation and controls. */
body.sjh-typography-enforced .sjh-typo-widget-nav :is(a,.elementor-item,.elementor-sub-item) {
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
}
body.sjh-typography-enforced .sjh-typo-widget-control :is(a,button,.elementor-button) {
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
}

/* Breadcrumbs, dates and other secondary metadata. */
body.sjh-typography-enforced .sjh-typo-widget-metadata,
body.sjh-typography-enforced .sjh-typo-widget-metadata :is(a,span,time,li,p) {
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
}

/* Icon lists are treated as readable body copy during review. */
body.sjh-typography-enforced .sjh-typo-widget-icon-list :is(.elementor-icon-list-text,a) {
    font-size: var(--sjh-iconlist-desktop) !important;
    font-weight: 400 !important;
    line-height: var(--sjh-iconlist-line-height) !important;
}

@media (max-width: 1024px) {
    body.sjh-typography-enforced .sjh-typo-role-institutional-h1 .elementor-heading-title,
    body.sjh-typography-enforced .sjh-typo-title-role-institutional-h1 :is(.elementskit-section-title,.ekit-heading--title,h1) {
        font-size: 48px !important;
    }
    body.sjh-typography-enforced .sjh-typo-role-utility-h1 .elementor-heading-title,
    body.sjh-typography-enforced .sjh-typo-title-role-utility-h1 :is(.elementskit-section-title,.ekit-heading--title,h1) {
        font-size: 40px !important;
    }
    body.sjh-typography-enforced .sjh-typo-role-h2 .elementor-heading-title,
    body.sjh-typography-enforced .sjh-typo-title-role-h2 :is(.elementskit-section-title,.ekit-heading--title,h2) {
        font-size: 28px !important;
    }
    body.sjh-typography-enforced .sjh-typo-role-h3 .elementor-heading-title,
    body.sjh-typography-enforced .sjh-typo-title-role-h3 :is(.elementskit-section-title,.ekit-heading--title,h3) {
        font-size: 22px !important;
    }
    body.sjh-typography-enforced .sjh-typo-widget-body .elementor-widget-container { font-size: var(--sjh-body-tablet) !important; }
    body.sjh-typography-enforced .sjh-typo-widget-elementskit-heading :is(.elementskit-section-title-wrap > p,.ekit-heading__description,.elementskit-section-title-wrap .elementskit-section-title + p) { font-size: var(--sjh-extra-tablet) !important; }
    body.sjh-typography-enforced .sjh-typo-widget-card-copy :is(.elementor-icon-box-description,.elementor-image-box-description) { font-size: var(--sjh-description-tablet) !important; }
    body.sjh-typography-enforced .sjh-typo-widget-form :is(input:not([type="submit"]),textarea,select) { font-size: var(--sjh-field-tablet) !important; }
    body.sjh-typography-enforced .sjh-typo-widget-accordion :is(.elementskit-card-body,.ekit-accordion--content,.elementor-tab-content,.e-n-accordion-item-content) { font-size: var(--sjh-accordion-tablet) !important; }
    body.sjh-typography-enforced .sjh-typo-widget-icon-list :is(.elementor-icon-list-text,a) { font-size: var(--sjh-iconlist-tablet) !important; }
}

@media (max-width: 767px) {
    body.sjh-typography-enforced .sjh-typo-role-institutional-h1 .elementor-heading-title,
    body.sjh-typography-enforced .sjh-typo-title-role-institutional-h1 :is(.elementskit-section-title,.ekit-heading--title,h1) {
        font-size: 36px !important;
    }
    body.sjh-typography-enforced .sjh-typo-role-utility-h1 .elementor-heading-title,
    body.sjh-typography-enforced .sjh-typo-title-role-utility-h1 :is(.elementskit-section-title,.ekit-heading--title,h1) {
        font-size: 32px !important;
    }
    body.sjh-typography-enforced .sjh-typo-role-h2 .elementor-heading-title,
    body.sjh-typography-enforced .sjh-typo-title-role-h2 :is(.elementskit-section-title,.ekit-heading--title,h2) {
        font-size: 26px !important;
    }
    body.sjh-typography-enforced .sjh-typo-role-h3 .elementor-heading-title,
    body.sjh-typography-enforced .sjh-typo-title-role-h3 :is(.elementskit-section-title,.ekit-heading--title,h3) {
        font-size: 20px !important;
    }
    body.sjh-typography-enforced .sjh-typo-role-card-heading .elementor-heading-title,
    body.sjh-typography-enforced .sjh-typo-title-role-card-heading :is(.elementskit-section-title,.ekit-heading--title,h1,h2,h3,h4),
    body.sjh-typography-enforced .sjh-typo-widget-card-copy :is(.elementor-icon-box-title,.elementor-image-box-title),
    body.sjh-typography-enforced .sjh-typo-widget-accordion :is(.elementskit-card-header,.ekit-accordion--toggler,.elementor-accordion-title,.e-n-accordion-item-title) {
        font-size: 18px !important;
    }
    body.sjh-typography-enforced .sjh-typo-role-eyebrow .elementor-heading-title,
    body.sjh-typography-enforced .sjh-typo-widget-elementskit-heading :is(.elementskit-section-subtitle,.ekit-heading__subtitle) {
        font-size: 12px !important;
    }
    body.sjh-typography-enforced .sjh-typo-widget-body .elementor-widget-container { font-size: var(--sjh-body-mobile) !important; }
    body.sjh-typography-enforced .sjh-typo-widget-elementskit-heading :is(.elementskit-section-title-wrap > p,.ekit-heading__description,.elementskit-section-title-wrap .elementskit-section-title + p) { font-size: var(--sjh-extra-mobile) !important; }
    body.sjh-typography-enforced .sjh-typo-widget-card-copy :is(.elementor-icon-box-description,.elementor-image-box-description) { font-size: var(--sjh-description-mobile) !important; }
    body.sjh-typography-enforced .sjh-typo-widget-form :is(input:not([type="submit"]),textarea,select) { font-size: var(--sjh-field-mobile) !important; }
    body.sjh-typography-enforced .sjh-typo-widget-accordion :is(.elementskit-card-body,.ekit-accordion--content,.elementor-tab-content,.e-n-accordion-item-content) { font-size: var(--sjh-accordion-mobile) !important; }
    body.sjh-typography-enforced .sjh-typo-widget-icon-list :is(.elementor-icon-list-text,a) { font-size: var(--sjh-iconlist-mobile) !important; }
}
