
/* Responsive layout */
/* default is nav at bottom, aside inline */


.horiz {
	flex-direction: column;
}

.float-right {
	float: none;
	max-width: initial;
}

@media (min-width: 550px) {
	.horiz {
		flex-direction: row;
	}

	
	.float-right {
	  float: right;
	  max-width: 33%;
    margin-left: 3em;
	  /*margin-top: 3em;
	  margin-bottom: 3em;*/
	}
}

/* text and aside normal, nav at bottom */
@media only screen and (min-width: 1120px) and (orientation:landscape) {

  #content {
  	flex-direction: row;
  	width: 100%;
    margin: 0px;
  }

  main {
  	flex: 1;
  	width: 100%;
  	height: 100%;
  }

  header {
  	/*position: fixed;*/
  	order: 0;
  	top: 0;
  	left: 0;
  	/*width: 180px;*/
  	width: 250px;
    min-height: 95vh;

  	padding: 0px;
    padding-top: 1.5em;
    padding-bottom: 1.5em;

  }

  nav .booktoc,
  nav .full {
    padding: 0px;
  }

  header .pagetoc,
  header .full,
  header #me {
    padding-left: 3em;
    padding-right: 3em;
    /*padding-top: 1em;
    padding-bottom: 1em;*/
  }

  nav div.booktoc .pagetoc.current {
    background-color: #fcfcfc;
  }

  nav {
    display: block;
  }

  nav .full {
    flex: none;
    display: block;
  }

  nav ul.toplevel {
    display: block;
  }

  nav .group {
    margin-top: 3em;
  }

 /* causes bug in Safari 10.1.1 */
  header .category-docs {
    /*display: initial;*/
  }

  nav ul li {
    float: none;
  }

  header .booktoc .pagetoc {
   /*margin-top: 6px;*/
    /*padding-bottom: 6px;*/

    /* force padding recalc */
    padding-top: 1px;
    padding-bottom: 1px;
  }

  nav div.booktoc .pagetoc.current {
    background-color: white;
  }

  nav div.booktoc {
    text-align: left;
  }

  header .booktoc ul {
    display: block;
  }

  header .booktoc .pagetoc {
    display: inherit;
  }

  #me, header .info {
  	text-align: center;
  }

  #me {
    margin-bottom: 1em;
  }

  header img {
    margin-bottom: 0px;
  }

  .cat-hideable {
    display: block;
  }

  .inpage-tocbox {
    display: none;
  }
}