/* Primary page-title sizing. Preserve fonts, colors, section headings and statistics. */
/* Reviewed light-background content headings. Quotes, notices, statistics and
   author-role labels are deliberately outside these component selectors. */
#main :is(.fuel-activity-inner-heading, .state-list-order-heading,
    .heading-card_custom, .key-heading, .heading-89, .heading-90,
    .heading-27, .heading-28, .heading-29,
    .railroad-together-cards-inner-heading, .saftey-head, .heading-style-h5,
    .heading-14, .heading-18, .heading-19, .heading-20, .heading-21,
    .heading-22, .heading-23, .assossiation-pacific-bottom-heading,
    .resources-cards-headings, .pass_text_heading-2),
#main .w-richtext > :is(h2, h3, h4, h5, h6),
#main .news-card h3,
#main .impact-post h3,
body.page-id-700522 #main section > h4,
body.page-id-700522 #main section > h1,
.upns-shadow-body .heading-card_custom,
[data-upns-balanced-subheading] {
    color: #034767 !important;
}

/* Legacy bold subheadings can contain inline text colours. */
[data-upns-balanced-subheading] :is(strong, b, em, span) {
    color: inherit !important;
}

/* Reviewed heading accents inside dark blue panels. */
#main .great-connection-bottom-left .great-connection-bottom-left-heading,
#main .map-rail-growth-holder .rail-growth-cards-main-text.head,
#main .rail-commitment-container .rail-to-rail-commitment-heading:not(.rail-commitment-informed-container-heading),
#main .merge-appication-top-bg .merge-appication-top-bg-heading {
    color: #fff !important;
}

/* Let headings share words more evenly between lines without changing type size. */
body:not(.home) #headerbanner > .container > h1,
body:not(.home) #main :is(h1, h2, h3, h4, h5, h6),
:host :is(h1, h2, h3, h4, h5, h6),
[data-upns-balanced-subheading] {
    text-wrap: balance;
}

body:not(.home) #headerbanner > .container > h1,
body:not(.home) #main header[class*="section_header50"]:not(.mission-unchanged-section) h1,
:host header[class*="section_header50"]:not(.mission-unchanged-section) h1 {
    font-size: 48px !important;
    line-height: 1.2 !important;
    overflow-wrap: break-word;
}

/* Newsroom only: separate its title from the introductory callout. */
body.page-template-t_newsroom #main .header50_component > h1.stb-head {
    margin-bottom: 32px;
}
@media (max-width: 767px) {
    body.page-template-t_newsroom #main .header50_component > h1.stb-head {
        margin-bottom: 24px;
    }
}

@media (max-width: 991px) {
    body:not(.home) #headerbanner > .container > h1,
    body:not(.home) #main header[class*="section_header50"]:not(.mission-unchanged-section) h1,
    :host header[class*="section_header50"]:not(.mission-unchanged-section) h1 {
        font-size: 32px !important;
    }
}

@media (max-width: 767px) {
    body:not(.home) #headerbanner > .container > h1,
    body:not(.home) #main header[class*="section_header50"]:not(.mission-unchanged-section) h1,
    :host header[class*="section_header50"]:not(.mission-unchanged-section) h1 {
        font-size: 24px !important;
    }
}

/* Primary blue banners share viewport gutters and a 1200px content measure. */
[data-upns-page-banner] {
    position: relative !important;
    left: var(--upns-banner-shift, 0px) !important;
    width: var(--upns-banner-width) !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 80px 32px !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden;
    border-radius: 0 0 16px 16px !important;
}
[data-upns-page-banner] [data-upns-banner-inner] {
    display: block !important;
    width: 100% !important;
    max-width: 1200px !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    padding: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
    text-align: left !important;
}
[data-upns-page-banner] h1 {
    text-align: left !important;
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
[data-upns-page-banner] > [class*="header50_background"] {
    inset: 0 !important; width: 100% !important; height: 100% !important;
    border-radius: inherit !important;
}
[data-upns-banner-unclip] { overflow: visible !important; }
@media (max-width: 991px) {
    [data-upns-page-banner] { padding: 56px 24px !important; }
}
@media (max-width: 767px) {
    [data-upns-page-banner] { padding: 40px 20px !important; }
}
