
/* ── ARTICLE PAGE STYLES ── */
.article-hero { padding: 36px 40px 0; max-width: 860px; margin: 0 auto; }
.article-hero h1 { font-family: var(--font-head); font-size: clamp(22px, 3vw, 36px); font-weight: 800; letter-spacing: -0.8px; color: var(--txt); margin-bottom: 14px; line-height: 1.2; }
.article-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.article-cat-pill { font-size: 12px; font-weight: 500; padding: 4px 12px; border-radius: 20px; text-decoration: none; transition: all 0.2s; }
.article-date { font-size: 12px; color: var(--txt3); }
.article-layout { max-width: 1160px; margin: 0 auto; padding: 36px 40px 100px; display: grid; grid-template-columns: 1fr 280px; gap: 48px; align-items: start; }
.article-body { min-width: 0; }
.article-content { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 40px; margin-bottom: 32px; }

/* ── ANCHOR OFFSET for sticky nav (64px height + 16px breathing room) ── */
.article-content h2,
.article-content h3 {
  scroll-margin-top: 88px;
}

.article-content h2 { font-family: var(--font-head); font-size: 20px; font-weight: 700; color: var(--txt); margin: 32px 0 12px; letter-spacing: -0.3px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.article-content h2:first-child { margin-top: 0; }
.article-content h3 { font-family: var(--font-head); font-size: 16px; font-weight: 700; color: var(--txt); margin: 24px 0 10px; }
.article-content h4 { font-family: var(--font-head); font-size: 14px; font-weight: 700; color: var(--txt2); margin: 20px 0 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.article-content p { color: var(--txt2); font-size: 14px; line-height: 1.8; margin-bottom: 14px; }
.article-content ul, .article-content ol { color: var(--txt2); font-size: 14px; line-height: 1.8; margin: 12px 0 16px 20px; }
.article-content li { margin-bottom: 6px; }
.article-content strong { color: var(--txt); font-weight: 600; }
.article-content a { color: var(--teal); text-decoration: none; }
.article-content a:hover { text-decoration: underline; }
.article-content code { background: rgba(56,189,248,0.1); color: var(--teal); padding: 2px 7px; border-radius: 4px; font-size: 13px; font-family: 'Courier New', monospace; white-space: nowrap; }
.article-content pre { background: #060a10; border: 1px solid var(--border); border-radius: 8px; padding: 20px; margin: 16px 0; overflow-x: auto; }
.article-content pre code { background: none; padding: 0; color: #7dd3fc; font-size: 13px; white-space: pre; }
.article-content table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13px; }
.article-content th { background: rgba(56,189,248,0.08); color: var(--txt); font-weight: 600; padding: 10px 14px; text-align: left; border: 1px solid var(--border); }
.article-content td { color: var(--txt2); padding: 10px 14px; border: 1px solid var(--border); }
.article-content tr:nth-child(even) td { background: rgba(255,255,255,0.015); }

.note-box { background: rgba(56,189,248,0.06); border: 1px solid rgba(56,189,248,0.2); border-left: 3px solid var(--teal); border-radius: 8px; padding: 14px 18px; margin: 16px 0; }
.note-box.warning { background: rgba(251,191,36,0.06); border-color: rgba(251,191,36,0.2); border-left-color: var(--amber); }
.note-box.danger { background: rgba(251,113,133,0.06); border-color: rgba(251,113,133,0.2); border-left-color: var(--coral); }
.note-box.success { background: rgba(52,211,153,0.06); border-color: rgba(52,211,153,0.2); border-left-color: var(--green); }
.note-box p { color: var(--txt2); font-size: 13px; margin: 0; }
.note-label { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.note-box .note-label { color: var(--teal); }
.note-box.warning .note-label { color: var(--amber); }
.note-box.danger .note-label { color: var(--coral); }
.note-box.success .note-label { color: var(--green); }

.step-list { list-style: none !important; margin-left: 0 !important; counter-reset: step-counter; }
.step-list li { counter-increment: step-counter; display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px !important; }
.step-list li::before { content: counter(step-counter); min-width: 28px; height: 28px; background: var(--teal-dim); color: var(--teal); border: 1px solid rgba(56,189,248,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; margin-top: 2px; }

/* ── ACTIVE ANCHOR HIGHLIGHT in sidebar ── */
.sidebar-link.toc-active { color: var(--teal) !important; }

.related-articles { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 24px; margin-bottom: 32px; }
.related-articles h3 { font-family: var(--font-head); font-size: 13px; font-weight: 700; color: var(--txt); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 14px; }
.related-link { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--txt2); font-size: 13px; padding: 8px 0; border-bottom: 1px solid var(--border); transition: color 0.15s; }
.related-link:last-child { border-bottom: none; }
.related-link:hover { color: var(--teal); }
.related-link::before { content: '→'; color: var(--txt3); transition: color 0.15s; }
.related-link:hover::before { color: var(--teal); }

@media (max-width: 900px) { .article-layout { grid-template-columns: 1fr; } }
@media (max-width: 768px) { .article-content { padding: 24px 18px; } .article-hero, .article-layout { padding-left: 20px; padding-right: 20px; } }
