/* ============================================================
   NorthMountain.Uk — blog styles
   Reuses main.css tokens (--bg, --accent, --text, --border, …).
   Only blog-specific components live here.
   --cat is set inline per card / article for the category accent.
   ============================================================ */

.blog-page main { padding-top: 0; }

/* ── reading progress bar ── */
.read-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    z-index: 200; transition: width .1s;
}

/* ── listing hero ── */
.blog-hero { position: relative; padding: 72px 0 36px; text-align: center; }
.bh-inner { max-width: 760px; margin: 0 auto; }
.bh-tag {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 500;
    letter-spacing: .06em; text-transform: uppercase; color: var(--accent);
    border: 1px solid var(--border); padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
}
.bh-tag .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: bhpulse 2s infinite; }
@keyframes bhpulse { 0% { box-shadow: 0 0 0 0 var(--accent-soft); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.blog-hero h1 { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 16px; }
.blog-hero h1 em { font-style: normal; background: linear-gradient(120deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.blog-hero p { color: var(--text-muted); font-size: var(--text-lg); max-width: 620px; margin: 0 auto; }

/* ── search ── */
.blog-search { max-width: 520px; margin: 28px auto 0; position: relative; }
.blog-search input {
    width: 100%; padding: 14px 18px 14px 46px; border-radius: 999px;
    border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
    font-size: var(--text-sm); outline: none; transition: border-color .2s, box-shadow .2s;
}
.blog-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.blog-search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-subtle); }

/* ── category filter chips ── */
.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 32px auto 0; max-width: 900px; }
.chip {
    font-size: var(--text-xs); font-weight: 600; padding: 8px 16px; border-radius: 999px;
    border: 1px solid var(--border); background: var(--surface); color: var(--text-muted);
    cursor: pointer; transition: color .2s, border-color .2s, background .2s;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.active { color: var(--bg); background: linear-gradient(120deg, var(--accent), var(--accent-2)); border-color: transparent; }

/* ── article grid ── */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 48px 0 64px; }
.blog-card {
    display: flex; flex-direction: column; background: var(--bg-elevated);
    border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
    transition: transform .25s var(--ease-out-expo), border-color .25s, box-shadow .25s;
}
.blog-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-hover); }
.bc-cover {
    height: 116px; position: relative; display: flex; align-items: flex-end; padding: 16px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--cat, var(--accent)) 28%, transparent), transparent 130%);
}
.bc-ico {
    position: relative; width: 46px; height: 46px; border-radius: 12px;
    background: var(--bg); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center; color: var(--cat, var(--accent));
}
.bc-ico svg { width: 24px; height: 24px; }
.bc-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.bc-cat { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--cat, var(--accent)); margin-bottom: 10px; }
.bc-body h2 { font-family: var(--font-display); font-size: var(--text-lg); line-height: 1.3; margin: 0 0 10px; }
.bc-body h2 a { transition: color .2s; }
.bc-body h2 a:hover { color: var(--accent); }
.bc-body p { font-size: var(--text-sm); color: var(--text-muted); margin: 0 0 16px; flex: 1; }
.bc-meta { display: flex; align-items: center; gap: 14px; font-size: var(--text-xs); color: var(--text-subtle); border-top: 1px solid var(--border); padding-top: 14px; }
.bc-meta .read { display: inline-flex; align-items: center; gap: 5px; }
.bc-meta .read svg { width: 14px; height: 14px; }
.bc-link { margin-left: auto; color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.bc-link svg { width: 14px; height: 14px; }
.no-results { grid-column: 1 / -1; text-align: center; color: var(--text-muted); padding: 60px 0; display: none; }

/* ── listing CTA ── */
.blog-cta {
    max-width: 900px; margin: 0 auto 80px; text-align: center;
    background: linear-gradient(135deg, var(--accent-soft), transparent);
    border: 1px solid var(--border-strong); border-radius: var(--radius-xl); padding: 44px;
}
.blog-cta h3 { font-family: var(--font-display); font-size: var(--text-2xl); margin: 0 0 10px; }
.blog-cta p { color: var(--text-muted); margin: 0 0 24px; }

/* ── breadcrumbs ── */
.crumbs { font-size: var(--text-sm); color: var(--text-subtle); padding: 24px 0 0; }
.crumbs a { transition: color .2s; }
.crumbs a:hover { color: var(--accent); }
.crumbs span { margin: 0 8px; opacity: .5; }

/* ── article head ── */
.art-head { max-width: 760px; margin: 0 auto; padding: 26px 0 8px; }
.art-cat { display: inline-block; font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--cat, var(--accent)); border: 1px solid var(--border); padding: 5px 12px; border-radius: 999px; margin-bottom: 18px; }
.art-head h1 { font-family: var(--font-display); font-size: clamp(1.9rem, 4.4vw, 2.8rem); line-height: 1.14; letter-spacing: -.02em; margin: 0 0 18px; }
.art-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-size: var(--text-sm); color: var(--text-muted); padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.art-meta .av { display: inline-flex; align-items: center; gap: 8px; }
.art-meta .av .badge { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: inline-flex; align-items: center; justify-content: center; color: var(--bg); font-weight: 700; font-size: 12px; }
.art-meta .dotsep::before { content: "•"; margin-right: 16px; opacity: .4; }

/* ── article layout: body + sticky TOC ── */
.art-layout { display: grid; grid-template-columns: 1fr 240px; gap: 48px; max-width: 1060px; margin: 0 auto; padding: 36px 0 64px; align-items: start; }
.art-body { max-width: 720px; font-size: var(--text-base); line-height: 1.7; }
.art-body .lead { font-size: var(--text-lg); color: var(--text); opacity: .9; margin-bottom: 28px; }
.art-body h2 { font-family: var(--font-display); font-size: var(--text-2xl); letter-spacing: -.01em; margin: 40px 0 14px; scroll-margin-top: 90px; }
.art-body h3 { font-family: var(--font-display); font-size: var(--text-lg); margin: 26px 0 10px; }
.art-body p { margin: 0 0 16px; }
.art-body ul, .art-body ol { margin: 0 0 18px; padding-left: 0; list-style: none; }
.art-body ul li { position: relative; padding-left: 28px; margin-bottom: 10px; }
.art-body ul li::before { content: ""; position: absolute; left: 6px; top: 11px; width: 7px; height: 7px; border-radius: 50%; background: var(--cat, var(--accent)); }
.art-body ol { counter-reset: n; }
.art-body ol li { position: relative; padding-left: 36px; margin-bottom: 10px; counter-increment: n; }
.art-body ol li::before { content: counter(n); position: absolute; left: 0; top: -1px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); color: var(--cat, var(--accent)); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.art-body strong { color: var(--text); font-weight: 600; }
.art-body a:not(.btn) { color: var(--accent); border-bottom: 1px solid transparent; transition: border-color .2s; }
.art-body a:not(.btn):hover { border-bottom-color: var(--accent); }

/* comparison table */
.cmp { width: 100%; border-collapse: collapse; margin: 8px 0 24px; font-size: var(--text-sm); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.cmp th, .cmp td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.cmp thead th { background: var(--surface); font-size: var(--text-xs); }
.cmp tbody tr:last-child td { border-bottom: none; }
.cmp td:first-child { color: var(--text); font-weight: 600; }

/* callout */
.callout { background: linear-gradient(135deg, var(--accent-soft), transparent); border: 1px solid var(--border-strong); border-left: 3px solid var(--cat, var(--accent)); border-radius: var(--radius-md); padding: 18px 20px; margin: 24px 0; }
.callout strong { color: var(--cat, var(--accent)); }

/* table of contents */
.toc { position: sticky; top: 90px; font-size: var(--text-sm); }
.toc h4 { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-subtle); margin: 0 0 12px; }
.toc a { display: block; color: var(--text-muted); padding: 6px 0 6px 14px; border-left: 2px solid var(--border); transition: color .2s, border-color .2s; }
.toc a:hover, .toc a.active { color: var(--accent); border-left-color: var(--accent); }

/* FAQ */
.faq-wrap { max-width: 760px; margin: 0 auto; padding: 8px 0 56px; }
.faq-wrap h2 { font-family: var(--font-display); font-size: var(--text-2xl); margin: 0 0 20px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-elevated); margin-bottom: 12px; overflow: hidden; }
.faq-item summary { list-style: none; cursor: pointer; padding: 18px 22px; font-size: var(--text-base); font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 22px; color: var(--accent); line-height: 1; }
.faq-item[open] summary::after { content: "−"; }
.faq-item .ans { padding: 0 22px 20px; color: var(--text-muted); }

/* article CTA */
.art-cta { max-width: 760px; margin: 0 auto 56px; text-align: center; background: linear-gradient(135deg, var(--accent-soft), transparent); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 36px; }
.art-cta h3 { font-family: var(--font-display); font-size: var(--text-xl); margin: 0 0 10px; }
.art-cta p { color: var(--text-muted); margin: 0 0 22px; }

/* related */
.related { max-width: 1060px; margin: 0 auto; padding: 8px 0 72px; }
.related h2 { font-family: var(--font-display); font-size: var(--text-2xl); margin: 0 0 22px; }
.rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.rel-card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; transition: transform .25s, border-color .25s, box-shadow .25s; }
.rel-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-soft); }
.rel-card .rc-cat { font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; color: var(--cat, var(--accent)); }
.rel-card h3 { font-family: var(--font-display); font-size: var(--text-base); line-height: 1.4; margin: 10px 0; }
.rel-card h3 a:hover { color: var(--accent); }
.rel-card .rc-link { color: var(--accent); font-weight: 600; font-size: var(--text-sm); }

/* ── responsive ── */
@media (max-width: 980px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
    .art-layout { grid-template-columns: 1fr; gap: 0; }
    .toc { display: none; }
    .rel-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .blog-grid { grid-template-columns: 1fr; }
}
