/* Standard, framework-free responsive header/nav. Lives outside the
   Muse-authored page content on purpose so it always reflows correctly
   regardless of window size or rendering engine -- no pixel math, no
   JS-computed transforms, just CSS. */

/* The old Muse CSS sets body{min-width:1200px} so its absolutely-positioned
   "browser_width" bars never collapsed on a narrow desktop window. Now that
   #scale-wrapper handles that case on its own (it forces its own width when
   narrow), this constraint only gets in the way of the header/nav below
   ever seeing a narrow viewport, so cancel it here. */
body{min-width:0 !important;}

/* Every page's own CSS pulls its first content column up by the same
   -69px via #pu79446{margin-top:-69px}, because that column used to start
   with the header (now moved out to .site-header, in normal flow above
   #scale-wrapper). Without the header there to butt up against, that
   negative margin instead pulls the page's own content up into the new
   header, so cancel it here. */
#pu79446{margin-top:0 !important;}

.site-header{
  background:#FFFFFF;
  border-bottom:1px solid #e0e0e0;
  position:relative;
  z-index:2000;
}
.site-header-inner{
  max-width:1400px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 20px;
  position:relative;
}
.site-logo{display:block;line-height:0;flex-shrink:0;}
.site-header .site-logo img{display:block;height:50px;width:auto;max-width:none;}

.nav-toggle{
  display:none;
  flex-direction:column;
  justify-content:space-between;
  width:28px;
  height:20px;
  background:none;
  border:none;
  cursor:pointer;
  padding:0;
  margin-left:12px;
}
.nav-toggle span{
  display:block;
  height:3px;
  width:100%;
  background:#3172A5;
  border-radius:2px;
}

.site-nav{flex-grow:1;}
.site-nav-list{
  display:flex;
  justify-content:flex-end;
  flex-wrap:wrap;
  list-style:none;
  margin:0;
  padding:0;
}
.site-nav-list > li{position:relative;}
.site-nav-list > li > a,
.site-nav-list > li > span.nav-label{
  display:block;
  padding:14px 16px;
  color:#333333;
  text-decoration:none;
  font-weight:bold;
  font-size:14px;
  white-space:nowrap;
  cursor:pointer;
  font-family:'Zen Kaku Gothic New','Noto Sans JP','Hiragino Kaku Gothic Pro',sans-serif;
}
.site-nav-list > li > a:hover,
.site-nav-list > li > span.nav-label:hover,
.site-nav-list > li > a.active{
  background:#3172A5;
  color:#FFFFFF;
}

.submenu-toggle{
  display:none;
}

.submenu{
  display:none;
  position:absolute;
  top:100%;
  left:0;
  background:#3172A5;
  list-style:none;
  margin:0;
  padding:0;
  min-width:220px;
  z-index:1000;
  box-shadow:0 4px 8px rgba(0,0,0,0.15);
}
.site-nav-list > li:hover > .submenu,
.site-nav-list > li.submenu-open > .submenu{
  display:block;
}
.submenu li a{
  display:block;
  padding:10px 16px;
  color:#FFFFFF;
  text-decoration:none;
  font-size:13px;
  white-space:nowrap;
}
.submenu li a:hover,
.submenu li a.active{
  background:rgba(255,255,255,0.2);
}

/* Mobile: collapse into a hamburger-triggered stacked menu */
@media (max-width: 900px){
  .nav-toggle{display:flex;}
  .site-nav{
    display:none;
    position:absolute;
    top:100%;
    left:0;
    right:0;
    background:#FFFFFF;
    border-top:1px solid #e0e0e0;
    max-height:80vh;
    overflow-y:auto;
  }
  .site-nav.open{display:block;}
  .site-nav-list{
    display:block;
    justify-content:flex-start;
  }
  .site-nav-list > li{border-bottom:1px solid #eeeeee;position:relative;}
  .site-nav-list > li > a,
  .site-nav-list > li > span.nav-label{
    padding:14px 20px;
  }
  .submenu-toggle{
    display:block;
    position:absolute;
    top:0;
    right:0;
    width:48px;
    height:48px;
    background:none;
    border:none;
    cursor:pointer;
  }
  .submenu-toggle::before{
    content:"";
    display:block;
    width:10px;
    height:10px;
    margin:17px auto;
    border-right:2px solid #3172A5;
    border-bottom:2px solid #3172A5;
    transform:rotate(45deg);
    transition:transform 0.15s;
  }
  .site-nav-list > li.submenu-open > .submenu-toggle::before{
    transform:rotate(-135deg);
    margin-top:22px;
  }
  .submenu{
    display:none;
    position:static;
    box-shadow:none;
    background:#f5f8fb;
  }
  .site-nav-list > li.submenu-open > .submenu{display:block;}
  .submenu li a{color:#333333;padding-left:36px;}
  .submenu li a:hover,
  .submenu li a.active{background:#e4edf5;}
}
