/* Final local repair for the archived IIW 2022 layout. */
html,
body {
  overflow-x: hidden;
}

html {
  height: auto !important;
  min-height: 100%;
  overflow-y: auto !important;
}

body {
  height: auto !important;
  min-height: 100vh;
  overflow-y: visible !important;
  font-family: Arial, "Helvetica Neue", sans-serif;
}

.container,
header .container,
main .container {
  box-sizing: border-box;
  width: min(1200px, calc(100% - 40px));
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.contents .flex:has(.youtube:empty),
.contents .chairman p:empty,
.contents dl > dt:empty {
  display: none !important;
}

.contents dl:has(> dt:empty) > dd {
  width: 100%;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid #1b62a8;
  outline-offset: 3px;
}

/* The selected home snapshot predates the sponsor-grid rules, while its
   markup and exact logo set are present in the export. Restore the grid from
   the domain's later compatible stylesheet instead of leaving one huge
   full-width logo per row. */
#index .sponsors .container > div > ul {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0;
  padding: 0;
}

#index .sponsors li {
  box-sizing: border-box;
  display: flex !important;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  height: auto !important;
  list-style: none;
}

#index .sponsors li:empty {
  display: none !important;
}

#index .sponsors li:has(img[src*="platinum_shimadzu.gif"]),
#index .sponsors li:has(img[src*="gold_kiswel.gif"]),
#index .sponsors li:has(img[src*="silver_fronius.gif"]),
#index .sponsors li:has(img[src*="bronze_daido.gif"]) {
  display: none !important;
}

#index .sponsors li img {
  display: block;
  max-width: 100%;
  height: auto !important;
}

#index .sponsors li.link_map {
  gap: 16px;
}

#index .sponsors li.link_map img {
  width: auto !important;
  max-width: calc(50% - 8px) !important;
  object-fit: contain;
}

#index .sponsors .platinum li { width: min(500px, 100%) !important; }
#index .sponsors .gold li,
#index .sponsors .silver li { width: min(300px, 100%) !important; }
#index .sponsors .bronze li { width: min(200px, 100%) !important; }
#index .sponsors .item li,
#index .sponsors .fundraisers li { width: min(180px, 100%) !important; }

@media screen and (min-width: 991px) {
  nav.navbar {
    display: flex;
    align-items: stretch;
    min-height: 80px;
  }

  nav .navbar-toggler,
  nav .navbar-brand {
    display: none !important;
  }

  #navbarSupportedContent {
    display: block !important;
    width: 100%;
  }

  .navbar-nav {
    display: flex !important;
    flex-direction: row;
    align-items: stretch;
    list-style: none;
    padding: 0;
  }

  .navbar-nav > .nav-item {
    position: relative;
    display: flex;
    align-items: stretch;
    flex: 1 1 0;
  }

  .navbar-nav > .nav-item > .nav-link {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 80px;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1.2;
    text-align: center;
  }

  .navbar-expand-lg .navbar-nav .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    z-index: 100;
    display: block !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none;
    margin: 0 !important;
    transform: translateY(-4px);
    transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .2);
  }

  .navbar-expand-lg .navbar-nav .dropdown-menu.show {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s;
  }

  .navbar-expand-lg .navbar-nav #nv6 .dropdown-menu {
    right: 0 !important;
    left: auto !important;
  }

  .navbar-expand-lg .navbar-nav .dropdown-menu a {
    display: block !important;
    box-sizing: border-box;
    width: 100% !important;
    color: #272100 !important;
    line-height: 1.3;
    text-indent: 0 !important;
    white-space: normal;
  }
}

/* Replace unavailable icon-font glyphs on the homepage actions with compact,
   dependable local text marks. */
#index .announcement .button a::after,
#index .announcement .dl li a::after {
  content: "\2192" !important;
  margin-left: .45em;
  font-family: Arial, sans-serif !important;
  font-size: 1em;
  font-weight: 700;
}

#index .announcement a[href*=".pdf"]::after {
  content: "PDF" !important;
  display: inline-block;
  padding: .12em .28em;
  border: 1px solid currentColor;
  border-radius: 2px;
  font-size: .68em;
  line-height: 1;
}

.nav-item.dropdown > .nav-link span::after {
  content: "\25be" !important;
  margin-left: .35em;
  font-family: Arial, sans-serif !important;
  font-size: .78em;
  font-weight: 700;
}

/* Font Awesome was not included in the archive. Use a real local chevron
   instead of the missing private-use glyph on every submenu item. */
.navbar-expand-lg .navbar-nav .dropdown-menu span::before {
  content: "\203a" !important;
  display: inline-block;
  margin-right: .5em;
  color: currentColor !important;
  font-family: Arial, sans-serif !important;
  font-size: 1.2em;
  font-weight: 700;
  line-height: 1;
  vertical-align: -.05em;
}

/* The archive paired white text with a light mustard fill. Dark text keeps
   the original palette while restoring readable contrast. */
.navbar-nav > .nav-item.active > .nav-link,
#index .announcement .button a,
#index .announcement .dl li a,
a.word,
a.pdf {
  color: #272100 !important;
}

@media screen and (max-width: 990px) {
  header .container,
  main .container,
  .container {
    width: min(100% - 28px, 720px);
  }

  nav.navbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }

  nav .navbar-brand {
    display: none !important;
  }

  nav .navbar-toggler {
    display: block !important;
    min-width: 92px;
    min-height: 44px;
    margin: 10px 14px;
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 3px;
    color: #fff;
    background: #8f1420;
    font: 700 16px/1 Arial, sans-serif;
    cursor: pointer;
  }

  nav .navbar-toggler-icon::before {
    content: "Menu";
  }

  #navbarSupportedContent {
    display: none !important;
    flex-basis: 100%;
    width: 100%;
  }

  #navbarSupportedContent.show {
    display: block !important;
  }

  .navbar-nav {
    display: flex;
    flex-direction: column;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .dropdown-menu {
    display: none;
  }

  .dropdown-menu.show {
    display: block;
  }
}
