
/* 
 *  Some useful numbers...
 *
 *  When font-size is 1em/12pt/16px/100%:
 *  1px = 0.0625em (when PPI is 96)
 *  1in = 6em
 *  1pt = 0.0833333em (1/12em)
 *
 */

/*! HTML5 Boilerplate v4.3.0 | MIT License | http://h5bp.com/ */

/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html,
button,
input,
select,
textarea {
    color: #222;
}
@media print {
    html,
    button,
    input,
    select,
    textarea {
        color: #000;
    }
}

html {
    font-family: 'Special Elite', 'Courier New', monospace;
    font-size: 1em;
    line-height: 1.3;
}

/*
 * Remove text-shadow in selection highlight: h5bp.com/i
 * These selection rule sets have to be separate.
 * Customize the background color to match your design.
 */

::-moz-selection {
    background: #b3d4fc;
    text-shadow: none;
}

::selection {
    background: #b3d4fc;
    text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
}

/*
 * Remove the gap between images, videos, audio and canvas and the bottom of
 * their containers: h5bp.com/i/440
 */

audio,
canvas,
img,
video {
    vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
    resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

html {
    margin: 0;
    padding: 0;
}
body {
    margin: 0;
    padding: 0;
    background: url('../img/web-background.jpg');
    background-attachment: fixed;
}
@media print {
    body {
        background: none;
    }
}

p,
pre {
    margin: .5em 0 .75em; /* bring top of paragraphs closer to headers */
}

em {
    font-style:normal;
    text-decoration:underline;
}

h1 {
    font-size: 2em;
    margin: 0.67em 0 0;
}

h2 {
    font-size: 1.5em;
    margin: 0.83em 0 0;
}

h3 {
    font-size: 1.17em;
    margin: 1em 0 0;
}

h4 {
    font-size: 1em;
    margin: 1.33em 0 0;
}

h5 {
    font-size: 0.83em;
    margin: 1.67em 0 0;
}

h6 {
    font-size: 0.67em;
    margin: 2.33em 0 0;
}

h2, h3, h4 {
    text-decoration:underline;
}

li ul {
    margin: 0;
}

table {
    border-collapse:collapse;
}

table, th, td {
    border: 1px solid #222;
}
@media print {
    table, th, td {
        border-color: black;
    }
}

td, th {
    padding: .3em .6em .2em;
}

.new-block-formatting-context {
     /* Starts a new block formatting context which will prevent text from wrapping tightly around
        an image, etc.
        http://colinaarts.com/articles/the-magic-of-overflow-hidden/
      */
    overflow: hidden;
}

.no-border, .no-border tr, .no-border tr th, .no-border tr td {
    border: none;
}

.centered-img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.diagram {
    width: 9em;
    float: right;
    margin-left: 1em;
    margin-bottom: 1em;
}

.diagram-label {
	text-align:center;
}

.page {
    margin: 1em auto;
    padding: 0;
    border: 1px solid #222; /* Safely using px because exists outside layout of page content */
    box-shadow: #222 0.0em 0em 0.6em;
    clear: both;
    background-color: #FFF;
    background-repeat: no-repeat;
    background-position: center; 
    background-size: 100%;
    width: 51em; /* = 8.5in at 12pt (1em) */
    min-height: 66em; /* = 11in at 12pt (1em) */
}
@media print {
    .page {
        margin: 0;
        border: none;
        box-shadow: none;
        max-width: none;
        min-height: initial;

        width: 51em; /* = 8.5in at 12pt (1em) */
        height: 66em; /* = 11in at 12pt (1em) */
        page-break-before: always;
    }
}

.page-bg-01 {
    background-image: url("../img/page-bg-noise-01.png");
}

.page-bg-02 {
    background-image: url("../img/page-bg-noise-02.png");
}

.page-bg-03 {
    background-image: url("../img/page-bg-noise-03.png");
}

.page-bg-04 {
    background-image: url("../img/page-bg-noise-04.png");
}

.page-bg-05 {
    background-image: url("../img/page-bg-noise-05.png");
}

.page-bg-06 {
    background-image: url("../img/page-bg-noise-06.png");
}

.page-bg-07 {
    background-image: url("../img/page-bg-noise-07.png");
}

@media print {
    .page-first {
        page-break-before: auto;
    }
}

.page-content {
    margin: 4.5em 8.82% 0; /* = 0.75in ~0.75in 0 at 12pt (1em) */
    min-height: 57em; /* Leaving 3em at the bottom for footer (0.75in) */
}

.page-header {
    display: block;
    position: relative;
    height: 0;
    top: 1.5em; /* = 0.25in at 12pt (1em) */
    margin: 0 5.88%; /* = ~0.5in at 12pt (1em) */
}
/*.page-first .page-header {
    display: none;
}*/
.page-header-section-title {
    position: relative;
    height: 0;
    top: 0;
    float: right;
}
.page-header-doc-title {
    position: relative;
    height: 0;
    top: 0;
}

.page-footer {
    text-align: center;
}

.relative-footer {
    margin-top: 1.5em; /* = 0.25in */
    height: 3em /* = 0.5in */
}

.absolute-footer {
    position: relative;
    height: 0;
    top: 63em; /* = 10.5in at 12pt (1em) */
    display: none;
}

@media print {
    .relative-footer {
        display: none;
    }

    .absolute-footer {
        display: block;
    }
}

.appendix-reference {
    font-style: italic;
}

/* ==========================================================================
   Section-specific
   ========================================================================== */

.instructions {
    font-family: 'Cabin', sans-serif;
    line-height: normal;
}

.instructions h2, .instructions h3, .instructions h4 {
    text-decoration:none;
}

.instructions em {
    font-style: italic;
    text-decoration: none;
}

.bomb-diagram {
    text-align: center;
    margin: 0 auto;
    display:block;
}

.bomb-diagram-front {
	width: 18.0020625em; /* Hardcoding for IE */
}

.bomb-diagram-side {
	width: 5.3895625em; /* Hardcoding for IE */
}

.diagram-label {
}

.bomb-diagram img {
    height: 11.7em; /* just barely gives enough room for all the other text */
    vertical-align: middle;
    padding: .5em 1em;
}

.bomb-diagram table, .bomb-diagram tr, .bomb-diagram td {
    margin:0;
    padding:0;
    border:0;
}

.bomb-diagram table {
    margin: 0 auto;
}

.timer-diagram {
    text-align: center;
    display: block;
    float: right;
    width: 5em;
    padding: 0;
    margin: 0 0 2em 2em;
}

.timer-diagram img {
    width: 100%;
    margin: 0;
    padding: 0;
}

.section-title .page-content {
    text-align: center;
}

.section-title .vertical-spacer
{
    height: 20.5em;
}

.music-image {
    height: 45em;
}

.music-table td, .music-table th {
    padding: 0;
}

.password-table {
    margin-left: auto;
    margin-right: auto;
}

.repeaters-table {
    width: 98%;
    border: none;
    margin-left: auto;
    margin-right: auto;
}

.repeaters-spacer {
	border:none;
}

.whos-on-first-step1-table, .whos-on-first-step1-table td  {
    margin-left: auto;
    margin-right: auto;
	border:none;
}

.whos-on-first-step1-table th, .whos-on-first-step1-table td {
	font-size: 0.9em;
    width: 6.5em;
    padding: 0.45em 0.45em .7em .7em;
}

.whos-on-first-step1-table th table, .whos-on-first-step1-table td table {
    width: 95%;
    margin-left: auto;
    margin-right: auto;
		
}            

.whos-on-first-look-at-display  {
	background-color: black;
	color: white;
}
                            
.whos-on-first-step1-table td table td
{
	font-size: 1em;
    height: 1.5em;
	width: 50%;
    padding: 0;
	text-align: center;
	border: 1px solid black;
}

.whos-on-first-step1-table td table th
{
	font-size: 1em;
	height: 1.5em;
	padding: 0.1em 0.1em;
	text-align: center;
	border: 1px solid black;
}

.whos-on-first-step1-table th {
	border: 1px solid black;
}

.whos-on-first-step2-table {
	width: 105%;
}

.whos-on-first-step2-table th {
    padding-left: .2em;
	padding-right: .2em;
	padding-top: .15em;
	padding-bottom: .15em;
}

.whos-on-first-step2-table td {
    font-size: .78em;
}

.keypad-table {
    margin-left: auto;
    margin-right: auto;
    font-family: Arial, sans-serif;
    font-size: 2.2em;
    border-style: none;
    text-align: center;
}

.keypad-table-column {
    background-color: #FFF; /*For ensuring photocopy noise doesn't affect symbols*/
	padding: .1em;
}

.keypad-table-spacer {
	border-style: none;
}

.keypad-symbol-image {
	height:1.9em;
}

.maze {
	width:11em;
	height:11em;
	margin:.1em;
}

#morseCodeChart {
	float: left;
	margin-right: 1em;
    height: 32em;
	width: 24.8270625em; /* Hardcode for IE */
	border:1px solid #021a40;
	background-color:#ffffff;
}

.morse-code table th {
	font-size: 1.2em;
	font-weight: bold;
	width: 5em;
}

.morse-code table td {
	text-align: center;
}

.venn-wires table th {
	font-size: 1.2em;
	font-weight: bold;
}

.venn-wires table td {
	text-align: center;
}

#venndiagram {
	display: block;
	width: 70%;
    position:relative;
    top: -2em;
	margin-bottom: 0;
	margin-left: auto;
	margin-right: auto;
}


#vennlegend {
	width: 20em;
	float: left;
    position:relative;
    top: -0.7em;
}

#venntable {
	border-width: 0.2em;
    position:relative;
    top: -0.7em;
}

#venntable td {
	font-size: 0.75em;
}

.venn-wires .appendix-reference {
    margin-top: 0;
    position:relative;
}

.appendix-ports table {
    margin-top: 1em;
}

.appendix-ports img {
	height: 5em;
}

.appendix-ports table td {
	text-align: center;
}

.appendix-ports table th {
	font-size: 1.2em;
	font-weight: bold;
}

.needy-knob table {
    margin-left: 1.3em;
    margin-right: 1.3em;
}

.needy-knob table td, .needy-knob table th {
    width: 1.5em;
    text-align:center;
}

.needy-diagram-label {
	text-align:left;
}

.wire-sequence table {
    display: inline-table;
    margin-top: 1em;
    margin-bottom: 1em;
    width: 15.3em;
    font-size: 0.9em;
}

.wire-sequence td, .wire-sequence th {
    padding-left: 0.4em;
    padding-right: 0.4em;
}

.wire-sequence table .header {
    background-color: #222;
    color: #FFF;
}

.wire-sequence .blue-table {
    /* Because it's the middle table... */
    margin-left: .3em;
    margin-right: .3em;
}

.wire-sequence .second-col {
    width: 5em;
}

.memory-rules p {
    margin-top: .3em;
    font-size: 0.95em; /* TODO: Remove this, it's a quick hack to get printing looking nicer with our placeholder graphic design. */
}

.rhythm-heaven .sub-components {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.rhythm-heaven .sub-components img {
    width: 5em;
    max-height: 4em;
}

.rhythm-heaven .example {
    width: 29em;
    float: right;
    position: relative;
    top: -2.9em;
}

.rhythm-heaven .example td, .rhythm-heaven .example th {
    padding: .15em .7em;
}

.flavour-text
{
	font-style: italic;
	font-size:75%;
    margin-top: .5em;
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Image replacement
 */

.ir {
    background-color: transparent;
    border: 0;
    overflow: hidden;
    /* IE 6/7 fallback */
    *text-indent: -9999px;
}

.ir:before {
    content: "";
    display: block;
    width: 0;
    height: 150%;
}

/*
 * Hide from both screenreaders and browsers: h5bp.com/u
 */

.hidden {
    display: none !important;
    visibility: hidden;
}

/*
 * Hide from both screenreaders and browsers, but only for non-print
 */
.hide-screen {
    display: none;
    visibility: hidden;
}

@media print {
    .hide-screen {
        display: initial;
        visibility: initial;
    }
}

/*
 * Hide from both screenreaders and browsers, but only for print
 */
@media print {
    .hide-print {
        display: none;
        visibility: hidden;
    }
}

/*
 * Hide only visually, but have it available for screenreaders: h5bp.com/v
 */

.visuallyhidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

/*
 * Extends the .visuallyhidden class to allow the element to be focusable
 * when navigated to via the keyboard: h5bp.com/p
 */

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
    clip: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    width: auto;
}

/*
 * Hide visually and from screenreaders, but maintain layout
 */

.invisible {
    visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * For modern browsers
 * 1. The space content is one way to avoid an Opera bug when the
 *    `contenteditable` attribute is included anywhere else in the document.
 *    Otherwise it causes space to appear at the top and bottom of elements
 *    that receive the `clearfix` class.
 * 2. The use of `table` rather than `block` is only necessary if using
 *    `:before` to contain the top-margins of child elements.
 */

.clearfix:before,
.clearfix:after {
    content: " "; /* 1 */
    display: table; /* 2 */
}

.clearfix:after {
    clear: both;
}

/*
 * For IE 6/7 only
 * Include this rule to trigger hasLayout and contain floats.
 */

.clearfix {
    *zoom: 1;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
    /* Style adjustments for viewports that meet the condition */
}

@media print,
       (-o-min-device-pixel-ratio: 5/4),
       (-webkit-min-device-pixel-ratio: 1.25),
       (min-resolution: 120dpi) {
    /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid required HTTP connection: h5bp.com/r
   ========================================================================== */

@media print {
    /* Removed all this stuff because we'll be aiming to make everything deliberate for print */
    * {
        /*background: transparent !important;
        color: #000 !important;*/ /* Black prints faster: h5bp.com/s */
        /*box-shadow: none !important;
        text-shadow: none !important;*/
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    abbr[title]:after {
        content: " (" attr(title) ")";
    }

    /*
     * Don't show links for images, or javascript/internal links
     */

    .ir a:after,
    a[href^="javascript:"]:after,
    a[href^="#"]:after {
        content: "";
    }

    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    thead {
        display: table-header-group; /* h5bp.com/t */
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    img {
        max-width: 100% !important;
    }
    
    @page {
        margin: 0;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }
}