/* Blog (/blog, /blog/topic/{key}, /blog/{slug}). Loads after landing, marketing and formats.css. */

.bpost, .bgrid, .bcard { --b-gst: #4f46e5; --b-get-paid: #059669; --b-documents: #ea580c; --b-business: #db2777; }

/* Reading progress: CSS scroll timeline, no script; hidden where unsupported */
.bprogress { display: none; }
@supports (animation-timeline: scroll()) {
    .bprogress {
        display: block; position: fixed; inset: 0 0 auto; z-index: 60; height: 3px;
        background: linear-gradient(90deg, var(--primary), var(--accent));
        transform-origin: 0 50%; transform: scaleX(0);
        animation: bprogress linear both; animation-timeline: scroll(root);
    }
    @keyframes bprogress { to { transform: scaleX(1); } }
}
@media (prefers-reduced-motion: reduce) { .bprogress { display: none; } }

/* Topic chips */
.btopics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.btopics a {
    padding: 8px 16px; border-radius: 999px; font-size: .9375rem; font-weight: 600; text-decoration: none;
    color: var(--text); background: var(--surface); border: 1px solid var(--border);
}
.btopics a:hover, .btopics a:focus-visible { border-color: var(--primary); color: var(--primary); }
.btopics a[aria-current="page"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.bhub-head { padding-bottom: 24px; }

/* Category chip */
.bchip {
    display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .9375rem; font-weight: 700;
    letter-spacing: .02em; text-decoration: none; color: var(--primary);
    background: color-mix(in srgb, var(--primary) 12%, transparent);
}
.bchip:hover { background: color-mix(in srgb, var(--primary) 20%, transparent); }

/* Drawn covers, one colour per topic */
.bcover {
    --c: var(--b-gst);
    position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 16px;
    background:
        radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--c) 55%, transparent), transparent 60%),
        radial-gradient(90% 80% at 0% 100%, color-mix(in srgb, var(--c) 30%, transparent), transparent 70%),
        color-mix(in srgb, var(--c) 14%, var(--surface));
}
.bcover--get-paid { --c: var(--b-get-paid); }
.bcover--documents { --c: var(--b-documents); }
.bcover--business { --c: var(--b-business); }
.bcover__sheet {
    position: absolute; left: 50%; bottom: -18%; width: 42%; height: 92%; padding: 9% 6% 0;
    display: flex; flex-direction: column; gap: 8%;
    background: #fff; border-radius: 10px; transform: translateX(-38%) rotate(-6deg);
    box-shadow: 0 20px 40px -18px rgba(15, 23, 42, .5);
}
.bcover__sheet--back { z-index: -0; transform: translateX(-70%) rotate(-14deg); opacity: .55; }
.bcover__sheet:not(.bcover__sheet--back) { z-index: 1; }
.bcover__sheet i { display: block; height: 7%; border-radius: 4px; background: #eef1f8; }
.bcover__sheet i:first-child { width: 55%; background: color-mix(in srgb, var(--c) 70%, #fff); }
.bcover__sheet i:nth-child(3) { width: 75%; }
.bcover__sheet u { display: block; margin-top: 6%; align-self: flex-end; width: 40%; height: 9%; border-radius: 4px; background: color-mix(in srgb, var(--c) 35%, #fff); }
.bcover__tag {
    position: absolute; left: 14px; top: 12px; z-index: 2; padding: 4px 10px; border-radius: 999px;
    font: 700 .875rem/1.3 var(--font); color: #fff; background: color-mix(in srgb, var(--c) 85%, #000);
}

/* Cards */
.bgrid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.bcard { position: relative; display: flex; flex-direction: column; gap: 14px; }
.bcard__body { display: flex; flex-direction: column; gap: 8px; }
.bcard__meta { display: flex; align-items: center; gap: 10px; margin: 0; font-size: .9375rem; color: var(--text-muted); }
.bcard__meta .bchip { position: relative; z-index: 2; }
.bcard__title { margin: 0; font-family: var(--display); font-size: 1.25rem; line-height: 1.25; letter-spacing: -.015em; color: var(--ink); text-wrap: balance; }
.bcard__title a { text-decoration: none; }
.bcard__title a::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.bcard__title a:focus-visible { outline: none; }
.bcard__title a:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 4px; }
.bcard:hover .bcard__title { color: var(--primary); }
.bcard:hover .bcover__sheet:not(.bcover__sheet--back) { transform: translateX(-38%) rotate(-3deg) translateY(-4%); }
.bcover__sheet { transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.bcard__excerpt { margin: 0; color: var(--text-muted); line-height: 1.55; text-wrap: pretty; }
.bcard__date { margin: 0; font-size: .9375rem; color: var(--text-muted); }
.bhub-featured { margin-top: 8px; }
.bcard--featured { padding: 16px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.bcard--featured .bcard__title { font-size: clamp(24px, 3.6vw, 34px); }
.bcard--featured .bcard__excerpt { font-size: 1.0625rem; }
@media (min-width: 860px) {
    .bcard--featured { display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px; align-items: center; padding: 20px 32px 20px 20px; }
}

/* Questions people ask (hub) */
.basked { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.basked a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px 20px; border-radius: 16px; text-decoration: none; background: var(--surface); border: 1px solid var(--border); }
.basked a:hover { border-color: var(--primary); }
.basked strong { color: var(--ink); font-size: 1rem; }
.basked span { color: var(--text-muted); font-size: .9375rem; line-height: 1.5; }

/* Free tools row */
.btools__row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.btools__item { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: 16px; text-decoration: none; color: var(--text); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent); }
.btools__item:hover { border-color: var(--primary); }
.btools__item strong { color: var(--ink); }
.btools__item span { font-size: .9375rem; color: var(--text-muted); }
.btools { padding-bottom: 56px; }

/* Post header */
.bpost-head { max-width: 780px; padding: 28px 0 8px; }
.bpost-head__title { margin: 14px 0 0; font-size: clamp(32px, 5vw, 50px); font-weight: 800; line-height: 1.08; color: var(--ink); text-wrap: balance; }
.bpost-head__lede { margin: 16px 0 0; font-size: 1.1875rem; line-height: 1.55; color: var(--text-muted); text-wrap: pretty; }
.bbyline { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.bbyline__avatar {
    flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
    font: 800 .9375rem/1 var(--display); color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent));
}
.bbyline__avatar--lg { width: 56px; height: 56px; font-size: 1.125rem; }
.bbyline__text { display: flex; flex-direction: column; font-size: .9375rem; color: var(--text-muted); }
.bbyline__text strong { color: var(--text); }

/* Post layout: article + sticky side column */
.bpost { display: grid; gap: 32px; padding-top: 24px; padding-bottom: 32px; }
.bpost__main { min-width: 0; max-width: 720px; }
.bpost__side { display: none; }
@media (min-width: 1024px) {
    .bpost { grid-template-columns: minmax(0, 720px) 300px; justify-content: space-between; }
    .bpost__side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 88px; align-self: start; }
    .btoc--inline { display: none; }
}

/* Answer first (AEO: this is the paragraph AI answers quote) */
.post-answer {
    position: relative; padding: 22px 24px 22px 28px; border-radius: 18px;
    background: color-mix(in srgb, var(--primary) 8%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--primary) 24%, transparent);
}
.post-answer::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 4px; border-radius: 0 4px 4px 0; background: var(--primary); }
.post-answer h2 { margin: 0 0 8px; font-size: .8125rem; font-family: var(--font); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--primary); }
.post-answer p { margin: 0; font-size: 1.125rem; line-height: 1.65; color: var(--text); }

.btake { margin-top: 20px; padding: 20px 24px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.btake h2 { margin: 0 0 10px; font-size: 1.125rem; color: var(--ink); }
.btake ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.btake li { position: relative; padding-left: 30px; line-height: 1.55; }
.btake li::before {
    content: "✓"; position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 20px; height: 20px;
    border-radius: 50%; font-size: .9375rem; font-weight: 800; color: #fff; background: var(--accent);
}

/* Table of contents */
.btoc { padding: 18px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.btoc--inline { margin-top: 20px; }
.btoc--inline summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.btoc__title { margin: 0 0 10px; font-size: .8125rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.btoc ol { margin: 10px 0 0; padding: 0; list-style: none; counter-reset: toc; display: grid; gap: 2px; }
.btoc--inline ol { margin-top: 12px; }
.btoc li { counter-increment: toc; }
.btoc a { display: flex; gap: 10px; padding: 6px 8px; border-radius: 8px; font-size: .9375rem; line-height: 1.4; text-decoration: none; color: var(--text-muted); }
.btoc a::before { content: counter(toc, decimal-leading-zero); font-variant-numeric: tabular-nums; font-weight: 700; color: color-mix(in srgb, var(--text-muted) 60%, transparent); }
.btoc a:hover, .btoc a[aria-current="true"] { color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, transparent); }
.btoc a[aria-current="true"]::before { color: var(--primary); }

/* Article text */
.bprose__section { scroll-margin-top: 84px; margin-top: 44px; }
.bprose__section h2 { margin: 0 0 14px; font-size: clamp(24px, 3.4vw, 30px); line-height: 1.2; color: var(--ink); text-wrap: balance; }
.bprose p, .bprose li { font-size: 1.125rem; line-height: 1.75; color: var(--text); text-wrap: pretty; }
.bprose p { margin: 0 0 16px; }
.bprose ul { margin: 0 0 16px; padding-left: 22px; }
.bprose li { margin-bottom: 6px; }
.bprose li::marker { color: var(--primary); }

.bsteps { list-style: none; margin: 8px 0 20px; padding: 0; counter-reset: st; display: grid; gap: 12px; }
.bsteps li { counter-increment: st; position: relative; display: flex; flex-direction: column; gap: 2px; padding: 16px 18px 16px 62px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.bsteps li::before {
    content: counter(st); position: absolute; left: 16px; top: 16px; display: grid; place-items: center; width: 32px; height: 32px;
    border-radius: 10px; font: 800 .9375rem/1 var(--display); color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent);
}
.bsteps strong { color: var(--ink); }
.bsteps span { color: var(--text-muted); font-size: 1rem; line-height: 1.55; }

.btable { overflow-x: auto; margin: 8px 0 20px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); }
.btable:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.btable table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: .9375rem; }
.btable th, .btable td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.btable thead th { font-size: .9375rem; letter-spacing: .03em; color: var(--text-muted); background: var(--surface-2); }
.btable thead th + th { color: var(--ink); }
.btable tbody th { font-weight: 600; color: var(--text-muted); }
.btable tbody tr:last-child > * { border-bottom: 0; }
.btable td:last-child { font-weight: 600; color: var(--ink); }

.bcallout { margin: 8px 0 20px; padding: 16px 18px; border-radius: 14px; border: 1px solid; }
.bcallout strong { display: block; margin-bottom: 4px; font-size: .8125rem; letter-spacing: .04em; text-transform: uppercase; }
.bcallout p { margin: 0; font-size: 1rem; line-height: 1.6; }
.bcallout--tip { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.bcallout--tip strong { color: color-mix(in srgb, var(--accent) 75%, var(--text)); }
.bcallout--warn { background: color-mix(in srgb, #f59e0b 10%, var(--surface)); border-color: color-mix(in srgb, #f59e0b 40%, transparent); }
.bcallout--warn strong { color: color-mix(in srgb, #f59e0b 70%, var(--text)); }

.bcta {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin: 12px 0 8px;
    padding: 20px 22px; border-radius: 18px; color: #fff;
    background: radial-gradient(120% 140% at 100% 0%, #10b981 0%, transparent 55%), linear-gradient(135deg, #4f46e5, #312e81);
}
.bcta div { display: flex; flex-direction: column; gap: 2px; }
.bcta strong { font: 800 1.1875rem/1.25 var(--display); }
.bcta span { font-size: .9375rem; opacity: .85; }
.bcta .btn { background: #fff; color: #312e81; }

.bsources .tool-sources { margin-top: 0; }
.bauthor { display: flex; gap: 16px; align-items: flex-start; margin-top: 44px; padding: 20px 22px; border-radius: 18px; background: var(--surface-2); }
.bauthor strong { color: var(--ink); }
.bauthor p { margin: 4px 0 0; font-size: .9375rem; line-height: 1.6; color: var(--text-muted); }
.bshare { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 20px; font-size: .9375rem; }
.bshare span { font-weight: 700; color: var(--text-muted); }
.bshare a, .bshare .link-btn { color: var(--primary); font-weight: 600; font-size: .9375rem; }

/* Side column */
.bside-cta { padding: 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.bside-cta__kicker { margin: 0 0 6px; font-size: .8125rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.bside-cta strong { display: block; font: 800 1.1875rem/1.25 var(--display); color: var(--ink); }
.bside-cta p:not(.bside-cta__kicker) { margin: 8px 0 14px; font-size: .9375rem; line-height: 1.55; color: var(--text-muted); }
.blinks { padding: 0 4px; }
.blinks ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.blinks a { font-size: .9375rem; font-weight: 600; color: var(--primary); text-decoration: none; }
.blinks a:hover { text-decoration: underline; }

.brelated { padding-bottom: 56px; }

/* "> message:" callout: a ready-to-send message, styled like a chat bubble */
.bcallout--msg { position: relative; background: color-mix(in srgb, #25d366 10%, var(--surface)); border-color: color-mix(in srgb, #25d366 35%, transparent); border-radius: 4px 14px 14px 14px; }
.bcallout--msg strong { color: color-mix(in srgb, #128c7e 80%, var(--text)); }
.bcallout--msg p { user-select: all; }
