/* static/css/blog/blog.css
   Blog — the list and one post, on StarRank's recipe: 604px stage,
   charcoal band with a gold hairline, white cards with 2px ink borders,
   Roboto titles, dates and text. Prefix blog-.
   The pager is the site's shared one, loaded by base.html. */

.blog-stage {
    max-width: 604px;
    margin: 1.5rem auto 3rem;
    padding: 0 2px;
    color: var(--dark-surface);
}

/* ---- header band: charcoal + gold hairline ---- */
.blog-head {
    position: relative;
    background: var(--bg-footer);
    border: 2px solid var(--dark-surface);
    padding: 0.7rem 1rem 0.85rem;
    margin-bottom: 0.6rem;
}

.blog-head::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: var(--accent-gold);
}

/* the list's heading, and on a post the way back to the list */
.blog-eyebrow {
    display: inline-block;
    margin: 0;
    font: 700 1rem/1 'Roboto', sans-serif;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent-gold);
    text-decoration: none;
}

a.blog-eyebrow:hover {
    color: #e0c04f;
}

/* ---- a post: a card on the list, the whole text on its own page ---- */
.blog-card {
    background: var(--surface);
    border: 2px solid var(--dark-surface);
    padding: 0.7rem 0.8rem 0.8rem;
    margin-bottom: 0.6rem;
}

.blog-date {
    display: inline-block;
    font: 700 0.78rem/1.4 'Roboto', sans-serif;
    color: var(--bg-footer);
    background: var(--cream);
    border: 1px solid var(--dark-surface);
    padding: 1px 7px;
    white-space: nowrap;
}

.blog-card-title,
.blog-title {
    margin: 0.45rem 0 0.35rem;
    font: 700 1.15rem/1.3 'Roboto', sans-serif;
    color: var(--dark-surface);
    overflow-wrap: anywhere;
}

.blog-title {
    font-size: 1.5rem;
    margin-bottom: 0.6rem;
}

/* the title is the way in, so it reads as a link */
.blog-card-title a {
    color: var(--accent-teal);
    text-decoration: none;
}

.blog-card-title a:hover {
    color: var(--accent-teal-dark);
}

.blog-lead {
    margin: 0;
    font: 400 1rem/1.5 'Roboto', sans-serif;
    color: var(--dark-surface);
    overflow-wrap: anywhere;
}

.blog-empty {
    margin: 0;
    font: 400 1rem/1.5 'Roboto', sans-serif;
    color: var(--dark-surface);
    background: var(--surface);
    border: 2px solid var(--dark-surface);
    padding: 0.7rem 0.8rem;
}

/* ---- the post's text, as the formatter hands it over ---- */
.blog-text {
    font: 400 1.05rem/1.65 'Roboto', sans-serif;
    color: var(--dark-surface);
    overflow-wrap: anywhere;
}

.blog-text > :first-child {
    margin-top: 0;
}

.blog-text > :last-child {
    margin-bottom: 0;
}

.blog-text p,
.blog-text ul,
.blog-text ol,
.blog-text blockquote,
.blog-text pre,
.blog-text table {
    margin: 0 0 0.9rem;
}

.blog-text ul,
.blog-text ol {
    padding-left: 1.4rem;
}

.blog-text h1,
.blog-text h2,
.blog-text h3,
.blog-text h4,
.blog-text h5,
.blog-text h6 {
    margin: 1.2rem 0 0.5rem;
    font: 700 1.1rem/1.3 'Roboto', sans-serif;
    color: var(--dark-surface);
}

.blog-text a {
    color: var(--accent-teal);
}

.blog-text blockquote {
    border-left: 3px solid var(--accent-gold);
    padding-left: 0.8rem;
}

.blog-text pre {
    overflow-x: auto;
    background: var(--cream);
    border: 2px solid var(--dark-surface);
    padding: 0.5rem 0.6rem;
}

.blog-text code {
    font-size: 0.9em;
}

.blog-text img {
    max-width: 100%;
    height: auto;
}

.blog-text hr {
    border: none;
    border-top: 2px solid var(--dark-surface);
    margin: 1.2rem 0;
}

@media (max-width: 480px) {
    .blog-stage {
        margin: 0.5rem auto 1.5rem;
    }
    .blog-head {
        padding: 0.5rem 0.5rem 0.6rem;
        margin-bottom: 0.4rem;
    }
    .blog-eyebrow {
        letter-spacing: 0.12em;
    }
    .blog-card,
    .blog-empty {
        padding: 0.5rem 0.35rem;
        margin-bottom: 0.4rem;
    }
    .blog-title {
        font-size: 1.3rem;
    }
}
