/* TGF 2.0: current theme compatibility; migrated from the approved Customizer CSS.
 * Keep theme-dependent selectors separate from shared library and reader tools. */
@media screen {
    #content.site-content {
        box-sizing: border-box;
        width: min(100%, var(--tgf-page-width));
        max-width: none;
        margin-inline: auto;
    }
    #content.site-content > .content-wrap:has(> #primary.content-area:only-child):not(:has(main#main.tgf-blog)) {
        box-sizing: border-box;
        width: 100% !important;
        max-width: none !important;
        margin-inline: auto;
    }
    #content.site-content > .content-wrap:not(:has(main#main.tgf-blog)) > #primary.content-area:only-child {
        box-sizing: border-box;
        width: 100% !important;
        max-width: none !important;
        min-width: 0;
        float: none;
        flex: 1 1 100%;
        margin-inline: 0;
    }
    #content.site-content > .content-wrap > #primary.content-area:only-child > #main.site-main:not(.tgf-blog) {
        box-sizing: border-box;
        width: 100%;
        max-width: none;
        min-width: 0;
        margin-inline: 0;
    }
    #content.site-content > .content-wrap > #primary.content-area:only-child > #main.site-main:not(.tgf-blog) > :is(.featured-thumbnail, article.posts-entry) {
        box-sizing: border-box;
        width: 100%;
        max-width: none;
        margin-inline: 0;
    }
    #main.site-main > .featured-thumbnail,
    #main.site-main > .featured-thumbnail > a,
    #main.site-main > .featured-thumbnail picture {
        display: block;
        box-sizing: border-box;
        width: 100% !important;
        max-width: 100% !important;
    }
    #main.site-main > .featured-thumbnail img {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain;
        margin-inline: auto;
    }
    /* Legacy recognition retained for existing content; new explicit block style preferred. */
    #primary #main .wp-block-image:is(.tgf-full-width-banner,.is-style-tgf-panoramic-banner,.is-style-tgf-fellowship-banner,.alignwide,.alignfull,:has(img:is([width="2000"][height="600"],[width="680"][height="203"],[width="756"][height="226"]))) {
        display: block !important;
        box-sizing: border-box;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        float: none !important;
        margin-inline: auto !important;
    }
    #primary #main .wp-block-image:is(.tgf-full-width-banner,.is-style-tgf-panoramic-banner,.is-style-tgf-fellowship-banner,.alignwide,.alignfull,:has(img:is([width="2000"][height="600"],[width="680"][height="203"],[width="756"][height="226"]))) :is(a,picture,img) {
        display: block !important;
        box-sizing: border-box;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: none !important;
        object-fit: contain !important;
        object-position: center;
        contain-intrinsic-size: none !important;
        content-visibility: visible !important;
        margin-inline: auto !important;
    }
    /* Protect existing Blog 2.0.4 during sequential rollout. Blog 2.0.5 owns its own gutter/banner rules. */
    main#main.tgf-blog {box-sizing:border-box;width:min(100%,var(--tgf-page-width));max-width:none;margin-inline:auto}
    #content.site-content main#main.tgf-blog {width:100%;max-width:none}
}
/* Footer policy links and social widgets, preserved as supplied. */
.tgf-footer-legal {width:100%;margin:0!important;padding:0!important;container-type:inline-size}
.tgf-footer-legal .tgf-footer-legal-grid {display:grid!important;grid-template-columns:repeat(3,minmax(0,max-content));gap:4px 20px!important;justify-content:start;align-items:start;text-align:left;margin:0!important;padding:0!important}
.tgf-footer-legal-grid a {display:block;font-family:inherit;font-size:.875rem!important;font-weight:400;line-height:1.3!important;color:inherit;text-decoration:underline;margin:0!important;padding:0!important;overflow-wrap:break-word}
@container (max-width:280px) {.tgf-footer-legal-grid {grid-template-columns:repeat(2,minmax(0,max-content))!important;column-gap:12px!important}}
footer .wp-social-link-x,footer .wp-social-link-x a {color:#FFFFFF!important;background-color:transparent!important}
footer .wp-social-link-x svg {fill:#FFFFFF!important}
footer .tgf-footer-social {margin-top:0!important;margin-bottom:0!important;padding-top:0!important;padding-bottom:0!important;align-items:center;justify-content:flex-start}
footer .tgf-footer-social .wp-social-link {margin:0!important}
footer .widget:has(.tgf-footer-social) {margin-top:0!important;padding-top:0!important;align-self:flex-start}
