/*
 * blog.css
 * Blog index, archives and single posts (home.php, archive.php, single.php).
 *
 * Scoped with .blog-page on <main>. Enqueued after the Tailwind CDN reset, so
 * article typography is declared explicitly under .blog-content.
 * Reuses from style.css: design tokens, .page-hero, .cta-banner, .btn
 */

.blog-page,
.blog-popup {
    /* Tailwind's reset makes <body> inherit the system font; restore the site's. */
    font-family: var(--font-body);
}

.blog-page {
    --blog-accent: #7a94ff;
    --blog-accent-soft: rgba(122, 148, 255, 0.12);
    --blog-card-border: rgba(0, 0, 0, 0.08);
    --blog-card-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    --blog-header-offset: 110px;
    /* style.css's subtle grey is 4.3:1 on the page background; darken it here. */
    --color-text-subtle: #5f5f6e;
    background-color: var(--color-bg);
}

/* style.css renders <em> as a dark highlight chip; inside the blog it is plain emphasis. */
.blog-page em {
    padding: 0;
    border-radius: 0;
    background: none;
    color: inherit;
    font-style: italic;
}

/* Same 1280px column as the site header and .container, with a safe gutter. */
.blog-container {
    width: min(var(--page-width), calc(100% - 48px));
    margin-inline: auto;
}

/* Title and intro run the full container width; the featured image is only
   used on listing cards and in social previews. */
.blog-article__intro {
    min-width: 0;
    overflow-wrap: anywhere;
}

.blog-article__intro .page-hero__subtext {
    max-width: none;
}

/* .page-hero__subtext centres itself for the centred page hero; here it sits left. */
.blog-hero__copy .page-hero__subtext,
.blog-article__intro .page-hero__subtext {
    margin-inline: 0;
}

/* Article titles run long; step the page-hero size down for them. */
.blog-article__intro .page-hero__heading {
    font-size: clamp(32px, 3.6vw, 48px);
    line-height: 1.15;
    letter-spacing: -1px;
}

.blog-page a:focus-visible,
.blog-page button:focus-visible {
    outline: 2px solid var(--color-dark);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* ====================================================================
   SHARED: chips, meta
   ==================================================================== */

.blog-chip {
    display: inline-flex;
    align-items: center;
    padding: 9px 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    background: var(--color-white);
    font-family: var(--font-heading);
    font-size: var(--fs-sm);
    line-height: 1;
    color: var(--color-text-muted);
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.blog-chip:hover,
.blog-chip.is-active {
    background: var(--color-dark);
    border-color: var(--color-dark);
    color: var(--color-white);
}

.blog-chip--sm {
    align-self: flex-start;
    padding: 6px 12px;
    border-color: transparent;
    background: var(--blog-accent-soft);
    font-size: var(--fs-xs);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #3d55c4;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: var(--fs-sm);
    color: var(--color-text-subtle);
}

/* ====================================================================
   LISTING (index + archives)
   ==================================================================== */

.blog-hero {
    position: relative;
    padding-top: 150px;
    background-color: var(--color-bg);
}

/* The glow clips itself so the search results panel can hang below the hero. */
.blog-hero__glow {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(760px 480px at 12% 18%, rgba(184, 171, 255, 0.38) 0%, transparent 70%),
        radial-gradient(640px 420px at 88% 30%, rgba(112, 177, 241, 0.26) 0%, transparent 70%),
        radial-gradient(520px 360px at 55% 95%, rgba(255, 185, 130, 0.2) 0%, transparent 70%);
}

/* Faint grid that fades out towards the edges. */
.blog-hero__glow::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(17, 17, 17, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(17, 17, 17, 0.05) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
}

.blog-hero__inner {
    position: relative;
    z-index: 2; /* above the ticker so the search panel can overlap it */
    padding-bottom: var(--sp-3xl);
}

.blog-hero--split .blog-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
    gap: 72px;
    align-items: center;
}

.blog-hero__copy {
    max-width: 640px;
    overflow-wrap: anywhere;
}

.blog-hero__accent {
    display: block;
    background: linear-gradient(90deg, #5b6cff 0%, #9b7bff 45%, #ff8a5c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #5b6cff;
}

.blog-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: var(--sp-xl);
}

.blog-hero__feature-label {
    margin-bottom: 12px;
    font-family: var(--font-heading);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-text-subtle);
}

.blog-hero__feature .blog-card {
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 24px 60px -24px rgba(44, 20, 72, 0.35), var(--shadow-sm);
}

/* -- 22-language ticker -- */
.blog-ticker {
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(17, 17, 17, 0.08);
    background: rgba(255, 255, 255, 0.55);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.blog-ticker__inner {
    display: flex;
    align-items: center;
    gap: var(--sp-xl);
    min-height: 68px;
}

.blog-ticker__label {
    flex-shrink: 0;
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}

.blog-ticker__label strong {
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    color: var(--color-dark);
}

.blog-ticker__track {
    display: flex;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.blog-ticker__list {
    display: flex;
    flex-shrink: 0;
    gap: 40px;
    padding-right: 40px;
    list-style: none;
    animation: blog-ticker 60s linear infinite;
}

.blog-ticker__list li {
    display: flex;
    align-items: center;
    gap: 40px;
    font-size: var(--fs-lg);
    white-space: nowrap;
    color: rgba(17, 17, 17, 0.72);
}

.blog-ticker__list li::after {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--blog-accent);
}

.blog-ticker__track:hover .blog-ticker__list {
    animation-play-state: paused;
}

@keyframes blog-ticker {
    to { transform: translateX(-100%); }
}

/* -- Grid section -- */
.blog-listing {
    padding: var(--sp-3xl) 0 var(--sp-5xl);
}

.blog-listing__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--sp-md);
    margin-bottom: var(--sp-xl);
}

.blog-listing__tools {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: flex-end;
    gap: var(--sp-md) var(--sp-lg);
}

/* Relevance / newest toggle on search results. */
.blog-sort {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}

.blog-sort__label {
    margin-right: 6px;
}

/* Matched search words in titles, excerpts and live results. */
.blog-mark {
    padding: 0 2px;
    border-radius: 3px;
    background: rgba(122, 148, 255, 0.28);
    color: inherit;
}

.blog-listing__heading,
.blog-related__heading {
    font-size: clamp(26px, 2.6vw, 34px);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.blog-related__heading {
    margin-bottom: var(--sp-xl);
}

.blog-listing__count {
    font-size: var(--fs-sm);
    color: var(--color-text-subtle);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--color-white);
    border: 1px solid var(--blog-card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--blog-card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.blog-card__media {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e9e9f5;
}

.blog-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card__placeholder {
    display: flex;
    align-items: flex-end;
    width: 100%;
    height: 100%;
    padding: 20px;
    background:
        radial-gradient(420px 260px at 20% 20%, rgba(184, 171, 255, 0.55) 0%, transparent 70%),
        radial-gradient(380px 240px at 85% 80%, rgba(112, 177, 241, 0.45) 0%, transparent 70%),
        radial-gradient(300px 200px at 60% 30%, rgba(255, 185, 130, 0.3) 0%, transparent 70%),
        #f1f0fa;
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    color: rgba(17, 17, 17, 0.55);
}

.blog-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
}

.blog-card__title {
    /* Two lines, always reserved, so every card in a row lines up. */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    min-height: calc(2em * 1.3);
    overflow-wrap: anywhere;
    font-size: var(--fs-lg);
    font-weight: var(--fw-semibold);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.blog-card__title a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.blog-card__excerpt {
    /* Three lines, always reserved; the meta row stays pinned below. */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    min-height: calc(3em * 1.6);
    margin-bottom: auto;
    overflow-wrap: anywhere;
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text-muted);
}

.blog-card--featured .blog-card__media {
    aspect-ratio: 16 / 9;
}

.blog-card--featured .blog-card__body {
    gap: 14px;
    padding: 28px;
}

.blog-card--featured .blog-card__title {
    min-height: calc(2em * 1.22);
    font-size: clamp(22px, 2.2vw, 28px);
    line-height: 1.22;
}

.blog-card--featured .blog-card__excerpt {
    -webkit-line-clamp: 2;
    line-clamp: 2;
    min-height: calc(2em * 1.6);
    font-size: var(--fs-base);
}

.blog-pagination {
    margin-top: var(--sp-2xl);
}

.blog-pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.blog-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    background: var(--color-white);
    font-family: var(--font-heading);
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}

.blog-pagination a.page-numbers:hover,
.blog-pagination .page-numbers.current {
    background: var(--color-dark);
    border-color: var(--color-dark);
    color: var(--color-white);
}

.blog-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: var(--sp-3xl) var(--sp-lg);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-white);
    text-align: center;
    color: var(--color-text-muted);
}

.blog-empty__title {
    font-size: var(--fs-xl);
}

/* ====================================================================
   SINGLE: progress, header
   ==================================================================== */

.blog-progress {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 103;
    height: 3px;
    pointer-events: none;
}

.blog-progress__bar {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #b8abff, var(--blog-accent));
    transform: scaleX(0);
    transform-origin: left;
}

.blog-article__header {
    position: relative;
    overflow: hidden;
    margin-bottom: var(--sp-xl);
    padding: 150px 0 var(--sp-2xl);
}

.blog-article__header > .blog-container {
    position: relative;
    z-index: 1;
}

/* Same glow as the index hero, minus the warm bottom spot the header would cut off. */
.blog-article__header .blog-hero__glow {
    background:
        radial-gradient(760px 480px at 12% 10%, rgba(184, 171, 255, 0.38) 0%, transparent 70%),
        radial-gradient(640px 420px at 88% 25%, rgba(112, 177, 241, 0.26) 0%, transparent 70%);
}

.blog-article__header .page-hero__eyebrow {
    display: inline-block;
    color: #3d55c4;
    transition: color 0.15s ease;
}

.blog-article__header .page-hero__eyebrow:hover {
    color: var(--color-dark);
}

.blog-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: var(--sp-lg);
    font-size: var(--fs-sm);
    color: var(--color-text-subtle);
}

.blog-breadcrumb a:hover {
    color: var(--color-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.blog-byline {
    margin-top: var(--sp-xl);
}


/* ====================================================================
   SINGLE: layout + table of contents
   ==================================================================== */

/* TOC on the left, article on the right. */
.blog-article__layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 60px;
    align-items: start;
    padding-bottom: var(--sp-3xl);
}

/* No TOC: the article keeps the container's left edge, like every other post. */
.blog-article__layout--no-toc {
    grid-template-columns: minmax(0, 1fr);
}

.blog-article__main {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
}

.blog-article__layout--no-toc .blog-article__main {
    grid-column: 1;
}

.blog-toc {
    position: sticky;
    top: var(--blog-header-offset);
    grid-column: 1;
    grid-row: 1;
    padding: var(--sp-lg);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.blog-toc__toggle:disabled {
    opacity: 1;
}

.blog-toc__percent {
    margin-left: auto;
    margin-right: 8px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
    color: var(--blog-accent);
}

.blog-toc__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-family: var(--font-heading);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-text-subtle);
    cursor: default;
}

.blog-toc__chevron {
    display: none;
    transition: transform 0.2s ease;
}

.blog-toc__body {
    max-height: calc(100vh - var(--blog-header-offset) - 110px);
    margin-top: var(--sp-md);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.blog-toc__list,
.blog-toc__sublist {
    display: flex;
    flex-direction: column;
    gap: 2px;
    list-style: none;
}

.blog-toc__sublist {
    margin: 2px 0 4px 12px;
}

.blog-toc__link {
    display: block;
    padding: 7px 12px;
    border-left: 2px solid transparent;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-size: var(--fs-sm);
    line-height: 1.4;
    color: var(--color-text-muted);
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.blog-toc__sublist .blog-toc__link {
    font-size: 13px;
    color: var(--color-text-subtle);
}

.blog-toc__link:hover {
    background: var(--color-bg);
    color: var(--color-dark);
}

.blog-toc__link.is-active {
    border-left-color: var(--blog-accent);
    background: var(--blog-accent-soft);
    color: var(--color-dark);
}

/* ====================================================================
   SINGLE: article typography (explicit — Tailwind resets the defaults)
   ==================================================================== */

.blog-content {
    font-size: 18px;
    line-height: 1.75;
    color: #2b2b2b;
    overflow-wrap: break-word;
}

.blog-content > * + * {
    margin-top: 1.4em;
}

.blog-content h2,
.blog-content h3,
.blog-content h4 {
    scroll-margin-top: var(--blog-header-offset);
    font-weight: var(--fw-semibold);
    letter-spacing: -0.01em;
    color: var(--color-dark);
}

.blog-content h2 {
    margin-top: 2.2em;
    font-size: clamp(24px, 3vw, 30px);
    line-height: 1.25;
}

.blog-content h3 {
    margin-top: 1.8em;
    font-size: clamp(20px, 2.4vw, 23px);
    line-height: 1.3;
}

.blog-content h4 {
    margin-top: 1.6em;
    font-size: var(--fs-md);
}

.blog-content h2 + *,
.blog-content h3 + *,
.blog-content h4 + * {
    margin-top: 0.7em;
}

.blog-content a {
    color: #3d55c4;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.blog-content a:hover {
    color: var(--color-dark);
}

.blog-content strong {
    font-weight: var(--fw-semibold);
    color: var(--color-dark);
}

.blog-content ul,
.blog-content ol {
    padding-left: 1.4em;
}

.blog-content ul {
    list-style: disc;
}

.blog-content ol {
    list-style: decimal;
}

.blog-content li + li,
.blog-content li > ul,
.blog-content li > ol {
    margin-top: 0.5em;
}

.blog-content li::marker {
    color: var(--blog-accent);
}

.blog-content blockquote {
    padding: 20px 24px;
    border-left: 3px solid var(--blog-accent);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    background: var(--color-white);
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    line-height: 1.5;
    color: var(--color-dark);
}

.blog-content blockquote cite {
    display: block;
    margin-top: 10px;
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-style: normal;
    color: var(--color-text-subtle);
}

.blog-content img,
.blog-content video,
.blog-content iframe {
    max-width: 100%;
    border-radius: var(--radius-lg);
}

.blog-content figcaption {
    margin-top: 10px;
    font-size: var(--fs-sm);
    text-align: center;
    color: var(--color-text-subtle);
}

.blog-content hr {
    margin-block: 2.4em;
    border: 0;
    border-top: 1px solid var(--color-border);
}

.blog-content code {
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: rgba(17, 17, 17, 0.07);
    font-size: 0.88em;
}

.blog-content pre {
    padding: 20px;
    overflow-x: auto;
    border-radius: var(--radius-lg);
    background: var(--color-dark);
    font-size: 15px;
    line-height: 1.6;
    color: #f3f4f1;
}

.blog-content pre code {
    padding: 0;
    background: none;
    font-size: inherit;
}

/* -- Tables: one bordered card, horizontal lines only, scrolls sideways on
   small screens with a shadow hint at the edge that still has content. -- */
.blog-content .wp-block-table,
.blog-content > table {
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(to right, var(--color-white) 30%, rgba(255, 255, 255, 0)) left / 40px 100% no-repeat local,
        linear-gradient(to left, var(--color-white) 30%, rgba(255, 255, 255, 0)) right / 40px 100% no-repeat local,
        linear-gradient(to right, rgba(17, 17, 17, 0.12), rgba(17, 17, 17, 0)) left / 16px 100% no-repeat scroll,
        linear-gradient(to left, rgba(17, 17, 17, 0.12), rgba(17, 17, 17, 0)) right / 16px 100% no-repeat scroll,
        var(--color-white);
    box-shadow: var(--blog-card-shadow);
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.blog-content > table {
    display: block;
}

.blog-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: var(--fs-base);
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
}

/* The editor's "fixed width cells" setting shares the width equally, which
   wastes space on short columns like "#"; size columns by content instead. */
.blog-content table.has-fixed-layout {
    table-layout: auto;
}

/* Wide tables keep readable columns and scroll instead of crushing. */
.blog-content table:has(tr > :nth-child(3)) {
    min-width: 520px;
}

.blog-content table:has(tr > :nth-child(4)) {
    min-width: 640px;
}

.blog-content th,
.blog-content td {
    padding: 14px 18px;
    border: 0;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
    vertical-align: top;
    /* Columns grow to fit whole words (the table scrolls) instead of
       splitting them mid-word as the article body is allowed to. */
    overflow-wrap: normal;
    word-break: normal;
}

.blog-content th {
    background: var(--color-bg);
    font-family: var(--font-body);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.blog-content td:first-child {
    font-weight: var(--fw-semibold);
    color: var(--color-dark);
}

.blog-content tbody tr:last-child td {
    border-bottom: 0;
}

.blog-content tbody tr:hover td {
    background: var(--blog-accent-soft);
}

.blog-content td.has-text-align-center,
.blog-content th.has-text-align-center {
    text-align: center;
}

.blog-content td.has-text-align-right,
.blog-content th.has-text-align-right {
    text-align: right;
}

.blog-content .wp-block-table figcaption {
    padding: 0 18px 14px;
    text-align: left;
}

/* ====================================================================
   SINGLE: core blocks and classic markup inside articles
   Editors can use any core block; these rules bring each one onto the
   theme's tokens (buttons, radii, borders) instead of WordPress defaults.
   ==================================================================== */

/* -- Alignment (block editor and classic editor) -- */
.blog-content::after {
    content: "";
    display: table;
    clear: both;
}

.blog-content h2,
.blog-content h3 {
    clear: both;
}

.blog-content .alignleft {
    float: left;
    max-width: min(50%, 360px);
    margin: 0.35em 1.6em 1em 0;
}

.blog-content .alignright {
    float: right;
    max-width: min(50%, 360px);
    margin: 0.35em 0 1em 1.6em;
}

.blog-content figure.aligncenter,
.blog-content .wp-caption.aligncenter {
    display: table;
    margin-inline: auto;
}

.blog-content img.aligncenter {
    display: block;
    margin-inline: auto;
}

.blog-content .wp-caption {
    max-width: 100%;
}

.blog-content .wp-caption-text {
    margin-top: 10px;
    font-size: var(--fs-sm);
    text-align: center;
    color: var(--color-text-subtle);
}

/* Wide/full alignments stay in the reading column: the TOC sits beside it. */
.blog-content .alignwide,
.blog-content .alignfull {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
}

/* -- Text -- */
.blog-content .has-drop-cap:not(:focus)::first-letter {
    margin: 0.08em 0.12em 0 0;
    font-family: var(--font-heading);
    font-size: 4.2em;
    font-weight: var(--fw-semibold);
    line-height: 0.85;
    color: var(--color-dark);
}

.blog-content h5 {
    margin-top: 1.6em;
    font-size: var(--fs-base);
}

.blog-content h6 {
    margin-top: 1.6em;
    font-size: var(--fs-sm);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-subtle);
}

.blog-content p.has-background,
.blog-content .wp-block-group.has-background,
.blog-content .wp-block-columns.has-background {
    padding: 20px 24px;
    border-radius: var(--radius-lg);
}

.blog-content mark {
    padding: 0 0.15em;
    border-radius: 3px;
}

.blog-content kbd {
    padding: 1px 6px;
    border: 1px solid var(--color-border);
    border-bottom-width: 2px;
    border-radius: var(--radius-sm);
    background: var(--color-white);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.82em;
    color: var(--color-dark);
}

.blog-content abbr[title] {
    text-decoration: underline dotted;
    cursor: help;
}

.blog-content dt {
    font-weight: var(--fw-semibold);
    color: var(--color-dark);
}

.blog-content dd {
    margin: 0.25em 0 0.8em;
    color: var(--color-text-muted);
}

/* -- Quotes -- */
.blog-content .wp-block-quote.is-style-plain {
    padding: 0;
    border: 0;
    background: none;
}

.blog-content .wp-block-quote > * + * {
    margin-top: 0.6em;
}

.blog-content .wp-block-pullquote {
    padding: 36px 0;
    border-top: 2px solid var(--color-dark);
    border-bottom: 2px solid var(--color-dark);
    text-align: center;
}

.blog-content .wp-block-pullquote blockquote {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    font-size: clamp(22px, 3vw, 30px);
    line-height: 1.35;
}

.blog-content .wp-block-pullquote cite {
    margin-top: 14px;
}

/* -- Media -- */
.blog-content video,
.blog-content audio {
    width: 100%;
}

.blog-content video {
    height: auto;
    background: var(--color-dark);
}

.blog-content iframe,
.blog-content embed,
.blog-content object {
    max-width: 100%;
}

/* Video embeds (block or pasted iframe) fill the column at 16:9. */
.blog-content .wp-block-embed.is-type-video iframe,
.blog-content iframe[src*="youtube.com"],
.blog-content iframe[src*="youtube-nocookie.com"],
.blog-content iframe[src*="vimeo.com"],
.blog-content iframe[src*="loom.com"] {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border: 0;
}

.blog-content .wp-block-embed__wrapper {
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.blog-content .wp-block-gallery {
    gap: 12px;
}

.blog-content .wp-block-cover,
.blog-content .wp-block-media-text {
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.blog-content .wp-block-cover img,
.blog-content .wp-block-media-text img {
    border-radius: 0;
}

.blog-content .wp-block-media-text {
    background: var(--color-white);
}

.blog-content .wp-block-columns {
    gap: 24px;
}

/* -- Buttons and file downloads: same pill as the theme's .btn -- */
.blog-content .wp-block-buttons {
    gap: 12px;
}

.blog-content .wp-block-button__link,
.blog-content .wp-block-file__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 26px;
    border: 2px solid var(--color-dark);
    border-radius: var(--radius-full);
    background: var(--color-dark);
    font-family: var(--font-heading);
    font-size: var(--fs-base);
    line-height: 1;
    text-decoration: none;
    color: var(--color-white);
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.blog-content .wp-block-button__link:hover,
.blog-content .wp-block-file__button:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    color: var(--color-white);
}

.blog-content .wp-block-button.has-custom-width .wp-block-button__link {
    width: 100%;
}

.blog-content .is-style-outline > .wp-block-button__link {
    background: transparent;
    color: var(--color-dark);
}

.blog-content .is-style-outline > .wp-block-button__link:hover {
    background: var(--color-dark);
    color: var(--color-white);
}

/* Editor-chosen colours win over the defaults above. */
.blog-content .wp-block-button__link.has-background {
    border-color: transparent;
}

.blog-content .wp-block-file {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    padding: 16px 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-white);
    font-size: var(--fs-base);
}

.blog-content .wp-block-file > a:not(.wp-block-file__button) {
    overflow-wrap: anywhere;
    color: var(--color-dark);
}

.blog-content .wp-block-file__button {
    margin-left: auto;
    padding: 10px 20px;
    font-size: var(--fs-sm);
}

/* -- Tables: one look for default and striped -- */
.blog-content .wp-block-table thead,
.blog-content .wp-block-table tfoot {
    border: 0;
}

.blog-content .wp-block-table.is-style-stripes {
    border-bottom: 0;
}

.blog-content .wp-block-table.is-style-stripes th,
.blog-content .wp-block-table.is-style-stripes td {
    border-color: var(--color-border);
}

.blog-content .wp-block-table.is-style-stripes tbody tr:nth-child(odd) td {
    background: var(--color-bg);
}

.blog-content tfoot td {
    font-weight: var(--fw-semibold);
}

/* -- Preformatted and verse read as text, not code -- */
.blog-content .wp-block-preformatted {
    border: 1px solid var(--color-border);
    background: var(--color-white);
    color: var(--color-dark);
}

.blog-content .wp-block-verse {
    padding: 0 0 0 20px;
    border-left: 2px solid var(--blog-accent);
    border-radius: 0;
    background: none;
    font-family: var(--font-body);
    font-size: inherit;
    font-style: italic;
    color: inherit;
    white-space: pre-wrap;
}

/* -- Details -- */
.blog-content .wp-block-details,
.blog-content details {
    padding: 16px 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-white);
}

.blog-content summary {
    font-family: var(--font-heading);
    font-weight: var(--fw-semibold);
    color: var(--color-dark);
    cursor: pointer;
}

.blog-content details[open] > summary {
    margin-bottom: 10px;
}

/* -- Social links and other lists that are not prose lists -- */
.blog-content ul.wp-block-social-links {
    padding-left: 0;
    list-style: none;
}

.blog-content ul.wp-block-social-links li::marker {
    content: none;
}

@media (max-width: 480px) {
    .blog-content .alignleft,
    .blog-content .alignright {
        float: none;
        max-width: 100%;
        margin: 0 0 1em;
    }

    .blog-content .wp-block-file__button {
        margin-left: 0;
    }
}

/* ====================================================================
   SINGLE: footer, adjacent, related
   ==================================================================== */

.blog-article__footer {
    display: flex;
    flex-direction: column;
    gap: var(--sp-lg);
    margin-top: var(--sp-2xl);
    padding-top: var(--sp-xl);
    border-top: 1px solid var(--color-border);
}

.blog-tags,
.blog-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.blog-tags a,
.blog-share__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    background: var(--color-white);
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.blog-tags a::before {
    content: "#";
}

.blog-tags a:hover,
.blog-share__btn:hover {
    background: var(--color-dark);
    border-color: var(--color-dark);
    color: var(--color-white);
}

.blog-share__label {
    margin-right: 4px;
    font-family: var(--font-heading);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-text-subtle);
}

.blog-adjacent {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding-bottom: var(--sp-3xl);
}

.blog-adjacent__link {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px;
    border: 1px solid var(--blog-card-border);
    border-radius: var(--radius-lg);
    background: var(--color-white);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.blog-adjacent__link:hover {
    border-color: var(--color-dark);
    box-shadow: var(--blog-card-shadow);
}

.blog-adjacent__link--next {
    align-items: flex-end;
    text-align: right;
}

.blog-adjacent__dir {
    font-size: var(--fs-sm);
    color: var(--color-text-subtle);
}

.blog-adjacent__title {
    font-family: var(--font-heading);
    font-size: var(--fs-md);
    font-weight: var(--fw-semibold);
    line-height: 1.35;
    color: var(--color-dark);
}

.blog-related {
    padding: var(--sp-3xl) 0 var(--sp-4xl);
    border-top: 1px solid var(--color-border);
}

/* The site's .cta-banner, boxed to the article column. */
.blog-article__cta {
    position: relative;
    margin-top: 40px;
    padding: var(--sp-xl);
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.blog-article__cta .cta-banner__inner {
    flex-wrap: wrap;
}


/* ====================================================================
   SINGLE: "In short" AI summary above the article
   ==================================================================== */

.blog-summary {
    margin-bottom: var(--sp-xl);
    padding: var(--sp-lg) var(--sp-xl);
    border: 1px solid var(--blog-card-border);
    border-left: 3px solid var(--blog-accent);
    border-radius: var(--radius-lg);
    background: var(--color-white);
    box-shadow: var(--blog-card-shadow);
}

.blog-summary__label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-dark);
}

.blog-summary__label svg {
    color: var(--blog-accent);
}

.blog-summary__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: var(--sp-md);
    padding-left: 22px;
    list-style: disc;
    font-size: var(--fs-md);
    line-height: var(--lh-relaxed);
    color: var(--color-text);
}

.blog-summary__list li::marker {
    color: var(--blog-accent);
}

.blog-summary__note {
    margin-top: var(--sp-md);
    font-size: var(--fs-xs);
    color: var(--color-text-subtle);
}

@media (max-width: 767px) {
    .blog-summary {
        padding: var(--sp-md) var(--sp-lg);
    }
}

/* ====================================================================
   SINGLE: per-post FAQs (site .faq accordion, boxed to the article column)
   ==================================================================== */

.blog-faq {
    margin-top: 40px;
    padding: var(--sp-xl) 0 0;
    border-top: 1px solid var(--color-border);
}

.blog-faq__heading {
    margin-bottom: var(--sp-lg);
    font-size: var(--fs-2xl);
    text-align: left;
}

/* Answers written in the editor run longer than the pricing one-liners. */
.blog-faq .faq__item--open .faq__answer {
    max-height: 1200px;
}

.blog-faq .faq__answer p {
    font-size: var(--fs-base);
}

.blog-faq .faq__answer p + p {
    margin-top: -8px;
}

.blog-faq .faq__answer a {
    color: var(--color-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* style.css forces .faq padding and heading size with !important below 768px
   (for the pricing page); the article FAQ needs its own compact values. */
@media (max-width: 768px) {
    .blog-faq {
        padding: var(--sp-lg) 0 0 !important;
    }

    .blog-faq__heading {
        margin-bottom: var(--sp-md) !important;
        font-size: var(--fs-xl) !important;
    }
}

/* ====================================================================
   SINGLE: read-80% popup (native <dialog>, opened by blog.js)
   ==================================================================== */

.blog-popup {
    /* style.css's global reset zeroes margins, which would pin the dialog top-left. */
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(520px, calc(100% - 32px));
    padding: 0;
    border: 0;
    border-radius: var(--radius-xl);
    background: var(--color-white);
    color: var(--color-text);
    box-shadow: 0 40px 90px -30px rgba(17, 17, 17, 0.45);
}

.blog-popup::backdrop {
    background: rgba(17, 17, 17, 0.55);
    backdrop-filter: blur(3px);
}

.blog-popup[open] {
    animation: blogPopupIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes blogPopupIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.blog-popup__inner {
    position: relative;
    padding: var(--sp-2xl) var(--sp-xl) var(--sp-xl);
    text-align: center;
}

.blog-popup__close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-white);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.blog-popup__close:hover {
    background: var(--color-dark);
    border-color: var(--color-dark);
    color: var(--color-white);
}

.blog-popup__title {
    margin-top: var(--sp-sm);
    font-family: var(--font-heading);
    font-size: clamp(24px, 3vw, 32px);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-snug);
    letter-spacing: -0.5px;
    color: var(--color-dark);
}

.blog-popup__text {
    margin-top: var(--sp-md);
    font-size: var(--fs-md);
    line-height: var(--lh-relaxed);
    color: var(--color-text-muted);
}

.blog-popup__actions {
    display: flex;
    flex-direction: column;
    gap: var(--sp-sm);
    margin-top: var(--sp-lg);
}

.blog-popup__actions .btn {
    width: 100%;
    min-width: 0;
}

/* ====================================================================
   RESPONSIVE
   ==================================================================== */

@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }


    .blog-article__layout {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--sp-xl);
    }

    .blog-article__main,
    .blog-toc {
        grid-column: 1;
        grid-row: auto;
    }

    /* TOC becomes a collapsible card above the article. */
    .blog-toc {
        position: static;
        padding: 0;
    }

    .blog-toc__toggle {
        min-height: 52px;
        padding: 0 20px;
        cursor: pointer;
    }

    .blog-toc__chevron {
        display: block;
    }

    .blog-toc__toggle[aria-expanded="true"] .blog-toc__chevron {
        transform: rotate(180deg);
    }

    .blog-toc__body {
        max-height: 50vh;
        margin: 0;
        padding: 0 12px 16px;
    }

    .blog-toc__toggle[aria-expanded="false"] + .blog-toc__body {
        display: none;
    }
}

@media (max-width: 900px) {
    .blog-hero--split .blog-hero__inner {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--sp-2xl);
    }

    .blog-hero__feature {
        max-width: 640px;
    }
}

@media (max-width: 1024px) and (min-width: 901px) {
    .blog-hero--split .blog-hero__inner {
        gap: var(--sp-2xl);
    }
}

@media (max-width: 767px) {
    .blog-byline {
        margin-top: var(--sp-lg);
    }

    .blog-container {
        width: calc(100% - 32px);
    }

    .blog-hero {
        padding-top: 120px;
    }

    /* Tighter vertical rhythm on phones: one 32px step between sections. */
    .blog-article__header {
        margin-bottom: var(--sp-lg);
        padding: 104px 0 var(--sp-lg);
    }

    .blog-article__layout {
        gap: var(--sp-lg);
        padding-bottom: var(--sp-2xl);
    }

    .blog-summary {
        margin-bottom: var(--sp-lg);
    }

    .blog-content {
        font-size: 17px;
        line-height: 1.7;
    }

    .blog-content th,
    .blog-content td {
        padding: 12px 14px;
    }

    .blog-article__footer,
    .blog-faq,
    .blog-article__cta {
        margin-top: var(--sp-xl);
    }


    .blog-article__intro .page-hero__subtext {
        font-size: 17px;
    }

    .blog-summary__list {
        gap: 8px;
        font-size: var(--fs-base);
    }

    .blog-listing__heading,
    .blog-related__heading {
        font-size: var(--fs-xl);
    }

    .blog-related__heading {
        margin-bottom: var(--sp-lg);
    }

    .blog-adjacent__title {
        font-size: var(--fs-base);
    }

    .blog-article__cta .cta-banner__heading {
        font-size: 26px;
    }

    .blog-article__cta {
        padding: var(--sp-lg);
    }

    .blog-adjacent {
        gap: 12px;
        padding-bottom: var(--sp-2xl);
    }

    .blog-adjacent__link--next {
        align-items: flex-start;
        text-align: left;
    }

    .blog-related {
        padding: var(--sp-2xl) 0 var(--sp-3xl);
    }

    .blog-hero__inner {
        padding-bottom: var(--sp-2xl);
    }


    .blog-ticker__inner {
        min-height: 56px;
    }

    .blog-ticker__label {
        display: none;
    }

    .blog-ticker__list li {
        font-size: var(--fs-md);
    }

    .blog-grid,
    .blog-adjacent {
        grid-template-columns: 1fr;
    }

    .blog-card--featured .blog-card__body {
        padding: 24px;
    }

    .blog-filter {
        flex-wrap: nowrap;
        justify-content: flex-start;
        margin-inline: -16px;
        padding: 0 16px 4px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .blog-chip {
        flex-shrink: 0;
    }

    .blog-content {
        font-size: 17px;
    }

    .blog-adjacent__link--next {
        align-items: flex-start;
        text-align: left;
    }
}

/* ====================================================================
   SEARCH: hero search box + live results panel
   ==================================================================== */

.blog-search {
    position: relative;
    z-index: 5; /* above the featured card and ticker so the panel can overlap them */
    max-width: 560px;
    margin-top: var(--sp-lg);
}

.blog-search__field {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 54px;
    padding: 0 6px 0 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.blog-search__field:focus-within {
    border-color: var(--color-dark);
    box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.06);
}

.blog-search__icon {
    flex: none;
    color: var(--color-text-subtle);
}

.blog-search.is-loading .blog-search__icon {
    animation: blog-search-pulse 0.9s ease-in-out infinite;
}

@keyframes blog-search-pulse {
    50% { opacity: 0.35; }
}

.blog-search__input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    font-family: var(--font-body);
    font-size: var(--fs-base);
    color: var(--color-text);
    outline: none;
}

.blog-search__input::placeholder {
    color: var(--color-text-light);
}

.blog-search__input::-webkit-search-cancel-button,
.blog-search__input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}

.blog-search__clear {
    display: none;
    flex: none;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--color-text-subtle);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.blog-search.is-filled .blog-search__clear {
    display: inline-flex;
}

.blog-search__clear:hover {
    background: var(--color-bg);
    color: var(--color-dark);
}

.blog-search__submit {
    flex: none;
    min-width: 0;
}

.blog-search__panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: min(520px, 70vh);
    overflow-y: auto;
    padding: 8px;
    border: 1px solid var(--blog-card-border);
    border-radius: var(--radius-lg);
    background: var(--color-white);
    box-shadow: var(--shadow-lg);
}

.blog-search__panel[hidden] {
    display: none;
}

.blog-search__option {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: background 0.12s ease;
}

.blog-search__option:hover,
.blog-search__option.is-active {
    background: var(--blog-accent-soft);
}

.blog-search__option-title {
    font-family: var(--font-heading);
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    line-height: 1.3;
    color: var(--color-dark);
}

.blog-search__option-snippet {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: var(--fs-sm);
    line-height: 1.5;
    color: var(--color-text-muted);
}

.blog-search__option-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: var(--fs-xs);
    color: var(--color-text-subtle);
}

.blog-search__status {
    padding: 14px;
    font-size: var(--fs-sm);
    line-height: 1.5;
    color: var(--color-text-muted);
}

.blog-search__status a {
    color: var(--color-dark);
    text-decoration: underline;
}

.blog-search__all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    padding: 12px 14px;
    border-top: 1px solid var(--color-border);
    font-family: var(--font-heading);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    text-decoration: none;
    color: var(--color-dark);
}

.blog-search__all:hover {
    text-decoration: underline;
}

.blog-search__hint {
    font-family: var(--font-body);
    font-weight: var(--fw-regular);
    color: var(--color-text-subtle);
}

@media (max-width: 640px) {
    .blog-search__field {
        height: 50px;
        padding-left: 14px;
    }


    .blog-listing__tools {
        justify-content: flex-start;
    }
}

/* ====================================================================
   404
   ==================================================================== */

/* style.css lays out body.error404 main as a centred flex box for its old
   inline 404; this template is a normal full-width page. */
body.error404 main.blog-404 {
    display: block;
    min-height: 0;
    padding: 0;
    align-items: stretch;
    justify-content: flex-start;
    text-align: left;
}

.blog-404__art {
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-404__code {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(120px, 18vw, 260px);
    font-weight: var(--fw-bold);
    line-height: 0.9;
    letter-spacing: -0.04em;
    user-select: none;
}

@media (max-width: 900px) {
    .blog-404__art {
        justify-content: flex-start;
    }

    .blog-404__code {
        font-size: clamp(96px, 24vw, 160px);
    }
}

/* ── Load / scroll reveal ───────────────────────────────────────────
   Reuses .reveal / .reveal-group from style.css (observer in custom.js):
   what is in view fades up on load, the rest as it scrolls in.
   Cards keep their own hover transition, so their entrance is a keyframe
   animation rather than the shared transition; backwards fill means the
   hover transform is free again once the entrance has played. */
.blog-card.reveal {
    opacity: 0;
}

.blog-card.reveal.is-visible {
    opacity: 1;
    animation: blogCardIn 480ms cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

@keyframes blogCardIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger grid cards by column and let the hero feature follow the copy. */
.blog-grid > .blog-card.reveal:nth-child(3n + 2).is-visible {
    animation-delay: 80ms;
}

.blog-grid > .blog-card.reveal:nth-child(3n).is-visible {
    animation-delay: 160ms;
}

.blog-hero__feature > .blog-card.reveal.is-visible {
    animation-delay: 200ms;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .blog-ticker__list {
        animation: none;
    }

    .blog-ticker__track {
        overflow-x: auto;
    }

    .blog-card,
    .blog-toc__chevron {
        transition: none;
    }

    .blog-card:hover {
        transform: none;
    }

    .blog-popup[open] {
        animation: none;
    }
}
