/* Blog: app-style layer. */
.bl-page {
    --bl-ink: #1b2a24;
    --bl-text: #3d4d46;
    --bl-muted: #6f7f78;
    --bl-line: #e2e8e4;
    --bl-line-strong: #d3dbd6;
    --bl-surface: #f6f8f7;
    --bl-green: #03875f;
    --bl-green-lip: #026447;
    --bl-bright: #12b886;
    --bl-sel-bg: #eafaf3;
    --bl-sel-ink: #05603f;
    --bl-spring: cubic-bezier(.34, 1.56, .64, 1);
    -webkit-tap-highlight-color: transparent;
}
.bl-page :focus-visible { outline: 3px solid #7fdcb8; outline-offset: 3px; }

.bl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 0 18px;
    border: 2px solid var(--bl-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 0 var(--bl-line);
    color: var(--bl-ink);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: transform .1s ease, box-shadow .1s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}
.bl-btn i { font-size: 12px; }
.bl-btn:active { transform: translateY(4px); box-shadow: none; }
@media (hover: hover) { .bl-btn:hover { background: var(--bl-surface); border-color: var(--bl-line-strong); box-shadow: 0 4px 0 var(--bl-line-strong); } }
.bl-btn-green { border-color: var(--bl-green); background: var(--bl-green); box-shadow: 0 4px 0 var(--bl-green-lip); color: #fff; }
@media (hover: hover) { .bl-btn-green:hover { border-color: var(--bl-green); background: var(--bl-green); box-shadow: 0 4px 0 var(--bl-green-lip); filter: brightness(1.07); } }
.bl-hl { color: var(--bl-green); }

/* ---------- Archive hero ---------- */
.bl-hero { background: linear-gradient(180deg, #eefaf4 0%, #fafbfc 100%) !important; }
.bl-hero-pip { width: 88px; margin: 0 auto 12px; animation: mmPopIn .6s var(--bl-spring) .1s backwards; }
.bl-hero-pip .mm-mascot { width: 100%; }
.bl-search {
    border: 2px solid var(--bl-line) !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: 0 4px 0 var(--bl-line) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}
.bl-search:focus-within { border-color: var(--bl-bright) !important; box-shadow: 0 4px 0 #9fdfc3 !important; }
.bl-search input { font-size: 16px !important; }   /* no iOS zoom */

/* ---------- Cards ---------- */
.bl-card {
    border: 2px solid var(--bl-line) !important;
    border-radius: 24px !important;
    box-shadow: 0 5px 0 var(--bl-line) !important;
    transition: border-color .15s ease, box-shadow .15s ease !important;
}
.bl-card:hover { transform: none !important; border-color: #9fdfc3 !important; box-shadow: 0 5px 0 #7fd3ad !important; }
.bl-card img, .bl-card .bl-fallback { transform: none !important; transition: none !important; }
.bl-cat {
    border: 0 !important;
    background: #fff !important;
    color: var(--bl-sel-ink) !important;
    box-shadow: 0 2px 0 rgba(0, 0, 0, .12) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}
.bl-card h2, .bl-card h4 { color: var(--bl-ink); }
/* card titles: the global body h2 rule made them 28px / 800, too heavy for a grid */
.bl-page .bl-card h2 { font-size: 20px !important; font-weight: 700 !important; line-height: 1.3 !important; letter-spacing: -.01em !important; }
.bl-page .bl-hero h1 { font-weight: 700 !important; }
.bl-read {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border: 2px solid var(--bl-line);
    border-radius: 12px;
    box-shadow: 0 3px 0 var(--bl-line);
    color: var(--bl-green) !important;
    font-size: 13px;
    font-weight: 800;
}
.bl-card:hover .bl-read { border-color: var(--bl-green); background: var(--bl-green); box-shadow: 0 3px 0 var(--bl-green-lip); color: #fff !important; }

/* newest post as a wide feature card */
@media (min-width: 1024px) {
    .bl-grid > .bl-card:first-child { grid-column: 1 / -1; flex-direction: row; }
    .bl-grid > .bl-card:first-child > a:first-child { flex: 0 0 56%; aspect-ratio: auto; min-height: 380px; }
    .bl-grid > .bl-card:first-child > div { align-self: center; padding: 44px; }
    .bl-page .bl-grid > .bl-card:first-child h2 { font-size: 26px !important; line-height: 1.25 !important; }
}

.bl-empty-pip { width: 110px; margin: 0 auto 14px; }
.bl-empty-pip .mm-mascot { width: 100%; }

/* ---------- Article ---------- */
.bl-back { min-height: 40px; }
.bl-head {
    border: 2px solid var(--bl-line) !important;
    border-radius: 26px !important;
    background: #fff !important;
    box-shadow: 0 5px 0 var(--bl-line) !important;
}
.bl-head > .bl-head-bar { display: none; }
.bl-cover {
    aspect-ratio: 3 / 2 !important;
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
    border: 2px solid var(--bl-line) !important;
    border-radius: 26px !important;
    box-shadow: 0 5px 0 var(--bl-line) !important;
}
.bl-layout { display: grid; gap: 28px; align-items: start; }
@media (min-width: 1024px) { .bl-layout { grid-template-columns: minmax(0, 1fr) 300px; } }
.bl-body {
    border: 2px solid var(--bl-line) !important;
    border-radius: 26px !important;
    box-shadow: 0 5px 0 var(--bl-line) !important;
}
/* ~70 characters a line: the old full-width column ran to ~130 */
.bl-body .article-content { max-width: 720px; margin: 0 auto; }
.bl-page .article-content p, .bl-page .article-content li { color: var(--bl-text); }
.bl-page .article-content h2 { color: var(--bl-ink); scroll-margin-top: 110px; }
.bl-page .article-content h2::before {
    content: '';
    display: block;
    width: 44px;
    height: 6px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: var(--bl-bright);
}
.bl-page .article-content ul li::before { content: ''; top: .72em; width: 8px; height: 8px; margin-left: -1.1em; border-radius: 3px; background: var(--bl-bright); position: absolute; }
.bl-page .article-content blockquote { border: 2px solid #bdebd6; border-left-width: 6px; font-style: normal; box-shadow: 0 4px 0 #bdebd6; }
.bl-page .article-content img { border: 2px solid var(--bl-line); border-radius: 20px; box-shadow: none; }
.bl-page .table-responsive { border: 2px solid var(--bl-line) !important; border-radius: 18px !important; box-shadow: 0 4px 0 var(--bl-line) !important; }

.bl-share a, .bl-share button {
    border: 2px solid var(--bl-line) !important;
    box-shadow: 0 3px 0 var(--bl-line);
    transition: transform .1s ease, box-shadow .1s ease, background-color .15s ease, color .15s ease !important;
}
.bl-share a:active, .bl-share button:active { transform: translateY(3px); box-shadow: none; }

/* sidebar: contents + plan CTA */
.bl-side { display: grid; align-content: start; gap: 18px; }
/* the CTA scrolls away; only the contents list sticks (a sticky column taller
   than the screen would hide its own bottom) */
@media (min-width: 1024px) { .bl-side { align-self: stretch; } .bl-side .bl-toc { position: sticky; top: 112px; } }
.bl-box { padding: 20px; border: 2px solid var(--bl-line); border-radius: 22px; background: #fff; box-shadow: 0 5px 0 var(--bl-line); }
.bl-box-title { margin: 0 0 10px; color: var(--bl-muted); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.bl-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: bltoc; }
.bl-toc li { counter-increment: bltoc; }
.bl-toc a {
    display: flex;
    gap: 10px;
    padding: 7px 8px;
    border-radius: 10px;
    color: var(--bl-text);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
}
.bl-toc a::before { content: counter(bltoc); flex: 0 0 auto; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--bl-surface); color: var(--bl-muted); font-size: 11px; font-weight: 800; }
.bl-toc a:hover { background: var(--bl-surface); color: var(--bl-ink); }
.bl-toc a.is-current { background: var(--bl-sel-bg); color: var(--bl-sel-ink); }
.bl-toc a.is-current::before { background: var(--bl-green); color: #fff; }
.bl-toc-mobile { display: block; }
.bl-toc-mobile summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
.bl-toc-mobile summary::-webkit-details-marker { display: none; }
.bl-toc-mobile summary .bl-box-title { margin: 0; }
.bl-toc-mobile summary i { color: var(--bl-muted); transition: transform .2s ease; }
.bl-toc-mobile[open] summary i { transform: rotate(180deg); }
.bl-toc-mobile ol { margin-top: 10px; }
@media (min-width: 1024px) { .bl-toc-mobile { display: none; } }
@media (max-width: 1023px) { .bl-side .bl-toc { display: none; } }

.bl-cta { position: relative; overflow: hidden; background: var(--bl-sel-bg); border-color: #bdebd6; box-shadow: 0 5px 0 #9fdfc3; text-align: center; }
.bl-cta-pip { width: 72px; margin: 0 auto 6px; }
.bl-cta-pip .mm-mascot { width: 100%; }
.bl-cta strong { display: block; color: var(--bl-ink); font-size: 17px; font-weight: 800; line-height: 1.3; }
.bl-cta p { margin: 6px 0 14px; color: var(--bl-text); font-size: 13.5px; line-height: 1.5; }
.bl-cta .bl-btn { width: 100%; }
.bl-cta small { display: block; margin-top: 10px; color: var(--bl-muted); font-size: 12px; }

/* end-of-article CTA (all screens) */
.bl-endcta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 40px; padding: 22px; border: 2px solid #bdebd6; border-radius: 22px; background: var(--bl-sel-bg); box-shadow: 0 5px 0 #9fdfc3; }
.bl-endcta .bl-cta-pip { flex: 0 0 auto; width: 76px; margin: 0; }
.bl-endcta div { flex: 1 1 240px; }
.bl-endcta strong { display: block; color: var(--bl-ink); font-size: 18px; font-weight: 800; line-height: 1.3; }
.bl-endcta p { margin: 4px 0 0; color: var(--bl-text); font-size: 14px; }
@media (max-width: 639px) { .bl-endcta .bl-btn { width: 100%; } }

.bl-progress { position: fixed; z-index: 60; top: 0; left: 0; width: 100%; height: 4px; transform-origin: 0 50%; transform: scaleX(0); background: var(--bl-bright); pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
    .bl-page *, .bl-page *::before, .bl-page *::after { animation: none !important; transition: none !important; }
}
@media print {
    .bl-side, .bl-toc-mobile, .bl-share, .bl-endcta, .bl-progress, .bl-back { display: none !important; }
    .bl-layout { display: block; }
    .bl-head, .bl-body, .bl-cover { border: 0 !important; box-shadow: none !important; }
}
