:root {
    --bg-color: #f8fafc;
    --grid-color: #e2e8f0;
    --text-main: #0f172a;
    --text-sub: #475569;
    --accent: #0055ff;
    --accent-hover: #003cc2;
    --danger: #ef4444;
    --success: #10b981;
    --border-color: #cbd5e1;
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }

body {
    background-color: var(--bg-color);
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 32px 32px;
    background-position: center top;
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    max-width: 100vw;
}

.blog-header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
    background: rgba(248, 250, 252, 0.9);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.blog-header-inner {
    display: flex; justify-content: space-between; align-items: center;
    height: 72px; max-width: 1200px; margin: 0 auto; padding: 0 24px;
}
.blog-logo {
    font-family: var(--font-mono); font-size: 1.1rem; font-weight: 700;
    color: var(--text-main); display: flex; align-items: center; gap: 10px; letter-spacing: -0.02em;
}
.blog-logo-img { width: 24px; height: 24px; display: block; flex-shrink: 0; }
.blog-header-nav { display: flex; align-items: center; gap: 16px; }
.blog-back-btn {
    font-family: var(--font-mono); font-size: 13px; font-weight: 700;
    color: var(--text-main); text-transform: uppercase; letter-spacing: 0.5px;
    border: 1px solid var(--border-color); padding: 8px 20px;
    transition: all 0.2s ease;
}
.blog-back-btn:hover { border-color: var(--accent); color: var(--accent); }

.article-hero { padding: 128px 0 0; background: linear-gradient(180deg, rgba(0,85,255,0.05), transparent 60%); border-bottom: 1px dashed var(--border-color); }
.article-hero-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px 48px; }

.article-hero-breadcrumbs {
    font-family: var(--font-mono); font-size: 12px; font-weight: 600;
    color: var(--text-sub); display: flex; flex-wrap: wrap; gap: 6px; line-height: 1.8;
    margin-bottom: 32px;
}
.article-hero-breadcrumbs a { color: var(--text-sub); transition: color 0.2s ease; }
.article-hero-breadcrumbs a:hover { color: var(--accent); }
.article-hero-breadcrumbs .sep { color: var(--border-color); }
.article-hero-breadcrumbs .current { color: var(--text-main); }

.article-hero-eyebrow {
    font-family: var(--font-mono); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
    color: var(--accent); margin-bottom: 24px; display: flex; align-items: center; gap: 8px;
}

.article-hero-grid { display: grid; gap: 32px; align-items: end; grid-template-columns: 1fr; }
@media (min-width: 900px) { .article-hero-grid { grid-template-columns: 1fr 300px; } }

.article-hero-title {
    font-size: clamp(2rem, 4.5vw, 3.75rem);
    font-weight: 800; color: var(--text-main); line-height: 1.2;
    letter-spacing: -0.02em; margin-bottom: 0;
}
.article-hero-title em { font-style: normal; color: var(--accent); }

.hero-stat-panel {
    background: var(--text-main); color: #ffffff; padding: 28px 26px; position: relative;
    clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}
.hero-stat-panel::before {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
}
.hero-stat-panel .hs-label {
    font-family: var(--font-mono); font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: rgba(255,255,255,0.5); margin-bottom: 10px; display: block;
}
.hero-stat-panel .hs-value { font-family: var(--font-mono); font-size: 2.6rem; font-weight: 800; color: #fff; line-height: 1; }
.hero-stat-panel .hs-value span { color: var(--accent); }
.hero-stat-panel .hs-desc { font-size: 12px; color: rgba(255,255,255,0.55); margin-top: 10px; line-height: 1.6; }

.article-hero-meta-row {
    display: flex; align-items: center; flex-wrap: wrap; gap: 0;
    border-top: 1px solid var(--border-color); padding-top: 24px; margin-top: 40px;
}
.author-meta-placeholder { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; }
.author-avatar {
    width: 40px; height: 40px; background: var(--text-main); color: #ffffff;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 800; font-family: var(--font-mono);
    flex-shrink: 0;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
.author-id { min-width: 0; }
.author-name { font-weight: 700; font-size: 0.95rem; color: var(--text-main); line-height: 1.3; }
.author-role { font-family: var(--font-mono); font-size: 11px; color: var(--text-sub); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.5px; }
.post-read-time {
    font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--text-sub);
    display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: 16px;
}
.post-read-time .prt-bar { display: inline-block; width: 1px; height: 16px; background: var(--border-color); }

.article-layout {
    max-width: 1000px; margin: 0 auto; padding: 64px 24px 100px; width: 100%;
}

.article-main { padding-bottom: 40px; min-width: 0; }

.article-content { font-size: 1.05rem; color: var(--text-main); line-height: 1.85; }
.article-content p { margin-bottom: 26px; }
.article-content strong { font-weight: 700; }

.article-content a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: rgba(0, 85, 255, 0.35);
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
.article-content a:hover { color: var(--accent-hover); text-decoration-color: var(--accent-hover); }

.article-content h2 { margin: 80px 0 32px; padding-bottom: 24px; border-bottom: 1px dashed var(--border-color); }
.article-content h2:first-child { margin-top: 0; }
.section-num {
    font-family: var(--font-mono); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; font-weight: 700;
    color: var(--accent); display: block; margin-bottom: 12px;
}
.section-heading { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; letter-spacing: -0.01em; line-height: 1.3; color: var(--text-main); display: block; }

.article-content h3 {
    font-size: 1.25rem; font-weight: 700; margin: 48px 0 18px;
    display: flex; align-items: center; gap: 10px;
}
.article-content h3::before { content: ''; width: 4px; height: 18px; background: var(--accent); flex-shrink: 0; }

.article-content h4 { font-size: 1.02rem; font-weight: 700; margin: 32px 0 12px; padding-left: 12px; border-left: 3px solid var(--border-color); }
.article-content h5 {
    font-size: 0.85rem; font-weight: 700; margin: 24px 0 8px; color: var(--text-sub);
    text-transform: uppercase; letter-spacing: 1px; font-family: var(--font-mono);
}

.article-content blockquote {
    margin: 56px 0; padding: 32px 36px; background: var(--text-main); position: relative;
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}
.article-content blockquote::before {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
}
.article-content blockquote p { font-size: 1.15rem; font-weight: 600; line-height: 1.7; color: #ffffff; margin: 0; }
.article-content blockquote p strong { color: var(--accent); }

.article-content ul { margin-bottom: 28px; }
.article-content ul li { position: relative; padding-left: 22px; margin-bottom: 14px; line-height: 1.8; }
.article-content ul li::before { content: ''; position: absolute; left: 0; top: 10px; width: 6px; height: 6px; background: var(--accent); }
.article-content ul li:last-child { margin-bottom: 0; }

.article-content ol { margin-bottom: 28px; counter-reset: list-counter; }
.article-content ol li { position: relative; padding-left: 34px; margin-bottom: 14px; line-height: 1.8; counter-increment: list-counter; }
.article-content ol li::before {
    content: counter(list-counter, decimal-leading-zero);
    position: absolute; left: 0; top: 0;
    font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700; color: var(--accent);
}
.article-content ol li:last-child { margin-bottom: 0; }

.article-table-wrap { margin: 0 0 36px; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border-color); background: #ffffff; }
.article-content table.article-matrix {
    --matrix-col-label-min: 6rem;
    --matrix-col-label-max: 14rem;
    --matrix-col-data-min: 10rem;
    --matrix-col-data-max: 26rem;
    --matrix-col-tail-min: 4.5rem;
    --matrix-col-tail-max: 7rem;
    width: 100%; min-width: 100%; border-collapse: collapse;
    font-size: 0.92rem; color: var(--text-main); table-layout: auto;
}
.article-matrix-caption {
    caption-side: top; text-align: left;
    font-family: var(--font-mono); font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px; color: var(--text-sub);
    padding: 14px 20px; border-bottom: 1px solid var(--border-color);
    background: var(--bg-color);
}
.article-content table.article-matrix th,
.article-content table.article-matrix td {
    border: 1px solid var(--border-color);
    padding: 14px 16px; vertical-align: top; line-height: 1.55; text-align: left;
    white-space: normal; word-break: keep-all; overflow-wrap: break-word;
    hyphens: auto; box-sizing: border-box;
}
.article-content table.article-matrix thead th {
    background: var(--text-main); color: #ffffff;
    font-weight: 700; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.5px;
}
.article-content table.article-matrix thead th:first-child,
.article-content table.article-matrix tbody th[scope="row"] {
    min-width: var(--matrix-col-label-min); max-width: var(--matrix-col-label-max);
    font-weight: 600; font-size: 0.88rem;
}
.article-content table.article-matrix tbody th[scope="row"] { background: var(--bg-color); color: var(--text-main); }
.article-content table.article-matrix thead th:not(:first-child),
.article-content table.article-matrix tbody td {
    min-width: var(--matrix-col-data-min); max-width: var(--matrix-col-data-max);
}
.article-content table.article-matrix:has(thead tr > th:nth-child(4)) { --matrix-col-label-max: 16rem; }
.article-content table.article-matrix:has(thead tr > th:nth-child(4)) thead th:nth-child(2),
.article-content table.article-matrix:has(thead tr > th:nth-child(4)) tbody td:nth-child(2) { min-width: 7rem; max-width: 11rem; }
.article-content table.article-matrix:has(thead tr > th:nth-child(4)) thead th:nth-child(3),
.article-content table.article-matrix:has(thead tr > th:nth-child(4)) tbody td:nth-child(3) { min-width: 8rem; max-width: 14rem; }
.article-content table.article-matrix:has(thead tr > th:nth-child(4)) thead th:last-child,
.article-content table.article-matrix:has(thead tr > th:nth-child(4)) tbody td:last-child { min-width: var(--matrix-col-tail-min); max-width: var(--matrix-col-tail-max); }
.article-content table.article-matrix td code,
.article-content table.article-matrix th code { word-break: break-all; overflow-wrap: anywhere; }
.article-content table.article-matrix tbody tr.article-matrix-row-emphasis td,
.article-content table.article-matrix tbody tr.article-matrix-row-emphasis th { background: var(--accent); color: #ffffff; font-weight: 700; }

.article-content code {
    font-family: var(--font-mono); font-size: 0.85em; font-weight: 600;
    background: var(--bg-color); padding: 2px 7px; color: var(--text-main); border: 1px solid var(--border-color);
}

.terminal-block { margin: 48px 0; background: #0f172a; color: #fff; overflow: hidden; border: 1px solid #1e293b; }
.terminal-block .term-header {
    background: #172033; padding: 12px 20px; font-size: 12px; font-weight: 700;
    color: #94a3b8; border-bottom: 1px solid #1e293b; text-transform: uppercase;
    font-family: var(--font-mono); display: flex; align-items: center; gap: 8px;
}
.term-dot { width: 8px; height: 8px; flex-shrink: 0; background: rgba(255,255,255,0.2); }
.term-filename { margin-left: auto; color: #475569; letter-spacing: 0.05em; }
.terminal-block pre {
    margin: 0; padding: 24px 28px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    white-space: pre; word-wrap: normal;
    font-family: var(--font-mono); font-size: 0.85rem; line-height: 1.9; max-width: 100%;
}
.terminal-block pre code { background: transparent; padding: 0; border: none; color: #cbd5e1; display: block; white-space: pre; }
.hl { color: #60a5fa; font-weight: 700; }
.err { color: #f87171; font-weight: 700; }
.ok { color: #34d399; font-weight: 700; }
.dim { color: #64748b; }

.article-divider { border: none; border-top: 1px dashed var(--border-color); margin: 80px 0; }

.article-cta {
    margin: 96px 0 0; background: #ffffff; border: 1px solid var(--border-color); position: relative;
    max-width: 620px;
    box-shadow: 16px 16px 0 rgba(0,0,0,0.03);
}
.article-cta::after {
    content: ""; position: absolute; bottom: -1px; right: -1px;
    width: 24px; height: 24px; background: var(--bg-color);
    border-top: 1px solid var(--border-color); border-left: 1px solid var(--border-color);
}
.article-cta-term-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 24px; border-bottom: 1px solid var(--grid-color);
    font-family: var(--font-mono); font-size: 12px; color: var(--text-sub);
}
.article-cta-body { padding: 24px 28px 28px; }
.article-cta-label {
    font-family: var(--font-mono); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
    color: var(--accent); margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.article-cta-text h3 {
    font-size: clamp(1.2rem, 3vw, 1.6rem); font-weight: 800; letter-spacing: -0.01em;
    margin-bottom: 10px; overflow-wrap: break-word;
}
.article-cta-text p { font-size: 0.95rem; color: var(--text-sub); line-height: 1.7; overflow-wrap: break-word; margin-bottom: 20px; }
.article-cta .btn {
    display: flex; align-items: center; justify-content: center; padding: 14px 32px; width: 100%;
    background: var(--text-main); color: #ffffff; border: none;
    font-family: var(--font-mono); font-size: 13px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px; transition: 0.2s; white-space: nowrap;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.article-cta .btn:hover { background: var(--accent); }
.cta-cursor-blink {
    display: inline-block; width: 7px; height: 14px; background: var(--accent);
    vertical-align: middle; animation: cta-blink 1s step-end infinite; margin-left: 4px;
}
@keyframes cta-blink { 50% { opacity: 0; } }

.floating-cta {
    position: fixed; bottom: 24px; right: 24px; z-index: 99; width: 260px;
    background: #ffffff; border: 1px solid var(--border-color);
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
    box-shadow: 10px 10px 0 rgba(0,0,0,0.04);
}
.floating-cta::before {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent); z-index: 1;
}
.floating-cta-body { padding: 20px 18px; }
.floating-cta .fc-label {
    font-family: var(--font-mono); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px;
    color: var(--accent); margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.floating-cta .fc-desc { font-size: 0.92rem; color: var(--text-main); line-height: 1.6; margin-bottom: 18px; }
.floating-cta .fc-btn {
    display: block; text-align: center; padding: 12px; background: var(--text-main); color: #ffffff;
    font-family: var(--font-mono); font-weight: 700; text-transform: uppercase; font-size: 12px;
    letter-spacing: 1px; transition: 0.2s;
}
.floating-cta .fc-btn:hover { background: var(--accent); }

.faq-block { margin: 80px 0 0; }
.faq-item { border-bottom: 1px dashed var(--border-color); }
.faq-question {
    font-weight: 700; font-size: 1rem; padding: 24px 0; cursor: pointer;
    display: flex; align-items: center; justify-content: space-between; color: var(--text-main);
    list-style: none; gap: 16px; user-select: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
    content: "+"; font-size: 1.3rem; font-weight: 700; color: var(--text-sub);
    flex-shrink: 0; line-height: 1; font-family: var(--font-mono);
}
details[open] > .faq-question::after { content: "\2212"; color: var(--accent); }
.faq-answer { padding: 0 0 24px; }
.faq-answer p { margin-bottom: 0; font-size: 0.95rem; color: var(--text-sub); line-height: 1.8; }

@media (max-width: 1440px) { .floating-cta { display: none; } }

@media (max-width: 768px) {
    .blog-header-inner { padding: 0 20px; }
    .article-hero { padding: 96px 0 0; }
    .article-hero-inner { padding: 0 20px 32px; }
    .article-hero-meta-row { flex-direction: column; align-items: flex-start; gap: 16px; }
    .post-read-time { margin-left: 0; }
    .article-layout { padding: 32px 20px 72px; }
    .article-main { max-width: 100%; overflow: hidden; }
    .article-content { overflow-wrap: break-word; word-break: break-word; }
    .article-content table.article-matrix th,
    .article-content table.article-matrix td { word-break: keep-all; overflow-wrap: break-word; }
    .article-content table.article-matrix {
        --matrix-col-label-min: 5rem; --matrix-col-label-max: 11rem;
        --matrix-col-data-min: 8rem; --matrix-col-data-max: 20rem;
        --matrix-col-tail-min: 4rem; --matrix-col-tail-max: 6rem;
    }
    .article-content h2 { margin: 56px 0 24px; }
    .article-cta-body { padding: 20px 20px 24px; }
    .article-cta .btn { white-space: normal; }
    .terminal-block pre,
    .article-content > pre { padding: 18px 16px; font-size: 0.8rem; }
}

@media (max-width: 480px) {
    .article-cta-body { padding: 18px 16px 22px; }
    .article-layout { padding: 24px 16px 64px; }
    .terminal-block pre,
    .article-content > pre { padding: 16px 14px; font-size: 0.78rem; }
}

.article-content b { font-weight: 700; }
.article-content em { font-style: italic; }
.article-content kbd {
    font-family: var(--font-mono); font-size: 0.82em; font-weight: 600;
    background: var(--text-main); color: #ffffff; padding: 2px 8px;
    border: 1px solid var(--text-main); border-radius: 3px;
    box-shadow: 0 1px 0 rgba(0,0,0,0.15);
}
.article-content del { color: var(--text-sub); text-decoration: line-through; }
.article-content mark { background: rgba(0, 85, 255, 0.14); color: var(--text-main); padding: 1px 4px; }

.article-content dl { margin: 0 0 28px; }
.article-content dt { font-weight: 700; color: var(--text-main); margin-top: 18px; }
.article-content dt:first-child { margin-top: 0; }
.article-content dd { margin: 6px 0 0; padding-left: 16px; border-left: 2px solid var(--border-color); color: var(--text-sub); line-height: 1.75; }

.article-content > pre {
    margin: 0 0 36px; padding: 20px 22px; background: #0f172a; color: #e2e8f0;
    overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #1e293b;
    font-family: var(--font-mono); font-size: 0.85rem; line-height: 1.8;
}
.article-content > pre code { background: transparent; padding: 0; border: none; color: inherit; font-size: inherit; }

.article-content .article-table-wrap table {
    width: 100%; border-collapse: collapse;
    font-size: 0.92rem; color: var(--text-main);
}
.article-content .article-table-wrap table thead th {
    background: var(--text-main); color: #ffffff; font-weight: 700;
    font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.5px;
}
.article-content .article-table-wrap table th,
.article-content .article-table-wrap table td {
    border: 1px solid var(--border-color); padding: 12px 16px; text-align: left; vertical-align: top; line-height: 1.6;
    word-break: keep-all; overflow-wrap: break-word;
}
.article-content .article-table-wrap table tbody tr:nth-child(even) { background: var(--bg-color); }

.article-content > hr { border: none; border-top: 1px dashed var(--border-color); margin: 56px 0; }

.article-content img { max-width: 100%; height: auto; display: block; margin: 0 0 36px; border: 1px solid var(--border-color); }
.article-content figure { margin: 0 0 36px; }
.article-content figure img { margin-bottom: 0; }
.article-content figcaption {
    font-family: var(--font-mono); font-size: 12px; color: var(--text-sub);
    text-align: center; margin-top: 10px; line-height: 1.6;
}

.article-content > details {
    margin: 0 0 20px; padding: 18px 20px; border: 1px solid var(--border-color); background: #ffffff;
}
.article-content > details summary {
    font-weight: 700; cursor: pointer; color: var(--text-main); list-style: none;
}
.article-content > details summary::-webkit-details-marker { display: none; }
.article-content > details[open] summary { color: var(--accent); margin-bottom: 12px; }

