/* Shared blog styles — linked by blog/index.html and every article.
   Keeping this external (unlike the rest of the site) means one place to
   restyle all posts and lets browsers cache it across articles. */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --brand: #667eea;
    --brand-2: #764ba2;
    --ink: #1a1a3a;
    --muted: #5b5d78;
    --line: rgba(15, 16, 49, 0.1);
    --bg: #ffffff;
    --bg-soft: #fafbff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); }

/* ---- Top nav (shared) ---- */
.blog-nav {
    display: flex; align-items: center; justify-content: space-between;
    max-width: 1040px; margin: 0 auto; padding: 20px 24px;
}
.blog-nav .brand {
    display: flex; align-items: center; gap: 8px;
    font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none;
}
.blog-nav .brand img { width: 26px; height: 26px; }
.blog-nav .links { display: flex; gap: 22px; align-items: center; font-size: 15px; }
.blog-nav .links a { color: var(--muted); text-decoration: none; }
.blog-nav .links a:hover { color: var(--ink); }
.blog-nav .links a.cta {
    background: var(--brand); color: #fff; padding: 9px 16px; border-radius: 10px; font-weight: 600;
}

/* ---- Blog index ---- */
.blog-head { max-width: 760px; margin: 40px auto 8px; padding: 0 24px; }
.blog-head h1 { font-size: 44px; font-weight: 800; letter-spacing: -1px; }
.blog-head p { color: var(--muted); font-size: 19px; margin-top: 10px; }

.post-list { max-width: 760px; margin: 24px auto 80px; padding: 0 24px; }
.post-card {
    display: block; text-decoration: none; color: inherit;
    padding: 28px 0; border-top: 1px solid var(--line);
}
.post-card:hover h2 { color: var(--brand); }
.post-card .meta { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.post-card h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; }
.post-card p { color: var(--muted); margin-top: 8px; }

/* ---- Article ---- */
.article { max-width: 720px; margin: 0 auto; padding: 0 24px 80px; }
.breadcrumb { font-size: 14px; color: var(--muted); margin: 32px 0 20px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); }

.article h1 { font-size: 42px; font-weight: 800; letter-spacing: -1px; line-height: 1.15; }
.article .byline { color: var(--muted); font-size: 15px; margin: 16px 0 32px; }
.article .lede { font-size: 20px; color: var(--ink); margin-bottom: 32px; }

.article h2 { font-size: 30px; font-weight: 750; margin: 44px 0 14px; letter-spacing: -0.5px; }
.article h3 { font-size: 22px; font-weight: 700; margin: 30px 0 10px; }
.article p { margin: 0 0 18px; font-size: 18px; }
.article ul, .article ol { margin: 0 0 18px 24px; }
.article li { margin-bottom: 8px; font-size: 18px; }
.article img { max-width: 100%; height: auto; border-radius: 12px; margin: 24px 0; }

/* Table of contents */
.toc {
    background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px;
    padding: 20px 24px; margin: 8px 0 32px;
}
.toc strong { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); margin-bottom: 10px; }
.toc a { display: block; padding: 4px 0; text-decoration: none; }

/* Comparison table */
.article table {
    width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 16px;
    display: block; overflow-x: auto;
}
.article th, .article td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.article th { font-weight: 700; background: var(--bg-soft); }

/* FAQ */
.faq { margin-top: 48px; padding-top: 8px; }
.faq h2 { margin-bottom: 8px; }
.faq details {
    border-bottom: 1px solid var(--line); padding: 16px 0;
}
.faq summary { font-weight: 650; font-size: 18px; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { margin-top: 12px; color: var(--muted); }

/* In-article CTA */
.cta-box {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff; border-radius: 16px; padding: 32px; margin: 48px 0; text-align: center;
}
.cta-box h3 { color: #fff; font-size: 24px; margin-bottom: 8px; }
.cta-box p { color: rgba(255,255,255,0.85); margin-bottom: 20px; }
.cta-box a {
    display: inline-block; background: #fff; color: var(--brand);
    padding: 12px 24px; border-radius: 10px; font-weight: 700; text-decoration: none;
}

.article-footer {
    border-top: 1px solid var(--line); margin-top: 56px; padding-top: 24px;
    display: flex; gap: 20px; flex-wrap: wrap; font-size: 15px;
}
.article-footer a { color: var(--muted); text-decoration: none; }

@media (max-width: 640px) {
    .blog-head h1 { font-size: 34px; }
    .article h1 { font-size: 32px; }
    .article h2 { font-size: 25px; }
    .blog-nav .links a:not(.cta) { display: none; }
}
