/*** GLOBAL DEFAULTS ***/

html {
    font-size: 1em;
    box-sizing: border-box;
}

body {
    background-color: white;
    font-weight: 400;
    line-height: 1.45;
    color: #333;
}

p {margin-bottom: 1.3em;}

h1, h2, h3, h4 {
    margin: 1.414em 0 0.5em;
    font-weight: inherit;
    line-height: 1.2;
}

h1 {
    margin-top: 0;
    font-size: 3.157em;
}

h2 {font-size: 2.369em;}

h3 {font-size: 1.777em;}

h4 {font-size: 1.333em;}

blockquote {
    background-color: #f5f5f5;
    border-left: 10px solid #ccc;
    margin: 1.5em 10px;
    padding: 0.5em 10px;
    quotes: "\201C""\201D";
}
blockquote:before {
    color: #ccc;
    content: open-quote;
    font-size: 4em;
    line-height: 0.1em;
    margin-right: 0.25em;
    vertical-align: -0.4em;
}
blockquote p {
    display: inline;
}

/* Override pure.css font-family */

/*
    When setting the primary font stack, apply it to the Pure grid units along
    with `html`, `button`, `input`, `select`, and `textarea`. Pure Grids use
    specific font stacks to ensure the greatest OS/browser compatibility.
*/
html, button, input, select, textarea,
.pure-g [class *= "pure-u"] {
    font-family: Merriweather, Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif;
}

/*** UTILITY CLASSES ***/

.link-button {
    display: block;
    text-align: center;
    padding: 0.5em 0;
    background: #000080;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

.truncate {
    width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.no-link-dec {
    text-decoration: none;
    color: #333;
}

.no-link-underline {
    text-decoration: none;
}

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

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

.text-align-right {
    text-align: right;
}

.bold {
    font-weight: bold;
}

.clearfix:after {
    content: "";
    display: table;
    clear: both;
}

hr.divider {
    border-style: solid;
    background-color: rgba(0, 0, 0, 0.6);
}

/*** FONT CLASSES ***/

.monospace {
    font-family: Inconsolata, Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace;
}

small, .font_small {font-size: 0.75em;}


/*** COLOR CLASSES ***/

.muted-gray {
    color: rgba(0, 0, 0, 0.6);
}


/*** NAV ***/

.pure-menu-link {
    color: rgba(0, 0, 0, 0.6);
}

.pure-menu-selected, .pure-menu-link:hover {
    background: #eee;
    color: black;
}

/*** HIGH-LEVEL LAYOUT ***/

/* Header */

.main-header {
    background-color: #f5f5f5;
    padding-right: 0.5em;
    padding-left: 0.5em;
    padding-top: 1em;    
    text-align: center;
    box-shadow: 0 2px 4px -1px rgba(0,0,0,0.25)
}

.header-title {
    font-size: 1.777em;
    margin-bottom: 0;
}

.header-nav-container {
    margin-top: 0.5em;
}


/* Content */

.container {
    margin: 0 auto;
    padding: 0 5px;
}

.homepage-container {
    max-width: 768px;
    padding: 0 0.5em;
    margin: 0 auto;
    margin-top: 3em;
}

.top-threads-container {
    padding: 0 0.5em;
    margin: 0 auto;
}

.tags-container {
    max-width: 600px;
    padding: 0 0.5em;
    margin: 0 auto;
}

.search-container {
    margin: 0 auto;
}

.search-results-container {
    margin: 0 auto;
}

.message-container {
    margin: 0 auto;
    overflow: hidden;
}

.about-container {
    padding: 0 0.5em;
    margin: 0 auto;
}

/* Footer */

/*** HOMEPAGE STYLING/LAYOUT ***/

.homepage-subheader {
    font-weight: bold;
    font-size: 1.333em;
    padding-bottom: 0.25em;
}

.featured-message:last-child {
    border-bottom: none;
}

.featured-message {
    border-bottom: 1px dashed rgba(0, 0, 0, 0.6);
}

/*** FAQ STYLING/LAYOUT ***/

.faq-container {
    max-width: 768px;
    margin: 0 auto;
    padding: 0 0.5em;
}

.faq-qa {
    margin: 4em 0;
}

.faq-question {
    font-weight: bold;
    font-size: 1.333em;
    padding-bottom: 0.25em;
}

/*** ALL TAGS STYLING/LAYOUT ***/

.tag-container {
    margin: 0 auto;
    padding: 3em 0;
    max-width: 600px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.6);
}

.tag-header {
}

.tag-meta {
    margin: 0;
    margin-top: 0.5em;
    font-weight: bold;
    color: rgba(0, 0, 0, 0.6);
    text-decoration: none;
    font-size: 0.75em;
}

.tag-description-container {
    padding: 0 10px;
}

.tag-description-container p:last-of-type {
    margin-bottom: 0;
}

.tag-title {
    margin: 0;
    font-size: 1.333em;
    font-weight: bold;
}

.tag-read-link {
    margin: 0 auto;
    width: 200px;
}

/*** THREAD LISTING STYLING/LAYOUT
/*
/* These are for thread listings where a user clicks through tot he actual
/* thread.
*/

.thread-listings-container {
    max-width: 600px;
    padding: 0 0.5em;
    margin: 0 auto;
    overflow: hidden;
}

.thread-listings-header {
    font-size: 1.333em;
    margin-top: 1em;
    text-align: center;
    background: #f5f5f5;
    padding: 0.5em;
    border: 1px dashed;
}

.thread-listing {
    margin: 3em 0;
    padding: 1em 0;
    border-bottom: 1px solid;
}

.thread-listing:last-of-type {
    margin-bottom: 0;
}

.thread-listing blockquote {
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);    
}


.thread-listing-title {
    font-size: 1.333em;
    font-weight: bold;
    word-wrap: break-word;
}

.thread-listing-meta-section {
    margin-top: 1em;
}

.thread-listing-meta {
    margin: 0;
    font-weight: bold;
    color: rgba(0, 0, 0, 0.6);
}

.thread-listing-teaser {
    margin-top: 3em;
    margin-bottom: 3em;
    word-wrap: break-word;
}

.thread-listing-annotation {
    margin: 3em 10px;
}

.thread-listing-categories {
    font-weight: normal;
}

.thread-listing-categories a {
    text-decoration: none;
}

.thread-listing-nav {
    margin: 0 auto;
    padding: 4em 0.5em;
    display: flex;
    justify-content: space-around;
}

.thread-listing-prev, .thread-listing-next {
    width: 150px;
    display: block;
    color: white;
}

.all-threads-subheader {
    font-size: 1rem;
}

/*** TAGS
 */

.tags {
    padding: 0;
    margin-bottom: 3em;
}

.tags li {
    display: inline-block;
    margin-right: 0.25em;
    
}

.tag {
    display: inline-block;
}

/*** THREAD SUMMARY STYLING/LAYOUT
/*
/*   These are for thread summaries where a user clicks through to the actual 
/*   thread.  
*/

.thread-summaries-container {
    padding: 0 0.5em;
    margin: 0 auto;
    overflow: hidden;
}

.thread-summaries-header {
    font-size: 1.333em;
    margin-top: 1em;
    text-align: center;
    background: #f5f5f5;
    padding: 0.5em;
    border: 1px dashed;
}

.thread-summary {
    margin: 0 auto;
    padding: 3em 0;
    border-bottom: 2px solid rgba(0, 0, 0, 0.6);
}

.thread-summary-subject {
    margin: 0;
    font-size: 1.333em;
    font-weight: bold;
    word-wrap: break-word;
}

.thread-summary-date {
    margin: 0;
}

.thread-summary-sender-recipient {
    margin: 0;
}

.thread-summary-teaser {
    background: #f5f5f5;
    padding: 1em;
    margin: 2em 0;
    word-wrap: break-word;
}

.thread-summary-categories {
    margin-top: 1.3em;
    margin-bottom: 0;
    font-size: 0.75em;
    text-align: center;
}

.thread-summary-categories a {
    text-decoration: none;
}


.thread-summary-num-messages {
    font-weight: bold;
    text-align: center;
}

.thread-summary-links {
    margin: 0 auto;
    max-width: 300px;
}

.thread-summary-read-link {
    margin: 1.3em 0;
}

.thread-summary-nav {
    margin: 0 auto;
    padding: 3em 1em;
    display: flex;
    justify-content: space-around;
}

.thread-summary-prev, .thread-summary-next {
    display: block;
    color: rgba(0, 0, 0, 0.6);
}

/*** TOP THREADS STYLING/LAYOUT ***/

.top-threads-header {
    font-size: 1.333em;
    margin-top: 1em;
    text-align: center;
    background: #f5f5f5;
    padding: 0.5em;
    border: 1px dashed;
}


.top-thread:last-child {
    border-bottom: none;
}

.top-thread {
    padding: 3em 0;
    border-bottom: 2px solid rgba(0, 0, 0, 0.6);
}

.top-thread p:last-of-type {
    margin-bottom: 0;
}

.top-thread-title {
    font-size: 1.333em;
    font-weight: bold;
}

.top-thread-quote {
    margin-top: 3em;
    margin-bottom: 3em;
}

.top-thread-read-link {
    margin: 0 auto;
    margin-top: 3em;
    max-width: 350px;
}

.inverted-top-thread {
    padding: 1em;
    margin: 3em 0;
    background: #f5f5f5;
    border-bottom: none;
    border: 1px dashed;
}

.inverted-top-thread blockquote {
    background: white;
}

/*** MESSAGE SECTION STYLING/LAYOUT ***/

/* Messages with their metadata. */

.message-container {
    padding: 0 0.5em;
    margin: 0 auto;
}

.message {
    padding: 3em 0;
}

.message-header {
    background: #f5f5f5;
    margin-bottom: 1em;
    padding: 1em;
}

.message-header-divider {
    border: 0;
    border-bottom: 1px dashed;
    margin: 1em 0;
}

.message-position {
    margin: 0;
    font-weight: bold;
    text-align: right;
}

.message-subject {
    margin: 0;
    font-size: 1.333em;
    font-weight: bold;
    width: 70%;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.message-subject-and-position {
    display: flex;
    justify-content: space-between;
}

.message-metadata p {
    margin-top: 0;
    margin-bottom: 0;
}

.message-recipient {
    word-wrap: break-word;
    white-space: pre-wrap;
}

.message-body {
    word-wrap: break-word;
    white-space: pre-wrap;
    overflow-x: hidden;
    padding: 1em 0.5em;
    margin: 0;
}


.message-footer-links {
    list-style-type: none;
    margin: 2em 0 0 0;
    padding: 0;
    text-align: center;
}

.message-footer-links li {
    display: inline-block;
    font-size: 0.9em;
    margin-left: 1em;
}

.message-footer-links li:first-child {
    margin-left: 0;
}

.thread-position {
    position: fixed;
    right: 0.5em;
    bottom: 0.5em;
    padding: 0.5em;

    background: black;
    color: white;
    font-weight: bold;
}

#thread-current-date {
    display: none;
    text-align: center;
    margin: 0;
}

/* Thread Next/Prev Navs */

.thread-nav {
    border-top: 2px solid rgba(0, 0, 0, 0.6);
    padding: 3em 0;
    padding-bottom: 4em;
}

.thread-nav-next-prev {
    margin: 0;
    margin-bottom: 1em;
}

.thread-nav-title {
    font-weight: bold;
    word-wrap: break-word;
    margin: 0;
}

.thread-nav-date {
    margin: 0;
    color: rgba(0, 0, 0, 0.6);
    font-weight: bold;
}

.thread-next, .thread-prev {
    padding: 1em;
    background: #f5f5f5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);    
}

.thread-next {
    margin-top: 2em;
}

/** SEARCH STYLING/LAYOUT **/

.search-highlight {
    background: #fff2a8;
}

.search-form {
    text-align: center;
    margin-top: 2em;
}

.search-nav {
    padding: 0 1em 2em 1em;
    margin: 0 auto;
    max-width: 500px;
}

.search-nav-link {
    text-align: center;
    text-decoration: none;
    display: inline-block;
    background-color: #f5f5f5;
    color: black;
    width: 100px;
    padding: 0.5em;
    box-shadow: 0 2px 4px -1px rgba(0,0,0,0.25)
}

.search-nav-header {
    text-align: center;
}

.search-suggestions {
    list-style: none;
}

.no-results-container {
    text-align: center;
}

.search-tips {
    display: inline-block;
    text-align: left;
}

/* Pure 'md' breakpoint. */
@media screen and (min-width: 768px) {
    .tag-container {
        margin: 0;
    }
    
    .search-nav-link {
        width: 150px;
    }

    /* 'Next ->' nav on message screen should right-align on larger screens. */
    .message-nav-link-next-container {
        text-align: right;
    }

    .message-nav-link-next {
        display: inline-block;
    }

    .message-nav-metadata {
        max-width: 300px;
    }

    .top-threads-container {
        max-width: 768px;
    }
    
    .thread-summaries-container {
        max-width: 768px;
    }

    .thread-summary {
        display: flex;
        flex-wrap: wrap;
    }

    .thread-summary-metadata {
        width: 50%;
    }

    .thread-summary-links {
        margin: auto;
        width: 50%;
    }

    .thread-summary-teaser {
        margin-bottom: 0;
    }

    .search-container {
        max-width: 768px; /* Limit max-width to 768px. */
    }

    .search-results-container {
        max-width: 768px;
    }

    .message-container {
        max-width: 768px;
    }

    .message-body-container {
        padding-left: 3em;
    }

    .message-subject-and-position {
        display: block;
        width: 50%;
    }

    .message-metadata {
        width: 50%;
    }

    .message-position {
        text-align: left;
    }

    .message-header-divider {
        display: none;
    }

    .message-header {
        display: flex;
        padding: 1em 2em;
    }

    .browse-period-container {
        max-width: 768px;
    }

    .about-container {
        max-width: 768px;
    }

    .browse-content {
        max-width: 900px;
    }

    .thread-nav {
        display: flex;
        justify-content: space-between;
    }

    .thread-next, .thread-prev {
        width: 40%;
        margin: 0;
    }

    .thread-next {
        text-align: right;
        margin-left: auto;
    }

    .thread-prev {
        margin-right: auto;
    }
    
}

/* Pure 'lg' breakpoint */
@media screen and (min-width: 1024px) {
    .thread-position {
        right: 128px;
        bottom: 50%;
    }

    #thread-current-date {
        display: block;
    }
}


/** THREADADMIN **/

.admin-container {
    margin: 0 auto;
    max-width: 768px;
}

.admin-header {
    padding: 1em;
    text-align: center;
    background: #000080;
    color: white;
}

.admin-label {
    font-weight: bold;
    display: inline-block;
    margin: 0 1em;
}

.admin-form {
    margin: 2em;
    text-align: center;
}

.admin-inputs {
    list-style-type: none;
}

#admin-top-thread-info {
    display: none;
    text-align: center;
}

#admin-top-thread-info li {
    margin: 2em 0;
}

#admin-top-thread-info input[type=text] {
    width: 420px;
    border: 1px solid;
}

.admin-add-tag-form {
    text-align: center;
    margin-bottom: 3em;
}

.admin-add-tag-form div {
    padding: 0.5em;
}

.admin-list {
    list-style-type: none;
}

.admin-list li {
    margin: 1em 0;
}

#admin-top-thread-list {
    list-style-type: none;
    counter-reset: top-thread-counter;
}

#admin-top-thread-list li {
    counter-increment: top-thread-counter;
    padding: 0.5em;
    margin: 1em 0;
    border: 1px dashed;
}

#admin-top-thread-list li:before {
    content: "[" counter(top-thread-counter) "] ";
    font-weight: bold;
}

.admin-page-marker {
    text-align: center;
    font-weight: bold;
    padding: 1em;
    background: #f5f5f5;
}

.ui-menu {
    background: white;
    color: black;
    list-style-type: none;
}
