/* Reusable engineering formula component for MX technical articles. */
.engineering-formula-block {
    box-sizing: border-box;
    max-width: 100%;
    margin: 24px 0;
    padding: 22px 24px;
    background: #f7f9fc;
    border: 1px solid #dce3eb;
    border-left: 4px solid #0b4f91;
    border-radius: 10px;
}

.engineering-formula {
    box-sizing: border-box;
    max-width: 100%;
    margin: 0;
    padding: 4px 0 16px;
    color: #102a43;
    font-family: "Cambria Math", "STIX Two Math", "Times New Roman", serif;
    font-size: clamp(18px, 2.2vw, 24px);
    font-style: normal;
    font-weight: 500;
    line-height: 1.55;
    text-align: center;
}

/* Plain HTML fallback: italicize variables while keeping numbers and units upright. */
.engineering-formula var {
    font-style: italic;
}

.engineering-formula sup,
.engineering-formula sub {
    font-size: 0.72em;
    line-height: 0;
}

/* MathJax handles the article equations; allow aligned equations to fit the card. */
.engineering-formula mjx-container[display="true"] {
    display: block;
    max-width: 100%;
    margin: 0 auto !important;
    font-size: 1em !important;
}

.engineering-formula-vars {
    margin: 8px 0 0;
    padding: 14px 0 0;
    border-top: 1px solid #dce3eb;
    color: #40566b;
    font-size: 15px;
    line-height: 1.65;
}

.engineering-formula-vars p {
    margin: 7px 0;
    line-height: inherit;
}

.engineering-note {
    margin: 18px 0 0;
    padding: 14px 16px;
    border-left: 3px solid #0b4f91;
    border-radius: 0 6px 6px 0;
    background: #fff;
    color: #344b5a;
    line-height: 1.65;
}

.engineering-example {
    margin: 24px 0;
    padding: 22px 24px;
    border: 1px solid #dce3eb;
    border-radius: 10px;
    background: #fff;
}

.engineering-result {
    margin: 20px 0;
    padding: 18px 20px;
    border: 1px solid #dce3eb;
    border-radius: 8px;
    background: #f8fafc;
}

body.single-ansipumpspro_news {
    overflow-x: hidden;
}

@media (max-width: 600px) {
    .engineering-formula-block {
        margin: 20px 0;
        padding: 18px 16px;
        border-radius: 8px;
    }

    .engineering-formula {
        font-size: clamp(16px, 4.1vw, 19px);
        line-height: 1.5;
    }

    .engineering-formula-vars {
        padding-top: 12px;
        font-size: 14px;
    }

    .engineering-note {
        padding: 12px 14px;
    }

    .engineering-example,
    .engineering-result {
        padding: 18px 16px;
    }
}

@media (max-width: 360px) {
    .engineering-formula {
        font-size: clamp(13px, 4.1vw, 15px);
    }
}

/* Match the live article body's paragraph specificity so MathJax scales with the viewport. */
body.single-ansipumpspro_news .engineering-formula {
    font-size: clamp(18px, 2.2vw, 24px) !important;
}

@media (max-width: 600px) {
    body.single-ansipumpspro_news .engineering-formula {
        font-size: clamp(16px, 4.1vw, 19px) !important;
    }
}

@media (max-width: 360px) {
    body.single-ansipumpspro_news .engineering-formula {
        font-size: clamp(13px, 4.1vw, 15px) !important;
    }
}
