html {position: relative; margin: 0; padding: 0; min-height: 100%; min-height: 100vh; background-image: url('bg.jpg'); background-position: left top; background-repeat: repeat; background-attachment: scroll; background-color: transparent}
body {margin: 0; padding: 0; text-align: left; min-height: 100%; min-height: 100vh; display: flex; flex-direction: column;}
/* clip вместо hidden: не заставляет overflow-y стать auto (иначе появляется лишний вертикальный скролл) */
#imPage {margin: 0px auto 0px auto; width: 983px; position: relative; box-sizing: border-box; overflow-x: clip; overflow-y: visible; flex: 1 0 auto; display: flex; flex-direction: column;}
#imHeaderBg {position: absolute; left: 0; top: 0; height: 165px; width: 100%; background-color: transparent}
#imHeader {flex: 0 0 auto; margin-bottom: 31px; height: 189px; background-color: transparent; background-image: url('top.png'); background-position: top left; background-repeat: no-repeat; box-sizing: border-box; width: 983px;}
#imMnMn {position: absolute; top: 189px; left: 0; height: 23px; width: 973px; box-sizing: content-box; padding: 3px 5px 5px 5px; background-image: url('menu.jpg'); background-position: left top; background-repeat: no-repeat; background-size: 100% 100%; background-attachment: scroll; background-color: #e8e8e8;}
#imMnMn > ul { text-align: left; }
#imMnMn li {display: inline}
/* Пустой якорь не должен занимать место в flex-колонке #imPage */
a#imGoToMenu { flex: 0 0 0; height: 0; margin: 0; padding: 0; overflow: hidden; font-size: 0; line-height: 0; border: 0; }
/* Как в оригинале X5: 973px контент + по 5px padding = 983px снаружи; обрезка широких вложений */
#imContent {flex: 1 1 auto; min-height: 380px; position: relative; width: 973px; box-sizing: content-box; padding: 5px 5px 5px 5px; margin: 0; overflow-x: clip; overflow-y: visible; }
#imContentGraphics {min-height: 380px; position: absolute; top: 220px; bottom: 58px; left: 0; width: 983px; background-image: url('content.jpg'); background-position: left top; background-repeat: repeat-y; background-attachment: scroll; background-color: transparent}
#imFooterBg {position: absolute; left: 0; bottom: 0; height: 90px; width: 100%; background-color: transparent}
#imFooter {flex: 0 0 auto; position: relative; margin: 0 auto; height: 58px; width: 983px; box-sizing: border-box; background-color: transparent; background-image: url('bottom.png'); background-position: top left; background-repeat: no-repeat; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 5px;}
.imFooterCopyright { margin: 0; padding: 0 12px 2px; text-align: center; font: normal normal normal 9pt Tahoma, Arial, sans-serif; color: #1c2840; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35); pointer-events: none; position: relative; z-index: 1; }
