/* Additive enhancement. Original Windows-1251 content and desktop artwork are retained. */
html { -webkit-text-size-adjust: 100%; }
*, *::before, *::after { box-sizing: border-box; }
#main { box-sizing: content-box; }
.site-content { width: 1022px; }
.mobile-brand, .menu-toggle { display: none; }
.skip-link { position: absolute; left: 12px; top: -100px; z-index: 100; background: #fff; padding: 12px 16px; border: 2px solid #2c5597; }
.skip-link:focus { top: 12px; }
a:focus-visible, button:focus-visible { outline: 3px solid #2c5597; outline-offset: 3px; }
#top { background-image: url(images/main.jpg); background-image: image-set(url("images/main-optimized.webp") type("image/webp"), url("images/main.jpg") type("image/jpeg")); }
#mainmenu { height: auto; }
#mainmenu .menu-list { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; }
#mainmenu li { min-width: 0; margin: 0; border-left: 1px solid #e6e6e6; }
#mainmenu li:first-child { border-left: 0; }
#mainmenu a { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 5px; min-height: 77px; padding: 2px 5px; text-align: center; font-size: 13px; line-height: 1.25; }
#mainmenu img { display: block; width: 45px; height: 44px; object-fit: contain; }
#mainmenu a[aria-current="page"] { color: #bd2720; }
.section-title { margin: 0; }
#mainpagehead, #partnershiphead, #docshead { left: 0; margin-left: 15px; }
#docs.doc-links { display: grid; grid-template-columns: 1fr 1fr; width: 550px; max-width: 100%; margin: 0 auto; padding: 0; list-style: none; }
#docs li { margin: 0; min-width: 0; }
#docs a { display: block; padding: 3px 6px; text-align: center; line-height: 1.35; }
.page-title h1 { margin: 0; font-size: 16px; font-weight: bold; line-height: 1.4; }
.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 900px; max-width: 100%; margin: 0 auto; }
.team-member { padding: 0 6px; min-width: 0; text-align: center; }
.team-member h3 { font-size: 14px; margin: 1em 0; line-height: 1.4; }
.document-image-link { display: block; width: fit-content; max-width: 100%; margin: 0 auto; }
.document-scan { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.document-caption { margin: 10px auto 24px; text-align: center; }
.document-caption a { display: inline-block; padding: 10px 12px; color: #2c5597; text-decoration: underline; }
#contactform fieldset { min-width: 0; border: 0; margin: 0; padding: 0; }
.form-status { margin: 0 0 16px; padding: 12px; background: #fff6dc; border-left: 3px solid #b57915; color: #614510; line-height: 1.5; }
#contactform input:disabled, #contactform textarea:disabled { background: #f7f7f7; color: #6f7780; }
#contactform input[type="submit"] { max-width: 100%; white-space: normal; }
#contactform input[type="submit"]:disabled { cursor: not-allowed; }

@media (max-width: 1023px) {
  body { font-size: 16px; line-height: 1.6; background: #f3f5f8; }
  #main { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; border: 0; }
  #top { width: auto; height: auto; background: none; padding: 20px 20px 0; border-bottom: 1px solid #e2e7ed; }
  .mobile-brand { display: block; }
  .brand-home, .brand-home:link, .brand-home:visited { display: flex; align-items: center; gap: 15px; font-size: inherit; text-decoration: none; }
  .brand-mark { width: 61px; height: auto; flex: 0 0 61px; }
  .brand-name { display: block; min-width: 0; line-height: 1.3; }
  .brand-name strong { display: block; font-size: clamp(18px, 3vw, 26px); color: #d63823; font-weight: 700; }
  .brand-name > span { display: block; font-size: clamp(14px, 2.2vw, 19px); color: #2c5597; margin-top: 3px; }
  #mainmenu { position: static; width: auto; height: auto; margin-top: 18px; padding-bottom: 12px; }
  #mainmenu .menu-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  #mainmenu li { border: 0; }
  #mainmenu a { min-height: 78px; padding: 10px 5px; font-size: 14px; border-radius: 7px; color: #2f537c; }
  #mainmenu a[aria-current="page"] { background: #edf3fb; color: #214572; }
  #mainmenu a:hover { background: #f2f5f9; font-size: 14px; }
  #mainmenu img { width: 31px; height: 31px; }
  .site-content { width: auto; min-width: 0; padding: 24px 24px 30px; overflow-wrap: anywhere; }
  .site-content a, .site-content a:hover, .site-content a:active { font-size: inherit; color: #254e7c; }
  .layout-decoration { display: none !important; }
  .home-layout, .home-layout > tbody, .home-layout > tbody > .home-content-row, .home-layout > .home-content-row { display: block; width: 100%; }
  .home-layout .home-content-row { display: flex !important; flex-direction: column; gap: 26px; }
  .home-membership, .home-primary { display: block; min-width: 0; width: 100%; height: auto; text-align: left; }
  .home-primary { order: 1; }
  .home-membership { order: 2; background: #f5f8fc !important; border: 1px solid #e0e7ef; border-radius: 10px; padding: 18px; }
  #mainpagehead, #docshead, #partnershiphead { position: static; height: auto; min-height: 0; width: auto; margin: 0 0 16px; padding: 0 0 0 12px; border-left: 4px solid #315f95; background: none; color: #294b75; font-size: 19px; line-height: 1.4; text-align: left; }
  #mainpagehead { border-color: #d83e2b; font-size: 23px; }
  #partnershiphead { border-color: #16a9a5; font-size: 18px; }
  #mainpagetext { height: auto; font-size: 16px; line-height: 1.7; text-align: left; padding: 0; margin-bottom: 28px; }
  #partnership { font-size: 16px; min-height: 0; text-align: left; padding: 0; }
  #partnership ul { padding-left: 23px; margin: 12px 0 22px; }
  #partnership li, #partnership a, #partnership a:hover { font-size: 16px; line-height: 1.55; color: #284d78; }
  #partnership li { margin: 8px 0; }
  #partnership a { display: inline-block; min-height: 44px; padding: 8px 0; }
  #docs.doc-links { width: auto; grid-template-columns: 1fr 1fr; gap: 8px; }
  #docs a, #docs a:hover { font-size: 15px; min-height: 48px; padding: 12px; background: #f3f6fa; border-radius: 7px; text-align: left; line-height: 1.5; }
  .page-layout, .page-layout > tbody, .page-layout > tbody > .page-heading-row, .page-layout > tbody > .page-content-row, .page-layout > .page-heading-row, .page-layout > .page-content-row { display: block; width: 100%; }
  .page-layout > tbody > tr > .page-title, .page-layout > tbody > tr > .page-body, .page-layout > tr > .page-title, .page-layout > tr > .page-body { display: block; width: 100%; height: auto !important; background: none !important; text-align: left; }
  .page-title { padding-bottom: 18px; }
  .page-title h1 { color: #284d78; font-size: 24px; line-height: 1.35; }
  .page-body { min-height: 80px; }
  .page-body > div { max-width: 100%; }
  .prose { text-align: left !important; padding-left: 0 !important; padding-right: 0 !important; }
  .prose ul, .page-body > ul { padding-left: 24px; }
  .prose li { margin-bottom: 8px; }
  .team-grid { width: auto; grid-template-columns: 1fr; gap: 16px; margin-top: 20px; }
  .team-member { padding: 16px; background: #f5f8fc; border: 1px solid #e0e7ef; border-radius: 9px; text-align: left; }
  .team-member h3 { margin: 0 0 10px; font-size: 18px; color: #2c5597; }
  .team-member p { padding: 0 !important; margin: 9px 0; }
  .partner-logo { float: none !important; display: block; margin: 12px 0 20px; padding: 0 !important; max-width: 100%; height: auto; }
  .contact-details { font-size: 16px !important; line-height: 1.7; margin-bottom: 28px; }
  .contact-details strong { color: #2c5597 !important; }
  .contact-details a { display: inline-block; padding: 6px 0; text-decoration: underline; }
  #contact-wrapper { width: 100%; max-width: 580px; padding: 18px; margin: 0 auto; border-radius: 9px; }
  #contactform input, #contactform textarea { box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; font-size: 16px; }
  #contactform input { min-height: 44px; }
  #contactform label { line-height: 1.4; }
  .document-caption a { min-height: 44px; }
  #bottom { font-size: 12px; line-height: 1.5; padding: 18px 20px; border-top: 1px solid #e2e7ed; color: #626c79; }
}

@media (max-width: 599px) {
  #top { padding: 16px 16px 0; }
  .brand-home { gap: 11px; }
  .brand-mark { width: 52px; flex-basis: 52px; }
  .brand-name strong { font-size: 19px; }
  .brand-name > span { font-size: 14px; }
  .nav-enhanced .menu-toggle { display: flex; width: 100%; min-height: 46px; align-items: center; justify-content: space-between; margin: 16px 0 12px; padding: 9px 13px; border: 1px solid #d8e2ee; border-radius: 7px; background: #f1f5fa; color: #294d77; font: 700 16px/1.3 Arial, Helvetica, sans-serif; cursor: pointer; }
  .menu-toggle-symbol { font-size: 21px; line-height: 1; }
  #mainmenu { margin-top: 14px; }
  .nav-enhanced #mainmenu { display: none; margin-top: 0; }
  .nav-enhanced #mainmenu.is-open { display: block; }
  #mainmenu .menu-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  #mainmenu a { flex-direction: row; justify-content: flex-start; gap: 10px; min-height: 52px; padding: 10px 7px; text-align: left; font-size: 14px; }
  #mainmenu img { width: 27px; height: 27px; flex: 0 0 27px; }
  .site-content { padding: 24px 16px 28px; }
  #docs.doc-links { grid-template-columns: 1fr; }
  .home-membership { padding: 16px; }
  #partnershiphead { font-size: 17px; }
  #contact-wrapper { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
