/* ── Site header (new template) ── */
#site-header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
    background: rgba(3,7,18,.75); backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,.08);
    transition: background .3s ease, box-shadow .3s ease;
}
#site-header.scrolled {
    background: rgba(3,7,18,.95);
    box-shadow: 0 2px 20px rgba(0,0,0,.4);
}

/* ── Nav actions (base — media query in article.css adds alignment) ── */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ── Primary download button in nav ── */
.btn-primary-nav {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #fff !important;
    text-decoration: none !important;
    white-space: nowrap;
    transition: all .2s ease;
    box-shadow: 0 3px 10px rgba(59,130,246,.35);
}
.btn-primary-nav:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59,130,246,.5);
    color: #fff !important;
    text-decoration: none !important;
}

/* ── Mobile nav dropdown ── */
.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-s, #111827);
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding: 12px 16px 20px;
    z-index: 99;
}
.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.mobile-nav ul li a {
    display: block;
    padding: 10px 12px;
    font-size: 15px;
    color: var(--c2, #9ca3af);
    border-radius: 8px;
    text-decoration: none;
    transition: all .2s ease;
}
.mobile-nav ul li a:hover {
    color: var(--c1, #f9fafb);
    background: rgba(255,255,255,.05);
}
body.nav-open .mobile-nav {
    display: block;
}

/* ── Site footer styles ── */
.site-footer {
    background: #020408;
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 48px 0 32px;
    position: relative;
    z-index: 1;
}

/* ── Article 2-column layout ── */
.article-page-wrap {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 104px 24px 80px;
    gap: 40px;
    position: relative; z-index: 1;
    align-items: flex-start;
}
.article-main {
    flex: 1;
    min-width: 0;
}
.article-sidebar {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: 96px;
}

/* ── TOC card ── */
.toc-card {
    background: rgba(17,24,39,.7);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    padding: 20px;
    backdrop-filter: blur(8px);
}
.toc-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--c2, #9ca3af);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 14px;
}
.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.toc-list li a {
    display: block;
    font-size: 13px;
    color: var(--c3, #6b7280);
    padding: 5px 8px;
    border-radius: 6px;
    border-left: 2px solid transparent;
    transition: all .2s ease;
    text-decoration: none;
    line-height: 1.5;
}
.toc-list li a:hover {
    color: var(--c1, #f9fafb);
    background: rgba(255,255,255,.04);
    text-decoration: none;
}
.toc-list li a.active {
    color: var(--blue, #3b82f6);
    border-left-color: var(--blue, #3b82f6);
    background: rgba(59,130,246,.06);
}

/* ── Inline CTA link ── */
.inline-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff !important;
    text-decoration: none !important;
    box-shadow: 0 4px 20px rgba(59,130,246,.35);
    transition: all .3s ease;
    letter-spacing: .2px;
}
.inline-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(59,130,246,.5);
    color: #ffffff !important;
    text-decoration: none !important;
}

/* ── Breadcrumb (injected) ── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--c3, #6b7280);
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.breadcrumb a {
    color: var(--blue, #3b82f6);
    text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { font-size: 10px; opacity: .5; }
.breadcrumb .current { color: var(--c2, #9ca3af); }

/* ── Article header (injected) ── */
.article-header {
    margin-bottom: 36px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}
.article-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 100px;
    background: rgba(59,130,246,.1);
    border: 1px solid rgba(59,130,246,.2);
    color: var(--blue, #3b82f6);
    letter-spacing: .03em;
}
.article-tag.latest {
    background: rgba(16,185,129,.1);
    border-color: rgba(16,185,129,.2);
    color: var(--green, #10b981);
}
.article-title {
    font-size: 30px;
    font-weight: 900;
    line-height: 1.3;
    color: var(--c1, #f9fafb);
    letter-spacing: -.3px;
    margin-bottom: 14px;
}
.article-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--c3, #6b7280);
    margin-bottom: 14px;
}
.article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}
.article-summary {
    font-size: 16px;
    color: var(--c2, #9ca3af);
    line-height: 1.75;
    margin-top: 4px;
}

/* ── Product recommend (injected) ── */
.product-recommend {
    margin-top: 48px;
    padding: 28px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(59,130,246,.08) 0%, rgba(139,92,246,.06) 100%);
    border: 1px solid rgba(59,130,246,.18);
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.product-recommend-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.product-recommend-logo-img {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: contain;
}
.product-recommend-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #fff !important;
    text-decoration: none !important;
    white-space: nowrap;
    transition: all .2s ease;
}
.product-recommend-btn:hover {
    transform: translateY(-1px);
    color: #fff !important;
}
.product-recommend-content { flex: 1; min-width: 200px; }
.product-recommend-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(16,185,129,.12);
    color: var(--green, #10b981);
    border: 1px solid rgba(16,185,129,.2);
    margin-bottom: 8px;
    letter-spacing: .05em;
}
.product-recommend-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--c1, #f9fafb);
    margin-bottom: 8px;
}
.product-recommend-desc {
    font-size: 13px;
    color: var(--c2, #9ca3af);
    line-height: 1.7;
    margin-bottom: 12px;
}
.product-recommend-points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.product-recommend-points li {
    font-size: 12px;
    color: var(--c2, #9ca3af);
    display: flex;
    align-items: flex-start;
    gap: 6px;
}
.product-recommend-points li::before {
    content: '✓';
    color: var(--green, #10b981);
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Prev / Next navigation ── */
.article-nav-prev-next {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    flex-wrap: wrap;
}
.nav-prev-next-item {
    flex: 1;
    min-width: 200px;
    padding: 18px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(17,24,39,.5);
    text-decoration: none !important;
    transition: all .2s ease;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.nav-prev-next-item:hover {
    border-color: rgba(59,130,246,.3);
    background: rgba(59,130,246,.06);
    text-decoration: none !important;
}
.nav-pn-direction {
    font-size: 11px;
    color: var(--c3, #6b7280);
    font-weight: 600;
    letter-spacing: .05em;
}
.nav-pn-title {
    font-size: 14px;
    color: var(--c1, #f9fafb);
    font-weight: 600;
    line-height: 1.4;
}
.nav-pn-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}
.nav-pn-tag {
    font-size: 11px;
    color: var(--c3, #6b7280);
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 4px;
    padding: 2px 7px;
}

/* ── Related articles ── */
.article-related {
    margin-top: 32px;
}
.article-related-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--c2, #9ca3af);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.article-related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.related-card {
    padding: 16px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.07);
    background: rgba(17,24,39,.5);
    text-decoration: none !important;
    transition: all .2s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.related-card:hover {
    border-color: rgba(59,130,246,.25);
    background: rgba(59,130,246,.05);
    text-decoration: none !important;
}
.related-card-title {
    font-size: 13px;
    color: var(--c1, #f9fafb);
    font-weight: 600;
    line-height: 1.45;
}
.related-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.related-card-tag {
    font-size: 10px;
    color: var(--c3, #6b7280);
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 3px;
    padding: 1px 6px;
}

/* ── Floating download widget ── */
.float-widget {
    position: fixed;
    bottom: 32px;
    right: 28px;
    z-index: 500;
    width: 200px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(59,130,246,.25);
    background: var(--bg-s, #111827);
    opacity: 0;
    transform: translateY(20px) scale(.92);
    pointer-events: none;
    transition: opacity .35s ease, transform .35s cubic-bezier(.34,1.56,.64,1);
}
.float-widget.visible {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}
.float-widget-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}
.float-widget-logo {
    background: linear-gradient(135deg,#1e3a8a 0%,#4c1d95 100%);
    padding: 20px 18px 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.float-widget-logo img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.2);
    margin-bottom: 12px;
}
.float-widget-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 3px;
}
.float-widget-desc {
    font-size: 11px;
    color: rgba(255,255,255,.55);
    line-height: 1.5;
    margin-bottom: 0;
}
.float-widget-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    margin: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #fff !important;
    text-decoration: none !important;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 3px 12px rgba(59,130,246,.4);
    transition: all .2s ease;
}
.float-widget-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(59,130,246,.55);
    color: #fff !important;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .article-page-wrap {
        flex-direction: column;
        padding: 88px 16px 56px;
        gap: 24px;
    }
    .article-sidebar {
        width: 100%;
        position: static;
    }
    .toc-card { padding: 16px; }
    .article-related-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .article-title { font-size: 22px; }
    .float-widget { bottom: 12px; right: 12px; left: 12px; width: auto; }
    .article-nav-prev-next { flex-direction: column; }
    .nav-prev-next-item { min-width: unset; }
    .product-recommend { flex-direction: column; gap: 16px; }
    .product-recommend-brand { flex-direction: row; align-items: center; }
}
