/* ================================================
   Article Page Common Styles
   Used by all blog article pages under zh-CN/blog/articles/
   DO NOT re-declare any of these styles inline in article HTML files
================================================ */

/* ── PAGE LAYOUT ── */
.article-page-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 104px 24px 80px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 268px;
    gap: 48px;
    align-items: start;
}
.article-main {
    min-width: 0;
    overflow-x: hidden;
}

/* Prevent any child element from overflowing the page width */
.article-page-wrap *,
.article-page-wrap *::before,
.article-page-wrap *::after {
    max-width: 100%;
    box-sizing: border-box;
}
.article-body img,
.article-body video,
.article-body iframe {
    max-width: 100%;
    height: auto;
}
.article-body pre {
    overflow-x: auto;
    word-break: normal;
    white-space: pre;
}
.article-body table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 28px;
    list-style: none;
}
.breadcrumb a {
    color: var(--muted);
    text-decoration: none;
    transition: color .2s;
}
.breadcrumb a:hover { color: var(--g); }
.breadcrumb .sep {
    color: var(--subtle);
    font-size: 9px;
    display: flex;
    align-items: center;
}
.breadcrumb .current {
    color: var(--ink);
    font-weight: 500;
}

/* ── ARTICLE HEADER (injected by article-recommend.js) ── */
.article-header {
    margin-bottom: 36px;
    padding-bottom: 32px;
    border-bottom: 2px solid var(--g-soft);
}
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}
.article-tag {
    padding: 4px 13px;
    border-radius: 100px;
    font-size: 11.5px;
    font-weight: 600;
    font-family: var(--ff-mono);
    background: var(--g-soft);
    color: var(--g);
    border: 1px solid var(--border-g);
}
.article-tag.latest {
    background: var(--g);
    color: var(--ink);
    border-color: var(--g);
}
.article-tag.category {
    background: rgba(0,212,255,.07);
    color: var(--g2);
    border-color: rgba(0,212,255,.2);
}
.article-h1 {
    font-family: var(--ff-disp);
    font-size: clamp(26px, 3.5vw, 42px);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 18px;
}
.article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 22px;
}
.article-meta span { display: flex; align-items: center; gap: 5px; }
.article-meta i { color: var(--g); font-size: 12px; }
.article-summary {
    font-size: 15.5px;
    line-height: 1.82;
    color: var(--muted);
    background: rgba(0,242,145,.04);
    border-left: 3px solid var(--g);
    padding: 16px 20px;
    border-radius: 0 10px 10px 0;
    margin-top: 4px;
}

/* ── ARTICLE BODY TYPOGRAPHY ── */
.article-body {
    font-size: 16px;
    line-height: 1.88;
    color: var(--ink);
}
.article-body h2 {
    font-family: var(--ff-disp);
    font-size: clamp(20px, 2.5vw, 26px);
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -.4px;
    margin: 52px 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--g-soft);
    scroll-margin-top: 100px;
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 {
    font-family: var(--ff-disp);
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    margin: 36px 0 12px;
    scroll-margin-top: 100px;
}
.article-body p {
    margin-bottom: 18px;
    color: var(--ink2);
}
.article-body a {
    color: var(--g);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(0,242,145,.4);
    transition: opacity .2s, text-decoration-color .2s;
}
.article-body a:hover {
    opacity: .8;
    text-decoration-color: var(--g);
}
.article-body ul,
.article-body ol {
    margin: 0 0 20px 26px;
}
.article-body li {
    margin-bottom: 8px;
    line-height: 1.78;
}
.article-body strong { font-weight: 700; color: var(--ink); }
.article-body em { font-style: italic; color: var(--muted); }
.article-body hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 40px 0;
}

/* Code */
.article-body pre {
    background: var(--ink);
    border-radius: 14px;
    padding: 20px 22px;
    overflow-x: auto;
    margin: 24px 0;
    border: 1px solid rgba(255,255,255,.07);
    font-family: var(--ff-mono);
    font-size: 13.5px;
    line-height: 1.8;
    color: rgba(255,255,255,.82);
    position: relative;
}
.article-body code {
    font-family: var(--ff-mono);
    font-size: .875em;
    background: rgba(0,242,145,.07);
    color: var(--g);
    padding: 2px 7px;
    border-radius: 5px;
    border: 1px solid var(--border-g);
}
.article-body pre code {
    background: none;
    color: rgba(255,255,255,.82);
    padding: 0;
    border: none;
    font-size: inherit;
}

/* Tables */
.article-body table {
    width: 100%;
    min-width: max-content;
    border-collapse: collapse;
    margin: 28px 0;
    font-size: 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
}
.article-body th {
    background: var(--ink);
    color: rgba(255,255,255,.85);
    font-weight: 600;
    padding: 13px 16px;
    text-align: left;
    font-size: 13px;
    letter-spacing: .2px;
    white-space: nowrap;
}
.article-body td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--ink2);
    white-space: nowrap;
}
.article-body tr:last-child td { border-bottom: none; }
.article-body tr:nth-child(even) td { background: rgba(0,242,145,.02); }

/* Blockquote */
.article-body blockquote {
    border-left: 3px solid var(--g);
    padding: 14px 20px;
    background: rgba(0,242,145,.04);
    border-radius: 0 10px 10px 0;
    margin: 28px 0;
    font-style: italic;
    color: var(--muted);
}

/* Callout boxes */
.callout {
    border-radius: 12px;
    padding: 16px 20px;
    margin: 24px 0;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 14.5px;
    line-height: 1.75;
}
.callout-tip  { background: rgba(0,242,145,.06);  border: 1px solid rgba(0,242,145,.22);  }
.callout-warn { background: rgba(251,191,36,.06);  border: 1px solid rgba(251,191,36,.25); }
.callout-info { background: rgba(0,212,255,.06);   border: 1px solid rgba(0,212,255,.22);  }
.callout > i  { margin-top: 2px; font-size: 15px; flex-shrink: 0; }
.callout-tip > i  { color: var(--g); }
.callout-warn > i { color: #fbbf24; }
.callout-info > i { color: var(--g2); }
.callout p    { margin-bottom: 0; }

/* Step cards */
.step-card {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 24px;
    margin: 16px 0;
}
.step-number {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--g);
    color: var(--ink);
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--ff-disp);
    margin-top: 2px;
}
.step-content {
    flex: 1;
    min-width: 0;
}
.step-content > strong {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 6px;
}
.step-content p { margin-bottom: 0; }

/* Inline download CTA inside article body */
.article-cta-box {
    background: var(--ink);
    border-radius: 16px;
    padding: 28px 32px;
    margin: 36px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border: 1px solid rgba(0,242,145,.2);
    position: relative;
    overflow: hidden;
}
.article-cta-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 120% at 0% 50%, rgba(0,242,145,.09) 0%, transparent 55%);
    pointer-events: none;
}
.article-cta-box-text { position: relative; z-index: 1; }
.article-cta-box-text strong {
    display: block;
    font-family: var(--ff-disp);
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}
.article-cta-box-text span {
    font-size: 13.5px;
    color: rgba(255,255,255,.45);
}
.article-cta-box a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: 100px;
    background: var(--g);
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: .3s var(--ease);
    position: relative;
    z-index: 1;
    border: none;
    text-underline-offset: unset;
    text-decoration-color: unset;
}
.article-cta-box a:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px var(--g-glow);
    opacity: 1;
}

/* ── PRODUCT RECOMMEND SECTION (injected by article-recommend.js) ── */
.product-recommend {
    background: var(--ink);
    border-radius: 22px;
    padding: 44px 48px;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.07);
}
.product-recommend::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 65% 100% at 0% 50%, rgba(0,242,145,.1) 0%, transparent 55%),
        radial-gradient(ellipse 40% 60% at 100% 0%, rgba(0,212,255,.06) 0%, transparent 55%);
    pointer-events: none;
}
.pr-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--g);
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}
.pr-eyebrow::before {
    content: '';
    width: 14px;
    height: 2px;
    background: var(--g);
    border-radius: 2px;
}
.pr-title {
    font-family: var(--ff-disp);
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 700;
    color: #fff;
    letter-spacing: -.6px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}
.pr-desc {
    font-size: 15px;
    color: rgba(255,255,255,.5);
    line-height: 1.78;
    margin-bottom: 26px;
    max-width: 540px;
    position: relative;
    z-index: 1;
}
.pr-features {
    list-style: none;
    margin: 0 0 30px;
    display: flex;
    flex-direction: column;
    gap: 11px;
    position: relative;
    z-index: 1;
}
.pr-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: rgba(255,255,255,.65);
    line-height: 1.65;
}
.pr-features li i {
    color: var(--g);
    margin-top: 3px;
    flex-shrink: 0;
    font-size: 12px;
}
.pr-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 14px 34px;
    border-radius: 100px;
    background: var(--g);
    color: var(--ink);
    font-size: 14.5px;
    font-weight: 700;
    text-decoration: none;
    transition: .3s var(--ease);
    position: relative;
    z-index: 1;
}
.pr-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px var(--g-glow);
    opacity: 1;
}

/* ── FLOAT WIDGET (injected by article-recommend.js) ── */
.float-widget {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 316px;
    background: var(--ink);
    border-radius: 20px;
    border: 1px solid rgba(0,242,145,.28);
    box-shadow: 0 20px 56px rgba(0,0,0,.45), 0 0 0 1px rgba(0,242,145,.06);
    padding: 24px 22px 22px;
    z-index: 800;
    transform: translateY(24px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .38s var(--ease), transform .38s var(--ease), visibility .38s;
}
.float-widget.visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}
.fw-close {
    position: absolute;
    top: 13px;
    right: 14px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.13);
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.4);
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s;
    flex-shrink: 0;
}
.fw-close:hover { background: rgba(255,255,255,.15); color: #fff; }
.fw-icon {
    width: 44px;
    height: 44px;
    background: rgba(0,242,145,.12);
    border: 1px solid rgba(0,242,145,.28);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    color: var(--g);
    margin-bottom: 13px;
}
.fw-title {
    font-family: var(--ff-disp);
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    padding-right: 32px;
}
.fw-desc {
    font-size: 12.5px;
    color: rgba(255,255,255,.45);
    line-height: 1.7;
    margin-bottom: 16px;
}
.fw-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    border-radius: 100px;
    background: var(--g);
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: .3s var(--ease);
}
.fw-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px var(--g-glow);
    opacity: 1;
}

/* ── SIDEBAR TOC ── */
.article-sidebar {
    position: sticky;
    top: 94px;
}
.toc-card {
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 22px 18px;
    box-shadow: 0 2px 14px rgba(0,0,0,.05);
}
.toc-title {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    color: var(--muted);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.toc-title i { color: var(--g); font-size: 11px; }
.toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.toc-list a {
    display: block;
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 8px;
    transition: .2s;
    line-height: 1.45;
    border-left: 2px solid transparent;
}
.toc-list a:hover {
    color: var(--ink);
    background: var(--g-soft);
}
.toc-list a.active {
    color: var(--g);
    font-weight: 600;
    border-left-color: var(--g);
    background: rgba(0,242,145,.04);
}
.toc-list li.toc-h3 a {
    padding-left: 22px;
    font-size: 12px;
}


/* ── ARTICLE PREV/NEXT NAVIGATION ── */
.article-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 40px;
}
.article-nav-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    text-decoration: none;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.article-nav-item:hover {
    border-color: var(--border-g);
    box-shadow: 0 6px 24px rgba(0,242,145,.1);
    transform: translateY(-2px);
    opacity: 1;
}
.article-nav-item.nav-next {
    text-align: right;
    align-items: flex-end;
}
.article-nav-dir {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--g);
    display: flex;
    align-items: center;
    gap: 5px;
}
.article-nav-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.5;
    transition: color .2s;
}
.article-nav-item:hover .article-nav-title { color: var(--g); }
.article-nav-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 2px;
}
.article-nav-item.nav-next .article-nav-tags { justify-content: flex-end; }
.article-nav-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 100px;
    background: var(--g-soft);
    color: var(--g);
    border: 1px solid var(--border-g);
    font-family: var(--ff-mono);
    font-weight: 600;
}

/* ── RELATED ARTICLES SECTION ── */
.related-articles {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    margin-bottom: 8px;
}
.related-articles-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    color: var(--muted);
    margin-bottom: 16px;
}
.related-articles-header i { color: var(--g); font-size: 12px; }
.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.related-article-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    text-decoration: none;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.related-article-card:hover {
    border-color: var(--border-g);
    box-shadow: 0 6px 24px rgba(0,242,145,.1);
    transform: translateY(-2px);
    opacity: 1;
}
.related-article-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.5;
    transition: color .2s;
}
.related-article-card:hover .related-article-title { color: var(--g); }
.related-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 2px;
}
.related-article-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 100px;
    background: var(--g-soft);
    color: var(--g);
    border: 1px solid var(--border-g);
    font-family: var(--ff-mono);
    font-weight: 600;
}
.related-article-cat {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 100px;
    background: rgba(0,212,255,.07);
    color: var(--g2);
    border: 1px solid rgba(0,212,255,.2);
    font-family: var(--ff-mono);
    font-weight: 600;
}

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
    .article-page-wrap {
        grid-template-columns: minmax(0, 1fr);
        padding-top: 100px;
    }
    .article-sidebar { display: none; }
    .product-recommend { padding: 32px 28px; }
    .article-cta-box { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 768px) {
    .article-page-wrap { padding: 110px 16px 56px; gap: 28px; overflow-x: hidden; }
    .article-h1 { font-size: clamp(22px, 5.5vw, 32px); word-break: break-word; overflow-wrap: break-word; }
    .article-tags { flex-wrap: wrap; }
    .article-tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .breadcrumb { flex-wrap: wrap; overflow-wrap: break-word; word-break: break-word; }
    .article-body pre { padding: 14px 16px; font-size: 12.5px; }
    .article-body h2 { font-size: 20px; }
    .article-body h3 { font-size: 16px; }
    .product-recommend { padding: 26px 20px; }
    .float-widget {
        width: calc(100vw - 32px);
        bottom: 16px;
        right: 16px;
        left: 16px;
    }
    .article-cta-box { padding: 22px 20px; }

    .article-nav { grid-template-columns: 1fr; }
    .article-nav-item.nav-next { text-align: left; align-items: flex-start; }
    .article-nav-item.nav-next .article-nav-tags { justify-content: flex-start; }
    .related-articles-grid { grid-template-columns: 1fr; }
}
