@import url("reset.css");

/*
 * Global styles. We only set styles on elements if they really,
 * really should apply everewhere. Otherwise we define styles on
 * elements only with a class (e.g. h1.foo) or as part of a descendant
 * selector. (E.g. .someclass h1). Additionally, the elements span and
 * div should never be styled without a class or containment
 * qualification so they can be used within a particular class or
 * containing element starting from a reset state.
 */

body {
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif;
}

pre, code {
    font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
}

p {
    margin-bottom: 10px;
}

/*
 * "article" is the class for article content.
 */

.article h1 {
    line-height: 1em;
    margin-bottom: 0;
    padding-bottom: 0;
}

.article h2 {
    font-size: 18px;
    font-style: italic;
    margin-top: 20px;
    margin-bottom: 6px;
}

.article p {
  line-height: 1.5;
  text-indent: 1em;
  padding: 0;
  margin: 0;
}

div.hr {
    height: 40px;
    margin-bottom: 10px;
    background: #fff url("/img/fleuron.png") no-repeat scroll center;
}

div.hr hr {
    display: none;
}

.article .by {
    line-height: 1em;
    font-size: 14px;
    font-style: italic;
    /*text-transform: uppercase;*/
    font-variant: small-caps;
    margin-top: 3px;
    padding-top: 0;
    margin-bottom: 12px;
}

.article h1 + p { text-indent: 0; }
.article h2 + p { text-indent: 0; }
.article h3 + p { text-indent: 0; }
.article .section + p { text-indent: 0; }
.article .intro + p { text-indent: 0; }
.article .by + p { text-indent: 0; }
/*.article ul + p { text-indent: 0; }*/

/* P's in LI's */
.article li p { text-indent: 0; }

.article .name {
    font-family: "Gill Sans";
    font-variant: small-caps;
    letter-spacing: 1px;
    font-weight: 300;
}

.intro { font-style: italic; margin-bottom: 2em; }
.intro > p:first-child { text-indent: 0; }
.intro  i { font-style: normal;  }

.greeting { font-style: italic; margin-bottom: 2em; }
.greeting > p:first-child { text-indent: 0 }
.greeting i { font-style: normal;  }
.greeting p { line-height: 22px; margin-left: 2em; margin-right: 2em; }


.toc h1 {
    font-size: 24px;
}

.toc h2 { 
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    /*margin-bottom: 6px;*/

}

.toc h2 span {
    font-size: 16px;
    font-style: italic;
    font-weight: normal;
    color: #888;
    /*position: absolute;
    right: 365px;*/
}

.toc h3 {
    margin-top: 0;
    margin-bottom: 6px;
    font-style: italic
}

sup { font-size: 75%; vertical-align: super; }

a[href] {
  color: #0043c0;
  text-decoration: none;
  font-weight: 900;
}

a[href]:hover   { text-decoration: underline; }
a[href]:visited { color: #4343c0; }

h1 {
    font-size: 24px; 
    line-height: 26px;
    margin-bottom: 12px;
    margin-top: 24px;
}

/*
 * "generic" is the class for all the pages on the site that aren't
 * article content.
 */

.generic h2 {
    font-size: 18px;
    font-style: italic;
    margin-top: 20px;
    margin-bottom: 6px;
}


.generic h3 { 
    /*font-size: 16px; 
    margin-bottom: 2px;
    */
    display: none;
}

ul, ol {
    margin: 20px 0 20px 1em;
}

ul { list-style: circle; }
ol { list-style: decimal; }

li {
    margin: 0.1em 0.1em 0.5em 1.3em;
    line-height: 22px;
}

figure {
    display: block; 
    margin-left: 2em;
    margin-right: 2em;
}

figcaption { font-style: italic; display: block; }


/*
 * #header is the title bar that goes on all (most?) pages. It
 * contains the logo and the navigation bar.
 */

#header {
    height: 50px;
    border-bottom: 1px solid #d3d3d3;
    background: #fafafa;
    background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#dfdfdf));
    background: -moz-linear-gradient(top, #ffffff, #dfdfdf);
    filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#FFFFFF', EndColorStr='#DFDFDF');
}

/*
 * #logo is the "CODE QUARTERLY: The hackademic journal" that
 * appears at the top-left of the header.
 */

#logo {
    display: block;
    font-weight: normal;
    color: black;
    margin: 4px 20px 4px 10px;
    float: left;
}

#logo h1 {
    font-size: 24px;
    line-height: 26px;
    margin-bottom: 0;
    margin-top: 0;
}

#logo h2 {
    text-transform: uppercase;
    font-style: normal;
    margin-top: -2px;
    margin-bottom: 0;
    font-size: 11px;
    line-height: 18px;
}

#logo a {
    font-weight: normal;
    color: black;
}

#logo a:hover {
    text-decoration: none;
}

/*
 * #navigation is the nav bar that goes in #header to the right of #logo.
 */

#navigation {
    padding: 0 0 0 180px;
}

#navigation span {
    display: block;
    color: black;
    float: left;
    padding: 20px 13px;
    font-size: 11px;
    text-transform: uppercase;
    border-right: 1px solid #d3d3d3;
}

#navigation span:first-child {
    border-left: 1px solid #d3d3d3;
}

#navigation a:hover, #navigation a.active {
    background: #ddd;
    background: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#d0d0d0));
    background: -moz-linear-gradient(top, #f5f5f5, #d0d0d0);
    filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#F5F5F5', EndColorStr='#D0D0D0');
}


/*
 * #container is the sole child of the body element. It exists so we
 * can make it a particular width and put a border around it.
 */

#container {
    position: relative;
    width: 970px; min-height: 700px;
    border: 1px solid #999;
    margin: 25px auto;
}

#survey-form, #comment-form {
    font-family: "Gill Sans", Arial;
}

#sidebar {
    position: absolute;
    right: 10px;
    margin-top: 20px;
    font-size: 14px;
    line-height: 22px;
    height: auto;
}
#sidebar > div {
    border: 1px solid #d3d3d3;
    background: #fafafa;
    width: 300px;
    padding: 10px;
    margin-bottom: 20px;
}

#sidebar h4 {
    font-weight: bold;
    margin-bottom: 10px;
}
#sidebar p {
    margin-bottom: 10px;
}
#sidebar input[type="text"], #sidebar textarea {
    width: 290px;
    padding: 2px 3px;
}
#sidebar textarea {
    height: 55px;
}
#sidebar form {
    font-size: 12px;
    padding-bottom: 10px;
}

#body {
    margin: 20px 225px 10px 10px;
    font-size: 14px;
    /*line-height: 22px;*/
    line-height: 28px;
}

#body code { font-size: 90%; }

body.widebar #body {
    margin-right: 365px;
}

#body p {
    /*margin-bottom: 10px;*/
}



#body pre {
    margin: 20px 1em;
    font-size: 12px;
    line-height: 16px;
    border: 1px solid #d3d3d3;
    background: #f8f8ff;
    padding: 10px 10px 0;
    color: #444;
}

#body .signature p {
    margin: 0;
    line-height: 22px;
}

blockquote {
    margin: 1em;
}

blockquote p {
    font-style: italic;
    line-height: 22px;
}

blockquote > p:first-child {
    text-indent: 0;
}

/* Used in dynamically generated HTML. */
.thanks {
    font-size: 120%;
    font-style: italic;
    text-align: center;
}

.terms-preamble { border: thin solid black; padding: 1em; margin: 2em; }
.terms {
    margin-top: 20px;
    border-bottom: thin solid black;
    margin-bottom: 20px;
}

.notes { border-top: thin solid black; margin-top: 3em; padding-top: 1em; }
.note { margin-bottom: 1em; font-size: 90%; }
.note p:first-child { text-indent: 0; }

.note-ref {
    vertical-align: super;
    font-size: 90%;
    /*padding: 24px 0;
    background: #dfd;*/
}
.note-number { font-size: 100%; }



#submitform input {
    width: 290px;
    padding: 2px 3px;
}

#submitform input[type="file"] {}

#submitform label { width: 150px; display: inline-block; }

#submitform .problem { color: red; font-weight: 900; }



/*
 * Currently unused elements.
 */

#search_box {
    position: absolute;
    top: 13px; right: 12px;
    width: 150px;
}

#callout {
    font-size: 14px;
    margin-bottom: 20px;
}
#callout img {
    float: left;
    border: 1px solid #d3d3d3;
}
#callout ul {
    font-size: 14px;
    line-height: 16px;
    width: 300px;
    float: left;
    margin: 0 0 0 10px;
    color: #999;
}
.byline {
    font-size: 12px;
    line-height: 14px;
    color: #777;
    margin-bottom: 15px;
}
.byline a {
    text-transform: uppercase;
}

#adwords {
    font: 11px Arial;
    color: #777;
    position: absolute;
    top: 50%; left: 34px;
}

#purchase {
    position: absolute;
    margin-top: 25px;
    right: 225px;
    font-size: 11px;
    line-height: 16px;
}

#purchase a {
    position: relative;
    padding: 0 10px 0 32px;
    border-left: 1px solid #d3d3d3;
}
#purchase a:first-child {
    border-left: 0;
}
#purchase img {
    margin-right: 3px;
    position: absolute;
    left: 10px;
}

.tk:before {
    content: "TK: "
}
.tk {
    color: red;
    text-transform: uppercase;
    background: #afa;
    border: thin solid #00f;
    margin: 2em;
    padding: 1em;
}

#shutdown {
    background: #999;
    color: #0f0;
    padding-top: 1em;
    padding-bottom: .5em;
    text-align: center;
    font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
   
}