/*
 * Base structure
 */

/* Move down content because we have a fixed navbar that is 50px tall */
body {
	background-color: #F9F9F9;
	color: black;
	margin-left: auto;
	margin-right: auto;
	max-width: 135ex; /* tried 83ex to fit tables, but text not as readable */
	padding: 1em;
  padding-top: 50px;
  font-size: 16pt !important;
}

html {
	font-family: californian, libertine, serif;
	font-size: 16pt;
}

/*
 * Global add-ons
 */

.sub-header {
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

/*
 * Top navigation
 * Hide default border to remove 1px line.
 */
.navbar-fixed-top {
  border: 0;
}

/*
 * Sidebar
 */
 table {
	border-top: 1pt solid black;
	color: #52555A;
	margin-left: auto;
	font-size: 16pt;
	margin-right: auto;
	text-align: center;
	/* doesn't look great for narrow tables, but at least provides some visual consistency */
	width: 100%;
	/* the following is needed for the "display: run-in" hack, but it is also a good idea anyway */
	margin-bottom: 3ex;
	margin-top: 3ex;
  border-collapse: collapse !important;
}

/* Hide for mobile, show later */
.sidebar {
  display: none;
}
@media (min-width: 768px) {
  .sidebar {
    position: fixed;
    top: 51px;
    bottom: 0;
    left: 0;
    z-index: 1000;
    display: block;
    padding: 20px;
    overflow-x: hidden;
    overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
    background-color: #f5f5f5;
    border-right: 1px solid #eee;
  }
}

/*
	Huge heading, used to separate the books.
*/
h1 {
	background-color: #656E64;
	color: #D5D5D5;
	font-family: biolinum, sans-serif;
	margin: 0;
	padding: 1ex;
	text-align: center;
}

/*
	Chapter heading. Hanging over page to make
	navigation easier, pretty big as well and
	maybe a bit too fancy right now. Comments?
*/
h2 {
	background-color: #D5D5D5;
	border-bottom: 3pt solid #656E64;
	color: #52555A;
	font-family: biolinum, sans-serif;
	margin-top: 2em;
	margin-bottom: 0.5em; /* seems to collapse with paragraph margin */
	margin-left: -2em;
	padding: 0.5em;
}

/*
	Section heading. Not hanging anymore but
	otherwise as fancy as chapter heading,
	just smaller of course.
*/
h3 {
	background-color: #D5D5D5;
	border-bottom: 2pt solid #656E64;
	color: #52555A;
	font-family: biolinum, sans-serif;
	margin-top: 1em;
	margin-bottom: 0.5em; /* seems to collapse with paragraph margin */
	padding: 0.25em;
}

/*
	Subsection heading. Now we're getting a
	lot plainer.
*/
h4 {
	color: #52555A;
	font-family: biolinum, sans-serif;
	margin-top: 1em;
	font-size: 16pt;
	margin-bottom: 1em; /* looks better, also required for runin hack */
}

h5 {
	color: #52555A;
	display: inline;
	float: left;
	font-size: 16pt;
	margin: 0;
    margin-bottom: -1em; /* required for Chrome to NOT catch 2nd line */
	margin-right: 0.5ex;
	
    margin-top:0.3ex;
}
h6 {
	color: #52555A;
	display: none; /* TODO: temporarily disabled */
}
/* Sidebar navigation */
.nav-sidebar {
  margin-right: -21px; /* 20px padding + 1px border */
  margin-bottom: 20px;
  margin-left: -20px;
}
.nav-sidebar > li > a {
  padding-right: 20px;
  padding-left: 20px;
}
.nav-sidebar > .active > a,
.nav-sidebar > .active > a:hover,
.nav-sidebar > .active > a:focus {
  color: #fff;
  background-color: #428bca;
}


/*
 * Main content
 */

.main {
  padding: 20px;
}
@media (min-width: 768px) {
  .main {
    padding-right: 40px;
    padding-left: 40px;
  }
}
.main .page-header {
  margin-top: 0;
}


/*
 * Placeholder dashboard ideas
 */

.placeholders {
  margin-bottom: 30px;
  text-align: center;
}
.placeholders h4 {
  margin-bottom: 0;
}
.placeholder {
  margin-bottom: 20px;
}
.placeholder img {
  display: inline-block;
  border-radius: 50%;
}
