/* ============================================================
   article.css — Blog article page shared styles
   Used by: zh-CN/blog/articles/*.html
   DO NOT duplicate any of these rules inline in article HTML files
   ============================================================ */

/* ── Page layout ── */
.article-page-wrap {
    display: flex;
    gap: 32px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 88px 24px 64px;
    align-items: flex-start;
}

.article-main {
    flex: 1;
    min-width: 0;
}

/* ── Breadcrumb ── */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--accent-blue);
}

.breadcrumb-sep {
    opacity: 0.45;
    font-size: 11px;
}

.breadcrumb-current {
    color: var(--text-main);
    font-weight: 500;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Article header (injected by article-recommend.js) ── */
.article-header {
    margin-bottom: 36px;
}

.article-header-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.article-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: rgba(0, 113, 227, 0.08);
    color: var(--accent-blue);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.article-tag-latest {
    background: linear-gradient(135deg, #0071e3 0%, #34aadc 100%);
    color: #fff;
}

.article-header-title {
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.025em;
    color: var(--text-main);
    margin-bottom: 16px;
}

.article-header-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.article-header-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.article-header-summary {
    font-size: 16px;
    line-height: 1.7;
    color: #444;
    border-left: 3px solid var(--accent-blue);
    padding: 14px 18px;
    background: rgba(0, 113, 227, 0.04);
    border-radius: 0 10px 10px 0;
    margin-top: 8px;
}

/* ── Article body typography ── */
.article-body {
    font-size: 16px;
    line-height: 1.85;
    color: #222;
    word-break: break-word;
}

.article-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 2.4em 0 0.8em;
    color: var(--text-main);
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.07);
}

.article-body h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 1.8em 0 0.6em;
    color: var(--text-main);
}

.article-body p {
    margin-bottom: 1.1em;
}

.article-body ul,
.article-body ol {
    margin: 0.6em 0 1.2em 1.5em;
}

.article-body li {
    margin-bottom: 0.4em;
}

.article-body a {
    color: var(--accent-blue);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: opacity 0.2s;
}

.article-body a:hover {
    opacity: 0.75;
}

.article-body strong {
    font-weight: 600;
    color: var(--text-main);
}

.article-body blockquote {
    margin: 1.5em 0;
    padding: 14px 20px;
    background: var(--card-bg);
    border-left: 4px solid var(--accent-blue);
    border-radius: 0 8px 8px 0;
    color: #444;
    font-style: italic;
}

.article-body pre {
    background: var(--code-bg);
    color: #e8e8e8;
    padding: 20px 24px;
    border-radius: 12px;
    overflow-x: auto;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 13.5px;
    line-height: 1.65;
    margin: 1.2em 0 1.6em;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.article-body code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.875em;
    background: rgba(0,0,0,0.06);
    padding: 2px 6px;
    border-radius: 4px;
    color: #c0392b;
}

.article-body pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    font-size: 14px;
    overflow-x: auto;
    display: block;
}

.article-body th,
.article-body td {
    padding: 10px 14px;
    border: 1px solid rgba(0,0,0,0.1);
    text-align: left;
}

.article-body th {
    background: var(--card-bg);
    font-weight: 600;
    color: var(--text-main);
}

.article-body tr:nth-child(even) td {
    background: rgba(0,0,0,0.02);
}

/* Callout / tip / warning boxes */
.callout {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 12px;
    margin: 1.4em 0;
    font-size: 14.5px;
    line-height: 1.7;
}

.callout-icon {
    flex-shrink: 0;
    font-size: 1.1em;
    margin-top: 2px;
}

.callout-tip {
    background: rgba(0, 178, 72, 0.08);
    border-left: 4px solid #00b248;
    color: #1a5c32;
}

.callout-warn {
    background: rgba(255, 149, 0, 0.08);
    border-left: 4px solid #ff9500;
    color: #7a4400;
}

.callout-info {
    background: rgba(0, 113, 227, 0.07);
    border-left: 4px solid var(--accent-blue);
    color: #1a3a66;
}

/* ── Product recommendation section ── */
.product-recommend {
    margin-top: 52px;
    padding: 40px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fe 100%);
    border: 1px solid rgba(0, 113, 227, 0.15);
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0, 113, 227, 0.06);
}

.product-recommend-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.product-recommend-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.product-recommend-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.product-recommend-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.product-recommend-desc {
    font-size: 15px;
    line-height: 1.75;
    color: #444;
    margin-bottom: 22px;
}

.product-recommend-features {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.product-recommend-features li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    background: rgba(255,255,255,0.85);
    border: 1px solid rgba(0, 113, 227, 0.15);
    border-radius: 30px;
    font-size: 13.5px;
    color: #333;
    font-weight: 500;
}

.product-recommend-features li i {
    color: var(--accent-blue);
    font-size: 12px;
}

.product-recommend-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 30px;
    background: var(--accent-blue);
    color: #fff;
    border-radius: 50px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 18px rgba(0, 113, 227, 0.35);
}

.product-recommend-cta:hover {
    background: var(--accent-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 113, 227, 0.4);
}

/* ── Prev / Next article navigation ── */
.article-nav-prev-next {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 32px;
}

.article-nav-item {
    display: flex;
    flex-direction: column;
    padding: 20px 22px;
    background: var(--card-bg);
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-main);
    border: 1px solid rgba(0,0,0,0.07);
    transition: all 0.28s cubic-bezier(0.25, 1, 0.5, 1);
}

.article-nav-item:hover {
    border-color: rgba(0, 113, 227, 0.3);
    background: rgba(0, 113, 227, 0.04);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.07);
}

.article-nav-item.is-prev {
    align-items: flex-start;
}

.article-nav-item.is-next {
    align-items: flex-end;
    text-align: right;
}

.article-nav-dir {
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-nav-title {
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-main);
    margin-bottom: 8px;
}

.article-nav-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.article-nav-item.is-next .article-nav-tags {
    justify-content: flex-end;
}

.article-nav-tag {
    font-size: 11px;
    padding: 2px 9px;
    background: rgba(0, 113, 227, 0.08);
    color: var(--accent-blue);
    border-radius: 20px;
    font-weight: 500;
}

/* ── Related articles ── */
.article-related {
    margin-top: 32px;
}

.article-related-heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 9px;
}

.article-related-heading i {
    color: var(--accent-blue);
}

.article-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.article-related-card {
    display: flex;
    flex-direction: column;
    padding: 18px;
    background: var(--card-bg);
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-main);
    border: 1px solid rgba(0,0,0,0.07);
    transition: all 0.28s cubic-bezier(0.25, 1, 0.5, 1);
}

.article-related-card:hover {
    border-color: rgba(0, 113, 227, 0.3);
    background: rgba(0, 113, 227, 0.04);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.07);
}

.article-related-card-title {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--text-main);
    margin-bottom: 10px;
    flex: 1;
}

.article-related-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.article-related-card-tag {
    font-size: 11px;
    padding: 2px 9px;
    background: rgba(0, 113, 227, 0.08);
    color: var(--accent-blue);
    border-radius: 20px;
    font-weight: 500;
}

/* ── Sidebar TOC ── */
.article-sidebar {
    width: 248px;
    flex-shrink: 0;
    position: sticky;
    top: 72px;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.12) transparent;
}

.article-sidebar::-webkit-scrollbar {
    width: 4px;
}

.article-sidebar::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.12);
    border-radius: 2px;
}

.toc-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 22px 18px;
    border: 1px solid rgba(0,0,0,0.12);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.toc-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.toc-title i {
    color: var(--accent-blue);
}

.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc-list li {
    margin-bottom: 2px;
}

.toc-list a {
    display: block;
    padding: 6px 10px;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    line-height: 1.45;
    position: relative;
}

.toc-list a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: transparent;
    border-radius: 1px;
    transition: background 0.2s ease;
}

.toc-list a:hover {
    background: rgba(0, 113, 227, 0.06);
    color: var(--accent-blue);
}

.toc-list a:hover::before {
    background: rgba(0, 113, 227, 0.4);
}

.toc-list a.toc-active {
    background: rgba(0, 113, 227, 0.08);
    color: var(--accent-blue);
    font-weight: 600;
}

.toc-list a.toc-active::before {
    background: var(--accent-blue);
}

.toc-list .toc-sub {
    padding-left: 24px;
    font-size: 12px;
}

/* ── Float widget ── */
.float-widget {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 300px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border: 1px solid rgba(0, 113, 227, 0.18);
    border-radius: 18px;
    padding: 22px 22px 18px;
    box-shadow:
        0 8px 32px rgba(0, 113, 227, 0.12),
        0 24px 64px rgba(0,0,0,0.1);
    z-index: 900;
    transform: translateY(120%) scale(0.95);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease;
    pointer-events: none;
}

.float-widget.visible {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.float-widget-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-secondary);
    opacity: 0.6;
    padding: 4px;
    line-height: 1;
    transition: opacity 0.2s;
}

.float-widget-close:hover {
    opacity: 1;
}

.float-widget-logo-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.float-widget-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.float-widget-brand {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}

.float-widget-brand-sub {
    font-size: 11.5px;
    color: var(--text-secondary);
}

.float-widget-body {
    font-size: 13px;
    line-height: 1.6;
    color: #444;
    margin-bottom: 16px;
}

.float-widget-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    padding: 11px 0;
    background: var(--accent-blue);
    color: #fff;
    border-radius: 50px;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(0, 113, 227, 0.3);
}

.float-widget-cta:hover {
    background: var(--accent-blue-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0, 113, 227, 0.4);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .article-sidebar {
        display: none;
    }

    .article-page-wrap {
        padding: 82px 20px 52px;
    }
}

@media (max-width: 768px) {
    .article-page-wrap {
        padding: 74px 16px 48px;
    }

    .article-body {
        font-size: 15px;
    }

    .article-body h2 {
        font-size: 1.3rem;
    }

    .article-nav-prev-next {
        grid-template-columns: 1fr;
    }

    .article-related-grid {
        grid-template-columns: 1fr;
    }

    .product-recommend {
        padding: 26px 20px;
    }

    .float-widget {
        width: calc(100vw - 32px);
        right: 16px;
        left: 16px;
        bottom: 16px;
        border-radius: 14px;
    }
}
