/* Blog post reading layout (2026-12-06): bigger type on mobile, calmer headings, contents box,
   reading progress bar, back-to-top. Loaded only on blog_post.html. Selectors are prefixed with
   .blog-article so they win over the older rules in style.css. */

.blog-article .article-content {
    font-size: 17.5px;
    line-height: 1.78;
    color: var(--textMd, #3d3d5c);
}
.blog-article .article-content p { margin: 0 0 1.15em; }
.blog-article .article-content p.dh-lead {
    font-size: 1.1em;
    line-height: 1.7;
    color: var(--text, #1a1a2e);
}
.blog-article .article-content strong { color: var(--text, #1a1a2e); }

/* headings: accent bar instead of a full-width underline, more air above each section */
.blog-article .article-content h2 {
    font-size: 25px;
    line-height: 1.3;
    margin: 2.4em 0 0.7em;
    padding: 2px 0 2px 14px;
    border-bottom: 0;
    border-left: 5px solid var(--accent, #c66d20);
    border-radius: 2px;
    scroll-margin-top: 90px;
}
.blog-article .article-content h3 {
    font-size: 19.5px;
    line-height: 1.35;
    margin: 1.8em 0 0.5em;
    color: var(--text, #1a1a2e);
    scroll-margin-top: 90px;
}
/* boxes that already style their own heading (price history, callouts) keep it */
.blog-article .article-content section h2,
.blog-article .article-content [style] > h2 {
    border-left: 0;
    padding-left: 0;
}
.blog-article .article-content li { line-height: 1.7; margin-bottom: 0.55em; }
.blog-article .article-content img { border-radius: 12px; max-width: 100%; height: auto; }
.blog-article .article-content a { text-decoration-thickness: 1px; }

/* "In this article" contents box */
.dh-toc {
    margin: 8px 0 30px;
    background: var(--card-solid, #fff);
    border: 1px solid var(--border2, rgba(200, 200, 220, .35));
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
    font-size: 15.5px;
    line-height: 1.5;
}
.dh-toc summary {
    cursor: pointer;
    list-style: none;
    padding: 14px 18px;
    font-weight: 800;
    color: var(--text, #1a1a2e);
    display: flex;
    align-items: center;
    gap: 10px;
}
.dh-toc summary::-webkit-details-marker { display: none; }
.dh-toc summary .dh-toc-count { font-weight: 600; color: var(--textLt, #7a7a9e); font-size: 13.5px; }
.dh-toc summary::after {
    content: '';
    margin-left: auto;
    width: 9px; height: 9px;
    border-right: 2px solid var(--textLt, #7a7a9e);
    border-bottom: 2px solid var(--textLt, #7a7a9e);
    transform: rotate(45deg);
    transition: transform .2s;
}
.dh-toc[open] summary::after { transform: rotate(-135deg); }
.blog-article .article-content .dh-toc ol {
    margin: 0;
    padding: 0 18px 14px 18px;
    counter-reset: toc;
}
.blog-article .article-content .dh-toc li {
    counter-increment: toc;
    padding: 6px 0 6px 34px;
    margin: 0;
    border-top: 1px solid var(--border2, rgba(200, 200, 220, .35));
}
.blog-article .article-content .dh-toc li::before {
    content: counter(toc);
    position: absolute;
    left: 0; top: 7px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--accentBg, rgba(255, 240, 224, .6));
    color: var(--accent, #c66d20);
    font-size: 12px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    opacity: 1;
}
.blog-article .article-content .dh-toc a {
    color: var(--textMd, #3d3d5c);
    text-decoration: none;
}
.blog-article .article-content .dh-toc a:hover { color: var(--accent, #c66d20); }
.blog-article .article-content .dh-toc a.dh-active { color: var(--accent, #c66d20); font-weight: 700; }

/* reading progress bar + back to top */
.dh-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0;
    background: var(--accent, #c66d20);
    z-index: 10000;
    transition: width .1s linear;
}
.dh-totop {
    position: fixed; right: 18px; bottom: 24px;
    width: 44px; height: 44px; border-radius: 50%;
    border: 0; cursor: pointer;
    background: var(--accent, #c66d20); color: #fff;
    box-shadow: 0 6px 18px rgba(198, 109, 32, .35);
    font-size: 20px; line-height: 44px; text-align: center;
    opacity: 0; pointer-events: none; transform: translateY(10px);
    transition: opacity .25s, transform .25s;
    z-index: 900;
}
.dh-totop.dh-show { opacity: 1; pointer-events: auto; transform: none; }
.dh-readtime { white-space: nowrap; }

@media (max-width: 768px) {
    .blog-article .article-content { font-size: 16.5px; line-height: 1.75; }
    .blog-article .article-content h2 { font-size: 21px; padding-left: 12px; border-left-width: 4px; }
    .blog-article .article-content h3 { font-size: 18px; }
    .dh-toc { font-size: 15px; }
    .dh-totop { bottom: 84px; right: 14px; }   /* stay above the mobile bottom nav */
}
