/*
 * Syncfinity blog: shared styles for blog/index.html and every post (blog/<slug>.html).
 * Same world as faq.html: Inter, ink #1d1230, brand purple #642c90, lilac washes, soft rounded panels.
 * Base styles in styles.css give h1 a gradient, h2 a centred underline bar and p/ul fixed sizes,
 * so everything here is scoped to .blog-page and resets those first.
 */
.blog-page {
    --b-ink: #1d1230;
    --b-read: #33293f;
    --b-text: #4a4158;
    --b-muted: #685f7c;
    --b-line: #ece6f4;
    --b-line-soft: #f1ecf7;
    --b-wash: #faf7fd;
    --b-tint: #f3eef9;
    --b-accent: #642c90;
    --b-accent-soft: #9054b9;
    --b-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --b-gutter: clamp(16px, 5vw, 64px);
    --b-header: 80px;
    --b-end: clamp(56px, 8vw, 104px);
    padding: calc(var(--b-header) + clamp(24px, 4vw, 52px)) var(--b-gutter) var(--b-end);
    background:
        radial-gradient(1100px 520px at 88% -8%, #f3ecfb 0%, rgba(243, 236, 251, 0) 62%),
        #ffffff;
    color: var(--b-text);
    line-height: 1.6;
    overflow-wrap: break-word;
}
.blog-page ::selection { background: #e9dcf7; color: var(--b-ink); }
.blog-page input { caret-color: var(--b-accent); }

/* Reset the site-wide heading, paragraph and list styles inside the blog. */
.blog-page h1, .blog-page h2, .blog-page h3, .blog-page h4 {
    position: static; display: block; max-width: none; margin: 0; padding: 0;
    text-align: left; color: var(--b-ink); background: none; filter: none; animation: none;
}
.blog-page h1::after, .blog-page h2::after, .blog-page h3::after { content: none; display: none; }
.blog-page p { margin: 0; font-size: inherit; }
.blog-page ul, .blog-page ol { margin: 0; padding: 0; list-style-position: outside; }
.blog-page a { transition: color 200ms ease, background-color 200ms ease, text-decoration-color 200ms ease; }
.blog-page a:focus-visible, .blog-page button:focus-visible, .blog-page summary:focus-visible {
    outline: 2px solid var(--b-accent); outline-offset: 3px; border-radius: 8px;
}
.blog-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.blog-wrap { max-width: 1180px; margin: 0 auto; }
.blog-skip {
    position: fixed; left: 16px; top: 12px; z-index: 1002; padding: 10px 16px; border-radius: 999px;
    background: #642c90; color: #ffffff; font: 600 0.95rem/1 Inter, sans-serif; text-decoration: none;
    transform: translateY(-160%); transition: transform 200ms ease;
}
.blog-skip:focus { transform: none; outline: 2px solid #ffffff; outline-offset: 2px; color: #ffffff; }

/* The site header starts white-on-transparent; blog pages have a white top. */
body:has(.blog-page) .mobile-menu-toggle { color: var(--primary-dark); }

/* ---------- Reading progress ---------- */
.blog-progress { display: none; position: fixed; inset: 0 0 auto; z-index: 1001; height: 3px; pointer-events: none; }
.blog-js .post-page .blog-progress { display: block; }
.blog-progress span {
    display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(var(--progress, 0));
    background: linear-gradient(90deg, #642c90, #9054b9 60%, #c08ae6);
    box-shadow: 0 1px 6px rgba(100, 44, 144, 0.35);
}


/* ---------- Post: one straight reading column, like an X article (template contract v3) ---------- */
.post-hero, .post-layout {
    --post-col: 680px;
    width: 100%; max-width: var(--post-col); margin-inline: auto;
    font-size: 1.125rem;
}
.post-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; list-style: none; font-size: 0.92rem; color: var(--b-muted); }
.post-crumbs li { display: inline-flex; align-items: center; }
.post-crumbs li + li::before {
    content: ""; width: 16px; height: 16px; margin: 0 8px;
    background: currentColor; opacity: 0.55;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3.5 10.5 8 6 12.5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3.5 10.5 8 6 12.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.post-crumbs a { color: var(--b-accent); font-weight: 600; text-decoration: none; }
.post-crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.blog-page h1.post-title {
    margin-top: 16px;
    font-size: clamp(2rem, 4.6vw, 2.9rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.032em;
    color: var(--b-ink); -webkit-text-fill-color: var(--b-ink) !important; text-wrap: balance;
}
.post-byline {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px;
    margin-top: clamp(18px, 2.2vw, 24px); color: var(--b-muted); font-size: 0.95rem;
}
.post-byline__author, .post-byline__meta > span { display: inline-flex; align-items: center; gap: 8px; }
.post-byline__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 0; }
.post-byline__meta > span + span::before {
    content: ""; width: 4px; height: 4px; margin: 0 14px; border-radius: 999px; background: #c9bcdb; flex: 0 0 auto;
}
.post-byline__meta .blog-tag { margin-left: 16px; }
.post-byline__author { color: var(--b-ink); font-weight: 600; }
.post-byline__author img {
    width: 34px; height: 34px; padding: 6px; border: 1px solid var(--b-line); border-radius: 11px;
    background: #ffffff; object-fit: contain; box-shadow: 0 4px 12px rgba(43, 23, 66, 0.06);
}
.post-byline i { color: var(--b-accent-soft); font-size: 0.85em; }
.post-byline time, .post-byline__minutes { font-variant-numeric: tabular-nums; }
.blog-tag {
    display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px;
    border-radius: 999px; background: var(--b-tint); color: var(--b-accent);
    font-size: 0.84rem; font-weight: 650; text-decoration: none; white-space: nowrap;
}
a.blog-tag:hover { background: #e9dcf7; color: var(--b-accent); }
.blog-tag i { color: inherit; font-size: 0.8rem; }

/* Cover picture: a wide banner at the very top of the article, like the cover of an X article. Any picture is
   trimmed to 5 by 2 around its middle, so a cover made at 1600 by 640 pixels shows whole. */
.post-cover { margin: 0 0 clamp(22px, 3vw, 30px); }
.post-cover img {
    display: block; width: 100%; height: auto; aspect-ratio: 5 / 2; object-fit: cover; object-position: center;
    border-radius: 14px; background: var(--b-tint);
}

.post-layout { margin-top: clamp(28px, 3.6vw, 40px); }

/* Quick answer */
.post-quick {
    position: relative; padding: clamp(20px, 3vw, 28px) clamp(20px, 3vw, 30px);
    border: 1px solid #e7dbf4; border-radius: 20px; scroll-margin-top: 110px;
    background:
        radial-gradient(520px 240px at 100% 0%, #efe3fb 0%, rgba(239, 227, 251, 0) 70%),
        var(--b-wash);
}
.blog-page .post-quick__title {
    display: flex; align-items: center; gap: 10px; margin: 0 0 10px;
    color: var(--b-accent); font-size: 0.98rem; font-weight: 700; letter-spacing: -0.005em;
}
.post-quick__title i {
    width: 28px; height: 28px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--b-accent); color: #ffffff; font-size: 0.78rem;
}
.blog-page .post-quick p { color: var(--b-ink); font-size: 1.12rem; font-weight: 500; line-height: 1.65; }
.blog-page .post-quick p + p { margin-top: 0.8em; }

/* Contents: a closed box under the quick answer */
.post-toc { border: 1px solid var(--b-line); border-radius: 16px; background: #ffffff; font-size: 0.95rem; scroll-margin-top: 110px; }
.post-quick + .post-toc { margin-top: 16px; }
.post-toc > summary {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 18px; border-radius: 16px; list-style: none; cursor: pointer;
    color: var(--b-ink); font-weight: 650; -webkit-tap-highlight-color: transparent;
}
.post-toc > summary::-webkit-details-marker { display: none; }
.post-toc > summary:hover { background: var(--b-wash); }
.post-toc > summary > span { display: inline-flex; align-items: center; gap: 10px; }
.post-toc > summary > span i { color: var(--b-accent-soft); font-size: 0.9em; }
.post-toc__chevron { color: var(--b-accent); font-size: 0.82em; transition: transform 300ms var(--b-ease); }
.post-toc[open] .post-toc__chevron { transform: rotate(180deg); }
.post-toc[open] > summary { border-radius: 16px 16px 0 0; }
.post-toc ol { display: grid; gap: 2px; padding: 6px 10px 12px; border-top: 1px solid var(--b-line-soft); list-style: none; counter-reset: post-toc; }
.post-toc li { counter-increment: post-toc; }
.post-toc a { display: flex; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--b-text); line-height: 1.45; text-decoration: none; }
.post-toc a::before {
    content: counter(post-toc, decimal-leading-zero); flex: 0 0 auto; padding-top: 0.12em;
    color: #b3a5c6; font-size: 0.8em; font-weight: 700; font-variant-numeric: tabular-nums;
}
.post-toc a:hover { background: var(--b-wash); color: var(--b-accent); }
.post-toc a:hover::before { color: var(--b-accent-soft); }

/* Article body */
.post-body { color: var(--b-read); }
.blog-page .post-intro { margin-top: clamp(30px, 4vw, 42px); }
.blog-page .post-intro p { color: var(--b-ink); font-size: clamp(1.15rem, 1.6vw, 1.25rem); line-height: 1.7; }
.blog-page .post-intro p + p { margin-top: 0.9em; }
.post-section { padding-top: clamp(28px, 4vw, 44px); scroll-margin-top: 96px; }
.blog-page .post-body h2 {
    margin: 0 0 0.6em; color: var(--b-ink);
    font-size: clamp(1.45rem, 2.4vw, 1.75rem); font-weight: 800; line-height: 1.25; letter-spacing: -0.022em; text-wrap: balance;
}
.blog-page .post-body h3 { margin: 1.6em 0 0.45em; color: var(--b-ink); font-size: 1.2rem; font-weight: 700; line-height: 1.4; letter-spacing: -0.01em; }
.blog-page .post-body h4 { margin: 1.4em 0 0.4em; color: var(--b-ink); font-size: 1.05rem; font-weight: 700; }
.blog-page .post-body h2 + h3 { margin-top: 0.4em; }
.blog-page .post-body p { margin: 0 0 1.15em; line-height: 1.75; text-wrap: pretty; }
.post-body strong { color: var(--b-ink); font-weight: 650; }
.post-body a {
    color: var(--b-accent); font-weight: 550; text-decoration: underline;
    text-decoration-color: rgba(100, 44, 144, 0.35); text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.post-body a:hover { text-decoration-color: currentColor; }

/* Bullets and numbered lists */
.blog-page .post-body ul, .blog-page .post-body ol { margin: 0 0 1.3em; padding-left: 1.45em; }
.blog-page .post-body ul { list-style: disc; }
.blog-page .post-body ol { list-style: decimal; }
.blog-page .post-body ul ul { list-style: circle; }
.post-body li { padding-left: 0.35em; line-height: 1.72; }
.post-body li + li { margin-top: 0.45em; }
.post-body ul > li::marker { color: var(--b-accent-soft); }
.post-body ol > li::marker { color: var(--b-accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.blog-page .post-body li > ul, .blog-page .post-body li > ol { margin: 0.45em 0 0; }
.blog-page .post-body li > p { margin: 0 0 0.5em; }

/* Pictures: always the full column; very tall ones sit on a light frame */
.blog-page .post-body .post-figure { margin: 1.8em 0 2em; }
.post-figure img {
    display: block; width: 100%; height: auto; max-height: 82vh; object-fit: contain;
    border: 1px solid var(--b-line); border-radius: 16px; background: var(--b-wash);
}
.post-figure figcaption { margin-top: 12px; color: var(--b-muted); font-size: 0.9rem; line-height: 1.5; text-align: center; text-wrap: balance; }
.post-body img { max-width: 100%; height: auto; border-radius: 16px; }

/* Videos: the full column, like pictures. Tall phone recordings are capped and sit on a dark frame. */
.post-figure--video video {
    display: block; width: 100%; height: auto; max-height: 80vh; object-fit: contain;
    border: 1px solid var(--b-line); border-radius: 16px; background: #120b1c;
}

/* Gallery: several pictures in one place. Without JavaScript it is a swipeable strip where the next picture peeks
   in; blog.js turns it into a slideshow with arrows, a counter and small previews underneath. */
.blog-page .post-body .post-gallery { position: relative; margin: 1.8em 0 2em; }
.post-gallery__slides {
    display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scrollbar-width: thin; padding-bottom: 6px;
}
.post-gallery__slide { flex: 0 0 86%; min-width: 0; margin: 0; scroll-snap-align: center; scroll-snap-stop: always; }
.post-body .post-gallery__slide img {
    display: block; width: 100%; height: auto; max-height: 70vh; object-fit: contain;
    border: 1px solid var(--b-line); border-radius: 16px; background: var(--b-wash);
}
.post-gallery__slide figcaption { margin-top: 12px; color: var(--b-muted); font-size: 0.9rem; line-height: 1.5; text-align: center; text-wrap: balance; }

.post-gallery.is-ready .post-gallery__slides { gap: 0; padding-bottom: 0; scrollbar-width: none; }
.post-gallery.is-ready .post-gallery__slides::-webkit-scrollbar { display: none; }
.post-gallery.is-ready .post-gallery__slides:focus-visible { outline: 3px solid rgba(100, 44, 144, 0.35); outline-offset: 4px; border-radius: 18px; }
.post-gallery.is-ready .post-gallery__slide { flex-basis: 100%; }
/* One stage height for every slide (set by blog.js from the pictures' shapes), so nothing jumps or gets cropped. */
.post-gallery.is-ready .post-gallery__slide img { height: var(--g-stage, min(62vh, 460px)); max-height: none; }

.post-gallery__controls { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; }
.post-gallery__nav {
    flex: none; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px;
    border: 1px solid var(--b-line); border-radius: 50%; background: rgba(255, 255, 255, 0.94); color: var(--b-ink);
    box-shadow: 0 8px 22px rgba(43, 23, 66, 0.16); cursor: pointer;
    transition: opacity 200ms var(--b-ease), transform 200ms var(--b-ease), background-color 200ms var(--b-ease);
}
.post-gallery__nav:hover { background: #ffffff; color: var(--b-accent); transform: scale(1.06); }
.post-gallery__nav:focus-visible { outline: 3px solid rgba(100, 44, 144, 0.4); outline-offset: 2px; }
.post-gallery__nav[disabled] { opacity: 0.35; box-shadow: none; transform: none; cursor: default; }
.post-gallery__nav svg { width: 18px; height: 18px; }

.post-gallery__count {
    flex: none; padding: 4px 11px; border-radius: 999px;
    background: rgba(29, 18, 48, 0.72); color: #ffffff; font-size: 0.8rem; font-weight: 650; font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em; pointer-events: none;
}

.post-gallery__thumbs {
    flex: 0 1 auto; min-width: 0; display: flex; gap: 8px; padding: 3px; overflow-x: auto; scrollbar-width: none;
}
.post-gallery__thumbs::-webkit-scrollbar { display: none; }
.post-gallery__thumb {
    flex: 0 0 auto; width: 64px; height: 64px; padding: 0; overflow: hidden; cursor: pointer;
    border: 2px solid transparent; border-radius: 12px; background: var(--b-wash); opacity: 0.62;
    transition: opacity 200ms var(--b-ease), border-color 200ms var(--b-ease), transform 200ms var(--b-ease);
}
.post-gallery__thumb:hover { opacity: 1; }
.post-gallery__thumb[aria-current="true"] { border-color: var(--b-accent); opacity: 1; }
.post-gallery__thumb:focus-visible { outline: 3px solid rgba(100, 44, 144, 0.4); outline-offset: 2px; }
.post-body .post-gallery__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 9px; }

/* Quote: a bar on the left, like a Notion quote */
.post-body blockquote {
    margin: 1.6em 0 1.8em; padding: 4px 0 4px 20px; border-left: 3px solid var(--b-accent);
    color: var(--b-ink); font-size: 1.2rem; font-weight: 500; line-height: 1.6;
}
.blog-page .post-body blockquote p { margin: 0 0 0.6em; line-height: 1.6; }
.blog-page .post-body blockquote > :last-child { margin-bottom: 0; }

/* Tip, note and warning: a soft box with an icon, like a Notion callout */
.post-callout {
    --c-bg: #f6f0fc; --c-ink: #4f2174; --c-icon: #7a3fae;
    --c-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21h4'/%3E%3Cpath d='M12 3a6 6 0 0 0-3.6 10.8c.6.5 1 1.2 1.1 2V16h5v-.2c.1-.8.5-1.5 1.1-2A6 6 0 0 0 12 3z'/%3E%3C/svg%3E");
    position: relative; margin: 1.6em 0 1.8em; padding: 16px 20px 16px 54px;
    border-radius: 14px; background: var(--c-bg);
}
.post-callout::before {
    content: ""; position: absolute; left: 18px; top: 18px; width: 22px; height: 22px; background: var(--c-icon);
    -webkit-mask: var(--c-glyph) center / contain no-repeat;
    mask: var(--c-glyph) center / contain no-repeat;
}
.post-callout--note {
    --c-bg: #edf4fb; --c-ink: #17436e; --c-icon: #2563a8;
    --c-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5.5M12 7.5v.01'/%3E%3C/svg%3E");
}
.post-callout--warning {
    --c-bg: #fcf4e3; --c-ink: #6b4100; --c-icon: #b86e00;
    --c-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 4.2 2.6 17.5A2 2 0 0 0 4.3 20.5h15.4a2 2 0 0 0 1.7-3L13.7 4.2a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9.5v4M12 17v.01'/%3E%3C/svg%3E");
}
.blog-page .post-body .post-callout p { margin: 0; color: var(--b-read); font-size: 1.04rem; line-height: 1.65; }
.blog-page .post-body .post-callout p + p { margin-top: 0.5em; }
.blog-page .post-body .post-callout .post-callout__label { margin: 0 0 2px; color: var(--c-ink); font-weight: 700; }
.post-callout a { color: var(--c-ink); }

/* Tables scroll inside their box instead of pushing the page sideways */
.post-table { margin: 1.5em 0 1.8em; overflow-x: auto; border: 1px solid var(--b-line); border-radius: 14px; background: #ffffff; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 0.96rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
.post-body th, .post-body td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--b-line-soft); }
.post-body th { background: var(--b-wash); color: var(--b-ink); font-weight: 700; }
.post-body tr:last-child td { border-bottom: none; }

.post-body code {
    padding: 0.12em 0.4em; border-radius: 6px; background: var(--b-tint); color: var(--b-ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88em;
}
.post-body pre {
    margin: 1.4em 0; padding: 18px 20px; overflow-x: auto; border-radius: 14px;
    background: #1d1230; color: #f1e9fb; font-size: 0.9rem; line-height: 1.65;
}
.post-body pre code { padding: 0; background: none; color: inherit; font-size: inherit; }
.post-body hr { height: 1px; margin: 2.4em 0; border: none; background: var(--b-line); }

/* FAQ (same item markup as faq.html) */
.post-faq {
    margin-top: clamp(40px, 6vw, 64px); padding: clamp(22px, 3vw, 34px) clamp(18px, 3vw, 34px) clamp(8px, 1.4vw, 14px);
    border: 1px solid var(--b-line); border-radius: 22px; background: #ffffff;
    box-shadow: 0 14px 40px rgba(43, 23, 66, 0.05); scroll-margin-top: 96px;
}
.blog-page .post-faq > h2 { margin: 0 0 6px; color: var(--b-ink); font-size: clamp(1.4rem, 2.3vw, 1.7rem); font-weight: 800; letter-spacing: -0.025em; }
.blog-page .faq-item { border-bottom: 1px solid var(--b-line-soft); scroll-margin-top: 110px; }
.blog-page .faq-item:last-of-type { border-bottom: none; }
.blog-page .faq-item > summary {
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    padding: 20px 4px; list-style: none; cursor: pointer; border-radius: 14px; -webkit-tap-highlight-color: transparent;
}
.blog-page .faq-item > summary::-webkit-details-marker { display: none; }
.blog-page .faq-item > summary:focus { outline: none; }
.blog-page .faq-item > summary:focus-visible { box-shadow: 0 0 0 3px rgba(100, 44, 144, 0.35); outline: none; }
.blog-page .faq-item h3 { margin: 0; color: var(--b-ink); font-size: 1.06rem; font-weight: 600; line-height: 1.45; letter-spacing: -0.01em; transition: color 200ms ease; }
.blog-page .faq-item > summary::after {
    content: ""; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 999px; border: 1px solid #e6dcf1;
    background:
        linear-gradient(var(--b-accent), var(--b-accent)) center / 12px 2px no-repeat,
        linear-gradient(var(--b-accent), var(--b-accent)) center / 2px 12px no-repeat,
        #ffffff;
    transition: transform 360ms var(--b-ease), border-color 200ms ease, box-shadow 200ms ease;
}
.blog-page .faq-item > summary:hover h3, .blog-page .faq-item[open] > summary h3 { color: var(--b-accent); }
.blog-page .faq-item > summary:hover::after { border-color: #cdb8e3; box-shadow: 0 4px 12px rgba(100, 44, 144, 0.12); }
.blog-page .faq-item[open] > summary::after {
    transform: rotate(180deg); border-color: var(--b-accent);
    background: linear-gradient(#ffffff, #ffffff) center / 12px 2px no-repeat, var(--b-accent);
}
.blog-page .faq-answer { padding: 0 58px 22px 4px; color: var(--b-read); font-size: 1rem; line-height: 1.72; }
.blog-page .faq-answer p { margin: 0 0 0.85em; }
.blog-page .faq-answer > :last-child { margin-bottom: 0; }
.blog-page .faq-answer a { color: var(--b-accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.blog-page .faq-answer ul { display: grid; gap: 8px; margin: 0 0 0.85em; list-style: none; }
.blog-page .faq-answer ul > li { position: relative; padding-left: 22px; }
.blog-page .faq-answer ul > li::before { content: ""; position: absolute; left: 5px; top: 0.72em; width: 7px; height: 7px; border-radius: 999px; background: var(--b-accent-soft); }


/* Buttons and the closing call to action */
.blog-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 50px; padding: 0 22px;
    border: 1px solid transparent; border-radius: 999px; font: 600 0.98rem/1 Inter, sans-serif;
    text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: transform 160ms ease, box-shadow 200ms ease, background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}
.blog-btn--primary { background: var(--b-accent); color: #ffffff; box-shadow: 0 10px 24px rgba(100, 44, 144, 0.25); }
.blog-btn--primary:hover { background: #57257e; color: #ffffff; transform: translateY(-1px); box-shadow: 0 14px 28px rgba(100, 44, 144, 0.3); }
.blog-btn--secondary { border-color: #ddd0ec; background: #ffffff; color: var(--b-ink); }
.blog-btn--secondary:hover { border-color: #c9b3e2; background: var(--b-wash); color: var(--b-ink); transform: translateY(-1px); }
.blog-cta {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 22px 40px;
    margin-top: clamp(40px, 6vw, 64px); padding: clamp(26px, 4vw, 44px);
    border: 1px solid #ece3f6; border-radius: 28px;
    background: radial-gradient(600px 300px at 100% 0%, #efe4fa 0%, rgba(239, 228, 250, 0) 70%), var(--b-wash);
}
.blog-page .blog-cta h2 { color: var(--b-ink); font-size: clamp(1.45rem, 2.4vw, 1.9rem); font-weight: 800; line-height: 1.18; letter-spacing: -0.03em; text-wrap: balance; }
.blog-page .blog-cta p { max-width: 54ch; margin-top: 10px; color: #574e6a; font-size: 1.02rem; line-height: 1.6; }
.blog-cta p a { color: var(--b-accent); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.blog-cta__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.post-layout .blog-cta { grid-template-columns: minmax(0, 1fr); }


/* Related posts band */
.post-related {
    margin: var(--b-end) calc(var(--b-gutter) * -1) calc(var(--b-end) * -1);
    padding: clamp(44px, 6vw, 80px) var(--b-gutter) clamp(52px, 7vw, 88px);
    border-top: 1px solid var(--b-line); background: var(--b-wash);
}
.blog-page .post-related h2 { margin: 0 0 clamp(20px, 3vw, 28px); font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; letter-spacing: -0.03em; }

/* Back to top */
.post-top {
    position: fixed; right: clamp(16px, 3vw, 28px); bottom: clamp(16px, 3vw, 28px); z-index: 900;
    width: 48px; height: 48px; display: none; align-items: center; justify-content: center;
    border: 1px solid #e3d8ef; border-radius: 999px; background: #ffffff; color: var(--b-accent);
    box-shadow: 0 12px 28px rgba(43, 23, 66, 0.14);
    opacity: 0; transform: translateY(12px) scale(0.92); pointer-events: none;
    transition: opacity 260ms ease, transform 360ms var(--b-ease), background-color 200ms ease, color 200ms ease;
}
.blog-js .post-top { display: inline-flex; }
.post-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.post-top:hover { background: var(--b-accent); color: #ffffff; }

/* ---------- Blog home ---------- */
.blog-page h1.blog-hero__title {
    max-width: 17em;
    font-size: clamp(2.4rem, 5.4vw, 4.4rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.04em;
    color: var(--b-ink); -webkit-text-fill-color: var(--b-ink) !important; text-wrap: balance;
}
.blog-hero__title span { display: block; color: var(--b-accent); -webkit-text-fill-color: var(--b-accent); }
.blog-page .blog-hero__intro { max-width: 60ch; margin-top: 22px; color: #5b5270; font-size: clamp(1rem, 1.3vw, 1.125rem); line-height: 1.65; text-wrap: pretty; }
.blog-hero__intro a { color: var(--b-accent); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

.blog-search { display: none; position: relative; max-width: 640px; margin-top: 32px; }
.blog-js .blog-search { display: block; }
.blog-search__icon { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); color: #8a7f9b; font-size: 1rem; pointer-events: none; }
.blog-search input {
    width: 100%; height: 60px; padding: 0 64px 0 54px;
    border: 1px solid #e3d8ef; border-radius: 999px; background: #ffffff;
    box-shadow: 0 10px 30px rgba(43, 23, 66, 0.06);
    font: inherit; font-size: 1rem; color: var(--b-ink);
    transition: border-color 200ms ease, box-shadow 200ms ease;
    -webkit-appearance: none; appearance: none;
}
.blog-search input::placeholder { color: #857b96; }
.blog-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.blog-search input:focus { outline: none; border-color: var(--b-accent); box-shadow: 0 0 0 4px rgba(100, 44, 144, 0.14), 0 10px 30px rgba(43, 23, 66, 0.06); }
.blog-search__clear {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; display: none; align-items: center; justify-content: center;
    border: none; border-radius: 999px; background: var(--b-tint); color: var(--b-accent); cursor: pointer;
}
.blog-search.has-query .blog-search__clear { display: inline-flex; }
.blog-search__clear:hover { background: #e9dcf7; }
.blog-search__clear svg { width: 12px; height: 12px; }

.blog-topics { display: none; margin-top: clamp(28px, 4vw, 40px); }
.blog-js .blog-topics { display: block; }
.blog-js .blog-topics:has(.blog-chips:empty) { display: none; }
.blog-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.blog-chip {
    display: inline-flex; align-items: center; gap: 9px; height: 42px; padding: 0 8px 0 16px;
    border: 1px solid #e8dff2; border-radius: 999px; background: #ffffff;
    color: #3b2a52; font: 600 0.92rem/1 Inter, sans-serif; white-space: nowrap; cursor: pointer;
    transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
}
.blog-chip i { color: var(--b-accent-soft); font-size: 0.85rem; }
.blog-chip__count {
    min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--b-tint); color: var(--b-accent); font-size: 0.75rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.blog-chip:hover { border-color: #d6c4ea; background: var(--b-wash); color: var(--b-ink); }
.blog-chip[aria-pressed="true"] { border-color: var(--b-accent); background: var(--b-accent); color: #ffffff; box-shadow: 0 8px 20px rgba(100, 44, 144, 0.22); }
.blog-chip[aria-pressed="true"] i { color: #e7d6f7; }
.blog-chip[aria-pressed="true"] .blog-chip__count { background: rgba(255, 255, 255, 0.18); color: #ffffff; }
.blog-status { display: none; }
.blog-js .blog-status { display: block; margin: 22px 0 16px; color: var(--b-muted); font-size: 0.92rem; }
.blog-list { margin-top: 28px; }
.blog-js .blog-list { margin-top: 0; }

/* Cards */
.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
.blog-card {
    position: relative; display: flex; flex-direction: column; min-width: 0;
    border: 1px solid var(--b-line); border-radius: 24px; background: #ffffff; overflow: hidden;
    box-shadow: 0 14px 40px rgba(43, 23, 66, 0.06);
    transition: transform 360ms var(--b-ease), box-shadow 360ms var(--b-ease), border-color 200ms ease;
}
.blog-card[hidden] { display: none; }
.blog-card:hover { transform: translateY(-4px); border-color: #dccbee; box-shadow: 0 24px 54px rgba(43, 23, 66, 0.12); }
.blog-card:focus-within { outline: 2px solid var(--b-accent); outline-offset: 3px; }
.blog-card:focus-within a:focus-visible { outline: none; }
.blog-art {
    position: relative; aspect-ratio: 16 / 9; overflow: hidden; isolation: isolate;
    background: linear-gradient(135deg, #642c90 0%, #9054b9 100%);
}
.blog-art[data-art="2"] { background: linear-gradient(140deg, #34174f 0%, #7b42ab 100%); }
.blog-art[data-art="3"] { background: linear-gradient(135deg, #7d3db0 0%, #cf98ef 100%); }
.blog-art[data-art="4"] { background: linear-gradient(135deg, #2e2468 0%, #7a5fd6 100%); }
.blog-art::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, 0.26) 1.1px, transparent 1.4px);
    background-size: 18px 18px;
    -webkit-mask-image: radial-gradient(120% 90% at 0% 0%, #000 0%, transparent 72%);
    mask-image: radial-gradient(120% 90% at 0% 0%, #000 0%, transparent 72%);
}
.blog-art::after {
    content: ""; position: absolute; z-index: -1; width: 70%; aspect-ratio: 1; right: -18%; top: -38%;
    border-radius: 999px; background: radial-gradient(closest-side, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0));
}
.blog-art > i {
    position: absolute; right: 9%; bottom: -10%; font-size: clamp(4.6rem, 8vw, 6.6rem); color: rgba(255, 255, 255, 0.92);
    transform: rotate(-9deg); filter: drop-shadow(0 18px 26px rgba(16, 6, 34, 0.35));
    transition: transform 520ms var(--b-ease);
}
.blog-card:hover .blog-art > i { transform: rotate(-4deg) translateY(-6px) scale(1.04); }
/* A post with a cover picture shows it instead of the artwork. */
.blog-art__img {
    position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover;
    transition: transform 700ms var(--b-ease);
}
.blog-card:hover .blog-art__img { transform: scale(1.04); }
.blog-art--photo::before { content: none; }
.blog-art--photo::after {
    width: auto; aspect-ratio: auto; inset: 0; border-radius: 0;
    background: linear-gradient(to top, rgba(20, 8, 38, 0.5) 0%, rgba(20, 8, 38, 0) 55%);
}
.blog-art__label {
    position: absolute; left: 16px; bottom: 14px; display: inline-flex; align-items: center; height: 28px; padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 999px; background: rgba(20, 8, 38, 0.28);
    color: #ffffff; font-size: 0.8rem; font-weight: 650; letter-spacing: 0.005em;
}
.blog-card__body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 22px 24px 22px; }
.blog-page .blog-card__title { color: var(--b-ink); font-size: 1.2rem; font-weight: 750; line-height: 1.3; letter-spacing: -0.015em; text-wrap: balance; }
.blog-card__title a { color: inherit; text-decoration: none; }
.blog-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.blog-card:hover .blog-card__title a { color: var(--b-accent); }
.blog-page .blog-card__desc {
    color: var(--b-text); font-size: 0.98rem; line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: auto; padding-top: 8px; color: var(--b-muted); font-size: 0.86rem; font-variant-numeric: tabular-nums; }
.blog-card__meta span, .blog-card__meta time { display: inline-flex; align-items: center; gap: 7px; }
.blog-card__meta i { color: var(--b-accent-soft); font-size: 0.82em; }
.blog-card__go { margin-left: auto; color: var(--b-accent); font-weight: 650; }
.blog-card__go i { color: inherit; transition: transform 300ms var(--b-ease); }
.blog-card:hover .blog-card__go i { transform: translateX(4px); }
.blog-card--featured { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
.blog-card--featured .blog-art { aspect-ratio: auto; min-height: 330px; }
.blog-card--featured .blog-art > i { font-size: clamp(6rem, 11vw, 9.5rem); right: 12%; bottom: -8%; }
.blog-card--featured .blog-card__body { justify-content: center; gap: 14px; padding: clamp(28px, 4vw, 52px); }
.blog-page .blog-card--featured .blog-card__title { font-size: clamp(1.55rem, 2.7vw, 2.25rem); font-weight: 800; line-height: 1.14; letter-spacing: -0.03em; }
.blog-page .blog-card--featured .blog-card__desc { font-size: 1.05rem; -webkit-line-clamp: 4; }
.blog-card--featured .blog-card__meta { margin-top: 8px; }

/* Empty states */
.blog-empty, .blog-none {
    display: grid; justify-items: center; gap: 10px; padding: clamp(36px, 6vw, 64px) 20px; text-align: center;
    border: 1px dashed #dccdee; border-radius: 28px; background: var(--blog-empty-bg, #faf7fd);
}
.blog-none { grid-column: 1 / -1; }
.blog-empty[hidden] { display: none; }
.blog-empty__icon {
    width: 56px; height: 56px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center;
    background: #ffffff; color: var(--b-accent); font-size: 1.15rem; box-shadow: 0 8px 20px rgba(43, 23, 66, 0.08);
}
.blog-page .blog-empty__title { color: var(--b-ink); font-size: 1.2rem; font-weight: 750; }
.blog-page .blog-empty p:not(.blog-empty__title), .blog-page .blog-none p:not(.blog-empty__title) { max-width: 48ch; color: var(--b-muted); font-size: 1rem; }
.blog-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.blog-index:has(.blog-none) .blog-search, .blog-index:has(.blog-none) .blog-topics, .blog-index:has(.blog-none) .blog-status { display: none; }
.blog-index:has(.blog-none) .blog-list { margin-top: clamp(32px, 4vw, 48px); }
.blog-index .blog-cta { margin-top: clamp(48px, 7vw, 88px); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 641px) {
    .post-body th { white-space: nowrap; }
}
@media (max-width: 760px) {
    .post-cover img { border-radius: 10px; }
    .blog-grid { grid-template-columns: minmax(0, 1fr); }
    .blog-card--featured { display: flex; }
    .blog-card--featured .blog-art { aspect-ratio: 16 / 10; min-height: 0; }
    .blog-cta { grid-template-columns: minmax(0, 1fr); border-radius: 22px; }
    .blog-cta__actions .blog-btn { flex: 1 1 auto; }
    .blog-card__go { flex-basis: 100%; margin-left: 0; }
}
@media (max-width: 640px) {
    .blog-chips {
        flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
        margin: 0 calc(var(--b-gutter) * -1); padding: 4px var(--b-gutter); scroll-padding-inline: var(--b-gutter);
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%);
        mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%);
    }
    .blog-chips::-webkit-scrollbar { display: none; }
    .blog-chips > li { flex: 0 0 auto; scroll-snap-align: start; }
    .blog-search input { height: 54px; }
    .post-hero, .post-layout { font-size: 1.0625rem; }
    .post-byline { gap: 12px; font-size: 0.92rem; }
    .post-byline__author { flex-basis: 100%; }
    .post-byline__meta > span + span::before { margin: 0 10px; }
    .post-byline__meta .blog-tag { margin-left: 12px; }
    .post-quick, .post-faq { border-radius: 18px; }
    .post-figure img, .post-figure--video video, .post-body .post-gallery__slide img { border-radius: 12px; }
    .post-gallery__controls { gap: 6px; }
    .post-gallery__nav { width: 36px; height: 36px; }
    .post-gallery__count { padding: 3px 8px; font-size: 0.75rem; }
    .post-gallery__thumb { width: 52px; height: 52px; border-radius: 10px; }
    .post-body blockquote { padding-left: 16px; font-size: 1.12rem; }
    .post-callout { padding: 14px 16px 14px 48px; }
    .post-callout::before { left: 15px; top: 16px; width: 20px; height: 20px; }
    .post-body th, .post-body td { padding: 11px 12px; }
    .blog-page .faq-item > summary { gap: 14px; padding: 16px 2px; }
    .blog-page .faq-item h3 { font-size: 1rem; }
    .blog-page .faq-item > summary::after { flex-basis: 30px; width: 30px; height: 30px; }
    .blog-page .faq-answer { padding: 0 2px 18px; }
    .blog-card__body { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    .blog-page *, .blog-page *::before, .blog-page *::after { transition: none !important; animation: none !important; }
    .blog-progress span { transition: none; }
}
@media print {
    .blog-progress, .post-toc, .post-top, .post-related, .blog-cta, .post-gallery__controls { display: none !important; }
    .post-gallery__slides { display: block; overflow: visible; }
    .post-gallery__slide + .post-gallery__slide { margin-top: 1em; }
}
