/*
 * ShopLeaf blog articles. Shared by the public post page and the admin blog editor
 * so what is written is what readers see. Fonts inherit from the site; set
 * --sl-article-font in a template to use a different body face (e.g. Georgia).
 */
/* --sl-header-offset is the height of the site's fixed header (set by the blog pages' script),
   so the title isn't hidden underneath it. Templates can also set it themselves. */
.sl-article {
    --sl-article-text: #242424;
    --sl-article-muted: #6b6b6b;
    --sl-article-rule: #e6e6e6;
    max-width: 720px;
    margin: 0 auto;
    padding: calc(var(--sl-header-offset, 0px) + 56px) 20px 80px;
    color: var(--sl-article-text);
    box-sizing: border-box;
    text-align: left;
}

.sl-article h1.sl-title {
    font-size: 42px;
    line-height: 1.18;
    font-weight: 800;
    letter-spacing: -0.015em;
    text-transform: none;
    text-align: left;
    border: 0;
    margin: 0 0 10px;
    padding: 0;
}

.sl-article .sl-subtitle {
    font-size: 22px;
    line-height: 1.4;
    color: var(--sl-article-muted);
    margin: 0 0 22px;
}

.sl-article .sl-meta {
    font-size: 14px;
    color: var(--sl-article-muted);
    margin: 0 0 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--sl-article-rule);
}

.sl-article-body {
    font-family: var(--sl-article-font, inherit);
    font-size: 20px;
    line-height: 1.75;
    word-wrap: break-word;
}

.sl-article-body > :first-child { margin-top: 0; }
.sl-article-body p { margin: 0 0 1.4em; }
.sl-article-body h2 { font-size: 30px; line-height: 1.25; font-weight: 700; margin: 1.7em 0 0.45em; text-transform: none; border: 0; text-align: left; }
.sl-article-body h3 { font-size: 23px; line-height: 1.3; font-weight: 700; margin: 1.5em 0 0.4em; text-transform: none; text-align: left; }
.sl-article-body a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.sl-article-body ul, .sl-article-body ol { margin: 0 0 1.4em; padding-left: 1.4em; }
.sl-article-body li { margin: 0 0 0.5em; }
.sl-article-body blockquote {
    margin: 1.8em 0;
    padding: 0 0 0 22px;
    border-left: 3px solid var(--sl-article-text);
    font-style: italic;
    font-size: 1.05em;
}
.sl-article-body hr {
    border: 0;
    height: auto;
    margin: 2.6em 0;
    text-align: center;
    overflow: visible;
    background: none;
}
.sl-article-body hr::before {
    content: "\2022  \2022  \2022";
    letter-spacing: 0.9em;
    font-size: 22px;
    color: var(--sl-article-muted);
}
.sl-article-body code {
    font-family: Menlo, Consolas, "Courier New", monospace;
    font-size: 0.85em;
    background: #f2f2f2;
    padding: 2px 5px;
    border-radius: 4px;
}
.sl-article-body pre {
    font-family: Menlo, Consolas, "Courier New", monospace;
    font-size: 15px;
    line-height: 1.6;
    background: #f4f4f4;
    padding: 18px 20px;
    border-radius: 6px;
    margin: 0 0 1.6em;
    white-space: pre-wrap;
    overflow-x: auto;
}

/* Images: normal = column width, wide = a little wider, full = edge to edge */
.sl-article figure { margin: 2.2em 0; padding: 0; }
.sl-article figure img { display: block; width: 100%; height: auto; border-radius: 4px; }
.sl-article figcaption { margin-top: 10px; text-align: center; font-size: 14px; line-height: 1.5; color: var(--sl-article-muted); font-style: normal; }
.sl-article figure.bl-wide { margin-left: -140px; margin-right: -140px; }
.sl-article figure.bl-full { width: 100vw; position: relative; left: 50%; margin-left: -50vw; }
.sl-article figure.bl-full img { border-radius: 0; }
.sl-article .bl-video { position: relative; padding-top: 56.25%; background: #000; border-radius: 4px; overflow: hidden; }
.sl-article .bl-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sl-article .sl-cover { margin-top: 0; }

.sl-article .sl-tags { margin-top: 40px; }
.sl-article .sl-tags a {
    display: inline-block;
    margin: 0 8px 8px 0;
    padding: 6px 14px;
    border-radius: 100px;
    background: #f2f2f2;
    color: var(--sl-article-text);
    font-size: 14px;
    text-decoration: none;
}
.sl-article .sl-back { display: inline-block; margin-top: 30px; font-size: 15px; color: var(--sl-article-muted); }

/* Listing */
.sl-blog { max-width: 1100px; margin: 0 auto; padding: calc(var(--sl-header-offset, 0px) + 56px) 20px 80px; box-sizing: border-box; }
.sl-blog > h1 { font-size: 40px; margin: 0 0 6px; text-transform: none; border: 0; text-align: left; }
.sl-blog .sl-blog-filter { color: #6b6b6b; margin: 0 0 28px; }
.sl-blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px; }
.sl-blog-card { display: block; color: inherit; text-decoration: none; }
.sl-blog-card .sl-blog-image { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: #eee; margin-bottom: 14px; }
.sl-blog-card h2 { font-size: 22px; line-height: 1.3; margin: 0 0 6px; text-transform: none; border: 0; text-align: left; }
.sl-blog-card p { margin: 0 0 8px; color: #6b6b6b; font-size: 16px; line-height: 1.5; }
.sl-blog-card .sl-meta { font-size: 13px; color: #6b6b6b; }
.sl-blog-pages { display: flex; justify-content: space-between; margin-top: 40px; }
.sl-blog-empty { color: #6b6b6b; padding: 40px 0; }

@media (max-width: 1040px) {
    .sl-article figure.bl-wide { margin-left: 0; margin-right: 0; }
}
@media (max-width: 600px) {
    .sl-article, .sl-blog { padding-top: calc(var(--sl-header-offset, 0px) + 32px); }
    .sl-article h1.sl-title { font-size: 32px; }
    .sl-article .sl-subtitle { font-size: 19px; }
    .sl-article-body { font-size: 18px; }
    .sl-article-body h2 { font-size: 25px; }
}
