/* ================= Article Page — Layout ================= */

.article-page-wrap {
    display: flex;
    align-items: flex-start;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 128px 5% 100px;
    gap: 48px;
    box-sizing: border-box;
    min-width: 0;
}

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

/* ================= Breadcrumb (injected by article-recommend.js) ================= */

nav.breadcrumb {
    margin-bottom: 32px;
}

.breadcrumb-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-gray);
    flex-wrap: wrap;
}

.breadcrumb-inner a {
    color: var(--text-gray);
    transition: color 0.2s;
}

.breadcrumb-inner a:hover {
    color: var(--brand-black);
}

.breadcrumb-inner .bc-sep {
    color: #ccc;
    user-select: none;
}

.breadcrumb-inner .bc-current {
    color: var(--brand-black);
    font-weight: 600;
}

/* ================= Article Header (injected by article-recommend.js) ================= */

.article-header {
    margin-bottom: 40px;
    padding-bottom: 36px;
    border-bottom: 2px solid var(--bg-warm);
}

.article-header-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    min-width: 0;
    max-width: 100%;
}

.art-category {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    background-color: var(--brand-yellow);
    color: var(--brand-black);
    padding: 4px 11px;
}

.art-tag {
    font-size: 11px;
    color: var(--text-gray);
    background: var(--bg-warm);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 3px 10px;
    border-radius: 2px;
}

.art-latest {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--brand-yellow);
    border: 1px solid rgba(255, 200, 0, 0.5);
    padding: 3px 10px;
}

.article-header h1 {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(26px, 4vw, 44px);
    color: var(--brand-black);
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.article-header-info {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 12px;
    color: var(--text-light);
    flex-wrap: wrap;
    margin-bottom: 20px;
}

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

.article-summary {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-gray);
    border-left: 4px solid var(--brand-yellow);
    padding: 16px 20px;
    background: var(--bg-warm);
    margin: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

/* ================= Article Body Typography ================= */

.article-body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.85;
    color: var(--text-dark);
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.article-body h2 {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(20px, 2.5vw, 28px);
    color: var(--brand-black);
    margin: 52px 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--brand-yellow);
    letter-spacing: -0.3px;
    line-height: 1.25;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.article-body h2:first-child {
    margin-top: 0;
}

.article-body h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(16px, 2vw, 20px);
    color: var(--brand-black);
    margin: 36px 0 14px;
    line-height: 1.3;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.article-body p {
    margin: 0 0 18px;
}

.article-body ul,
.article-body ol {
    margin: 0 0 18px 22px;
    list-style: revert;
}

.article-body li {
    margin-bottom: 8px;
    line-height: 1.8;
}

.article-body img,
.article-body video,
.article-body iframe {
    max-width: 100%;
    height: auto;
}

.article-body strong {
    font-weight: 700;
    color: var(--brand-black);
}

.article-body a {
    color: var(--brand-black);
    border-bottom: 1px solid var(--brand-yellow);
    transition: color 0.2s, border-color 0.2s;
}

.article-body a:hover {
    color: #c49800;
    border-bottom-color: #c49800;
}

/* Inline code */
.article-body code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    background-color: var(--bg-warm);
    color: #c0392b;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Code block */
.article-body pre {
    background-color: var(--brand-black);
    color: #e8e8e8;
    padding: 24px 28px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0 24px;
    border-left: 4px solid var(--brand-yellow);
    font-size: 13px;
    line-height: 1.7;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    white-space: pre;
}

.article-body pre code {
    background: none;
    color: inherit;
    border: none;
    padding: 0;
    font-size: inherit;
    border-radius: 0;
    display: block;
    white-space: pre;
    word-break: normal;
    overflow-wrap: normal;
}

/* Callout / Note box */
.article-body .callout,
.article-body blockquote {
    background: rgba(255, 200, 0, 0.07);
    border-left: 5px solid var(--brand-yellow);
    padding: 18px 24px;
    margin: 24px 0;
    font-size: 14px;
    color: var(--text-dark);
    line-height: 1.8;
}

.article-body .callout-warning {
    background: rgba(231, 76, 60, 0.06);
    border-left-color: #e74c3c;
}

.article-body .callout-title {
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    color: var(--brand-black);
}

/* Table */
.article-body table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin: 20px 0 24px;
    table-layout: fixed;
}

.article-body th {
    background-color: var(--brand-black);
    color: var(--brand-yellow);
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 18px;
    text-align: left;
    font-size: 11px;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.article-body td {
    padding: 12px 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--text-dark);
    vertical-align: top;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.article-body tr:last-child td {
    border-bottom: none;
}

.article-body tr:hover td {
    background-color: rgba(255, 200, 0, 0.04);
}

/* Step list with numbered markers */
.article-body .step-list {
    list-style: none;
    margin-left: 0;
    counter-reset: step-counter;
}

.article-body .step-list li {
    counter-increment: step-counter;
    padding-left: 48px;
    position: relative;
    margin-bottom: 16px;
}

.article-body .step-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 30px;
    background-color: var(--brand-yellow);
    color: var(--brand-black);
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}

/* Download CTA inside article body */
.article-body .inline-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--brand-yellow);
    color: var(--brand-black);
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 14px 32px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    border-bottom: none;
    margin: 8px 0;
    max-width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
}

.article-body .inline-cta:hover {
    background-color: var(--brand-black);
    color: var(--brand-yellow);
    border-bottom: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ================= Product Recommend (injected after #article-body) ================= */

.product-recommend {
    margin-top: 60px;
    background-color: var(--brand-black);
    padding: 52px 56px;
    border-top: 5px solid var(--brand-yellow);
    position: relative;
    overflow: hidden;
}

.product-recommend::before {
    content: 'CLASH';
    position: absolute;
    right: -20px;
    bottom: -30px;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 120px;
    color: rgba(255, 200, 0, 0.04);
    letter-spacing: -4px;
    pointer-events: none;
    user-select: none;
    line-height: 1;
}

.product-recommend-label {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--brand-yellow);
    border: 1px solid rgba(255, 200, 0, 0.4);
    padding: 4px 12px;
    margin-bottom: 20px;
}

.product-recommend h2 {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(22px, 3vw, 32px);
    color: var(--brand-white);
    line-height: 1.2;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}

.product-recommend-desc {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.75;
    margin-bottom: 28px;
    max-width: 600px;
}

.product-features {
    list-style: none;
    margin: 0 0 36px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 0;
}

.product-features li::before {
    content: '▶';
    color: var(--brand-yellow);
    font-size: 10px;
    flex-shrink: 0;
    margin-top: 4px;
}

.product-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background-color: var(--brand-yellow);
    color: var(--brand-black);
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 16px 40px;
    transition: all 0.3s;
    text-decoration: none;
    position: relative;
    z-index: 1;
}

.product-dl-btn:hover {
    background-color: var(--brand-white);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 200, 0, 0.25);
}

/* ================= Floating Widget (injected) ================= */

.float-widget {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 280px;
    background-color: var(--brand-black);
    border-top: 4px solid var(--brand-yellow);
    padding: 24px 24px 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 500;
    transform: translateX(calc(100% + 40px));
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
    pointer-events: none;
}

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

.float-widget-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
    transition: color 0.2s;
}

.float-widget-close:hover {
    color: var(--brand-yellow);
}

.float-widget-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--brand-yellow);
    margin-bottom: 10px;
    display: block;
}

.float-widget h3 {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 17px;
    color: var(--brand-white);
    line-height: 1.25;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

.float-widget p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.65;
    margin-bottom: 16px;
}

.float-widget-btn {
    display: block;
    text-align: center;
    background-color: var(--brand-yellow);
    color: var(--brand-black);
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 12px 20px;
    transition: all 0.25s;
    text-decoration: none;
}

.float-widget-btn:hover {
    background-color: var(--brand-white);
    transform: translateY(-2px);
}

/* ================= Sidebar TOC ================= */

.article-sidebar {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
}

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

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

.toc-card {
    background-color: var(--brand-white);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 24px 20px;
    border-top: 3px solid var(--brand-yellow);
}

.toc-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--brand-black);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toc-list {
    list-style: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toc-list li a {
    display: block;
    font-size: 13px;
    color: var(--text-gray);
    padding: 6px 10px 6px 12px;
    border-left: 2px solid transparent;
    line-height: 1.45;
    transition: all 0.2s;
    word-break: break-all;
}

.toc-list li a:hover {
    color: var(--brand-black);
    border-left-color: rgba(255, 200, 0, 0.5);
    background-color: var(--bg-warm);
}

.toc-list li a.toc-active {
    color: var(--brand-black);
    font-weight: 700;
    border-left-color: var(--brand-yellow);
    background-color: rgba(255, 200, 0, 0.06);
}

/* ================= Responsive ================= */

@media (max-width: 1024px) {
    .article-page-wrap {
        flex-direction: column;
        padding: 112px 5% 80px;
        gap: 0;
    }

    .article-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        margin-bottom: 40px;
        order: -1;
    }

    .toc-card {
        padding: 18px 16px;
    }

    .toc-list li a {
        font-size: 12px;
        padding: 5px 8px 5px 10px;
    }

    .product-recommend {
        padding: 40px 32px;
    }
}

@media (max-width: 768px) {
    .article-page-wrap {
        padding: 96px 5% 64px;
    }

    .article-body h2 {
        margin-top: 40px;
        font-size: 21px;
    }

    .article-body h3 {
        font-size: 17px;
    }

    .article-body pre {
        padding: 16px 18px;
        font-size: 12px;
    }

    .product-recommend {
        padding: 32px 24px;
    }

    .product-recommend h2 {
        font-size: 22px;
    }

    .float-widget {
        width: calc(100% - 32px);
        right: 16px;
        bottom: 16px;
        left: 16px;
    }

    .article-header h1 {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .article-sidebar {
        display: none;
    }

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

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

    .float-widget {
        border-radius: 0;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        border-top-width: 3px;
    }
}

/* Screen-reader only: visible to crawlers, hidden visually */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
