/* ===== CSS VARIABLES & RESET ===== */
:root {
    --bg: #ffffff;
    --text-main: #111111;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --border-light: #eaeaea;
    --surface-gray: #f8f9fa;
    --surface-dark: #0a0a0a;
    --accent-blue: #4285F4;
    --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --container-width: 1320px;
    --prose-width: 760px;
    --ease-smooth: cubic-bezier(0.25, 1, 0.5, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ===== HEADER (injected by header.js — outerHTML replaces #site-header with <header>) ===== */
header {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 80px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    display: flex; align-items: center;
}
.header-inner {
    width: 100%; max-width: var(--container-width);
    margin: 0 auto; padding: 0 40px;
    display: flex; justify-content: space-between; align-items: center;
}
.logo {
    display: flex; align-items: center; gap: 8px;
    text-decoration: none; color: var(--text-main);
    font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -0.5px;
}
.logo svg { width: 24px; height: 24px; color: var(--accent-blue); }
.nav-group { display: flex; gap: 36px; align-items: center; }
.nav-group a {
    text-decoration: none; color: var(--text-secondary);
    font-size: 15px; font-weight: 500; transition: color 0.2s;
    position: relative;
}
.nav-group a:hover { color: var(--text-main); }
.nav-group a.active { color: var(--text-main); font-weight: 600; }
.nav-group a.active::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0; right: 0;
    height: 2px;
    background: var(--accent-blue);
    border-radius: 1px;
}

/* Header right group (lang switcher + CTA) */
.header-right { display: flex; align-items: center; gap: 12px; }

/* Language switcher */
.lang-switcher { position: relative; }
.lang-btn {
    display: flex; align-items: center; gap: 5px;
    padding: 7px 11px; border-radius: 100px;
    border: 1px solid rgba(0,0,0,0.12);
    background: transparent; cursor: pointer;
    color: var(--text-secondary); font-size: 13px; font-weight: 500;
    transition: border-color 0.2s, color 0.2s;
    font-family: var(--font-sans);
}
.lang-btn:hover { border-color: rgba(0,0,0,0.22); color: var(--text-main); }
.lang-chevron { transition: transform 0.2s; flex-shrink: 0; }
.lang-switcher.is-open .lang-btn { border-color: rgba(0,0,0,0.18); color: var(--text-main); }
.lang-switcher.is-open .lang-chevron { transform: rotate(180deg); }
.lang-dropdown {
    display: none;
    position: absolute; top: calc(100% + 8px); right: 0;
    min-width: 136px;
    background: #fff; border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.09);
    padding: 5px; z-index: 1100;
}
.lang-switcher.is-open .lang-dropdown { display: block; }
.lang-option {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 11px; border-radius: 8px;
    text-decoration: none; color: var(--text-secondary);
    font-size: 14px; font-weight: 500; white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.lang-option:hover { background: #f5f5f5; color: var(--text-main); }
.lang-option--current { color: var(--text-main); font-weight: 600; }
.lang-option--current::after { content: '✓'; font-size: 12px; color: var(--accent-blue); }

.btn-black {
    background: #111; color: #fff;
    padding: 10px 24px; border-radius: 100px;
    font-size: 14px; font-weight: 500; text-decoration: none;
    display: flex; align-items: center; gap: 8px;
    transition: transform 0.2s var(--ease-smooth), background 0.2s;
}
.btn-black:hover { transform: scale(1.03); background: #000; }

/* ===== FOOTER (injected by footer.js) ===== */
footer {
    border-top: 1px solid var(--border-light);
    padding: 80px 40px 40px;
}
.footer-inner {
    max-width: var(--container-width); margin: 0 auto;
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 60px;
}
.footer-col p { color: var(--text-secondary); font-size: 14px; max-width: 280px; margin-top: 16px; }
.footer-col h5 { font-size: 14px; font-weight: 600; color: #111; margin-bottom: 24px; }
.footer-col a { display: block; text-decoration: none; color: var(--text-secondary); font-size: 14px; margin-bottom: 14px; transition: color 0.2s; }
.footer-col a:hover { color: var(--text-main); }
.footer-bottom {
    max-width: var(--container-width); margin: 60px auto 0;
    padding-top: 32px; border-top: 1px solid var(--border-light);
    display: flex; justify-content: space-between; font-size: 13px; color: var(--text-tertiary);
}

/* ===== BREADCRUMB ===== */
.breadcrumb-wrap {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 108px 40px 0;
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-tertiary);
    flex-wrap: wrap;
}
.breadcrumb a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.2s;
}
.breadcrumb a:hover { color: var(--text-main); }
.breadcrumb-sep {
    color: var(--border-light);
    font-size: 12px;
}
.breadcrumb-current {
    color: var(--text-secondary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 320px;
}

/* ===== ARTICLE HEADER ===== */
.article-header {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 40px 40px 0;
}

.article-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.article-cat-tag {
    font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    padding: 5px 14px; border-radius: 999px;
    color: #1d4ed8; background: #eff6ff;
}
.article-cat-tag.cat-update   { color: #047857; background: #ecfdf5; }
.article-cat-tag.cat-tutorial { color: #7c3aed; background: #f5f3ff; }
.article-cat-tag.cat-network  { color: #b45309; background: #fffbeb; }
.article-cat-tag.cat-security { color: #be185d; background: #fdf2f8; }
.article-cat-tag.cat-billing  { color: #0369a1; background: #f0f9ff; }

.article-meta-row {
    display: flex; align-items: center; gap: 16px;
    font-family: ui-monospace, monospace;
    font-size: 13px; color: var(--text-tertiary);
    flex-wrap: wrap;
}
.article-meta-row span { display: flex; align-items: center; gap: 5px; }

.article-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 4.5vw, 56px);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.12;
    color: var(--text-main);
    max-width: 900px;
    margin-bottom: 24px;
}
.article-desc {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 680px;
    margin-bottom: 40px;
}

/* Article header divider */
.article-header-divider {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 0 40px;
    max-width: calc(var(--container-width) - 0px);
}

/* ===== ARTICLE BODY LAYOUT ===== */
.article-layout {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 64px 40px 0;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 80px;
    align-items: start;
}

/* ===== PROSE (Main Content) ===== */
.article-prose {
    min-width: 0;
}

/* Table of contents */
.article-toc {
    background: var(--surface-gray);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 48px;
}
.article-toc-title {
    font-family: ui-monospace, monospace;
    font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px;
}
.article-toc-title::before {
    content: '';
    display: inline-block; width: 16px; height: 1px;
    background: var(--border-light);
}
.article-toc ol {
    list-style: none;
    counter-reset: toc-counter;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.article-toc ol li {
    counter-increment: toc-counter;
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.article-toc ol li::before {
    content: counter(toc-counter, decimal-leading-zero);
    font-family: ui-monospace, monospace;
    font-size: 11px;
    color: var(--border-light);
    flex-shrink: 0;
}
.article-toc a {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    line-height: 1.5;
    transition: color 0.2s;
}
.article-toc a:hover { color: var(--text-main); }

/* Prose typography */
.article-prose h2 {
    font-family: var(--font-display);
    font-size: 26px; font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: var(--text-main);
    margin: 56px 0 20px;
    padding-top: 8px;
}
.article-prose h2:first-child { margin-top: 0; }

.article-prose h3 {
    font-family: var(--font-display);
    font-size: 20px; font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-main);
    margin: 36px 0 14px;
}

.article-prose p {
    font-size: 16.5px;
    color: var(--text-secondary);
    line-height: 1.85;
    margin-bottom: 24px;
}
.article-prose p:last-child { margin-bottom: 0; }

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

.article-prose ul, .article-prose ol {
    margin: 0 0 24px 0;
    padding-left: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.article-prose ul li {
    padding-left: 24px;
    position: relative;
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
}
.article-prose ul li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: var(--text-tertiary);
}
.article-prose ol {
    counter-reset: prose-counter;
}
.article-prose ol li {
    counter-increment: prose-counter;
    padding-left: 32px;
    position: relative;
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
}
.article-prose ol li::before {
    content: counter(prose-counter) '.';
    position: absolute;
    left: 0;
    font-weight: 600;
    color: var(--text-tertiary);
    font-family: ui-monospace, monospace;
    font-size: 14px;
}

/* Callout / highlight boxes */
.article-callout {
    background: #eff6ff;
    border-left: 3px solid var(--accent-blue);
    border-radius: 0 12px 12px 0;
    padding: 20px 24px;
    margin: 32px 0;
}
.article-callout p {
    font-size: 15px !important;
    color: #1e40af !important;
    margin-bottom: 0 !important;
}
.article-callout.callout-green {
    background: #f0fdf4;
    border-color: #10b981;
}
.article-callout.callout-green p { color: #065f46 !important; }
.article-callout.callout-amber {
    background: #fffbeb;
    border-color: #f59e0b;
}
.article-callout.callout-amber p { color: #92400e !important; }

/* Comparison table */
.article-table-wrap {
    overflow-x: auto;
    margin: 32px 0;
    border-radius: 16px;
    border: 1px solid var(--border-light);
}
.article-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.article-table thead {
    background: var(--surface-gray);
}
.article-table th {
    padding: 14px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--text-main);
    font-size: 13px;
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
}
.article-table td {
    padding: 14px 20px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(0,0,0,0.04);
    line-height: 1.6;
}
.article-table tr:last-child td { border-bottom: none; }
.article-table .check { color: #10b981; font-weight: 600; }
.article-table .cross { color: #ef4444; }
.article-table .highlight-row td { background: #f0f9ff; font-weight: 500; color: var(--text-main); }
.article-table .highlight-row td:first-child { color: var(--accent-blue); font-weight: 700; }

/* Code block */
.article-code {
    background: #0d0d12;
    border-radius: 12px;
    padding: 24px;
    margin: 28px 0;
    overflow-x: auto;
    font-family: ui-monospace, 'Cascadia Code', 'Fira Code', monospace;
    font-size: 13px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
}
.article-code .code-comment { color: rgba(255,255,255,0.25); }
.article-code .code-key { color: #93c5fd; }
.article-code .code-val { color: #86efac; }

/* Step list */
.step-list {
    list-style: none !important;
    counter-reset: step-counter;
    display: flex !important;
    flex-direction: column;
    gap: 20px !important;
    margin: 28px 0 !important;
    padding-left: 0 !important;
}
.step-list li {
    counter-increment: step-counter;
    display: flex !important;
    align-items: flex-start;
    gap: 16px;
    padding-left: 0 !important;
}
.step-list li::before { display: none !important; }
.step-list li .step-num {
    flex-shrink: 0;
    width: 32px; height: 32px;
    background: var(--text-main);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-size: 13px; font-weight: 600;
    margin-top: 2px;
}
.step-list li .step-body {
    flex: 1;
}
.step-list li .step-body strong {
    display: block;
    font-size: 16px; font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}
.step-list li .step-body p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 0 !important;
    line-height: 1.7;
}

/* ===== SIDEBAR ===== */
.article-sidebar {
    position: sticky;
    top: 108px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-toc {
    background: var(--surface-gray);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 28px;
}
.sidebar-toc-title {
    font-family: ui-monospace, monospace;
    font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 20px;
    display: flex; align-items: center; gap: 8px;
}
.sidebar-toc-title::before {
    content: '';
    display: inline-block; width: 16px; height: 1px; background: var(--border-light);
}
.sidebar-toc nav {
    display: flex; flex-direction: column; gap: 4px;
}
.sidebar-toc nav a {
    display: block;
    padding: 6px 10px;
    font-size: 13px; line-height: 1.4;
    color: var(--text-tertiary);
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}
.sidebar-toc nav a:hover { background: #fff; color: var(--text-main); }
.sidebar-toc nav a.active { background: #fff; color: var(--text-main); font-weight: 500; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }

/* Sidebar CTA card */
.sidebar-cta {
    background: linear-gradient(135deg, #0d0d12 0%, #0f1a2e 100%);
    border-radius: 20px;
    padding: 28px;
    position: relative;
    overflow: hidden;
}
.sidebar-cta::before {
    content: '';
    position: absolute; top: -20%; right: -20%;
    width: 80%; height: 80%;
    background: radial-gradient(circle, rgba(66,133,244,0.15), transparent 65%);
    pointer-events: none;
}
.sidebar-cta-label {
    font-family: ui-monospace, monospace;
    font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    margin-bottom: 12px;
}
.sidebar-cta h4 {
    font-family: var(--font-display);
    font-size: 18px; font-weight: 600;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 10px;
    position: relative; z-index: 1;
}
.sidebar-cta p {
    font-size: 13px;
    color: rgba(255,255,255,0.45);
    line-height: 1.6;
    margin-bottom: 20px;
    position: relative; z-index: 1;
}
.sidebar-cta-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: #fff; color: #111;
    padding: 12px 20px; border-radius: 999px;
    font-size: 14px; font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s var(--ease-smooth);
    position: relative; z-index: 1;
}
.sidebar-cta-btn:hover { transform: scale(1.03); }
.sidebar-cta-btn svg { width: 14px; height: 14px; }

/* ===== END-OF-ARTICLE DOWNLOAD CTA ===== */
.article-end-cta {
    background: linear-gradient(135deg, #0d0d12 0%, #0f1a2e 100%);
    border-radius: 28px;
    padding: 56px 64px;
    margin: 64px 0 0;
    position: relative;
    overflow: hidden;
}
.article-end-cta::before {
    content: '';
    position: absolute; top: -30%; right: -5%;
    width: 60%; height: 160%;
    background: radial-gradient(ellipse, rgba(66,133,244,0.18) 0%, transparent 65%);
    pointer-events: none;
}
.article-end-cta::after {
    content: '';
    position: absolute; bottom: -30%; left: 15%;
    width: 40%; height: 120%;
    background: radial-gradient(ellipse, rgba(16,185,129,0.12) 0%, transparent 65%);
    pointer-events: none;
}
.article-end-cta-inner {
    position: relative; z-index: 1;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 48px;
    align-items: center;
}
.article-end-cta-text {}
.article-end-cta-eyebrow {
    font-family: ui-monospace, monospace;
    font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    margin-bottom: 14px;
}
.article-end-cta-text h3 {
    font-family: var(--font-display);
    font-size: clamp(22px, 2.8vw, 32px);
    font-weight: 600; letter-spacing: -0.02em;
    color: #fff;
    margin-bottom: 12px;
}
.article-end-cta-text p {
    font-size: 15px;
    color: rgba(255,255,255,0.45);
    line-height: 1.7;
    max-width: 400px;
}
.article-end-cta-actions {
    display: flex; flex-direction: column; gap: 12px;
    align-items: stretch; flex-shrink: 0;
}
.btn-end-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: #fff; color: #111;
    padding: 14px 28px; border-radius: 999px;
    font-size: 15px; font-weight: 600;
    text-decoration: none; white-space: nowrap;
    transition: transform 0.2s var(--ease-smooth), box-shadow 0.2s;
}
.btn-end-primary:hover { transform: scale(1.04); box-shadow: 0 12px 28px rgba(0,0,0,0.3); }
.btn-end-secondary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 28px; border-radius: 999px;
    border: 1.5px solid rgba(255,255,255,0.22);
    color: rgba(255,255,255,0.72);
    font-size: 15px; font-weight: 600;
    text-decoration: none; white-space: nowrap;
    transition: border-color 0.22s, color 0.22s, transform 0.22s var(--ease-smooth);
}
.btn-end-secondary:hover {
    border-color: rgba(255,255,255,0.55);
    color: #fff;
    transform: scale(1.04);
}
.btn-end-secondary svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ===== PREV / NEXT NAVIGATION ===== */
.article-nav-section {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 80px 40px 0;
}
.article-nav-label {
    font-family: ui-monospace, monospace;
    font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 28px;
    display: flex; align-items: center; gap: 10px;
}
.article-nav-label::before {
    content: '';
    display: inline-block; width: 18px; height: 1px;
    background: var(--border-light);
}
.article-nav-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.article-nav-card {
    display: flex;
    flex-direction: column;
    padding: 28px 32px;
    background: var(--surface-gray);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s var(--ease-smooth), box-shadow 0.3s;
    min-height: 140px;
}
.article-nav-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,0.07); }
.article-nav-card.nav-next { align-items: flex-end; text-align: right; }
.article-nav-card.nav-next .article-nav-cat { align-self: flex-end; }

.article-nav-dir {
    font-family: ui-monospace, monospace;
    font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--text-tertiary);
    display: flex; align-items: center; gap: 6px;
    margin-bottom: 12px;
}
.article-nav-dir svg { width: 14px; height: 14px; stroke: currentColor; }
.article-nav-card.nav-next .article-nav-dir { flex-direction: row-reverse; }

.article-nav-cat {
    font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
    padding: 3px 10px; border-radius: 999px;
    color: #1d4ed8; background: #eff6ff;
    margin-bottom: 10px; display: inline-block;
    align-self: flex-start;
}
.article-nav-cat.cat-update   { color: #047857; background: #ecfdf5; }
.article-nav-cat.cat-tutorial { color: #7c3aed; background: #f5f3ff; }
.article-nav-cat.cat-network  { color: #b45309; background: #fffbeb; }
.article-nav-cat.cat-security { color: #be185d; background: #fdf2f8; }
.article-nav-cat.cat-billing  { color: #0369a1; background: #f0f9ff; }

.article-nav-title {
    font-family: var(--font-display);
    font-size: 17px; font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
    color: var(--text-main);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-nav-desc {
    font-size: 13px;
    color: var(--text-tertiary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-nav-empty {
    background: var(--surface-gray);
    border: 1px dashed var(--border-light);
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: var(--text-tertiary);
    text-decoration: none; min-height: 140px;
}

/* ===== RELATED ARTICLES ===== */
.related-section {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 80px 40px 100px;
}
.related-label {
    font-family: ui-monospace, monospace;
    font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 28px;
    display: flex; align-items: center; gap: 10px;
}
.related-label::before {
    content: '';
    display: inline-block; width: 18px; height: 1px;
    background: var(--border-light);
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.related-card {
    display: flex;
    flex-direction: column;
    background: var(--surface-gray);
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: 20px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s var(--ease-smooth), box-shadow 0.3s;
}
.related-card:hover { transform: translateY(-5px); box-shadow: 0 16px 40px rgba(0,0,0,0.07); }
.related-card-cat {
    font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    padding: 3px 10px; border-radius: 999px;
    color: #1d4ed8; background: #eff6ff;
    margin-bottom: 14px; display: inline-block;
    align-self: flex-start;
}
.related-card-cat.cat-update   { color: #047857; background: #ecfdf5; }
.related-card-cat.cat-tutorial { color: #7c3aed; background: #f5f3ff; }
.related-card-cat.cat-network  { color: #b45309; background: #fffbeb; }
.related-card-cat.cat-security { color: #be185d; background: #fdf2f8; }
.related-card-cat.cat-billing  { color: #0369a1; background: #f0f9ff; }
.related-card h4 {
    font-family: var(--font-display);
    font-size: 16px; font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
    color: var(--text-main);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.related-card-meta {
    display: flex; align-items: center; gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(0,0,0,0.05);
    font-size: 12px; color: var(--text-tertiary);
    font-family: ui-monospace, monospace;
}
.related-card-meta span { display: flex; align-items: center; gap: 4px; }

/* ===== FLOATING DOWNLOAD WIDGET ===== */
.float-widget {
    position: fixed;
    bottom: 32px; right: 32px;
    z-index: 900;
    opacity: 0; transform: translateY(20px);
    transition: opacity 0.4s var(--ease-smooth), transform 0.4s var(--ease-smooth);
    pointer-events: none;
}
.float-widget.visible {
    opacity: 1; transform: translateY(0);
    pointer-events: auto;
}
.float-widget-card {
    background: #0d0d12;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 20px 24px;
    width: 280px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}
.float-widget-card::before {
    content: '';
    position: absolute; top: -20%; right: -20%;
    width: 70%; height: 70%;
    background: radial-gradient(circle, rgba(66,133,244,0.2), transparent 65%);
    pointer-events: none;
}
.float-close {
    position: absolute; top: 12px; right: 12px;
    width: 24px; height: 24px;
    background: rgba(255,255,255,0.08);
    border: none; border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.4);
    transition: background 0.2s, color 0.2s;
    padding: 0;
}
.float-close:hover { background: rgba(255,255,255,0.15); color: #fff; }
.float-close svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2.5; }
.float-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(16,185,129,0.12);
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px; font-weight: 600; color: #10b981;
    margin-bottom: 12px;
}
.float-badge::before {
    content: '';
    width: 6px; height: 6px; border-radius: 50%;
    background: #10b981;
    animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(16,185,129,0.6); }
    70% { box-shadow: 0 0 0 5px rgba(16,185,129,0); }
    100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}
.float-widget-card h4 {
    font-family: var(--font-display);
    font-size: 16px; font-weight: 600;
    color: #fff; line-height: 1.35;
    margin-bottom: 6px;
    position: relative; z-index: 1;
}
.float-widget-card p {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    line-height: 1.55;
    margin-bottom: 18px;
    position: relative; z-index: 1;
}
.float-btn {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    background: #fff; color: #111;
    padding: 11px 16px; border-radius: 999px;
    font-size: 13px; font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s var(--ease-smooth);
    position: relative; z-index: 1;
}
.float-btn:hover { transform: scale(1.03); }
.float-btn svg { width: 13px; height: 13px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .article-layout { grid-template-columns: 1fr 240px; gap: 56px; }
}

@media (max-width: 1024px) {
    .article-layout { grid-template-columns: 1fr; }
    .article-sidebar { display: none; }
    .article-prose .article-toc { display: block; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
    .article-end-cta { padding: 48px; }
    .article-end-cta-inner { grid-template-columns: 1fr; gap: 32px; }
    .breadcrumb-wrap, .article-header { padding-left: 32px; padding-right: 32px; }
    .article-layout, .article-nav-section, .related-section { padding-left: 32px; padding-right: 32px; }
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 768px) {
    .article-title { font-size: clamp(26px, 6vw, 40px); }
    .article-desc { font-size: 16px; }
    .article-nav-grid { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .float-widget { right: 16px; bottom: 16px; }
    .float-widget-card { width: 260px; }
    .article-end-cta { padding: 36px; }
}

@media (max-width: 600px) {
    .breadcrumb-wrap, .article-header { padding-left: 20px; padding-right: 20px; }
    .article-layout, .article-nav-section, .related-section { padding-left: 20px; padding-right: 20px; }
    .header-inner { padding: 0 20px; }
    .article-title { font-size: 28px; }
    .related-grid { grid-template-columns: 1fr; }
    .article-end-cta { padding: 28px 24px; border-radius: 20px; }
    .article-prose h2 { font-size: 22px; }
    .footer-inner { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 8px; }
}

/* Inline TOC hidden by default on desktop (shown in sidebar instead) */
@media (min-width: 1025px) {
    .article-toc { display: none; }
}
