﻿/* For IE */
section, header, nav, footer {
    display: block;
}

* {
    font-family: arial, sans-serif;
}

html {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #b2cdda;
}

body {
    box-sizing: border-box;
    position: relative;
    max-width: 1280px;
    min-width: 325px;
    width: expression(document.documentElement && document.documentElement.offsetWidth > 1280? "1280px": "auto");
    height: auto !important;
    height: 100%;
    min-height: 100%;
    margin: 0 auto;
    background: #b2cdda;
}

body:before, body:after {
    content: "";
    display: block;
    height: 16px;
    margin-right: 238px;
    font-size: x-small;
    text-align: center;
    color: #333;
}

body:after {
    content: "Copyright 2009-2011 Arthur McBain";
    margin-top: 2px;
}

body > header {
    height: 120px;
    overflow: hidden;
    text-indent: 100%;
    background: url(http://asmcbain.net/public/images/asmcbain.net12.png) no-repeat 8px 97px,
                url(http://asmcbain.net/public/images/header.png) #b2cdda;
}

aside {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 200px; /* Adjust aside:before width and #content:after right */
    min-height: 580px;
    padding: 11px 0 10px 11px;
    background: #f0f0f0;
    box-shadow: 0 0 3px #555;
}

aside:before {
    content: "";
    position: absolute;
    top: 11px;
    left: 11px;
    width: 199px;
    height: 120px;
    background: url(http://asmcbain.net/public/images/header.png) no-repeat right top;
    border: 1px solid #555;
    border-right: none;
}

@media (max-width: 640px) {

    body:after {
        margin-right: 0;
    }

    aside {
        left: 0;
        bottom: auto;
        width: auto;
        height: 123px;
        min-height: 0;
    }

    aside:before {
        left: 0;
        border-right: 1px solid #555;
        border-left: none;
    }
}

aside nav {
    position: relative;
    overflow: hidden;
    padding-bottom: 9px;
}

aside nav ul {
    overflow: hidden;
    margin: 133px 0 0 -1px;
    padding: 0;
}

aside nav li {
    height: 26px;
    overflow: hidden;
    margin-bottom: 1px;
    list-style-type: none;
}

aside nav a {
    display: block;
    float: right;
    width: 97%;
    height: 100%;
    line-height: 26px;
    vertical-align: middle;
    text-indent: 6px;
    text-decoration: none;
    font-size: 14px;
    color: #707070;
    background-color: #e3e3e3;
}

aside nav a.selected {
    width: 100%;
    font-weight: bold;
}

aside form {
    position: relative;
    margin-bottom: 20px;
}

aside input {
    width: 179px; /* Is somehow tied to the width of aside */
    height: 15px;
    padding-right: 18px;
    border: 1px solid #959699;
}

aside button {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 12px;
    height: 12px;
    font-size: 0;
    border: none;
    /* http://openclipart.org/media/files/antsorin/13878 */
    background: url(http://asmcbain.net/public/images/antsorin_magnifying-glass.png) no-repeat white;
}

@media (max-width: 640px) {

    aside nav ul {
        margin-top: 0;
        margin-left: 201px;
    }

    aside nav li {
        width: 100px;
        height: 24px;
    }

    aside nav li:first-child, aside nav li:last-child {
        height: 23px;
    }

    aside nav a {
        float: none;
        width: 94%;
        line-height: 24px;
    }

    aside form {
        position: absolute;
        right: 0;
        bottom: 11px;
        margin: 0;
        z-index: 1;
    }
}

h2 {
    font-size: larger; /* actually makes the text *smaller* isn't life wonderful? */
}

em {
    font-size: x-small;
}

#whatsnew, #whatsnew section {
    height: 70px;
}

#whatsnew h1 {
    height: 26px;
    margin: 0 0 9px;
    font-size: small;
    text-indent: 6px;
    line-height: 26px;
    background-color: #E3E3E3;
}

#whatsnew h1 a {
    display: block;
    text-decoration: none;
    color: #707070;
}

@media (max-width: 640px) {

    #whatsnew {
        position: absolute;
        right: 0;
        top: 11px;
        width: 199px;
        z-index: 0;
    }

    #whatsnew h1 {
        height: 25px;
        margin-bottom: 8px;
    }

    #whatsnew section {
        display: none;
    }

    #whatsnew h1 + section {
        display: block;
        border-bottom: none;
    }
}

@media (max-width: 538px) {

    aside form input {
        width: 99px;
    }

    #whatsnew {
        display: none;
    }
}

@media (max-width: 459px) {

    aside form {
        display: none;
    }
}

#whatsnew section {
    float: right;
    width: 97%;
    padding-bottom: 1px;
    border-bottom: 1px solid #e3e3e3;
}

#whatsnew section:last-child {
    border-bottom: none;
}

#whatsnew section h2 {
    margin: 0;
    font-weight: bold;
    font-size: small;
}

#whatsnew section a {
    font-size: small;
    text-decoration: none;
    color: #707070;
}

#whatsnew section a:hover {
    text-decoration: underline;
}

#whatsnew section img, #whatsnew section div {
    float: left;
    position: relative;
    width: 40px;
    height: 40px;
    margin: 5px 5px 0 8px;
    border: none;
}

#whatsnew section div {
    font-size: 0;
    border-radius: 40px;
    background-color: #e3e3e3;
}

#whatsnew section div:before, #whatsnew section div:after {
    content: "";
    display: block;
    position: absolute;
}

#whatsnew section div:before {
    top: 4px;
    left: 4px;
    width: 32px;
    height: 32px;
    border-radius: 35px;
    background-color: #f0f0f0;
}

#whatsnew section div:after {
    top: 4px;
    left: 18px;
    width: 4px;
    height: 32px;
    transform: rotate(45deg);
    -o-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    -webkit-transform: rotate(45deg);
    background-color: #e3e3e3;
}

#content {
    overflow: hidden;
    margin: 0 16px;
    margin-right: 238px; /* 20px larger than :after */
    padding: 10px 16px;
    padding-bottom: 0;
}

#content, #content a, #content .item footer a:hover {
    color: #333;
}

#content:after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0; /* 2px larger than aside to account for shadow */
    width: 222px; /* 22px larger than aside */
    min-height: 579px;
    padding: 11px 0;
    background: #d8e6d1;
    box-shadow: 0 0 3px #555;
}

@media (max-width: 640px) {

    #content {
        margin: 0;
        margin-top: 145px;
    }

    #content:after {
        right: 0;
        bottom: auto;
        left: 0;
        width: auto;
        height: 134px;
        min-height: 0;
    }
}

@media (min-width: 1325px) {

    #content:after {
        right: -11px;
        width: 233px; /* 10px wider than :after sans media query */
    }
}

#content h1 {
    margin-top: 0;
}

#content section {
    border-top: 1px solid #9cb4bf;
}

#content nav {
    margin-bottom: 1em;
    overflow: hidden;
}

#content nav ul {
    float: left;
    margin: 0;
    padding: .25em;
    background-color: #A7C0CC;
    border-radius: 2px;
    cursor: default;
}

#content nav li {
    display: inline;
}

#content nav li:first-child:before {
    content: "Pages";
    padding-right: 1em;
    font-weight: bold;
    color: #333;
}

#content nav li:first-child a, #content nav li:last-child a {
    text-decoration: none;
}

#content nav li.disabled, #content .item footer a {
    color: #7d9099;
}

#content .item, #content .linkbox {
  border-top: none;
}

.item {
  display: block;
  overflow: hidden;
  margin: 0 -1ex 1em 0;
  padding-right: 1ex;
}

.item header, .linkbox h2 {
  margin-bottom: 0;
  border-bottom: 1px solid #9cb4bf;
}

.item header, .item footer {
  overflow: hidden;
}

.item header h2 {
  float: left;
  margin: 0;
}

.item header a, .item footer a {
  text-decoration: none;
  color: #333;
}

.item header a:hover, .item footer a:hover {
  text-decoration: underline;
}

.item header span, .item header time {
  float: right;
  margin-left: 1ex;
  color: #555;
}

.item footer {
  min-height: 1em;
  margin-bottom: .5ex;
}

.item footer a {
  float: right;
  margin-left: 1ex;
  font-weight: bold;
}

.item p {
  margin: 0 0 1ex 1em;
}

.item footer + a, .item footer + span {
  display: block;
  float: left;
  width: 75px;
  max-height: 75px;
  overflow: hidden;
  margin: 0 1em .75em;
}

.item img {
  display: block;
  width: 100%;
  border: none;
}

.linkbox h2 {
  margin-top: 0;
}

.linkbox ul {
  margin-left: 1em;
  padding: 0;
  list-style: none;
}

.linkbox a {
  text-decoration: none;
}

.linkbox a:hover, .linkbox span {
  text-decoration: underline;
}

.errorbox {
  text-align: center;
  margin-bottom: 2em;
}

