/* Fly brand contract: #1D59BB / #F4624E. Shared layout safeguards, not content clipping. */
:root{--fly-blue:#1D59BB;--fly-coral:#F4624E;--fly-focus:#1D59BB}
body{accent-color:#1D59BB}
body :is(button,a,input):is(.primary,.btn-primary,.button-primary){background:#1D59BB!important;color:#fff!important}
body :is(button,a,input):is(.primary,.btn-primary,.button-primary):hover{background:#174a9c!important}
:where(main,section,article,aside,form,fieldset,nav){min-width:0}
:where(input,select,textarea){box-sizing:border-box;max-width:100%;min-width:0}
:where(img,video,canvas){max-width:100%}
:where(h1,h2,h3,p,a,label){overflow-wrap:break-word}
dialog{box-sizing:border-box;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto}
/* Old module banners had fixed heights and uncontained decorative shapes. */
html:has(link[href^="/module-quality.css"]) .hero{height:auto!important;max-height:none!important;overflow:hidden}
/* Keep the feed readable while using the available desktop width. */
@media(min-width:1001px){
 body.fly-layout .shell{width:100%!important;max-width:1920px!important;box-sizing:border-box!important;grid-template-columns:clamp(190px,18vw,280px) minmax(0,1fr) clamp(220px,23vw,340px)!important;gap:clamp(16px,2vw,32px)!important;padding-inline:clamp(16px,2vw,40px)!important;justify-content:stretch!important}
 body.fly-layout .feed-column{width:100%!important;min-width:0!important;max-width:960px!important;justify-self:center}
 body.fly-layout .shell>.right-rail{display:block!important;min-width:0!important}
 body.fly-layout .topbar .brand{width:clamp(170px,18vw,280px)!important}
 body.fly-layout .fly-header-search{flex:1 1 180px!important;min-width:80px!important;max-width:440px}
 body.fly-layout .desktop-nav{flex:1 0 auto!important;gap:4px!important}
 body.fly-layout .desktop-nav .nav-item{padding-inline:10px!important}
}
@media(min-width:1001px) and (max-width:1199px){
 body.fly-layout .shell{grid-template-columns:190px minmax(0,1fr)!important}
 body.fly-layout .shell>.right-rail{display:none!important}
 body.fly-layout .topbar .brand small{display:none!important}
 body.fly-layout .topbar .brand{width:76px!important}
}
@media(max-width:1000px){
 body.fly-layout .shell{width:100%!important;box-sizing:border-box!important;max-width:1000px!important;grid-template-columns:minmax(0,1fr)!important;padding-inline:clamp(10px,2vw,20px)!important}
 body.fly-layout .feed-column{min-width:0!important;width:100%!important;max-width:800px!important;justify-self:center}
}
@media(max-width:480px){
 body.fly-layout .topbar{padding-inline:10px!important;gap:8px!important}
 body.fly-layout .topbar .brand{flex-shrink:1!important}
 body.fly-layout .top-actions{gap:4px!important}
 body.fly-layout .post>footer{gap:4px!important}
 body.fly-layout .post>footer>button{padding-inline:6px!important}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
/* Visible brand hierarchy: strong actions, coral landmarks, quiet reading surfaces. */
body.fly-layout :is(.social-create-fab,#publish,.fs-primary){background:#1D59BB!important;color:#fff!important;box-shadow:0 6px 18px #1d59bb26!important}
body.fly-layout .social-create-fab{border:3px solid #F4624E!important}
body.fly-layout #publish:disabled{opacity:.45;box-shadow:none!important;cursor:not-allowed}
body.fly-layout .fly-ecosystem-card em{background:#1D59BB;color:#fff;font-weight:650;padding:9px 13px;border-radius:8px}
body.fly-layout .fly-ecosystem-card a:hover em{background:#174a9c}
body.fly-layout .fly-module-link[aria-current="page"]{background:#1D59BB!important;color:#fff!important;box-shadow:inset 4px 0 #F4624E,0 4px 12px #1d59bb18;font-weight:700}
body.fly-layout .fly-module-link[aria-current="page"]>svg{color:#fff!important;background:#ffffff20!important}
body.fly-layout .desktop-nav .nav-item.active{background:#edf3fd!important;color:#1D59BB!important}
body.fly-layout .desktop-nav .nav-item.active:after{height:4px;background:#F4624E}
body.fly-layout .filter.active{background:#1D59BB!important;color:#fff!important;border-bottom-color:#F4624E!important;border-radius:10px 10px 0 0;box-shadow:inset 0 -3px #F4624E}
body.fly-layout .mobile-nav button.active{background:#edf3fd!important;color:#1D59BB!important;border-radius:10px;box-shadow:inset 0 3px #F4624E}
body.fly-layout .discovery-card h3{border-inline-start:4px solid #F4624E;padding-inline-start:10px}
body.fly-layout .composer.composer-v2{border-top:3px solid #F4624E!important}
body.fly-layout .fly-see-more{border:1px solid #cbdcf4;color:#1D59BB;background:#edf3fd}
body.fly-layout :is(.social-create-fab,#publish,.fs-primary):not(:disabled):hover{background:#174a9c!important}
/* Quiet selection treatment: only the sidebar selection and feed tabs. */
body.fly-layout .fly-module-link[aria-current="page"]{background:#edf3fd!important;color:#1D59BB!important;box-shadow:none!important;font-weight:550!important}
body.fly-layout .fly-module-link[aria-current="page"]>svg{color:#1D59BB!important;background:transparent!important;filter:none!important}
body.fly-layout .filter.active{background:#edf3fd!important;color:#1D59BB!important;border-bottom-color:transparent!important;border-radius:10px;box-shadow:none!important;font-weight:550!important}
/* Media-first posts: preserve the whole single photo at the feed width. */
body.fly-layout .composer.composer-v2{border-top:1px solid #dfe7f2!important}
body.fly-layout .post-media.count-1{display:block!important;max-height:none!important;height:auto!important;background:transparent!important}
body.fly-layout .post-media.count-1>.post-media-open{display:block!important;width:100%!important;height:auto!important;min-height:0!important}
body.fly-layout .post-media.count-1 img{display:block!important;width:100%!important;height:auto!important;max-height:none!important;object-fit:contain!important;transform:none!important}
body.fly-layout .post-media:not(.count-1){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:4px!important;max-height:none!important}
body.fly-layout .post-media:not(.count-1)>.post-media-open{aspect-ratio:1;min-height:0!important;height:auto!important}
body.fly-layout .post-media:not(.count-1) img{width:100%!important;height:100%!important;object-fit:cover!important}
#media-lightbox-content{height:100%;min-height:0}.media-lightbox-stage{min-height:0;overflow:hidden;position:relative}.media-lightbox-stage>img{position:absolute;inset:0;width:100%;height:100%;min-height:0;object-fit:contain!important}
@media(min-width:801px){.media-lightbox-shell{grid-template-rows:minmax(0,1fr)}}
.media-lightbox-form button{background:#1D59BB!important}.media-lightbox-actions button[aria-pressed=true]{background:#1D59BB;color:white}
.media-lightbox-status{min-height:22px;color:#526581;font-size:13px}.media-lightbox-comment time{font-size:11px;color:#526581}
.media-lightbox-actions button[aria-pressed=true]{background:#1D59BB;color:white}.media-lightbox-info{min-width:0}.media-lightbox-comment{overflow-wrap:anywhere}.media-lightbox-comment button{align-self:flex-start;background:transparent;border:0;color:#526581;font-size:12px;padding:6px}
