/**
 * @file
 * Basic layout structure
 */

#header .inside,
#sub-nav .region,
#preface .region,
#container,
#postscript .region,
#footer .region,
#closure .region {
  max-width: 72em;
  height: auto;
  overflow: hidden;
  margin: 0 auto;
  position: relative;
}
#wrapper {
  float: left;
  width: 100%;
}
#primary {
  margin: 0 39% 0 25%;
}
#secondary {
  float: left;
  width: 25%;
  margin-left: -100%;
}
#tertiary {
  float: left;
  width: 332px;
  margin-left: -332px;
}
#footer {
  clear: left;
  width: 100%;
}

/* no secondary */
.no-secondary #primary {
  margin-left: 0;
}
/* no tertiary */
.no-tertiary #primary {
  margin-right: 0;
}
/* no secondary & tertiary */
.no-secondary.no-tertiary #wrapper {
  float: none;
}
@media only screen and (max-width: 78em) {
  #header .inside,
  #sub-nav .region,
  #preface .region,
  #container,
  #closure .region,
  #postscript .region .block > .view {
    margin-left: 3em;
    margin-right: 3em;
  }
  #footer .region {
    margin: 0;
    max-width: none;
  }
}
@media only screen and (max-width: 72em) {
  #tertiary {
    width: 300px;
    margin-left: -300px;
  }
  #tertiary .region {
    position: relative;
    left: 2em;
  }
}
@media only screen and (max-width: 60em) {
  #header .inside,
  #sub-nav .region,
  #preface .region,
  #container,
  #closure .region,
  #postscript .region .block > .view {
    margin-left: 2em;
    margin-right: 2em;
  }
  #primary {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  #secondary,
  #tertiary {
    margin: 0;
    width: 100%;
  }
  #tertiary .region {
    left: 0;
  }
}
@media only screen and (max-width: 30em) {
  #header .inside,
  #preface .region,
  #container,
  #closure .region,
  #postscript .region .block > .content {
    margin-left: 1em;
    margin-right: 1em;
  }
}

@media only screen and (max-width: 48em) {
  #page {
    padding-bottom: 3em;
  }
}
@media only screen and (max-width: 30em) {
  #page {
    overflow: hidden;
  }
}
