/*
 * Global styles for Ghost which are used throughout the admin interface
 * Utility classes defined here to keep other libraries (Normalize) from
 * being modified, preventing upgrade later.
 *
 * Table of Contents
 *
 * Utility Classes
 * Global Styles
 * Global Navigation
 * Mobile Navigation
 * Drop-down / Pop-up Menu
 * Main Elements
 * Floating Headers
 * Image Uploader
 * Misc
 */

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.hidden         { @include hidden; } // TODO: Merge this with .visuallyhidden
.invisible      { visibility: hidden; }
.right          { float: right; }
.left           { float: left; }

.markdown, pre, code { font-family: $font-family-mono; }

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

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

.clearfix:before,
.clearfix:after {
    content: " ";
    display: table;
}
.clearfix:after { clear: both; }
.clearfix { *zoom: 1; }

/* ==========================================================================
   Global Styles
   ========================================================================== */

body {
    width:100%;
    color: $darkgrey;
    font-weight: 300;
    background: $lightbrown;
    @include breakpoint($mobile) { background: #fff; }
}

::-moz-selection {
    color: $darkgrey;
    background: lighten($blue, 20%);
    text-shadow: none;
}

::selection {
    color: $darkgrey;
    background: lighten($blue, 20%);
    text-shadow: none;
}

article aside {
    width: 30%;
    padding: 0 2.2em;
    margin: 0 2.2em 1.6em 2.2em;
    float: right;
    background: $lightbrown;
    border-radius: 3px;
}

// Headings

h1, h2, h3,
h4, h5, h6 {
    color: $darkgrey;
}

h2 {
    padding-top: 0.8em;
    margin-top: 0.8em;
    border-top: $lightbrown 1px solid;
}

h1 a:hover {
    text-decoration: none;

    box-shadow: $blue 0 -5px 0 inset;
}

h2 a:hover {
    text-decoration: none;
    box-shadow: $blue 0 -4px 0 inset;
}

h3 a:hover {
    text-decoration: none;
    box-shadow: $blue 0 -3px 0 inset;
}

h4 a:hover,
h5 a:hover,
h6 a:hover {
    text-decoration: none;
    box-shadow: $blue 0 -1px 0 inset;
}

hgroup {
    @include baseline;

    h1, h2, h3,
    h4, h5, h6 {
        padding:0;
        margin:0;
        border:none;
        margin-bottom: 5px;

        a {
            color: $darkgrey;

            &:hover {
                box-shadow: $darkgrey 0 -1px 0 inset;
            }

        }

        /*
         * Make everything except the first
         * heading appear smaller/thinner.
         */
        &:nth-child(n+2) {
            font-size: 1.8em;
            font-weight: 300;
            color: $brown;
        }

    }

}

// Text elements

p, ul, ol { @include baseline; }

ol ol, ul ul,
ul ol, ol ul {
    margin: 0.4em 0;
}

p + p,
aside + p {
    text-indent: 1.5em;
}

a {
    color:$blue;
    text-decoration:none;
    @include transition(all 0.15s ease-in-out);

    &:hover {
        text-decoration:underline;
    }

    &.highlight {
        color: $orange;
        font-weight: bold;
    }
}

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid $lightbrown;
    margin: 3.2em 0;
    padding: 0;
}

blockquote {
    @include baseline;
    @include box-sizing(border-box);
    padding: 0 1.6em 0 1.6em;
    border-left: $lightbrown 0.6em solid;

    p {
        margin:0.8em 0;
        font-size:1.2em;
        font-weight: 300;
    }

    small {
        display: inline-block;
        margin: 0.8em 0 0.8em 1.5em;;
        font-size:0.9em;
        color: $brown;

        &:before { content: '\2014 \00A0'; }
    }

    cite {
        font-weight:bold;
        a { font-weight: normal; }
    }
}

dl {
    @include baseline;

    dt {
        float: left;
        width: 180px;
        overflow: hidden;
        clear: left;
        text-align: right;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-weight: bold;
        margin-bottom: 1em
    }

    dd {
        margin-left: 200px;
        margin-bottom: 1em
    }
}

mark {
    background-color: #ffc336;
}

code, tt {
    font-family: $font-family-mono;
    font-size: 0.85em;
    background: lighten($lightbrown, 2%);
    border: 1px solid darken($lightbrown, 8%);
    border-radius: 2px;
    padding: 1px 3px;
}

pre {
    @include baseline;
    @include box-sizing(border-box);
    background: lighten($lightbrown, 2%);
    border: 1px solid darken($lightbrown, 8%);
    width: 100%;
    padding: 10px;
    font-family: $font-family-mono;
    font-size: 0.9em;
    overflow: auto;
    border-radius: 3px;

    code, tt {
        font-size: inherit;
        background: transparent;
        border: none;
        padding: 0;
    }
}

kbd {
    display: inline-block;
    margin-bottom: 0.4em;
    padding: 1px 8px;
    border: #ccc 1px solid;
    color: $darkgrey;
    text-shadow: #fff 0 1px 0;
    font-size: 0.9em;
    font-weight: bold;
    background: #f4f4f4;
    border-radius: 4px;
    box-shadow:
        0 1px 0 rgba(0, 0, 0, 0.2),
        0 1px 0 0 #fff inset;
}

// Tabular Data

table {
    @include baseline;
    @include box-sizing(border-box);
    width:100%;
    max-width: 100%;
    background-color: transparent;

    th,
    td {
        padding: 8px;
        line-height: 20px;
        text-align: left;
        vertical-align: top;
        border-top: 1px solid $lightbrown;
    }

    th { color: $brown; }

    caption + thead tr:first-child th,
    caption + thead tr:first-child td,
    colgroup + thead tr:first-child th,
    colgroup + thead tr:first-child td,
    thead:first-child tr:first-child th,
    thead:first-child tr:first-child td {
        border-top: 0;
    }

    tbody + tbody { border-top: 2px solid $lightbrown; }

    table table { background-color: #fff; }

    tbody > tr:nth-child(odd) > td,
    tbody > tr:nth-child(odd) > th {
        background-color: lighten($lightbrown, 5%);
    }

    &.plain {
        tbody > tr:nth-child(odd) > td,
        tbody > tr:nth-child(odd) > th {
            background: transparent;
        }
    }

}

// General Navigation

nav {
    ul {
        list-style: none;
        margin:0;
        padding:0;
        border-top:$lightbrown 1px solid;
    }

    li { font-size:1.1em;

        a {
            display:block;
            padding:10px 15px;
            color:$brown;
            border-bottom:$lightbrown 1px solid;

            &:hover {
                color:$darkgrey;
                background: $lightbrown;
                text-decoration: none;
            }

            &:before { margin-right:1em; } // Make space for icons

        }
    }
}

/* ==========================================================================
   Main Navigation
   ========================================================================== */
#global-header { /* Added because the code editor was breaking for the title "Ghost" - this also happens on TryGhost */
    #ghost {
        @include icon($i-ghost);
        display: block;
        float:left;
        height:40px;
        padding:12px 15px;
        color: lighten($grey, 10%);
        @include box-sizing(border-box);
        &:hover {text-decoration:none;}
    }

    #ghost:hover {
        color: $lightgrey;
        background:darken($darkgrey, 2%);
    }
}

.navbar {
    height: 40px;
    font-size: 0.85em;
    background: $darkgrey;
    @include breakpoint($netbook) {font-weight:normal}

    // The main navbar styles, apply to to everything.
    nav {

        ul {
            float:left;
            border-left:$grey 1px solid;
            border-top:none;
        }

        li {
            float:left;
            font-size: 1em;
            position:relative;
            border-right:$grey 1px solid;

            a {
                display: block;
                height:40px;
                padding:11px 15px;
                border-bottom:none;
                color: $midgrey;
                text-transform: uppercase;
                @include box-sizing(border-box);
            }

            a:hover,
            &.active a {
                color: $lightgrey;
                text-decoration: none;
                position:relative;
                background:darken($grey, 2%);
                box-shadow: 0 -2px 2px rgba(0,0,0,0.2) inset;
            }

            // Make a little arrow pointing up at the currently active menu item
            &.active a:after {
                content:"";
                position:absolute;
                bottom:0;
                left:50%;
                margin-left:-5px;
                border-width:0 5px 5px 5px;
                border-style:solid;
                border-color:$lightbrown transparent;
                display:block;
                width:0;

                @include breakpoint($mobile) {
                    border-color: #fff transparent;
                }

            }

            ul {
                position: absolute;
                top:40px;
                right:0;
                min-width:200px;
                background: $darkgrey;
            }

            li {
                width: 100%;
                border-right: none;
            }

        }

        // Add some icons to specific nav items
        a:before {margin-right: 5px;}
        .dashboard a {  @include icon($i-stats) {vertical-align: -10%} }
        .content a {    @include icon($i-content) }
        .editor a {     @include icon($i-add) }
        .settings a {   @include icon($i-settings2) }

    }//nav ul

    // Style any nav items which have dropdowns
    .subnav {
        position: relative;

        // The anchor which toggles the menu open/closed
        > a {
            @include icon-after($i-chevron-down, 8px) {margin-left: 8px};

            &.active {
                color: $lightgrey;
                background: darken($grey, 3%);
                @include transition(none);
                box-shadow: none;
            }
        }

        // The dropdown menu
        ul {
            display: none;
            padding: 7px 0;
            border-left: none;
            position: absolute;
            top:40px;
            left:-1px;
            z-index: 800;
            background:darken($grey, 3%);
            box-shadow: rgba(0,0,0,0.2) 0 4px 6px;
        }

        li {
            a {
                color: $lightgrey;

                &:hover {
                    background: darken($darkgrey, 10%);
                    @include transition(none);
                    box-shadow: none;
                }

                &:before { margin-right: 1em; } // space for icons
            }
        }

        .divider {
            height: 1px;
            margin: 7px 0;
            overflow: hidden;
            background: $grey;
        }

    }//.subnav

}//.navbar

// The user menu in the top right corner of the screen
#usermenu {
    position:absolute;
    top:0;
    right:0;
    border-right:none;
    border-left:$grey 1px solid;

    > a {
        padding-left:43px; //15px + 18px avatar + 10px
    }

    .avatar {
        height:18px;
        width:18px;
        border-radius: 50px;
        position:absolute;
        top:11px;
        left:15px;
    }

    > ul {
        right: 0;
        left: auto;
    }

    //Add some icons to specific items
    .usermenu-profile a { @include icon($i-user) }
    .usermenu-help a { @include icon($i-support, 1.1em) }
    .usermenu-shortcuts a { @include icon($i-pc)  }
    .usermenu-signout a { @include icon($i-power) }
}

/* ==========================================================================
   Mobile Navigation
   ========================================================================== */

// Yo dawg, I heard you like nav menus so I put nav menus in your nav menus
#global-header {
    @include breakpoint(650px) {

        #ghost {
            @include icon($i-menu, 14px);
            height:40px;
            width: 40px;
            text-align: center;
            padding:12px 0;
            @include transition(margin-left 0.3s ease 0s);
            .off-canvas & {
                margin-left: 280px;
                @include transition(margin-left 0.3s ease 0.1s);
            }
        }

        ul {
            position: fixed;
            overflow: auto;
            top: 0;
            right: auto;
            bottom: 0;
            left: -280px;
            z-index: 980;
            width: 280px;
            padding-top: 40px;
            font-weight:normal;
            background: $darkgrey;
            border-left:none;
            @include transition(left 0.3s ease 0.2s);
            .off-canvas & {
                left: 0;
                @include transition(left 0.3s ease 0s);
            }
        }

        li {
            float:none;
            border-right:none;
            border-bottom:$grey 1px solid;

            a:hover,
            &.active a {box-shadow: none;}

            &.active a:after {display:none;}

            a:before {margin-right: 1em;}

            ul {
                position: static;
                min-width:0;
                background: $darkgrey;
            }

            li {width: auto;}

        }

        #usermenu {
            position:fixed;
            top:0;
            right:auto;
            bottom: auto;
            left:-280px;
            height:40px;
            z-index: 990;
            width:279px;
            border-left:none;
            border-right: darken($grey, 7%) 1px solid;
            border-bottom: darken($grey, 5%) 1px solid;
            @include gradient(darken($darkgrey, 8%), darken($darkgrey, 3%));
            @include transition(left 0.3s ease 0.2s);
            .off-canvas & {
                left: 0;
                @include transition(left 0.3s ease 0s);
            }
            > a {
                &:hover { background: inherit; }
                &.active { background: darken($grey, 3%); }
            }

            > ul {
                padding: 0;
                box-shadow: none;
                width: 100%;
                font-weight: 300;
            }

            .open {
                box-shadow: rgba(0,0,0,0.4) 0 10px 20px;
            }

            li {
                border-bottom: darken($grey, 3%) 1px solid;

                a {
                    background: darken($grey, 3%);

                    &:hover {background: darken($grey, 8%)}
                    &:before { margin-right: 1em; } // space for icons
                }

            }

            .divider {display: none}

        }
    }
}

/* ==========================================================================
   Drop-down / Pop-up Menu
   ========================================================================== */

.dropdown {
    @include icon-after($i-chevron-down, 8px) {
        padding-left: 6px;
        vertical-align: 0;
    };

    &.active {
        color: $darkgrey;
        @include icon-after($i-chevron-down, 8px);
    }
}

// This is the base menu extend used for styles on interaction menus
%menu {
    display: inline-block;
    position:absolute;
    z-index: 960;
    padding:6px 0;
    border:none;
    list-style: none;
    color: $lightgrey;
    background: $darkgrey;
    border-radius: 3px;
    box-shadow: rgba(0,0,0,0.5) 0 1px 15px;

    // The triangle chiclet that points to where the menu came from
    // By default, this is bottom center.
    &:before {
        content:"";
        position:absolute;
        bottom:-10px;
        left:50%;
        margin-left:-10px;
        border-width:10px 10px 0 10px;
        border-style:solid;
        border-color:$darkgrey transparent;
        display:block;
        width:0;
    }

    li {overflow:hidden;} // Stop :hover shadow from overflowing

    a, p {
        @include box-sizing(border-box);
        display: block;
        position: relative;
        padding:10px 25px 10px 35px;
        border: none;
        @include box-sizing(border-box);
        color: $lightgrey !important; // It's dirty, but it's needed.
        text-transform: none;
        text-decoration: none;

        &:hover {
            background: $blue;
            box-shadow:
                rgba(255,255,255,0.2) 0 1px 0 inset,
                rgba(0,0,0,0.5) 0 1px 5px;
        }

    }

    // Add a check mark to the currently active menu item
    .active a {
        @include icon($i-check) {
            position: absolute;
            top: 14px;
            left: 11px;
        }
    }

}

// This extend moves the chiclet to the top, for menus which drop down.
%menu-drop {
    &:before {
        top: -10px;
        bottom: auto;
        border-width:0 10px 10px 10px;
    }
}

// Chiclet to the left, for menus appearing close to left edge of the screen.
%menu-left {
    &:before {
        left:10px;
        margin-left:0;
    }
}

// Chiclet to the right, for menus appearing close to right edge of the screen.
%menu-right {
    &:before {
        left: auto;
        right:10px;
        margin-left:0;
    }
}

// Pop menu, chiclet bottom center.
.menu {
    @extend %menu;
}

// Pop left, chiclet bottom left.
.menu-left {
    @extend %menu;
    @extend %menu-left;
}

// Pop right, chiclet bottom right.
.menu-right {
    @extend %menu;
    @extend %menu-right;
}

// Drop menu, chiclet top center.
.menu-drop {
    @extend %menu;
    @extend %menu-drop;
}

// Drop left, chiclet top left.
.menu-drop-left {
    @extend %menu;
    @extend %menu-drop;
    @extend %menu-left;
}

// Drop right, chiclet top right.
.menu-drop-right {
    @extend %menu;
    @extend %menu-drop;
    @extend %menu-right;
}

/* ==========================================================================
   Notifications
   ========================================================================== */

%notification, .notification {
    @include box-sizing(border-box);
    width: 100%;
    min-height: 40px;
    padding: 10px 43px 10px 57px;
    margin: 0 0 15px 0;
    color: rgba(255,255,255,0.9);
    background: $orange;
    position:relative;
    box-shadow: $shadow;

    @include icon($i-notification) {
        position: absolute;
        top: 0;
        left: 0;
        @include box-sizing(border-box);
        height: 100%;
        width: 44px;
        padding: 14px 15px;
        text-align: center;
        color: rgba(255,255,255,0.8);
        background: rgba(0,0,0,0.1);
    };

    .close {
        @include icon-after($i-close) {
            padding:6px;
            position:absolute;
            top:8px;
            right:9px;
        };
        display: inline-block;
        color: rgba(255,255,255,0.6);
        cursor: pointer;
        &:hover { color: #fff; }

    }
}

.notification-success {
    @extend %notification;
    @include icon($i-success);
    background: $green;
}

.notification-error {
    @extend %notification;
    @include icon($i-error);
    background: $red;
}

.notification-alert {
    @extend %notification;
    @include icon($i-info);
    background: $blue;
}

/* ==========================================================================
   Main Elements
   ========================================================================== */

main {
    position: absolute;
    bottom: 0;
    top: 55px;
    left: 15px;
    right: 15px;
    padding: 0;

    @include breakpoint($mobile) {
        left:0;
        right:0;
    }

}

/* ==========================================================================
   Floating Headers
   ========================================================================== */

// Semi-opaque fixed-position headers - used on content/editor
.floatingheader {
    @include box-sizing(border-box);
    position: absolute;
    top:0;
    left:0;
    right:0;
    z-index: 400;
    height: 40px;
    padding: 12px 15px;
    text-transform: uppercase;
    font-size: 0.85em;
    color: $brown;
    //Transparent gradient to make bg fade out as it goes out the top.
    background: -moz-linear-gradient(top,  rgba(255,255,255,1) 0%, rgba(255,255,255,1) 25%, rgba(255,255,255,0.90) 100%);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,1)), color-stop(25%,rgba(255,255,255,1)), color-stop(100%,rgba(255,255,255,0.90)));
    background: -webkit-linear-gradient(top,  rgba(255,255,255,1) 0%,rgba(255,255,255,1) 25%,rgba(255,255,255,0.90) 100%);
    background: -o-linear-gradient(top,  rgba(255,255,255,1) 0%,rgba(255,255,255,1) 25%,rgba(255,255,255,0.90) 100%);
    background: -ms-linear-gradient(top,  rgba(255,255,255,1) 0%,rgba(255,255,255,1) 25%,rgba(255,255,255,0.90) 100%);
    background: linear-gradient(to bottom,  rgba(255,255,255,1) 0%,rgba(255,255,255,1) 25%,rgba(255,255,255,0.90) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f2ffffff',GradientType=0 );

    button, .button {
        display:inline-block;
        font-size: 10px;
        min-height: 20px;
        height: 20px;
        padding: 3px 4px;
        vertical-align: top;
    }

    a {
        color: $brown;
        &:hover { color: $darkgrey; }
    }

}//.floatingheader

// Special case, when scrolling, add shadows to content headers.
.scrolling {

    .floatingheader {
        box-shadow:
            rgba(0,0,0,0.02) 0 1px 2px,
            rgba(255, 255, 255, 0.5) 0 -1px 0 inset;

        &::before {
            content: "";
            height:40px;
            width: 80%;
            position:absolute;
            bottom:0;
            left:50%;
            margin-left: -40%;
            box-shadow: rgba(0,0,0,0.02) 0 2px 2px;
        }
        &::after {
            content: "";
            height:40px;
            width: 30%;
            position:absolute;
            bottom:0;
            left:50%;
            margin-left: -15%;
            box-shadow: rgba(0,0,0,0.02) 0 3px 3px;
        }
    }

}

/* ==========================================================================
   Image Uploader
   ========================================================================== */

.image-uploader {
    @include box-sizing(border-box);
    @include baseline;
    position: relative;
    overflow:hidden;
    padding: 55px 60px 65px 60px;
    border: $lightbrown 3px dashed;
    width: 100%;
    height: auto;
    text-align: center;
    color: $brown;
    background: #F9F8F5;

    a {
        color: $brown;
        text-decoration: none;

        &:hover {
            color: $darkgrey;
        }
    }

    .media {
        @include icon($i-image, 60px, darken($lightbrown, 3%)) {
            display:inline-block;
            @include transition(transform 1s ease);
        }
    }

    .image-url {
        @include icon($i-link, 12px);
        line-height: 12px;
        padding: 10px;
        display: block;
        position: absolute;
        bottom: 0;
        left: 0;
        color: $brown;
        text-decoration: none;
    }

    .image-webcam {
        @include icon($i-camera, 12px);
        line-height: 12px;
        padding: 10px;
        display: block;
        position: absolute;
        bottom: 0;
        right: 0;
        color: $brown;
        text-decoration: none;
    }

    .fileupload {
        position: absolute;
        right: 0;
        margin: 0;
        opacity: 0;
        @include transform-origin(right);
        @include transform( scale(14));
        font-size: 23px;
        direction: ltr;
        cursor: pointer;
    }

    .progress {
        position: relative;
        top: -39px;
        margin:  auto;
        margin-bottom: -12px;
        display: block;
        overflow: hidden;
        @include linear-gradient(to bottom, #f5f5f5, #f9f9f9);
        border-radius: 12px;
        box-shadow: (rgba(0,0,0,0.1) 0 1px 2px inset);
    }

    .fileupload-loading {
        display: block;
        top: 50%;
        width: 35px;
        height: 28px;
        margin: -28px auto 0;
        background-size: contain;
    }

    .bar {
        height: 12px;
        background: $blue;
    }
}

/* ==========================================================================
   Misc
   ========================================================================== */

//Simple
.wrapper {
    position:relative;
}

.palette {
    margin-bottom: 15px;

    section {
        padding:5px 10px;
        width: 90px;
        height:90px;
        float:left;
        color:rgba(0,0,0,0.5);
        position:relative;
        font-size:12px;
        font-weight: bold;
        font-family: $font-family-mono;
        overflow: hidden;
        @include transition(all 0.15s ease-in-out);

        &:hover {
            box-shadow:
                rgba(0,0,0,0.05) 5px 0 0 inset,
                rgba(0,0,0,0.05) -5px 0 0 inset,
                rgba(0,0,0,0.05) 0 5px 0 inset,
                rgba(0,0,0,0.05) 0 -5px 0 inset;
            @include transition(all 0.15s ease-in-out);
        }

        small {
            position:absolute;
            top:20px;
            left:10px;
            font-size:11px;
            font-weight: normal;
            font-family: $font-family;
            display: block;
            width:100px;
            opacity: 0.6;
            @include transition(all 0.15s ease-in-out);
        }

        &:hover small {
            opacity: 1;
            @include transition(all 0.15s ease-in-out);
        }
    }

    .brown {
        background:$brown;
    }
    .midbrown {
        background:$midbrown;
    }
    .lightbrown {
        background:$lightbrown;
    }

    .darkgrey {
        color:rgba(255,255,255,0.5);
        background:$darkgrey;
    }
    .grey {
        color:rgba(255,255,255,0.5);
        background:$grey;
    }
    .midgrey {
        background:$midgrey;
    }
    .lightgrey {
        background:$lightgrey;
    }

    .blue {
        color:#fff;
        background:$blue;
    }
    .red {
        color:#fff;
        background:$red;
    }
    .orange {
        color:#fff;
        background:$orange;
    }

}

.status-draft {
    color: $red;
}
.status-scheduled {
    color: $orange;
}


keep keep keep keep keep replace replace keep keep keep

/*
 * These styles control elements specific to the post editor screen
 * used for publishing content with Ghost.
 *
 * Table of Contents:
 *
 * Editor / Preview
 * Post Preview Content
 * Full Screen Mode
 * Publish Bar
 * CodeMirror
 */

/* =============================================================================
   Editor / Preview
   ============================================================================= */

.editor {

	// The main post title
	.entry-title {
		@extend %box;
		height: 35px;
		padding: 10px 15px;
		margin-bottom: 15px;
		position:relative;

		@include breakpoint($mobile) {
			box-shadow: none;
		}

		input {
			border: 0;
			margin: 0;
			padding:0;
			font-size: 2em;
			font-weight: 300;
			width: 100%;
			&:focus {
				outline: 0;
			}
		}

	}

    .entry-container {
        position: relative;
        height: -webkit-calc(100% - 70px);
        height: -moz-calc(100% - 70px);
        height: calc(100% - 70px);
    }

	// The two content panel wrappers, positioned left/right
	.entry-markdown { left:0; border-right:$lightbrown 2px solid; }
	.entry-preview { right:0; border-left:$lightbrown 2px solid; }

	// The visual styles for both panels
	.entry-markdown, .entry-preview {
		@include box-sizing(border-box);
		width: 50%;
		padding: 15px;
		position: absolute;
		bottom:40px; // height of the publish bar
		top:0px; // height of the post title + margin
		background: #fff;
		box-shadow: $shadow;

		@include breakpoint($mobile) {
			box-shadow: none;
		}

		// Convert all content areas to small boxes
		@include breakpoint($netbook) {
			top:40px;
			left:0;
			right:0;
			width:100%;
			border:none;
			z-index:100;
			min-height:380px;
			.markdown, .entry-preview-content {
				height:50px;
				overflow: hidden;
			}
		}

		.floatingheader {

			// Turn headers into tabs which act as links
			// both headers set to grey/inactive colour
			@include breakpoint($netbook) {
			    cursor:pointer;
			    width:50%;
			    border-right:$lightbrown 2px solid;
			    color:#fff;
			    font-weight: normal;
			    background:$brown;
			    position:absolute;
			    top:-40px;
			    left:0;
			    box-shadow: rgba(0,0,0,0.1) 0 -2px 3px inset;

			    a {
			        color:#fff;
			    }
			}

			a {
			    color: $brown;
			}

			.markdown-help {
			    @include icon($i-question, '', lighten($brown, 15%));
			    float:right;

			    &:hover {
			        @include icon($i-question, '', $brown)
			    }
			}

			.entry-word-count {
			    float:right;
			}

		}

		// Give the tab with the .active class the highest z-index
		&.active {
			z-index: 200;
		}

		// Restore the normal height of the .active tab (inactive tab stays small, hidden behind)
		&.active .markdown,
		&.active .entry-preview-content {
			height:auto;
			overflow: auto;
		}

		// Restore the white bg of the currently .active tab, remove hand cursor from currently active tab
		&.active header {
			@include breakpoint($netbook) {
				cursor:auto;
				color: $brown;
				background:#fff;
				box-shadow: none;
				a {
					color: $brown;
				}
			}
		}

		// Hide markdown icon + wordcount when we hit mobile
		@include breakpoint($mobile) {
			.markdown-help,
			.entry-word-count {
				display: none;
			}
		}

	}

	.entry-markdown-content {

		textarea {
			border: 0;
			width: 100%;
			height: 100%;
			max-width: 100%;
			margin: 0;
			padding: 0;
			position:absolute;
			top: 0;
			right:0;
			bottom:0;
			left:0;

			&:focus {
				outline: 0;
			}
		}

		.CodeMirror {
			height: auto;
			position:absolute;
			top:0;
			left:0;
			right:0;
			bottom:0;
			font-family: $font-family-mono;
			font-size:1.1em;
			line-height:1.2em;
			color: lighten($darkgrey, 30%);

			.CodeMirror-focused,
			.CodeMirror-selected {
			    color: $darkgrey;
			    background: lighten($blue, 20%);
			    text-shadow: none;
			}

			::selection {
			    color: $darkgrey;
			    background: lighten($blue, 20%);
			    text-shadow: none;
			}
		}

		.CodeMirror-lines {
			padding: 65px 0 40px 0; /* Vertical padding around content */
			@include breakpoint($netbook) {padding-top: 25px;}
			@include breakpoint($mobile) {padding: 15px 0;}
		}
		.CodeMirror pre {
		 	padding: 0 40px; /* Horizontal padding of content */
		 	@include breakpoint($mobile) {padding: 0 15px;}
		}

		.cm-header {
			color:#000;
			font-size: 1.4em;
			line-height: 1.4em;
		}

		.cm-string,
		.cm-link,
		.cm-comment,
		.cm-quote {color:#000;}

	}

	.entry-preview {
		// Align the tab of entry-preview on the right
		.floatingheader {
			@include breakpoint($netbook) {
				right:0;
				left:auto;
				border-right:none;
				border-left:$lightbrown 2px solid;
			}
		}

		.entry-preview-content {
			position:absolute;
			top:0;
			right:0;
			bottom:0;
			left:0;
			padding: 60px 40px 40px 40px;
			overflow: auto;

			// Tweak padding for smaller screens
			@include breakpoint($netbook) {padding-top: 20px;}
			@include breakpoint($mobile) {padding: 15px;}
		}

	}

	// Special case, when scrolling, add shadows to content headers.
	.scrolling {

		.floatingheader {
			@include breakpoint($netbook) {
	            box-shadow: none;
	        }

	        &::before,
	        &::after {
	        	@include breakpoint($netbook) {display:none;}
	        }
		}
		.CodeMirror-scroll,
		.entry-preview-content {
			@include breakpoint($netbook) {
				box-shadow: 0 5px 5px rgba(0,0,0,0.05) inset;
			}
		}
	}

}//.editor

/* =============================================================================
   Post Preview Content
   ============================================================================= */

// The styles for the actual content inside the preview
// TODO: These should just be defaults, overridden by editor.hbs in theme dir
.entry-preview-content,
.content-preview-content {
	font-size:1.15em;
	line-height: 1.5em;

	a {
		color: $blue;
		text-decoration: underline;
	}
	p {
		text-indent: 0;
		margin: 1.2em 0 1.6em;
		&:first-child {
			margin-top:0;
		}
	}
	h1 {
		font-size: 3em;
	}
	h2 {
		font-size: 2.2em;
	}
	h3 {
		font-size: 1.8em;
	}
	.btn {
		text-decoration: none;
		color: $grey;
	}
	.img-placeholder {
		border: 5px dashed $grey;
		height: 100px;
		position: relative;
		span {
			display: block;
			height: 30px;
			position: absolute;
			margin-top: -15px;
			top: 50%;
			width: 100%;
			text-align: center;
		}
	}

	img {
		width: 100%;
		height: auto;
	}
}

/* =============================================================================
   Full Screen Mode
   ============================================================================= */

body.zen {
	background: lighten($lightbrown, 3%);
	#usermenu {display:none;}
	#global-header, #publish-bar {
		opacity: 0;
		height:0;
		overflow: hidden;
		@include transition(all 0.5s ease-out);
	}

	main {top: 15px;@include transition(all 0.5s ease-out);}
	.entry-markdown, .entry-preview {bottom:0;@include transition(all 0.5s ease-out);}

}

/* =============================================================================
   Publish Bar
   ============================================================================= */

#publish-bar {
	@include box-sizing(border-box);
	height:40px;
	padding: 0;
	color: $midgrey;
	background: darken($darkgrey, 4%);
	position: fixed;
	bottom: 0;
	left:0;
	right:0;
	z-index:900;
	box-shadow: 0 -2px 8px rgba(0,0,0,0.2);

	@include breakpoint($netbook) {font-weight:normal;}

	button {
		min-height: 30px;
		height: 30px;
		line-height: 12px;
		padding: 0 10px;
		margin-top: 5px;
		border-top:rgba(255,255,255,0.4) 1px solid;
	}

	.button-link { border-top: none; }

	.options {
		width:30px;
		min-height: 30px;
		height: 30px;
		margin-top:5px;
		box-shadow: rgba(255,255,255,0.4) 0 1px 0 inset;

		&.up:hover {
            @include icon($i-chevron-down) {
                margin-top:-5px;
                @include transform(rotate(540deg));
                @include transition(transform 0.6s ease);
            };
        }
	}

	.splitbutton-save{
		.button-save{
			@include transition(width 0.25s ease);
		}

		.editor-options{
			@extend %menu;
	    	@extend %menu-right;
	    	bottom: 140%;
	    	right: -3%;

	    	a{
	    		font-size: 14px;
	    	}
		}
	}
}

#entry-categories {
	position: absolute;
	top:0;
	left:0;
	right: 165px;
	bottom:0;
	text-transform: none;
	padding: 10px 0 0 0;
}

.category-label {
	display: block;
	float:left;
	@include icon($i-tag);
	padding:1px 8px 0 8px;
	@include transition;

	&:hover {
		cursor:pointer;
		color: $lightgrey;
	}
}

.category-input {
	display: inline-block;
	color: $lightgrey;
	font-weight: 300;
	background: transparent;
	border: none;

	&:focus {outline:none;}
}

.category {
	@include icon-after($i-x, 8px, $darkgrey) {
		margin-left:4px;
		vertical-align:5%;
		text-shadow: rgba(255,255,255,0.15) 0 1px 0;
		@include transition;
	}
	display: block;
	float: left;
	margin-right: 5px;
	padding: 0 5px;
	color: $lightgrey;
	background: lighten($grey, 15%);
	border-radius: $rounded;
	box-shadow:
		rgba(255,255,255,0.2) 0 1px 0 inset,
		#000 0 1px 3px;

	&:hover {
		cursor: pointer;
		@include icon-after($i-x, 8px, $lightgrey) {text-shadow: none;}

	}
}

.suggestions {
  @extend %menu;
  bottom: 100%;

  li.selected{
    background: $blue;
    box-shadow:
        rgba(255,255,255,0.2) 0 1px 0 inset,
        rgba(0,0,0,0.5) 0 1px 5px;
  }

  mark{
    background: none;
    color: white;
    font-weight: bold;
  }
}

#entry-settings {
	@include icon($i-settings, 1.1em){vertical-align:0;};
	@include box-sizing(border-box);
	display:inline-block;
	padding: 0 10px;
	line-height: 1.8em;
	color: $midgrey;
	@include transition;

	&:hover {
		color: $lightgrey;
	}
}

#entry-settings-menu {
	position: absolute;
    bottom:50px;
    right:-5px;
}

#entry-actions {
	margin-right:6px;
	position: relative;
}

#entry-actions-menu {
    position: absolute;
    bottom:50px;
    right:-5px;
}

/* =============================================================================
   CodeMirror
   ============================================================================= */

.CodeMirror {
    /* Set height, width, borders, and global font properties here */
    font-family: monospace;
    height: 300px;
}

.CodeMirror-scroll {
    /* Set scrolling behaviour here */
    overflow: auto;
}

/* PADDING */

.CodeMirror-lines {
    padding: 4px 0; /* Vertical padding around content */
}

.CodeMirror pre {
    padding: 0 4px; /* Horizontal padding of content */
}

.CodeMirror-scrollbar-filler {
    background-color: white; /* The little square between H and V scrollbars */
}

/* GUTTER */

.CodeMirror-gutters {
    border-right: 1px solid #ddd;
    background-color: #f7f7f7;
}

/* CURSOR */

.CodeMirror div.CodeMirror-cursor {
    border-left: 1px solid black;
    z-index: 3;
}
/* Shown when moving in bi-directional text */
.CodeMirror div.CodeMirror-secondarycursor {
    border-left: 1px solid silver;
}

.cm-tab { display: inline-block; }

/* DEFAULT THEME */

.cm-s-default .cm-keyword {color: #708;}
.cm-s-default .cm-atom {color: #219;}
.cm-s-default .cm-number {color: #164;}
.cm-s-default .cm-def {color: #00f;}
.cm-s-default .cm-variable {color: black;}
.cm-s-default .cm-variable-2 {color: #05a;}
.cm-s-default .cm-variable-3 {color: #085;}
.cm-s-default .cm-property {color: black;}
.cm-s-default .cm-operator {color: black;}
.cm-s-default .cm-comment {color: #a50;}
.cm-s-default .cm-string {color: #a11;}
.cm-s-default .cm-string-2 {color: #f50;}
.cm-s-default .cm-meta {color: #555;}
.cm-s-default .cm-error {color: #f00;}
.cm-s-default .cm-qualifier {color: #555;}
.cm-s-default .cm-builtin {color: #30a;}
.cm-s-default .cm-bracket {color: #997;}
.cm-s-default .cm-tag {color: #170;}
.cm-s-default .cm-attribute {color: #00c;}
.cm-s-default .cm-header {color: blue;}
.cm-s-default .cm-quote {color: #090;}
.cm-s-default .cm-hr {color: #999;}
.cm-s-default .cm-link {color: #00c;}

.cm-negative {color: #d44;}
.cm-positive {color: #292;}
.cm-header, .cm-strong {font-weight: bold;}
.cm-em {font-style: italic;}
.cm-link {text-decoration: underline;}

.cm-invalidchar {color: #f00;}

/* STOP */

/* The rest of this file contains styles related to the mechanics of
   the editor. You probably shouldn't touch them. */

.CodeMirror {
    line-height: 1;
    position: relative;
    overflow: hidden;
    background: white;
    color: black;
}

.CodeMirror-scroll {
    /* 30px is the magic margin used to hide the element's real scrollbars */
    /* See overflow: hidden in .CodeMirror */
    margin-bottom: -30px; margin-right: -30px;
    padding-bottom: 30px; padding-right: 30px;
    height: 100%;
    outline: none; /* Prevent dragging from highlighting the element */
    position: relative;
}
.CodeMirror-sizer {
    position: relative;
}

/* The fake, visible scrollbars. Used to force redraw during scrolling
   before actuall scrolling happens, thus preventing shaking and
   flickering artifacts. */
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler {
    position: absolute;
    z-index: 6;
    display: none;
}

.CodeMirror-vscrollbar {
    right: 0; top: 0;
    overflow-x: hidden;
    overflow-y: scroll;
}

.CodeMirror-hscrollbar {
    bottom: 0; left: 0;
    overflow-y: hidden;
    overflow-x: scroll;
}

.CodeMirror-scrollbar-filler {
    right: 0; bottom: 0;
    z-index: 6;
}

.CodeMirror-gutters {
    position: absolute; left: 0; top: 0;
    height: 100%;
    padding-bottom: 30px;
    z-index: 3;
}

.CodeMirror-lines {
    cursor: text;
}

.CodeMirror pre {
    /* Reset some styles that the rest of the page might have set */
    -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
    border-width: 0;
    background: transparent;
    font-family: inherit;
    font-size: inherit;
    margin: 0;
    white-space: pre;
    word-wrap: normal;
    line-height: inherit;
    color: inherit;
    z-index: 2;
    position: relative;
    overflow: visible;
}

.CodeMirror-wrap pre {
    word-wrap: break-word;
    white-space: pre-wrap;
    word-break: normal;
}

.CodeMirror-wrap .CodeMirror-scroll {
    overflow-x: hidden;
}

.CodeMirror-measure {
    position: absolute;
    width: 100%; height: 0px;
    overflow: hidden;
    visibility: hidden;
}

.CodeMirror-measure pre { position: static; }

.CodeMirror div.CodeMirror-cursor {
    position: absolute;
    visibility: hidden;
    border-right: none;
    width: 0;
}

.CodeMirror-focused div.CodeMirror-cursor {
    visibility: visible;
}

.CodeMirror-selected { background: #d9d9d9; }
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }

/* IE7 hack to prevent it from returning funny offsetTops on the spans */
.CodeMirror span { *vertical-align: text-bottom; }

@media print {
/* Hide the cursor when printing */
    .CodeMirror div.CodeMirror-cursor {
        visibility: hidden;
    }
}


/*global window, document, Ghost, $, _, Backbone */
(function () {
    "use strict";

    // Set the url manually and id to '0' to force PUT requests
    Ghost.Models.Settings = Backbone.Model.extend({
        url: '/api/v0.1/settings/',
        id: "0",
        defaults: {
            title: 'My Blog',
            description: '',
            email: 'admin@tryghost.org'
        }
    });

}());


        Star

    {{! TODO: JavaScript toggle featured/unfeatured}}
    {{#if published}}Published{{else}}Written{{/if}}
    by
    Joe Bloggs

        Edit Post
        Post Settings

Delete

{{{content}}}


<img class="photo" src="{{content.data.image}}" />


color: $lightgrey;
background: lighten($grey, 15%);
border-radius: $rounded;
box-shadow:
rgba(255,255,255,0.2) 0 1px 0 inset,
#000 0 1px 3px;


    {{content.data.number.count}}
    {{content.data.number.sub.value}} {{content.data.number.sub.item}} {{content.data.number.sub.period}}


keep keep keep keep keep replace keep keep keep keep keep


/*
 * The icons used in Ghost are the Pictos set by Drew Wilson - http://pictos.css
 * They are embedded via a custom icon font built with http://icomoon.io
 *
 * Table of Contents:
 *
 * Font Face
 * Icon Element
 * Icon Variables / Short Names
 * Usage
 */

/* =============================================================================
   The Font Face
   ============================================================================= */

/* Generated by icomoon.co */

@font-face {
	font-family: 'Icons';
	src:url('../fonts/icons.eot');
	src:url('../fonts/icons.eot?#iefix') format('embedded-opentype'),
		url('../fonts/icons.woff') format('woff'),
		url('../fonts/icons.ttf') format('truetype'),
		url('../fonts/icons.svg#icons') format('svg');
	font-weight: normal;
	font-style: normal;
}

/* =============================================================================
   The Icon Element
   ============================================================================= */

/*
 * Epic dynamic icon element by Eric Eggert, this thing is so fucking cool it's
 * actually unreal. http://cl.ly/O40t
 */

%icon:before,
%icon:after {
	font-family: "Icons";
	font-weight: normal;
	font-style: normal;
	vertical-align: -7%;
	text-transform:none;
	speak: none;
	line-height: 1;
	-webkit-font-smoothing: antialiased;

}

@mixin icon($char, $size: '', $color: '') {
    @extend %icon;

    &:before {
        content: '#{$char}';
        @if $size != '' {
            font-size: $size;
        }
        @if $color != '' {
            color: $color;
        }
        @content;
    }

    &:hover {
        text-decoration:none;
    }
}

/*
 * Special use case for when we want to add an icon after an element rather
 * than before it. For things like dropdowns.
 */

@mixin icon-after($char, $size: '', $color: '') {
    @extend %icon;

    &:after {
        content: '#{$char}';
        @if $size != '' {
            font-size: $size;
        }
        @if $color != '' {
            color: $color;
        }
        @content;
    }

    &:hover {
        text-decoration:none;
    }
}

/* =============================================================================
   Icon Variables / Short Names
   ============================================================================= */

/*
 * For accessibility, icon characters in the icon font are stored in Unicode's
 * Private Use Area characters. This means that screen readers won't attempt to
 * read them out loud. For code maintainability, we then store these Unicode
 * references inside Sass variables.
 */

// Placeholder
$i:                 \e018;

// Icons
$i-ghost: 			\e000;
$i-chevron-down: 	\e001;
$i-users: 			\e002;
$i-tag: 			\e003;
$i-tablet: 			\e004;
$i-menu: 			\e005;
$i-settings: 		\e006;
$i-search: 			\e007;
$i-search-left: 	\e008;
$i-rss: 			\e009;
$i-preview: 		\e00a;
$i-plugins: 		\e00b;
$i-pin: 			\e00c;
$i-pc: 				\e00d;
$i-pacman: 			\e00e;
$i-edit: 			\e00f;
$i-mobile: 			\e010;
$i-image: 			\e011;
$i-mail: 			\e012;
$i-list: 			\e013;
$i-info: 			\e014;
$i-home: 			\e015;
$i-grid: 			\e016;
$i-fullscreen: 		\e017;
$i-question: 		\e018;
$i-external: 		\e019;
$i-error: 			\e01a;
$i-comments: 		\e01b;
$i-close: 			\e01c;
$i-chevron: 		\e01d;
$i-calendar: 		\e01e;
$i-archive: 		\e01f;
$i-services: 		\e020;
$i-appearance: 		\e021;
$i-video: 			\e022;
$i-remove: 			\e023;
$i-reply: 	     	\e024;
$i-stats: 			\e025;
$i-featured: 		\e026;
$i-unfeatured: 		\e027;
$i-clock: 			\e028;
$i-settings2: 		\e029;
$i-camera: 			\e02a;
$i-power: 			\e02b;
$i-lock: 			\e02c;
$i-content: 		\e02d;
$i-user: 			\e02e;
$i-support: 		\e02f;
$i-success:         \e030;
$i-notification:    \e031;
$i-add:             \e032;
$i-check:           \e033;
$i-x:               \e034;
$i-link:            \e035;
$i-camera:          \e036;
$i-repost:          \e037;
$i-weather-rain:    \e038;
$i-weather-sun:     \e039;
$i-weather-partial: \e03a;
$i-weather-snow:    \e03b;
$i-weather-cloudy:  \e03c;

/* =============================================================================
   Usage
   =============================================================================

To create a button with a label that is prefixed with a camera icon, we might
write our Sass something like this:

#button {
	display: block;
	width: 200px;
	height: 40px;
	@include icon($i-camera, 16px, #fff) {vertical-align:-10%;};
}

Thi would then output full CSS something like this:

#button {
	display: block;
	width: 200px;
	height: 40px;
}

#button:before {
	content: "\e02a";
	size: 16px;
	color: #fff;
	font-family: "Icons";
	font-weight: normal;
	font-style: normal;
	vertical-align: -10%;
	text-transform:none;
	speak: none;
	line-height: 1;
	-webkit-font-smoothing: antialiased;
}

*/


/*! normalize.css v2.1.0 | MIT License | git.io/normalize */

/* ==========================================================================
   HTML5 display definitions
   ========================================================================== */

/**
 * Correct `block` display not defined in IE 8/9.
 */

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section,
summary {
    display: block;
}

/**
 * Correct `inline-block` display not defined in IE 8/9.
 */

audio,
canvas,
video {
    display: inline-block;
}

/**
 * Prevent modern browsers from displaying `audio` without controls.
 * Remove excess height in iOS 5 devices.
 */

audio:not([controls]) {
    display: none;
    height: 0;
}

/**
 * Address styling not present in IE 8/9.
 */

[hidden] {
    display: none;
}

/* ==========================================================================
   Base
   ========================================================================== */

/**
 * 1. Set default font family to sans-serif.
 * 2. Prevent iOS text size adjust after orientation change, without disabling
 *    user zoom.
 */

html {
    font-family: sans-serif; /* 1 */
    -webkit-text-size-adjust: 100%; /* 2 */
    -ms-text-size-adjust: 100%; /* 2 */
}

/**
 * Remove default margin.
 */

body {
    margin: 0;
}

/* ==========================================================================
   Links
   ========================================================================== */

/**
 * Address `outline` inconsistency between Chrome and other browsers.
 */

a:focus {
    outline: thin dotted;
}

/**
 * Improve readability when focused and also mouse hovered in all browsers.
 */

a:active,
a:hover {
    outline: 0;
}

/* ==========================================================================
   Typography
   ========================================================================== */

/**
 * Address variable `h1` font-size and margin within `section` and `article`
 * contexts in Firefox 4+, Safari 5, and Chrome.
 */

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

/**
 * Address styling not present in IE 8/9, Safari 5, and Chrome.
 */

abbr[title] {
    border-bottom: 1px dotted;
}

/**
 * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
 */

b,
strong {
    font-weight: bold;
}

/**
 * Address styling not present in Safari 5 and Chrome.
 */

dfn {
    font-style: italic;
}

/**
 * Address differences between Firefox and other browsers.
 */

hr {
    -moz-box-sizing: content-box;
    box-sizing: content-box;
    height: 0;
}

/**
 * Address styling not present in IE 8/9.
 */

mark {
    background: #ff0;
    color: #000;
}

/**
 * Correct font family set oddly in Safari 5 and Chrome.
 */

code,
kbd,
pre,
samp {
    font-family: monospace, serif;
    font-size: 1em;
}

/**
 * Improve readability of pre-formatted text in all browsers.
 */

pre {
    white-space: pre-wrap;
}

/**
 * Set consistent quote types.
 */

q {
    quotes: "\201C" "\201D" "\2018" "\2019";
}

/**
 * Address inconsistent and variable font size in all browsers.
 */

small {
    font-size: 80%;
}

/**
 * Prevent `sub` and `sup` affecting `line-height` in all browsers.
 */

sub,
sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sup {
    top: -0.5em;
}

sub {
    bottom: -0.25em;
}

/* ==========================================================================
   Embedded content
   ========================================================================== */

/**
 * Remove border when inside `a` element in IE 8/9.
 */

img {
    border: 0;
}

/**
 * Correct overflow displayed oddly in IE 9.
 */

svg:not(:root) {
    overflow: hidden;
}

/* ==========================================================================
   Figures
   ========================================================================== */

/**
 * Address margin not present in IE 8/9 and Safari 5.
 */

figure {
    margin: 0;
}

/* ==========================================================================
   Forms
   ========================================================================== */

/**
 * Define consistent border, margin, and padding.
 */

fieldset {
    border: 1px solid #c0c0c0;
    margin: 0 2px;
    padding: 0.35em 0.625em 0.75em;
}

/**
 * 1. Correct `color` not being inherited in IE 8/9.
 * 2. Remove padding so people aren't caught out if they zero out fieldsets.
 */

legend {
    border: 0; /* 1 */
    padding: 0; /* 2 */
}

/**
 * 1. Correct font family not being inherited in all browsers.
 * 2. Correct font size not being inherited in all browsers.
 * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
 */

button,
input,
select,
textarea {
    font-family: inherit; /* 1 */
    font-size: 100%; /* 2 */
    margin: 0; /* 3 */
}

/**
 * Address Firefox 4+ setting `line-height` on `input` using `!important` in
 * the UA stylesheet.
 */

button,
input {
    line-height: normal;
}

/**
 * Address inconsistent `text-transform` inheritance for `button` and `select`.
 * All other form control elements do not inherit `text-transform` values.
 * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+.
 * Correct `select` style inheritance in Firefox 4+ and Opera.
 */

button,
select {
    text-transform: none;
}

/**
 * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
 *    and `video` controls.
 * 2. Correct inability to style clickable `input` types in iOS.
 * 3. Improve usability and consistency of cursor style between image-type
 *    `input` and others.
 */

button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
    -webkit-appearance: button; /* 2 */
    cursor: pointer; /* 3 */
}

/**
 * Re-set default cursor for disabled elements.
 */

button[disabled],
html input[disabled] {
    cursor: default;
}

/**
 * 1. Address box sizing set to `content-box` in IE 8/9.
 * 2. Remove excess padding in IE 8/9.
 */

input[type="checkbox"],
input[type="radio"] {
    box-sizing: border-box; /* 1 */
    padding: 0; /* 2 */
}

/**
 * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
 * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
 *    (include `-moz` to future-proof).
 */

input[type="search"] {
    -webkit-appearance: textfield; /* 1 */
    -moz-box-sizing: content-box;
    -webkit-box-sizing: content-box; /* 2 */
    box-sizing: content-box;
}

/**
 * Remove inner padding and search cancel button in Safari 5 and Chrome
 * on OS X.
 */

input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
}

/**
 * Remove inner padding and border in Firefox 4+.
 */

button::-moz-focus-inner,
input::-moz-focus-inner {
    border: 0;
    padding: 0;
}

/**
 * 1. Remove default vertical scrollbar in IE 8/9.
 * 2. Improve readability and alignment in all browsers.
 */

textarea {
    overflow: auto; /* 1 */
    vertical-align: top; /* 2 */
}

/* ==========================================================================
   Tables
   ========================================================================== */

/**
 * Remove most spacing between table cells.
 */

table {
    border-collapse: collapse;
    border-spacing: 0;
}


/*global window, document, Ghost, $, _, Backbone */
(function () {
    "use strict";

    var Settings = {};

    // Base view
    // ----------
    Ghost.Views.Settings = Ghost.View.extend({
        initialize: function (options) {
            $(".settings-content").removeClass('active');
            this.addSubview(new Settings.Sidebar({
                el: '.settings-sidebar',
                pane: options.pane,
                model: this.model
            }));

            this.$('input').iCheck({
                checkboxClass: 'icheckbox_ghost'
            });
        }
    });

    // Sidebar (tabs)
    // ---------------
    Settings.Sidebar = Ghost.View.extend({
        initialize: function (options) {
            this.menu = this.$('.settings-menu');
            this.showContent(options.pane || 'general');
        },

        events: {
            'click .settings-menu li' : 'switchPane'
        },

        switchPane: function (e) {
            e.preventDefault();
            var item = $(e.currentTarget),
                id = item.find('a').attr('href').substring(1);
            this.showContent(id);
        },

        showContent: function (id) {
            Backbone.history.navigate('/settings/' + id);
            if (this.pane && '#' + id === this.pane.el) {
                return;
            }
            _.result(this.pane, 'destroy');
            this.setActive(id);
            this.pane = new Settings[id]({ model: this.model });
            this.pane.render();
        },

        setActive: function (id) {
            this.menu.find('li').removeClass('active');
            this.menu.find('a[href=#' + id + ']').parent().addClass('active');
        }
    });

    // Content panes
    // --------------
    Settings.Pane = Ghost.View.extend({
        destroy: function () {
            this.$el.removeClass('active');
            this.undelegateEvents();
        },

        render: function () {
            this.$el.addClass('active');
        }
    });

    // TODO: render templates on the client
    // TODO: use some kind of data-binding for forms

    // ### General settings
    Settings.general = Settings.Pane.extend({
        el: '#general',
        events: {
            'click .button-save': 'saveSettings'
        },

        saveSettings: function () {
            var self = this;
            this.model.save({
                title: this.$('#blog-title').val(),
                email: this.$('#email-address').val()
            }, {
                success: function () {
                    self.addSubview(new Ghost.Views.NotificationCollection({
                        model: [{
                            type: 'success',
                            message: 'Saved',
                            status: 'passive'
                        }]
                    }));
                },
                error: function () {
                    self.addSubview(new Ghost.Views.NotificationCollection({
                        model: [{
                            type: 'error',
                            message: 'Something went wrong, not saved :(',
                            status: 'passive'
                        }]
                    }));
                }
            });
        },

        render: function () {
            var settings = this.model.toJSON();
            this.$('#blog-title').val(settings.title);
            this.$('#email-address').val(settings.email);
            Settings.Pane.prototype.render.call(this);
        }
    });

    // ### Content settings
    Settings.content = Settings.Pane.extend({
        el: '#content',
        events: {
            'click .button-save': 'saveSettings'
        },
        saveSettings: function () {
            this.model.save({
                description: this.$('#blog-description').val()
            }, {
                success: function () {
                    this.addSubview(new Ghost.Views.NotificationCollection({
                        model: [{
                            type: 'success',
                            message: 'Saved',
                            status: 'passive'
                        }]
                    }));

                },
                error: function () {
                    this.addSubview(new Ghost.Views.NotificationCollection({
                        model: [{
                            type: 'error',
                            message: 'Something went wrong, not saved :(',
                            status: 'passive'
                        }]
                    }));
                }
            });
        },

        render: function () {
            var settings = this.model.toJSON();
            this.$('#blog-description').val(settings.description);
            Settings.Pane.prototype.render.call(this);
        }
    });

    // ### User settings
    Settings.users = Settings.Pane.extend({
        el: '#users',
        events: {
        }
    });

    // ### Appearance settings
    Settings.appearance = Settings.Pane.extend({
        el: '#appearance',
        events: {
        }
    });

    // ### Services settings
    Settings.services = Settings.Pane.extend({
        el: '#services',
        events: {
        }
    });

    // ### Plugins settings
    Settings.plugins = Settings.Pane.extend({
        el: '#plugins',
        events: {
        }
    });

}());


keep keep keep replace keep keep keep keep keep

.content-view-container {
position: relative;
height: 100%;
width: 100%;
}

/*
 * These styles control elements specific to the settings screen
 * used for configuring your Ghost install.
 *
 * Table of Contents:
 *
 * Settings
 *
 */

/* =============================================================================
   Settings
   ============================================================================= */

.settings {
    // The main white bg for the page
    .wrapper {
        background: #fff;
        box-shadow: $shadow;
        position:absolute;
        top:0;
        bottom:0;
        left:0;
        right:0;
        margin:0;
        padding:0;
    }

    .title {
        text-transform: uppercase;
        font-weight: normal;
        font-size: 1.6em;
        line-height: 0.8em;
        margin:0 0 18px 0;
        padding:0;
        border: none;
    }

/* =============================================================================
   Sidebar
   ============================================================================= */

    //The whole left column sidebar, duh.
    .settings-sidebar {
        width:20%;
        position:absolute;
        top:0;
        left:0;
        bottom:0;
        z-index: 700;
        box-shadow: $lightbrown 1px 0 0;
        @include breakpoint($tablet) {
            width:100%;
            box-shadow: none;
        }

        > header {
            height: 17px;
            padding: 30px 15px 30px 40px;
            margin-bottom: 0;
            border-bottom: none;
            box-shadow: #edece4 0 -1px 0 inset;
            @include breakpoint($netbook) {
                padding-left: 15px;
            };
        }
    }//.settings-sidebar

    //Main settings-menu styles, apply to every item
    .settings-menu {
        position:absolute;
        top: 77px; //30px + 17px title + 30px
        left:0;
        bottom:0;
        right:-1px;
        overflow: auto;
        @include breakpoint($tablet) { right:0; };

        ul {
            border-top:none;
            @include breakpoint($tablet) { border-bottom: #edece4 1px solid; }
        }

        li {
            margin-right:1px;
            border-top: #fff 1px solid;
            @include breakpoint($tablet) {
                margin-right:0;
                border-top: #edece4 1px solid;
            }

            a {
                padding:15px 15px 15px 40px;
                border-bottom:none;
                @include breakpoint($netbook) { padding-left: 15px; }
                @include breakpoint($tablet) {
                    @include icon-after($i-chevron) {float:right;margin-top:5px;};
                }
            }

            &:first-child { border-top: none; }
            &:first-child.active { border-top:none; }

            &.active {
                @include breakpoint($biggerthan-tablet) {
                    // only apply active styles on larger devices

                    margin-right:0;
                    position:relative;
                    z-index: 300;
                    border-top: #edece4 1px solid;
                    box-shadow:
                        #fff 1px 0 0,
                        #edece4 0 1px 0;
                    @include transition;

                    a {
                        color: $darkgrey;
                        font-weight: bold;
                        background: #fff;

                    }

                }
            }//.active

        }//li

        // Give all icons some space
        li a:before {
            margin-right: 20px;
            @include breakpoint($netbook) {
                margin-right: 15px;
            }
        }

        // Add the icons for specific menu items
        .general a { @include icon($i-settings) }
        .publishing a { @include icon($i-content) }
        .services a { @include icon($i-services) }
        .users a { @include icon($i-users) }
        .appearance a { @include icon($i-appearance) }
        .plugins a { @include icon($i-plugins) }

    }//.settings-menu

/* =============================================================================
   Content
   ============================================================================= */

    // The main content panel on the right
    .settings-content {
        padding:0;
        position:absolute;
        top:0;
        right:0;
        left:20%;
        bottom:0;
        @include breakpoint($tablet) { display: none; }

        display: none;
        &.active {display:block;}

        > header {
            height: 17px;
            padding: 30px 220px 29px 40px;
            border-bottom:$lightbrown 1px solid;
            margin-bottom:40px;
            text-transform: none;
            font-weight: normal;
            line-height: inherit;
            color: inherit;
            @include breakpoint($netbook) { padding-left:15px; }
            @include breakpoint($letterbox) {
                height: auto;
                padding: 5px;
                position: absolute;
                top:0;
                right:0;
                border:none;

                .title { display:none; }
            }

        }//header

        .page-actions {
            position:absolute;
            top:20px;
            right:40px;
            z-index: 700;
            font-size: 1em;
            @include breakpoint($netbook) { right:15px; }

            .button-add {
                position:relative;
                padding-left:50px;
                @include icon($i-add, 1.4em, rgba(255,255,255,0.6)) {
                    position: absolute;
                    top:0;
                    padding:9px 8px 0 0;
                    left:9px;
                    bottom:0;
                    width: 20px;
                    border-right: darken($green, 8%) 1px solid;
                };
            }
        }

        .content {
            position: absolute;
            top:77px; //30px + 17px title + 30px
            right:0;
            left:0;
            bottom:0;
            padding:40px;
            overflow:auto;

            &.no-padding {
                padding: 0;
            }

            @include breakpoint($netbook) { padding-left:15px; }
            @include breakpoint($letterbox) { top: 0; }
        }

/* =============================================================================
   Users List
   ============================================================================= */

        .user-group-header {
            margin-bottom: 0px;
            padding-bottom: 20px;
            border: 0 none;
            border-bottom: 1px solid darken($lightbrown, 10%);

            h3 {
                display: inline-block;
                margin: 0;
                color: $midbrown;
                font-weight: normal;
                font-size: 1.1em;
                line-height: 1em;
            }

        }

        .user-search {
            display: inline-block;
            float: right;

            label { margin: 0}

            &:hover .user-search-input, .user-search-input:focus {
                width: 260px;
                padding: 0 10px;
            }

            .user-search-input {
                @include box-sizing(border-box);
                width: 0px;
                padding: 0;
                border: none;
                border-bottom: lighten($lightbrown, 2%) 1px solid;
                @include transition(width 0.2s ease-in-out);
                box-shadow: none;
            }

            .search-icon {
                @include icon($i-search, 1em, $midbrown);
            }
        }

        .users {
            padding: 0px;
            margin-top: 0px;
            list-style: none;
        }

        .user {
            @include box-sizing(border-box);
            display: block;
            width: 100%;
            padding: 20px;
            border: 0 none;
            border-top: 1px solid $lightgrey;

            &:first-child {
                border: none;
            }

            .user-image {
                display: inline-block;
                width: 40px;
                height: 40px;
                margin-right: 17px;
                vertical-align: middle;
                background-color: $lightbrown;
                border-radius: 20px;

                &.invite {
                    @include box-sizing(border-box);
                    padding-top: 8px;
                    text-align: center;
                    @include icon($i-mail, 1em, $brown);
                }

                img {
                    width: 40px;
                    height: 40px;
                    border-radius: 20px;
                }
            }

            .user-meta {
                display: inline-block;
                vertical-align: middle;

                .user-name {
                    margin: 0;
                    margin-top: 0.4em;
                    font-weight: 400;
                    font-size: 1.2em;
                    line-height: 1em;
                }

                .user-last-seen {
                    line-height: 1em;
                }
            }
        }

        .user-role {
            padding: 2px 8px;
            float: right;
            font-size: 0.8em;
            color: #fff;
            text-transform: uppercase;

            &.admin {
                background-color: #DE523A;
            }
            &.editor {
                background-color: #4A8CBD;
            }
        }

/* =============================================================================
   User Profile
   ============================================================================= */

        .user-profile-header {
            position: relative;
            width: 100%;
            height: 300px;
        }

        .cover-image {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;

            img {
                position: absolute;
                max-width: 100%;
            }
        }

        .button-change-cover {
            position: absolute;
            right: 40px;
            bottom: 40px;
            background: rgba(0,0,0,0.4);
            color: #FFFFFF;
            z-index: 2;

            &:hover {
                background: rgba(0,0,0,0.8);
            }
        }

        .user-details-container {
            position: relative;
            top: -90px;
            z-index: 1;
        }

        .user-details-top {
            margin-bottom: 0;
            overflow: auto;

            p {
                color: #FFFFFF;
            }
        }

        .user-avatar-image {
            @include box-sizing(border-box);
            position: relative;
            width: 120px;
            height: 120px;
            float: left;
            margin-left: 40px;
            margin-right: 20px;
            border-radius: 60px;
            border: 3px solid #FFFFFF;
            cursor: pointer;
            z-index: 2;

            img {
                width: 100%;
                height: 100%;
                border-radius: 60px;
            }

            .button-change-avatar {
                position: absolute;
                top: 0;
                width: 100%;
                height: 100%;
                display: block;
                border-radius: 60px;
                background: rgba(0,0,0,0.5);
                opacity: 0;
                color: #FFFFFF;
                @include transition(opacity 0.3s ease);
            }

            &:hover {
                .button-change-avatar {
                    opacity: 1;
                }
            }
        }

        .user-details-bottom {
            padding: 0 40px;
            margin: 0;
        }

        .bio-container {
            max-width: 370px;
        }

        .bio-desc {
            display: inline-block;
        }

        .word-count {
            margin-right: 20px;
            float: right;
            font-weight: bold;
            color: darken($brown, 5%);
        }

/* =============================================================================
   User Profile
   ============================================================================= */

        .plugin-section {
            padding-bottom: 20px;
        }

        .plugin-section-header {
            h3 {
                margin: 15px 0;
                font-size: 1.1em;
                font-weight: normal;
                color: $brown;
            }
        }

        .plugin-section-footer {
            text-align: right;
        }

        .button-update-all {
            @include icon($i-power, 1em, #FFC125){ // TODO: Need lightening icon
                margin-right: 5px;
            };
        }

        .button-cancel {
            @include icon($i-x, 1em, #FFFFFF){
                margin-right: 5px;
            };
        }

        .plugin-section-table {
            margin-top: 5px;

            tbody > tr:nth-child(odd) > td {
                background: none;
            }

            .plugin-section-item {

                &.inactive {
                    .plugin-meta {
                        opacity: 0.4;
                    }

                    td:last-child {
                        .plugin-meta {
                            opacity: 1;
                        }
                    }
                }

                td {
                    padding: 20px 0;
                    border-bottom:$lightbrown 1px solid;

                    &:first-child {
                        padding-left: 0px;
                        border-top:$lightbrown 1px solid;

                        .plugin-meta {
                            padding: 0px;
                            width: 75%;
                            border-left: none;
                            text-align: left;
                        }
                    }

                    &:last-child {
                        .plugin-meta {
                            padding: 0px;
                            text-align: right;
                        }
                    }
                }
            }

            .plugin-icon {
                display: inline-block;
                width: 40px;
                height: 40px;
                margin-right: 15px;
                background: #FFC125;
                border-radius: 5px;
                vertical-align: middle;

                img {
                    width: 100%;
                }
            }

            .plugin-meta {
                @include box-sizing(border-box);
                display: inline-block;
                width: 100%;
                height: 100%;
                padding: 0 20px;
                vertical-align: middle;
                border-left: $lightbrown 1px solid;
                text-align: center;
            }

            .plugin-info {
                display: block;
                color: lighten($grey, 5%);
                font-size: 1.2em;
                font-weight: normal;
                vertical-align: top;
            }

            .plugin-title {
                color: $grey;
            }

            .plugin-sub-info {
                display: block;
                color: $midgrey;
            }

            .plugin-download-progress {
                position: relative;
                display: block;
                height: 6px;
                margin-top: 10px;
                background: $lightbrown;
                border-radius: 3px;

                > span {
                    position: absolute;
                    left: 0;
                    top: 0;
                    content: "";
                    height: 100%;
                    background-color: $blue;
                    border-radius: 3px;
                }
            }

            .rating {

                unicode-bidi: bidi-override;
                text-align: center;

                > span {
                    display: inline-block;
                    position: relative;
                    width: 1.1em;
                    height: 1.1em;
                    font-size: 0.8em;

                    &:before {
                        content: "\2605";
                        position: absolute;
                        left: 0;
                        opacity: 0.5;
                    }

                    &.active {
                        &:before {
                            content: "\2605";
                            opacity: 1;
                        }
                    }
                }

            }
            .plugin-settings-icon {
                display: block;
                margin-top: 9px;
                font-size: 1.4em;
                @include icon($i-settings, 1em, $grey);
            }

        } //.plugin-section-table

    }//.settings-content

}//.settings


    {{content.data.artist}}
    {{oontent.data.title}}