#paper_box, #selection_box {
    background: $bg1;

    .paper_header, .paper_text, .paper_comments {
        padding: 1.5em;
        border-bottom: 1px solid #fff;
    }
    .paper_text h4, .paper_comments h3, .paper_comments h4 {
        color: $black;
        font-size: 120%;
    }
    .paper_comments, .paper_comments {
        .meta {
            margin-bottom: 0;
            padding-top: 0.8em;
        }
    }
    .paper_comments ul.comments_list {
        background: none;

        > li {
            padding: 0.8em 1.5em 0 0;
        }
    }
    details {
        padding: 1.5em 1.5em 0;

        hr {
            background: #fff;
            border: none;
        }
    }
}

#selection_box {
    #history, #votes {
        padding: 1.5em;

        .content_list > li {
            background: none;
        }
    }
}

#sidebar_nav {
    border-bottom: 1px dotted $border;
    padding-bottom: 0.8em;
    margin-bottom: 1.2em;

    > div {
        background: url('/images/shadow_subnavi.jpg') no-repeat right bottom transparent;
        padding-bottom: 15px;
    }
    ul {
        background-color: lighten($button-color, 3%);
        @include background-image(linear-gradient(top left, lighten($button-color, 14%), lighten($button-color, 3%)));
        list-style: none;
        margin: 0;
        padding: 0.8em 0;
    }
    li {
        border-top: 1px solid lighten($button-color, 16%);
        border-bottom: 1px solid $button-color;
        &:first-child {
            background: none;
        }
        a {
            padding: 9px 60px 5px 20px;
            display: block;
            color: #fff;
            font-weight: bold;
            position: relative;
            min-height: 25px;

            &:hover, &:focus, &.current {
                text-decoration: none;
                background-color: $button-color;
                @include background-image(linear-gradient(170deg, $button-color 40%, darken($button-color, 14%)));
            }
            .count {
                position: absolute;
                top: 10px;
                right: 20px;
                font-weight: normal;
            }
            .meta {
                color: #fff;
                font-weight: normal;
            }
        }
    }
    &.paper_selection ul {
        padding: 0;
        margin-top: 0.8em;
    }
}
.paper_selection {
    padding-top: 2.7em;

    #main-overlay & {
        padding-top: 6.5em;
    }
}

.truncate {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.changes_switch, .version_function {
    border-bottom: 1px dotted $border;
    padding-bottom: 0.8em;
    margin-bottom: 0.4em;
}
.version_function .button { display: block; }

.changes_switch {
    span {
        float: left;
    }
    .switch_buttons {
        float: right;
    }

    .no-js & {
        display: none;
    }
}

@include desktop {
    #sidebar_nav li a {
        &:hover, &:focus, &.current {
            &:before {
                width: 0;
                height: 0;
                border: 20px solid transparent;
                border-right: 19px solid $button-color;
                position: absolute;
                top: 0;
                left: -39px;
                content: "";
            }
        }
    }
}
