/* ─────────────────────────────────────────────────────────────
   Blog article page — v3 design language
   Scoped to .article-shell so it doesn't leak into the rest of
   the site. Reuses homepage-v30 tokens (--ink, --soft, --line,
   --accent, --accent-glow, --sans, --mono, --serif).
   ───────────────────────────────────────────────────────────── */

html { scroll-behavior: smooth; }

/* ── Hero (dark — matches homepage & blog listing) ──── */
.article-hero-inner {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}
.article-hero .eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 11.5px;
    letter-spacing: .08em;
}
.hero.on-dark.article-hero { padding: 80px 0 64px; }
.article-hero h1.hero-h {
    font-family: var(--sans);
    font-size: 42px;
    line-height: 1.15;
    letter-spacing: -.022em;
    font-weight: 700;
    margin: 18px auto 18px;
}
.article-hero .article-meta {
    display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px;
    color: var(--dark-muted); font-size: 13px;
    font-family: var(--mono);
}
.article-hero .article-meta .sep { opacity: .5; }

/* ── Breadcrumbs bar (slim row under dark hero, on light shell) ── */
.article-crumbs-bar {
    background: var(--bg-2);
    padding: 20px 0 4px;
}
.article-crumbs-bar .article-container {
    padding-top: 0;
    padding-bottom: 0;
}
.article-crumbs {
    display: flex; align-items: center; gap: 8px;
    font-size: 12.5px;
    color: var(--soft);
    overflow: hidden;
    min-width: 0;
}
.article-crumbs a {
    color: var(--ink-3);
    text-decoration: none;
    transition: color .14s;
    flex: 0 0 auto;
}
.article-crumbs a:hover { color: var(--accent); }
.article-crumbs .crumb-sep {
    width: 10px; height: 10px;
    color: var(--soft); opacity: .6;
    flex: 0 0 auto;
}
.article-crumbs .crumb-home {
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--ink-3);
    transition: color .14s;
}
.article-crumbs .crumb-home:hover { color: var(--accent); }
.article-crumbs .crumb-home svg {
    width: 14px; height: 14px;
    flex: 0 0 auto;
}
.article-crumbs .current {
    color: var(--soft);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

/* ── 3-col grid ───────────────────────────────────────── */
.article-shell {
    padding: 36px 0 80px;
    background: var(--bg-2);
}
.article-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
}
.article-grid {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 260px;
    gap: 40px;
    align-items: start;
}

/* ── TOC (left) ───────────────────────────────────────── */
.article-toc { position: sticky; top: 96px; }
.toc-eyebrow {
    font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    color: var(--soft); margin: 0 0 14px;
}
.article-toc .toc-main {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 1px;
    border-left: 1px solid var(--line);
}
.article-toc .toc-main li {
    margin: 0; padding: 0;
}
.article-toc .toc-main li a {
    display: block;
    padding: 6px 12px;
    margin-left: -1px;
    border-left: 2px solid transparent;
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--soft);
    text-decoration: none;
    transition: color .14s, border-color .14s;
}
.article-toc .toc-main li a:hover { color: var(--ink); }
.article-toc .toc-main li.active a {
    color: var(--ink);
    border-left-color: var(--accent);
    font-weight: 600;
}
.article-toc .toc-main li.active-ancestor a {
    color: var(--ink-2);
    font-weight: 500;
}
.article-toc .toc-main li.toc-h3 a { padding-left: 24px; font-size: 13px; }
.article-toc .toc-main li.toc-h4 a { padding-left: 36px; font-size: 12.5px; }

/* ── Article body (middle) ────────────────────────────── */
.article-body {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 48px 56px;
    box-shadow: 0 1px 2px rgba(12,12,13,.04), 0 24px 60px -32px rgba(12,12,13,.10);
}

.article-body .article-prose {
    font-family: var(--sans);
    font-size: 16.5px;
    line-height: 1.72;
    color: var(--ink-2);
}
.article-body .article-prose > *:first-child { margin-top: 0; }
.article-body .article-prose > *:last-child  { margin-bottom: 0; }

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

.article-body .article-prose h2 {
    font-family: var(--sans);
    font-size: 26px;
    line-height: 1.25;
    letter-spacing: -.015em;
    font-weight: 700;
    color: var(--ink);
    margin: 48px 0 18px;
    scroll-margin-top: 100px;
}
.article-body .article-prose h3 {
    font-family: var(--sans);
    font-size: 20px;
    line-height: 1.3;
    letter-spacing: -.01em;
    font-weight: 600;
    color: var(--ink);
    margin: 36px 0 14px;
    scroll-margin-top: 100px;
}
.article-body .article-prose h4 {
    font-family: var(--sans);
    font-size: 16.5px;
    font-weight: 600;
    color: var(--ink);
    margin: 28px 0 12px;
    scroll-margin-top: 100px;
}

.article-body .article-prose a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: var(--accent-line);
    text-underline-offset: 3px;
    transition: text-decoration-color .14s;
}
.article-body .article-prose a:hover { text-decoration-color: var(--accent); }

.article-body .article-prose strong { font-weight: 600; color: var(--ink); }
.article-body .article-prose em { font-style: italic; }

.article-body .article-prose ul,
.article-body .article-prose ol {
    margin: 0 0 22px;
    padding-left: 24px;
}
.article-body .article-prose ul li,
.article-body .article-prose ol li {
    padding: 4px 0;
}
.article-body .article-prose ul li::marker { color: var(--accent); }
.article-body .article-prose ol li::marker { color: var(--soft); font-variant-numeric: tabular-nums; }

.article-body .article-prose blockquote {
    margin: 28px 0;
    padding: 16px 22px;
    border-left: 3px solid var(--accent);
    background: var(--accent-soft);
    border-radius: 0 10px 10px 0;
    color: var(--ink-2);
    font-style: italic;
}
.article-body .article-prose blockquote p:last-child { margin-bottom: 0; }

.article-body .article-prose img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--line);
    margin: 24px 0;
}

.article-body .article-prose hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 36px 0;
}

/* inline code */
.article-body .article-prose code {
    font-family: var(--mono);
    font-size: 14px;
    background: var(--bg-3);
    border: 1px solid var(--line);
    padding: 1px 6px;
    border-radius: 5px;
    color: var(--ink);
}

/* code blocks (highlight.js / atom-one-dark) */
.article-body .article-prose pre {
    position: relative;
    margin: 24px 0;
    padding: 0;
    border-radius: 12px;
    background: #1f2329;
    border: 1px solid #2a2f37;
    overflow: hidden;
}
.article-body .article-prose pre code {
    display: block;
    background: transparent;
    border: 0;
    padding: 18px 22px;
    color: #e6e6e6;
    font-size: 13.5px;
    line-height: 1.65;
    overflow-x: auto;
    border-radius: 0;
}

.article-body .article-prose pre .copy-button {
    position: absolute;
    top: 10px; right: 10px;
    width: 30px; height: 30px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.7);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 7px;
    cursor: pointer;
    opacity: 0;
    transition: opacity .14s, background .14s, color .14s;
}
.article-body .article-prose pre:hover .copy-button { opacity: 1; }
.article-body .article-prose pre .copy-button:hover {
    background: rgba(255,255,255,.10);
    color: #fff;
}
.copy-button-icon,
.copy-button-icon-success {
    width: 14px; height: 14px;
    background-repeat: no-repeat; background-position: center; background-size: contain;
}
.copy-button-icon {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ffffff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'><rect x='5' y='5' width='9' height='9' rx='1.5'/><path d='M11 5V3.5A1.5 1.5 0 0 0 9.5 2h-6A1.5 1.5 0 0 0 2 3.5v6A1.5 1.5 0 0 0 3.5 11H5'/></svg>");
}
.copy-button-icon-success {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%234ec97e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='3 8.5 6.5 12 13 4'/></svg>");
}

/* tables in prose */
.article-body .article-prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 14.5px;
}
.article-body .article-prose th,
.article-body .article-prose td {
    border: 1px solid var(--line);
    padding: 10px 14px;
    text-align: left;
}
.article-body .article-prose th {
    background: var(--bg-3);
    font-weight: 600;
    color: var(--ink);
}

/* meta line above article body */
.article-body .article-meta-row {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; font-family: var(--mono);
    color: var(--soft);
    margin: 0 0 28px;
    padding: 0 0 18px;
    border-bottom: 1px solid var(--line);
}
.article-body .article-meta-row .sep { opacity: .5; }

/* social sharing */
.article-social {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    display: flex; align-items: center; gap: 12px;
}
.article-social .lbl {
    font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    color: var(--soft);
}
.article-social .share-btn {
    width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--line);
    color: var(--ink-3);
    background: #fff;
    text-decoration: none;
    transition: border-color .14s, color .14s, background .14s;
}
.article-social .share-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}
.article-social .share-btn svg { width: 16px; height: 16px; }

/* ── Right CTA (product features) ─────────────────────── */
.article-cta, .article-cta *, .article-cta *::before, .article-cta *::after { box-sizing: border-box; }
.article-cta { position: sticky; top: 96px; }
.article-cta-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(12,12,13,.03);
}
.article-cta .cta-eyebrow {
    font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
    color: var(--ink); margin: 0 0 16px;
    line-height: 1.4;
}
.article-cta .feat-list {
    list-style: none; padding: 0; margin: 0 0 18px;
    display: flex; flex-direction: column; gap: 10px;
}
.article-cta .feat-list li {
    display: flex; align-items: center; gap: 10px;
    padding: 0;
}
.article-cta .feat-list .ic {
    width: 28px; height: 28px; flex: 0 0 28px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 7px;
    border: 1px solid var(--accent-line);
}
.article-cta .feat-list .ic svg { width: 15px; height: 15px; }
.article-cta .feat-list .lbl {
    font-size: 12px;
    color: var(--ink);
    font-weight: 500;
    line-height: 1.35;
}
.article-cta .cta-btn {
    display: flex; align-items: center; gap: 6px;
    width: 100%; justify-content: center;
    padding: 10px 14px;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    font-family: var(--sans); font-weight: 600; font-size: 12.5px;
    text-decoration: none;
    white-space: nowrap;
    transition: background .14s, transform .14s;
}
.article-cta .cta-btn:hover { background: var(--accent-2); }
.article-cta .cta-btn .arr { transition: transform .14s; }
.article-cta .cta-btn:hover .arr { transform: translateX(2px); }

/* ── Related posts section ────────────────────────────── */
.article-related {
    background: #fff;
    padding: 64px 0 72px;
    border-top: 1px solid var(--line);
}
.article-related-inner {
    max-width: 1440px; margin: 0 auto; padding: 0 24px;
}
.article-related h2.related-title {
    font-family: var(--sans);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--ink);
    margin: 0 0 28px;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 1100px) {
    .article-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }
    .article-toc { position: static; top: auto; }
    .article-toc .toc-main { max-height: 220px; overflow-y: auto; }
    .article-cta { position: static; top: auto; order: 3; }
    .article-body { padding: 36px 32px; }
}
@media (max-width: 720px) {
    .article-hero { padding: 56px 0 28px; }
    .article-hero h1.hero-h { font-size: 30px; }
    .article-body { padding: 28px 22px; border-radius: 14px; }
    .article-body .article-prose { font-size: 16px; line-height: 1.68; }
    .article-body .article-prose h2 { font-size: 22px; margin-top: 36px; }
    .article-body .article-prose h3 { font-size: 18px; }
    .article-crumbs-bar { padding: 14px 0 2px; }
    .article-shell { padding: 12px 0 48px; }
    .article-related { padding: 48px 0 56px; }
}
