/* =========================================================
   Blog article — aligned with zh homepage / blog list
   DOM contract preserved (IDs / key classes for blog-writer).
   ========================================================= */

.article-page {
    background: #f8f9fa;
}

/* ── Reading progress ── */
#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #2563eb 0%, #7c3aed 100%);
    z-index: 60;
    transition: width 0.1s linear;
}

/* ── Breadcrumb ── */
.site-article-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.55rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: #64748b;
}
.site-article-breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}
.site-article-breadcrumb a:hover { color: #2563eb; }
.site-article-breadcrumb a i { font-size: 0.9rem; }
.site-article-breadcrumb > i.ph {
    font-size: 0.65rem;
    color: #cbd5e1;
}
.site-article-breadcrumb span {
    color: #0f172a;
    font-weight: 600;
    max-width: 28rem;
    line-height: 1.35;
}

/* ── Hero meta ── */
.site-article-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 1.25rem;
}
.site-article-tag,
.article-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 0.75rem;
    font-weight: 700;
}
.site-article-meta-item {
    font-size: 0.82rem;
    font-weight: 600;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
}
.site-article-meta-dot {
    color: #cbd5e1;
    font-size: 0.65rem;
}
.site-article-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #0f172a;
    margin-bottom: 1rem;
}
.site-article-deck {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #64748b;
    font-weight: 500;
    max-width: 44rem;
}

/* ── Layout ── */
.site-article-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}
@media (min-width: 1024px) {
    .site-article-layout {
        grid-template-columns: minmax(0, 1fr) 240px;
        gap: 2.5rem;
    }
}

/* Mobile TOC */
.site-article-toc-mobile {
    display: block;
    margin-bottom: 1.25rem;
}
@media (min-width: 1024px) {
    .site-article-toc-mobile { display: none; }
}
.site-article-toc-mobile summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    list-style: none;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.05);
}
.site-article-toc-mobile summary::-webkit-details-marker { display: none; }
.site-article-toc-mobile .site-article-toc {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
}

/* ── Article body card ── */
.site-article-body {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.05);
}
.site-article-body-accent { display: none; }
.site-article-body-inner {
    padding: 1.5rem;
}
@media (min-width: 640px) {
    .site-article-body-inner { padding: 2rem 2.25rem; }
}
@media (min-width: 1024px) {
    .site-article-body-inner { padding: 2.5rem 2.75rem; }
}

/* ── Prose ── */
.article-body h2 {
    scroll-margin-top: 7rem;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a !important;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.article-body h3:not(.cta-title) {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a !important;
    margin-bottom: 0.4rem;
}
.article-body p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #475569;
    margin-bottom: 1rem;
}
.article-body strong {
    color: #0f172a;
    font-weight: 600;
}
.article-body a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(37, 99, 235, 0.25);
    transition: border-color 0.2s;
}
.article-body a:hover { border-bottom-color: #2563eb; }
.article-body ul,
.article-body ol {
    margin: 0;
    padding: 0;
    list-style: none;
}
.article-body section {
    margin-bottom: 2.75rem;
}
.article-body section:last-child { margin-bottom: 0; }

.article-lead {
    background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
    border: 1px solid #dbeafe;
    border-radius: 1rem;
    padding: 1.25rem 1.4rem;
    margin-bottom: 1.75rem;
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.75;
}

.article-body .site-article-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}
.article-body .site-article-topic {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
}

.article-section-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.5rem;
    background: #2563eb;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    flex-shrink: 0;
}
.article-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #fff;
}
.data-table thead tr { background: #f8f9fa; }
.data-table th {
    padding: 0.75rem 1rem;
    font-weight: 700;
    text-align: left;
    color: #0f172a;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.data-table td {
    padding: 0.75rem 1rem;
    border-top: 1px solid #f1f5f9;
    color: #475569;
    font-weight: 500;
}
.data-table tbody tr:hover {
    background: rgba(37, 99, 235, 0.03);
}
.article-body .overflow-x-auto { margin-bottom: 1.25rem; }

.article-body .rounded-xl.border,
.article-body .article-card-box {
    border-radius: 1rem !important;
    border: 1px solid #e5e7eb !important;
    background: #f8f9fa !important;
    padding: 1.25rem !important;
}
.article-body .grid.sm\:grid-cols-2 {
    display: grid;
    gap: 0.85rem;
    margin-bottom: 0.5rem;
}
@media (min-width: 640px) {
    .article-body .grid.sm\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.article-body li.flex.gap-2,
.article-body li.flex.gap-3 {
    display: flex;
    gap: 0.65rem;
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.7;
}
.article-body li.flex.gap-2 span:first-child,
.article-body li.flex.gap-3 span:first-child {
    color: #2563eb;
    font-weight: 800;
    flex-shrink: 0;
}
.article-body ol.space-y-3 li { margin-bottom: 0.75rem; }

/* FAQ */
.article-body details,
.article-faq details {
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    background: #f8f9fa;
    padding: 1rem 1.2rem;
    margin-bottom: 0.65rem;
}
.article-body details summary,
.article-faq summary {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}
.article-body details summary::-webkit-details-marker,
.article-faq summary::-webkit-details-marker { display: none; }
.article-body details p,
.article-faq details p {
    margin-top: 0.75rem;
    margin-bottom: 0;
}
.article-body details i {
    color: #94a3b8;
    transition: transform 0.2s;
    flex-shrink: 0;
}
.article-body details[open] i { transform: rotate(180deg); }

.article-body .rounded-xl.p-5 {
    border-radius: 1rem !important;
    padding: 1.35rem !important;
    background: #f8f9fa !important;
    border: 1px solid #e5e7eb !important;
    color: #475569;
}

/* In-article CTA */
.article-cta {
    position: relative;
    overflow: hidden;
    margin-top: 2.5rem;
    padding: 1.75rem 1.5rem;
    border-radius: 1.5rem;
    color: #fff;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.35);
}
@media (min-width: 768px) {
    .article-cta { padding: 2rem 2.25rem; }
}
.article-cta__grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
@media (min-width: 768px) {
    .article-cta__grid {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 2rem;
    }
}
.article-cta__copy { min-width: 0; }
.article-cta__actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    flex-shrink: 0;
}
@media (min-width: 640px) {
    .article-cta__actions {
        flex-direction: row;
        align-items: center;
    }
}
.article-cta .cta-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #93c5fd;
    margin-bottom: 0.4rem;
}
.article-cta .cta-title {
    font-size: clamp(1.15rem, 2.5vw, 1.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: #ffffff !important;
    margin-bottom: 0.35rem;
}
.article-cta .cta-desc {
    font-size: 0.88rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.6);
    max-width: 36rem;
}
.article-cta a {
    text-decoration: none;
    border: none;
}
.article-cta .cta-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    height: 2.75rem;
    padding: 0 1.35rem;
    background: #fff;
    color: #0f172a !important;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 9999px;
    transition: background 0.2s, transform 0.2s;
    white-space: nowrap;
}
.article-cta .cta-btn-primary:hover {
    background: #f1f5f9;
    color: #0f172a !important;
    transform: translateY(-1px);
}
.article-cta .cta-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    height: 2.75rem;
    padding: 0 1.35rem;
    color: #fff !important;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.06);
    transition: background 0.2s;
    white-space: nowrap;
}
.article-cta .cta-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff !important;
}
.article-cta .flex {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
@media (min-width: 640px) {
    .article-cta .flex { flex-direction: row; }
}

.site-article-back {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 1.5rem;
    padding: 0.65rem 1.1rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    transition: color 0.2s, border-color 0.2s, gap 0.2s;
}
.site-article-back:hover {
    color: #2563eb;
    border-color: rgba(37, 99, 235, 0.3);
    gap: 0.55rem;
}

/* ── Sidebar ── */
.site-article-sidebar {
    display: none;
}
@media (min-width: 1024px) {
    .site-article-sidebar {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        position: sticky;
        top: 6.5rem;
    }
}
.site-article-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 1.25rem;
    padding: 1.25rem;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.04);
}
.site-article-panel-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 0.85rem;
}
.site-article-toc {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.toc-link,
.site-article-toc-link {
    display: block;
    padding: 0.5rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    border-radius: 0.65rem;
    transition: all 0.18s;
}
.toc-link:hover,
.site-article-toc-link:hover {
    color: #0f172a;
    background: #f8f9fa;
}
.toc-link.active,
.toc-link.is-active,
.site-article-toc-link.is-active {
    color: #2563eb;
    font-weight: 600;
    background: #eff6ff;
}
.site-article-info dl {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.site-article-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.site-article-info dt {
    font-size: 0.75rem;
    font-weight: 500;
    color: #94a3b8;
}
.site-article-info dd {
    font-size: 0.82rem;
    font-weight: 600;
    color: #0f172a;
}
.site-article-sidebar-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.85rem 1rem;
    background: #0f172a;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 9999px;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 12px 24px -8px rgba(15, 23, 42, 0.35);
}
.site-article-sidebar-cta:hover {
    color: #fff;
    background: #1e293b;
    transform: translateY(-1px);
}

/* ── Bottom purchase dock ── */
#blog-purchase-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transform: translateY(110%);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    padding: 0 1rem 1rem;
}
#blog-purchase-bar.is-visible { transform: translateY(0); }
#blog-purchase-bar.is-hidden-permanently { display: none; }

.blog-purchase-dock {
    pointer-events: auto;
    max-width: 640px;
    margin: 0 auto;
}
.blog-purchase-dock__inner {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem 0.85rem 1.15rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(229, 231, 235, 0.8);
    backdrop-filter: blur(16px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.12);
}
@media (min-width: 640px) {
    .blog-purchase-dock__inner {
        padding: 0.9rem 1.15rem 0.9rem 1.25rem;
        gap: 1rem;
    }
}
.blog-purchase-dock__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: #eff6ff;
    color: #2563eb;
    font-size: 1.15rem;
    flex-shrink: 0;
}
.blog-purchase-dock__copy {
    flex: 1;
    min-width: 0;
}
.blog-purchase-dock__kicker {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #2563eb;
    margin-bottom: 0.05rem;
}
.blog-purchase-dock__title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}
.blog-purchase-dock__actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}
.blog-purchase-dock__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    height: 2.5rem;
    padding: 0 1.1rem;
    background: #0f172a;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 9999px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, transform 0.2s;
}
.blog-purchase-dock__cta:hover {
    color: #fff;
    background: #1e293b;
    transform: translateY(-1px);
}
.blog-purchase-dock__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 9999px;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.blog-purchase-dock__close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Mobile floating pill */
#blog-purchase-float {
    position: fixed;
    bottom: 1.25rem;
    right: 1rem;
    z-index: 40;
    transition: opacity 0.3s, transform 0.3s;
}
.blog-purchase-float__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.1rem 0.7rem 0.95rem;
    background: #2563eb;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 9999px;
    text-decoration: none;
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.35);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.blog-purchase-float__btn i {
    font-size: 1.05rem;
}
.blog-purchase-float__btn:hover {
    color: #fff;
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(37, 99, 235, 0.4);
}
@media (min-width: 1024px) {
    #blog-purchase-float { display: none; }
}
