/* ============================================================
   Blog — list (blog.html) & detail (blog-post.html)
   Layout matches reference: hero + stats + search + 2-col main
   Reuses :root tokens (--primary red, --surface, --border, --shadow, --radius)
   ============================================================ */

/* ---- Page background (clean white) ---- */
.blog-page {
    background-color: #ffffff;
    min-height: 100vh;
    position: relative;
    z-index: 0;
}
/* The global `body::before` blueprint-grid pseudo-element (style.css)
   is a fixed positioned child of body with z-index 0. Inside body's own
   stacking context it paints AFTER static children, so the grid lines
   end up drawing on top of .bp-wrap / .bp-card / .bp-toc-cta etc.
   Solution: hide it on blog pages — the clean white look is the design. */
body.blog-page::before { display: none !important; }
/* Blog navbar intentionally reuses the SAME solid-white bar as every
   other page (base .navbar / .navbar.scrolled / .navbar.nav-hidden in
   style.css). Do NOT override it to transparent/frosted — that lets the
   article content show through the bar and breaks the scroll-animation
   consistency across the site. The .bp-wrap / .blog-hero already carry
   120–130px top padding, so a solid bar never hides content. */

/* ============================================================
   HERO (2-col: text left, illustration right)
   ============================================================ */
.blog-hero {
    padding: 120px 0 24px;
    position: relative;
}
.blog-hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 48px;
    align-items: center;
}
.blog-eyebrow {
    display: inline-block;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 14px;
}
.blog-hero-text h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(40px, 5vw, 60px);
    font-weight: 700; line-height: 1.05;
    color: var(--text);
    margin-bottom: 18px;
    letter-spacing: -0.025em;
}
.blog-hero-text h1 .highlight { color: var(--primary); }
.blog-hero-text p {
    color: #4a4540;
    font-size: 17px; line-height: 1.6;
    max-width: 540px;
}
.blog-hero-visual {
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.blog-hero-visual img {
    width: 100%; max-width: 480px;
    height: auto;
    /* No white card frame / drop-shadow — the composition carries its own look */
    animation: hero-float 6s ease-in-out infinite;
}
@keyframes hero-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ============================================================
   STATS (4 cards — embedded inside the hero text column)
   The old full-width .blog-stats section is gone; the grid now
   lives directly below the subtitle in .blog-hero-text.
   ============================================================ */
.blog-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
/* Inline version (inside hero text) */
.blog-stats-inline {
    margin-top: 22px;
}
.blog-stat {
    background: #ffffff;
    border: 1px solid rgba(198, 95, 60, 0.14);
    border-radius: 12px;
    padding: 12px 12px;
    box-shadow: 0 1px 0 rgba(198, 95, 60, 0.04), 0 4px 12px -10px rgba(115, 50, 30, 0.14);
    display: flex; flex-direction: column; gap: 6px;
    transition: transform 0.3s var(--ease-out-quart), box-shadow 0.3s var(--ease-out-quart);
}
.blog-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 0 rgba(198, 95, 60, 0.05), 0 10px 22px -14px rgba(115, 50, 30, 0.2);
}
.blog-stat-icon {
    width: 30px; height: 30px;
    border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    background: color-mix(in oklch, var(--c, var(--primary)) 14%, #fff);
}
.blog-stat-icon svg { width: 16px; height: 16px; color: var(--c, var(--primary)); }
.blog-stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 24px; font-weight: 700; line-height: 1;
    color: var(--text);
}
.blog-stat-label {
    font-size: 11.5px;
    color: var(--text-light);
    font-weight: 500;
}
.blog-stat-text { display: contents; }
.blog-stat-arrow {
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--c, var(--primary));
}
.blog-stat-arrow svg { width: 18px; height: 18px; }
.blog-hero-divider { display: none; }
/* Per-card color tokens */
.blog-stat.bs-red    { --c: var(--primary); }
.blog-stat.bs-blue   { --c: oklch(62% 0.14 250); }
.blog-stat.bs-amber  { --c: var(--accent-dark); }
.blog-stat.bs-green  { --c: oklch(64% 0.13 150); }

/* ============================================================
   SEARCH + POPULAR TOPICS row
   ============================================================ */
.blog-searchbar { padding: 4px 0 32px; }
.blog-searchbar-inner {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 28px;
    align-items: center;
}
.blog-search {
    display: flex; align-items: stretch;
    background: #ffffff;
    border: 1px solid rgba(198, 95, 60, 0.18);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 14px -10px rgba(115, 50, 30, 0.2);
}
.blog-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in oklch, var(--primary) 18%, transparent); }
.blog-search input {
    flex: 1; min-width: 0;
    border: 0; outline: 0;
    padding: 14px 18px;
    font: 400 14.5px/1.4 'Outfit', sans-serif;
    color: var(--text);
    background: transparent;
}
.blog-search input::placeholder { color: var(--text-light); }
.blog-search input:focus { background: transparent; }
.blog-search input:-webkit-autofill,
.blog-search input:-webkit-autofill:hover,
.blog-search input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: var(--text) !important;
    transition: background-color 5000s ease-in-out 0s;
}
.blog-search-btn {
    border: 0; cursor: pointer;
    background: var(--primary);
    color: #ffffff;
    padding: 0 22px;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.blog-search-btn:hover { background: var(--primary-dark); }
.blog-search-btn svg { width: 18px; height: 18px; }
.blog-search-clear {
    border: 0; cursor: pointer; background: transparent;
    color: var(--text-light);
    padding: 0 4px 0 12px;
    display: inline-flex; align-items: center; justify-content: center;
    transition: color 0.15s;
}
.blog-search-clear:hover { color: var(--primary); }
.blog-search-clear svg { width: 16px; height: 16px; }
.blog-search-clear[hidden] { display: none; }
.blog-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.blog-search input::-ms-clear { display: none; width: 0; height: 0; }
.blog-search-mark {
    background: color-mix(in oklch, var(--primary) 28%, transparent);
    color: var(--primary-dark);
    border-radius: 3px;
    padding: 0 3px;
    font-weight: 700;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.blog-popular {
    display: flex; align-items: center; gap: 14px;
    flex-wrap: wrap;
}
.blog-popular-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700; font-size: 13.5px;
    color: var(--text);
}
.blog-popular-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.blog-popular-chip {
    display: inline-flex; align-items: center;
    padding: 8px 15px;
    background: color-mix(in oklch, var(--primary) 8%, #fff);
    border: 1px solid color-mix(in oklch, var(--primary) 16%, #fff);
    border-radius: 999px;
    font-size: 13px; font-weight: 600;
    color: var(--primary-dark);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s var(--ease-out-quart);
}
.blog-popular-chip:hover {
    background: color-mix(in oklch, var(--primary) 14%, #fff);
    border-color: var(--primary);
    color: var(--primary);
}

/* ============================================================
   MAIN 2-column layout
   ============================================================ */
.blog-main { padding: 4px 0 90px; }
.blog-main-grid {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 36px;
    align-items: start;
}

/* ---- Sidebar ---- */
.blog-sidebar { display: flex; flex-direction: column; gap: 20px; }

/* Categories card */
.blog-cats-card {
    background: #ffffff;
    border: 1px solid rgba(198, 95, 60, 0.12);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 2px 0 rgba(198, 95, 60, 0.04), 0 8px 22px -16px rgba(115, 50, 30, 0.16);
}
.blog-cats-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px; font-weight: 700;
    letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--primary);
    margin: 0 0 14px;
}

/* --- 分类列表滚动容器 --- */
/* 真实数据可能多达数十个；>10 项时启用滚动，≤10 自然展示。
   10 × ~42px ≈ 420px（padding 10+10 + 内容 22 + border 1） */
.blog-cats-list-wrap {
    position: relative;
    margin: 0 -4px;          /* 给滚动条留出空间 */
    padding: 0 4px 0 0;
}
.blog-cats-list-wrap > ul {
    list-style: none;
    margin: 0; padding: 0;
    max-height: 420px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(198, 95, 60, 0.28) transparent;
    -webkit-overflow-scrolling: touch;
}
.blog-cats-list-wrap > ul::-webkit-scrollbar { width: 6px; }
.blog-cats-list-wrap > ul::-webkit-scrollbar-track { background: transparent; }
.blog-cats-list-wrap > ul::-webkit-scrollbar-thumb {
    background: rgba(198, 95, 60, 0.28);
    border-radius: 3px;
    border: 1px solid #fff;
}
.blog-cats-list-wrap > ul::-webkit-scrollbar-thumb:hover { background: rgba(198, 95, 60, 0.45); }

/* 顶/底渐变遮罩：可滚动时 + 未贴边时才显示 */
.blog-cats-fade-top,
.blog-cats-fade-bottom {
    position: absolute; left: 0; right: 6px;
    height: 24px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 1;
}
.blog-cats-fade-top {
    top: 0;
    background: linear-gradient(180deg, #fff 10%, rgba(255, 255, 255, 0));
}
.blog-cats-fade-bottom {
    bottom: 0;
    background: linear-gradient(0deg, #fff 10%, rgba(255, 255, 255, 0));
}
.blog-cats-list-wrap.is-scrollable.has-top    .blog-cats-fade-top    { opacity: 1; }
.blog-cats-list-wrap.is-scrollable.has-bottom .blog-cats-fade-bottom { opacity: 1; }

.blog-cats-card ul { list-style: none; margin: 0; padding: 0; }
.blog-cats-card li {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 4px;
    border-bottom: 1px dashed rgba(198, 95, 60, 0.16);
    font-size: 14px;
    transition: padding 0.2s;
}
.blog-cats-card li:last-child { border-bottom: 0; }
.blog-cats-card li a {
    display: flex; align-items: center; gap: 10px;
    color: var(--text); text-decoration: none;
    font-weight: 500;
    flex: 1; min-width: 0;
}
.blog-cats-card li a .ci {
    width: 22px; height: 22px;
    border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center;
    background: color-mix(in oklch, var(--c, var(--primary)) 14%, #fff);
    color: var(--c, var(--primary));
    flex: 0 0 22px;
}
.blog-cats-card li a .ci svg { width: 13px; height: 13px; }
.blog-cats-card li a .cn {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.blog-cats-card li .cc {
    color: var(--text-light); font-size: 13px; font-weight: 600;
    margin-left: 8px;
}
.blog-cats-card li:hover {
    background: color-mix(in oklch, var(--c, var(--primary)) 6%, #fff);
    padding-left: 10px; padding-right: 10px;
    border-radius: 8px;
    border-bottom-color: transparent;
}
.blog-cats-card li.active {
    background: color-mix(in oklch, var(--c, var(--primary)) 10%, #fff);
    border-radius: 8px;
    border-bottom-color: transparent;
    padding-left: 10px; padding-right: 10px;
}
.blog-cats-card li.active .cn { color: var(--c, var(--primary-dark)); font-weight: 700; }

/* Newsletter card */
.blog-newsletter {
    background: #ffffff;
    border: 1px solid rgba(198, 95, 60, 0.12);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 2px 0 rgba(198, 95, 60, 0.04), 0 8px 22px -16px rgba(115, 50, 30, 0.16);
    position: relative;
}
.blog-newsletter::after {
    content: ""; position: absolute;
    right: 14px; bottom: 14px;
    width: 32px; height: 32px;
    background: radial-gradient(circle at center, color-mix(in oklch, var(--primary) 18%, #fff) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.bn-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: color-mix(in oklch, var(--primary) 14%, #fff);
    color: var(--primary);
    margin-bottom: 12px;
}
.bn-icon svg { width: 18px; height: 18px; }
.blog-newsletter h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 17px; font-weight: 700;
    color: var(--text);
    margin: 0 0 6px;
}
.blog-newsletter p {
    font-size: 13px; color: var(--text-light);
    line-height: 1.5;
    margin: 0 0 14px;
}
.bn-form { display: flex; flex-direction: column; gap: 8px; }
.bn-form input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid rgba(198, 95, 60, 0.22);
    border-radius: 10px;
    background: #fffaf6;
    font: 400 13.5px/1.4 'Outfit', sans-serif;
    color: var(--text);
    outline: 0;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.bn-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in oklch, var(--primary) 18%, transparent);
    background: #fff;
}
.bn-form button {
    width: 100%;
    padding: 11px 14px;
    background: var(--primary);
    color: #fff;
    border: 0;
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.bn-form button:hover { background: var(--primary-dark); }
.bn-form button:active { transform: scale(0.98); }

/* ============================================================
   CONTENT (right column) — Featured + Latest
   ============================================================ */
.blog-content { display: flex; flex-direction: column; gap: 32px; min-width: 0; }

/* ============================================================
   FEATURED ARTICLE — two-column: rich-content preview (left) + meta (right)
   The left column renders the first ~3 elements of post.content (h2 / p /
   table / img / figure / ul) inside a card so visitors get a real preview
   of the article body — not just a single hero image.
   ============================================================ */
.blog-featured {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    background: #ffffff;
    border: 1px solid rgba(198, 95, 60, 0.14);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 0 rgba(198, 95, 60, 0.05), 0 14px 30px -14px rgba(115, 50, 30, 0.22);
    transition: transform 0.3s var(--ease-out-quart), box-shadow 0.3s var(--ease-out-quart);
    position: relative;
    isolation: isolate;
}
.blog-featured:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 0 rgba(198, 95, 60, 0.06), 0 22px 40px -14px rgba(115, 50, 30, 0.3);
}

/* Left: featured image (used when the post has a featured_media image).
   - 4:3 frame (matches the source 720x480 thumbnails)
   - soft warm background as a loading fallback
   - object-fit:cover so non-standard ratios still fill the frame
   - hover: gentle zoom to feel like the same teaser as the preview variant */
.blog-featured-image {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--bg-warm);
    border-right: 1px dashed rgba(198, 95, 60, 0.18);
}
.blog-featured-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s var(--ease-out-quart);
}
.blog-featured:hover .blog-featured-image img { transform: scale(1.04); }

/* Left: rich-content preview
   - shows the first 3-4 elements from the post body (h2 / p / table / img / figure)
   - rendered inside a soft warm card that mimics the article's visual style
   - background is a single creamy tone (not per-category gradient) so the
     typography stays the focal point; only the Continue-reading + category
     tag pick up the article's accent color. */
.blog-featured-preview {
    position: relative;
    background: var(--bg-warm);
    padding: 28px 30px 32px;
    display: flex; flex-direction: column;
    min-height: 420px;
    overflow: hidden;
    border-right: 1px dashed rgba(198, 95, 60, 0.18);
}
.blog-featured-preview::before {
    content: "";
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.45;
    pointer-events: none;
}
.blog-featured-preview > * { position: relative; z-index: 1; }
.blog-featured-preview-inner {
    max-height: 380px;
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 78%, transparent 100%);
    /* tiny scrollbar hint (visible only on overflow) */
    scrollbar-width: thin;
    scrollbar-color: rgba(198, 95, 60, 0.3) transparent;
}
.blog-featured-preview-inner > * + * { margin-top: 0.9em; }
.blog-featured-preview-inner h2,
.blog-featured-preview-inner h3 {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text);
    line-height: 1.25;
    margin: 0;
}
.blog-featured-preview-inner h2 { font-size: 20px; font-weight: 700; }
.blog-featured-preview-inner h3 { font-size: 16px; font-weight: 600; }
.blog-featured-preview-inner p {
    font-size: 15px; line-height: 1.65; color: var(--text);
    margin: 0;
}
.blog-featured-preview-inner ul,
.blog-featured-preview-inner ol {
    margin: 0; padding-left: 1.3em;
    font-size: 14px; line-height: 1.7; color: var(--text);
}
.blog-featured-preview-inner li { margin-top: 0.3em; }
.blog-featured-preview-inner figure { margin: 0; }
.blog-featured-preview-inner img {
    width: 100%; height: auto;
    border-radius: 10px;
    border: 1px solid rgba(198, 95, 60, 0.16);
    background: #fff;
    display: block;
}
.blog-featured-preview-inner blockquote {
    border-left: 3px solid var(--primary);
    padding: 4px 0 4px 14px;
    margin: 0;
    color: var(--text-light); font-style: italic; font-size: 14px;
    background: rgba(255, 255, 255, 0.6); border-radius: 0 8px 8px 0;
}
.blog-featured-preview-inner table {
    width: 100%; border-collapse: collapse; font-size: 13px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px; overflow: hidden;
}
.blog-featured-preview-inner th,
.blog-featured-preview-inner td {
    border: 1px solid rgba(198, 95, 60, 0.18);
    padding: 6px 10px; text-align: left;
}
.blog-featured-preview-inner th {
    background: rgba(198, 95, 60, 0.08);
    font-weight: 700; color: var(--text);
}
/* Preview footer link — leads into the full article */
.blog-featured-preview-cta {
    margin-top: 18px;
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 700;
    color: var(--c, var(--primary));
    text-decoration: none;
    align-self: flex-start;
    transition: gap 0.2s;
}
.blog-featured-preview-cta:hover { gap: 10px; }
.blog-featured-preview-cta svg { width: 14px; height: 14px; }

/* Right: meta column */
.blog-featured-aside {
    padding: 36px 36px;
    display: flex; flex-direction: column; justify-content: center; gap: 14px;
    background: #ffffff;
    min-width: 0;
}
.blog-featured-tag {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--c, var(--primary));
}
.blog-featured-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(20px, 2.4vw, 26px);
    font-weight: 700; line-height: 1.25;
    color: var(--text);
    margin: 0;
}
.blog-featured-title a { color: inherit; text-decoration: none; }
.blog-featured-title a:hover { color: var(--primary); }
.blog-featured-desc {
    font-size: 14.5px; line-height: 1.6;
    color: var(--text-light);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
    margin: 0;
}
.blog-featured-meta {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-top: 4px;
    font-size: 13px; color: var(--text-light);
}
.blog-featured-meta .avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: color-mix(in oklch, var(--c, var(--primary)) 18%, #fff);
    color: color-mix(in oklch, var(--c, var(--primary)) 70%, #1f1b16);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
    margin-right: 4px;
    flex: 0 0 28px;
}
.blog-featured-meta .author { color: var(--text); font-weight: 600; }

/* Category tag — sits on its own line below the meta row, picks up
   the article's accent color.  Inherits `--c` from the article card. */
.blog-featured-cat {
    margin-top: 4px;
    display: inline-flex; align-items: center;
    align-self: flex-start;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12.5px; font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--c, var(--primary));
    text-decoration: none;
    transition: opacity 0.2s;
}
.blog-featured-cat:hover { opacity: 0.75; }

/* ---- Latest heading ---- */
.blog-latest-head {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 4px;
}
.blog-latest-head h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px; font-weight: 700;
    letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--primary);
    margin: 0;
}
.blog-view-all-link {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 14px; font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    transition: gap 0.2s;
}
.blog-view-all-link svg { width: 14px; height: 14px; }
.blog-view-all-link:hover { gap: 10px; color: var(--primary-dark); }

/* ---- Latest grid (3x2) ---- */
.blog-latest-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.blog-latest-card {
    background: #ffffff;
    border: 1px solid rgba(198, 95, 60, 0.12);
    border-radius: 14px;
    overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: 0 2px 0 rgba(198, 95, 60, 0.04), 0 8px 22px -16px rgba(115, 50, 30, 0.16);
    transition: transform 0.3s var(--ease-out-quart), box-shadow 0.3s var(--ease-out-quart), border-color 0.3s;
}
.blog-latest-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 0 rgba(198, 95, 60, 0.05), 0 16px 30px -12px rgba(115, 50, 30, 0.24);
    border-color: color-mix(in oklch, var(--primary) 30%, rgba(198, 95, 60, 0.12));
}
.blog-latest-thumb {
    display: block; position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #fae6d8;
}
.blog-latest-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease-out-quart); }
.blog-latest-card:hover .blog-latest-thumb img { transform: scale(1.06); }
.blog-latest-thumb.no-img {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg,
        color-mix(in oklch, var(--c, var(--primary)) 22%, #fbe8d9) 0%,
        color-mix(in oklch, var(--c, var(--primary)) 14%, #fceadd) 100%);
}
.blog-latest-thumb.no-img::before {
    content: "";
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.35) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.55;
    pointer-events: none;
}
.blog-latest-thumb.no-img > * { position: relative; z-index: 1; }
.blog-latest-thumb.no-img .bl-letter {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 38px; font-weight: 700; line-height: 1;
    color: color-mix(in oklch, var(--c, var(--primary)) 70%, white);
}
.blog-latest-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.blog-latest-cat {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--c, var(--primary-dark));
}
.blog-latest-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15.5px; font-weight: 600; line-height: 1.3;
    color: var(--text);
    margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-latest-title a { color: inherit; text-decoration: none; transition: color 0.2s; }
.blog-latest-card:hover .blog-latest-title a { color: var(--primary); }
.blog-latest-meta {
    display: flex; gap: 6px;
    margin-top: auto;
    font-size: 12px; color: var(--text-light);
}
.blog-latest-meta .dot { opacity: 0.5; }

/* Category color tokens (used by latest cards + featured no-img) */
.cat-red    { --c: var(--primary); }
.cat-blue   { --c: oklch(62% 0.14 250); }
.cat-amber  { --c: var(--accent-dark); }
.cat-green  { --c: oklch(64% 0.13 150); }

/* Empty state */
.blog-latest-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border: 1px dashed rgba(198, 95, 60, 0.2);
    border-radius: 14px;
    color: var(--text-light);
    font-size: 14px;
}
/* No-result state (search miss) */
.blog-latest-noresult { padding: 56px 24px; }
.blog-latest-noresult .empty-icon {
    width: 56px; height: 56px; border-radius: 50%;
    background: color-mix(in oklch, var(--primary) 10%, #fff);
    color: var(--primary);
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 14px;
}
.blog-latest-noresult .empty-icon svg { width: 28px; height: 28px; }
.blog-latest-noresult h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px; font-weight: 700;
    color: var(--text);
    margin: 0 0 6px;
}
.blog-latest-noresult p {
    font-size: 14px;
    color: var(--text-light);
    max-width: 380px;
    margin: 0 auto 16px;
    line-height: 1.6;
}
.blog-latest-noresult .empty-reset {
    display: inline-flex; align-items: center;
    padding: 9px 18px;
    background: var(--primary);
    color: #fff;
    border: none; border-radius: 999px;
    font-size: 13px; font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.blog-latest-noresult .empty-reset:hover { background: var(--primary-dark); }

/* Results count + live source tag */
.blog-results-count {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    padding: 0 2px;
    font-size: 14px;
    color: var(--text-light);
    margin-top: -8px;
}
.blog-results-count strong { color: var(--text); font-weight: 700; }
.blog-results-count em { font-style: normal; color: var(--text); font-weight: 600; }
.blog-results-count .src-tag {
    display: inline-flex; align-items: center; gap: 5px;
    margin-left: auto;
    padding: 3px 10px;
    background: color-mix(in oklch, #16a34a 12%, #fff);
    color: #15803d;
    border: 1px solid color-mix(in oklch, #16a34a 24%, #fff);
    border-radius: 999px;
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.blog-results-count .src-tag::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #16a34a;
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5);
    animation: src-pulse 1.6s ease-out infinite;
}
@keyframes src-pulse {
    0%   { box-shadow: 0 0 0 0   rgba(22,163,74,.5); }
    70%  { box-shadow: 0 0 0 6px rgba(22,163,74,0); }
    100% { box-shadow: 0 0 0 0   rgba(22,163,74,0); }
}

/* ============================================================
   Pagination (real, client-side over all posts)
   ============================================================ */
.blog-pagination {
    display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap; gap: 8px;
    margin: 38px 0 8px;
}
.blog-pagination .bp-page {
    min-width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 12px;
    background: #fff;
    border: 1px solid rgba(198, 95, 60, 0.18);
    border-radius: 10px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px; font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s var(--ease-out-quart);
}
.blog-pagination .bp-page svg { width: 16px; height: 16px; }
.blog-pagination .bp-page:hover:not(.disabled):not(.active) {
    border-color: var(--primary);
    color: var(--primary);
    background: color-mix(in oklch, var(--primary) 6%, #fff);
}
.blog-pagination .bp-page.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    cursor: default;
}
.blog-pagination .bp-page.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.blog-pagination .bp-gap {
    min-width: 28px; text-align: center;
    color: var(--text-light);
    user-select: none;
}

/* ============================================================
   Responsive
   ============================================================ */
/* ============================================================
   BLOG POST — detail (blog-post.html)
   Layout follows the reference: breadcrumb → hero (image+meta)
   → 3-col main (TOC | body | sidebar with author/share/related)
   ============================================================ */
.bp-wrap { padding: 130px 0 90px; }
.bp-breadcrumb {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-size: 14px; color: var(--text-light); margin-bottom: 22px;
}
.bp-breadcrumb a { color: var(--text-light); text-decoration: none; }
.bp-breadcrumb a:hover { color: var(--c, var(--primary)); }
.bp-breadcrumb svg { width: 15px; height: 15px; opacity: 0.55; flex: 0 0 15px; }
.bp-breadcrumb .cur { color: var(--c, var(--primary)); font-weight: 600; }

/* ------------------------------------------------------------
   Hero — image (left) + meta (right). Reference: rounded card
   with featured 4:3 image, pill-style tags, large title, gray
   excerpt, then author row with avatar + name/role.
   ------------------------------------------------------------ */
.bp-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 0 rgba(198, 95, 60, 0.04), 0 14px 30px -14px rgba(115, 50, 30, 0.18);
    margin-bottom: 40px;
    /* Establish a stacking context so the static children sit above the
       body's `body::before` blueprint-grid pseudo-element (which is fixed
       at z-index 0). Without this, the grid pattern shows through. */
    position: relative;
    z-index: 1;
}
/* Category accent strip — colored by --c so the hero visibly adapts to
   the article's topic (each category gets its own hue). */
.bp-hero::before {
    content: "";
    position: absolute; top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        var(--c, var(--primary)),
        color-mix(in oklch, var(--c, var(--primary)) 55%, #fff));
    z-index: 3;
    pointer-events: none;
}
.bp-hero-image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--bg-warm);
    border-right: 1px solid var(--border);
}
.bp-hero-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.bp-hero-image.bp-hero-no-image {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #f7e3d2 0%, #fae6d8 100%);
    color: color-mix(in oklch, var(--c, var(--primary)) 70%, #fff);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 86px; font-weight: 700;
}
.bp-hero-meta {
    padding: 36px 38px;
    display: flex; flex-direction: column; justify-content: center; gap: 16px;
    background: color-mix(in oklch, var(--c, var(--primary)) 4%, #ffffff);
    min-width: 0;
}
.bp-cats { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.bp-cat {
    font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--c, var(--primary-dark));
    background: color-mix(in oklch, var(--c, var(--primary)) 12%, white);
    padding: 5px 12px; border-radius: 999px; text-decoration: none;
    transition: all 0.2s;
}
.bp-cat:hover {
    background: color-mix(in oklch, var(--c, var(--primary)) 20%, white);
}
.bp-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(26px, 3.4vw, 36px);
    font-weight: 700; line-height: 1.18;
    color: var(--text); margin: 0;
    letter-spacing: -0.015em;
}
.bp-excerpt {
    font-size: 15.5px; line-height: 1.6; color: var(--text-light);
    margin: 0;
}
.bp-title-meta {
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
    color: var(--text-light); font-size: 14px;
    margin-top: 4px;
}
.bp-title-meta .dot { opacity: 0.5; }
.bp-title-meta .avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: color-mix(in oklch, var(--c, var(--primary)) 18%, #fff);
    color: var(--c, var(--primary-dark));
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700;
    flex: 0 0 36px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px color-mix(in oklch, var(--c, var(--primary)) 22%, transparent);
}
.bp-title-meta-text {
    display: flex; flex-direction: column; line-height: 1.2;
    margin-right: 4px;
}
.bp-title-meta .author { color: var(--text); font-weight: 700; font-size: 14px; }
.bp-title-meta .role { color: var(--text-light); font-size: 12.5px; margin-top: 2px; }
.bp-title-meta .bp-date,
.bp-title-meta .bp-read { display: inline-flex; align-items: center; gap: 6px; }
.bp-title-meta .bp-date::before,
.bp-title-meta .bp-read::before {
    content: ""; width: 14px; height: 14px; opacity: 0.6;
    background: currentColor;
    -webkit-mask-position: center; mask-position: center;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-size: contain; mask-size: contain;
}
.bp-title-meta .bp-date::before {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg 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'><rect x='3' y='4' width='18' height='18' rx='2'/><line x1='16' y1='2' x2='16' y2='6'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='3' y1='10' x2='21' y2='10'/></svg>");
    mask-image: url("data:image/svg+xml;utf8,<svg 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'><rect x='3' y='4' width='18' height='18' rx='2'/><line x1='16' y1='2' x2='16' y2='6'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='3' y1='10' x2='21' y2='10'/></svg>");
}
.bp-title-meta .bp-read::before {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg 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'><circle cx='12' cy='12' r='10'/><polyline points='12 6 12 12 16 14'/></svg>");
    mask-image: url("data:image/svg+xml;utf8,<svg 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'><circle cx='12' cy='12' r='10'/><polyline points='12 6 12 12 16 14'/></svg>");
}

/* ------------------------------------------------------------
   3-col main: TOC (left) | body (center) | sidebar (right)
   Reference grid: sidebar 240, TOC 200, body fluid
   ------------------------------------------------------------ */
.bp-main {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr) 280px;
    gap: 36px;
    align-items: start;
    /* Same stacking-context fix as .bp-hero — see comment there. */
    position: relative;
    z-index: 1;
}

/* ---- Left: Table of contents + CTA card ---- */
.bp-toc-wrap {
    position: sticky;
    top: 100px;
    display: flex; flex-direction: column; gap: 22px;
}
.bp-toc {
    background: transparent;
}
.bp-toc-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11.5px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 14px;
}
.bp-toc-list {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 2px;
    border-left: 2px solid var(--border);
}
.bp-toc-list li { margin: 0; }
.bp-toc-list a {
    display: block;
    padding: 7px 12px 7px 14px;
    margin-left: -2px;
    border-left: 2px solid transparent;
    font-size: 13.5px; line-height: 1.5;
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.bp-toc-list a:hover { color: var(--text); }
.bp-toc-list a.is-active {
    color: var(--c, var(--primary));
    border-left-color: var(--c, var(--primary));
    background: color-mix(in oklch, var(--c, var(--primary)) 7%, transparent);
    font-weight: 600;
}
.bp-toc-list a .toc-num {
    color: var(--text-light); opacity: 0.7; font-weight: 600; margin-right: 6px;
}
.bp-toc-list a.is-active .toc-num { color: var(--c, var(--primary)); opacity: 1; }

.bp-toc-cta {
    background: linear-gradient(135deg, #fff5e8 0%, #fae6d8 100%);
    border: 1px solid rgba(198, 95, 60, 0.18);
    border-radius: 14px;
    padding: 22px 20px;
    text-align: center;
    box-shadow: 0 4px 14px -6px rgba(198, 95, 60, 0.18);
}
.bp-toc-cta-icon {
    width: 40px; height: 40px;
    margin: 0 auto 12px;
    background: var(--c, var(--primary));
    color: #fff;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px -2px color-mix(in oklch, var(--c, var(--primary)) 55%, transparent);
}
.bp-toc-cta-icon svg { width: 22px; height: 22px; }
.bp-toc-cta h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15.5px; font-weight: 700; line-height: 1.35;
    color: var(--text);
    margin: 0 0 16px;
}
.bp-toc-cta .btn { width: 100%; justify-content: center; }

/* ---- Center: article body ---- */
.bp-body-col {
    min-width: 0;
}
.bp-body {
    font-size: 17px; line-height: 1.8; color: var(--text);
}
.bp-body > * + * { margin-top: 1.1em; }
html[data-bp-scroll] { scroll-padding-top: 100px; }
.bp-body h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 27px; font-weight: 700; line-height: 1.25;
    color: var(--text);
    margin-top: 1.6em; margin-bottom: 0.6em;
    scroll-margin-top: 100px;
}
.bp-body h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 21px; font-weight: 600;
    color: var(--text);
    margin-top: 1.4em; margin-bottom: 0.4em;
    scroll-margin-top: 100px;
}
.bp-body p { color: var(--text); margin: 0; }
.bp-body a { color: var(--c, var(--primary)); text-decoration: underline; }
.bp-body ul, .bp-body ol { padding-left: 1.4em; margin: 0.4em 0; }
.bp-body li { margin-top: 0.4em; }
.bp-body img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 0.6em 0; }
.bp-body blockquote {
    border-left: 4px solid var(--c, var(--primary));
    padding: 14px 18px;
    color: var(--text-light);
    background: var(--bg-warm);
    border-radius: 0 12px 12px 0;
    font-style: normal;
    display: flex; align-items: flex-start; gap: 12px;
}
.bp-body blockquote::before {
    content: ""; flex: 0 0 24px; height: 24px; margin-top: 2px;
    background: var(--c, var(--primary));
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'><path d='M12 2a7 7 0 00-4 12.74V17a2 2 0 002 2h2v-7H9a4 4 0 014-4V2zm-7 0a7 7 0 00-4 12.74V17a2 2 0 002 2h2v-7H2a4 4 0 014-4V2z'/></svg>") center/contain no-repeat;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'><path d='M12 2a7 7 0 00-4 12.74V17a2 2 0 002 2h2v-7H9a4 4 0 014-4V2zm-7 0a7 7 0 00-4 12.74V17a2 2 0 002 2h2v-7H2a4 4 0 014-4V2z'/></svg>") center/contain no-repeat;
}
.bp-body figure { margin: 1.2em 0; }
.bp-body figcaption { font-size: 13px; color: var(--text-light); text-align: center; margin-top: 6px; }
.bp-body table { width: 100%; border-collapse: collapse; font-size: 15px; }
.bp-body th, .bp-body td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.bp-body th { background: var(--bg-warm); }

/* WP Gallery grids (auto-generated by WP block editor) */
.bp-body .wp-block-gallery,
.bp-body .blocks-gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 1.4em 0;
    padding: 0;
    list-style: none;
}
.bp-body .wp-block-gallery .blocks-gallery-item,
.bp-body .blocks-gallery-grid .blocks-gallery-item { margin: 0; }
.bp-body .wp-block-gallery img,
.bp-body .blocks-gallery-grid img {
    width: 100%; aspect-ratio: 1 / 1;
    object-fit: cover; border-radius: 12px;
    margin: 0;
    border: 1px solid var(--border);
    background: var(--bg-warm);
}
.bp-body .wp-block-gallery figcaption,
.bp-body .blocks-gallery-grid figcaption { margin-top: 6px; font-weight: 600; }

.bp-read-more {
    display: flex; justify-content: center; margin-top: 36px;
    padding-top: 12px;
}
.bp-read-more .btn { padding: 10px 22px; }

/* ---- Right: sidebar (author / share / related) ---- */
.bp-sidebar {
    display: flex; flex-direction: column; gap: 22px;
    position: sticky;
    top: 100px;
}
.bp-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 2px 8px -4px rgba(115, 50, 30, 0.08);
}

/* ---- Back to top (blog detail, right side) ---- */
.bp-back-top {
    position: fixed;
    right: 26px;
    bottom: 26px;
    z-index: 900;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--primary, #e8442a);
    color: #fff;
    box-shadow: 0 8px 22px -8px rgba(232, 68, 42, 0.55);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s, background .2s ease;
}
.bp-back-top svg { width: 20px; height: 20px; }
.bp-back-top span {
    font: 600 10px/1 'Outfit', sans-serif;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.bp-back-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.bp-back-top:hover { background: var(--primary-dark, #c8381f); }
.bp-back-top:active { transform: translateY(1px); }
.bp-card-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15.5px; font-weight: 700; color: var(--text);
    margin: 0 0 14px;
    display: flex; align-items: center; gap: 8px;
}

/* About the Author card */
.bp-author-head {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 14px;
}
.bp-author-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: color-mix(in oklch, var(--c, var(--primary)) 18%, #fff);
    color: var(--c, var(--primary-dark));
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700;
    flex: 0 0 48px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px color-mix(in oklch, var(--c, var(--primary)) 22%, transparent);
}
.bp-author-name { font-family: 'Space Grotesk', sans-serif; font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.2; }
.bp-author-role { font-size: 12.5px; color: var(--text-light); margin-top: 2px; }
.bp-author-bio {
    font-size: 13.5px; line-height: 1.6; color: var(--text-light);
    margin: 0 0 14px;
}
.bp-author-contact {
    display: flex; flex-direction: column; gap: 8px;
    margin: 0; padding: 0;
    list-style: none;
    border-top: 1px dashed var(--border);
    padding-top: 14px;
}
.bp-author-contact a {
    display: flex; align-items: center; gap: 10px;
    font-size: 13px;
    color: var(--text);
    text-decoration: none;
    padding: 4px 0;
    transition: color 0.18s;
}
.bp-author-contact a:hover { color: var(--primary); }
.bp-author-contact .bp-aci {
    width: 28px; height: 28px;
    border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 28px;
    color: #fff;
}
.bp-author-contact .bp-aci svg { width: 14px; height: 14px; }
.bp-author-contact .bp-aci.bp-aci-phone { background: #2a8a3e; }
.bp-author-contact .bp-aci.bp-aci-whatsapp { background: #25d366; }
.bp-author-contact .bp-aci.bp-aci-wechat  { background: #07c160; }
.bp-author-contact .bp-aci.bp-aci-email   { background: #e84954; }
.bp-author-contact .bp-acl {
    display: flex; flex-direction: column; line-height: 1.25;
}
.bp-author-contact .bp-acl .bp-acl-label {
    font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--text-light);
}
.bp-author-contact .bp-acl .bp-acl-val {
    font-size: 13.5px; color: var(--text); font-weight: 600;
    margin-top: 1px;
}

/* Share this article */
.bp-share-row {
    display: flex; gap: 10px;
}
.bp-share-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff;
    background: var(--c, #4a5568);
    text-decoration: none;
    transition: transform 0.18s, opacity 0.18s;
    border: none; cursor: pointer;
}
.bp-share-btn:hover { transform: translateY(-2px); opacity: 0.92; }
.bp-share-btn svg { width: 16px; height: 16px; }
.bp-share-btn.bp-share-fb { background: #1877f2; }
.bp-share-btn.bp-share-x  { background: #0f1419; }
.bp-share-btn.bp-share-li { background: #0a66c2; }
.bp-share-btn.bp-share-link { background: #e2e8f0; color: #4a5568; border: 1px solid #cbd5e0; }
.bp-share-btn.bp-share-link.is-copied { background: #22c55e; color: #fff; border-color: #22c55e; }

/* Related articles */
.bp-related-loading {
    color: var(--muted, #8a8f98);
    font-size: 0.9rem;
    padding: 4px 0;
}
.bp-related-list {
    display: flex; flex-direction: column; gap: 16px;
    list-style: none; padding: 0; margin: 0;
}
.bp-related-item {
    display: flex; gap: 12px; align-items: flex-start;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}
.bp-related-item:hover { transform: translateX(2px); }
.bp-related-thumb {
    flex: 0 0 88px; width: 88px; aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-warm);
    position: relative;
    border: 1px solid var(--border);
}
.bp-related-thumb img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.bp-related-thumb-noimg {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #f7e3d2 0%, #fae6d8 100%);
    color: color-mix(in oklch, var(--c, var(--primary)) 65%, #fff);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px; font-weight: 700;
}
.bp-related-body { flex: 1; min-width: 0; }
.bp-related-tags {
    display: inline-flex; align-items: center; gap: 6px;
    margin-bottom: 6px;
}
.bp-related-badge {
    background: #e84954; color: #fff;
    font-size: 9.5px; font-weight: 800; letter-spacing: 0.06em;
    padding: 2px 6px; border-radius: 4px;
    text-transform: uppercase;
}
.bp-related-title {
    font-size: 14px; font-weight: 600; line-height: 1.4;
    color: var(--text);
    margin: 0 0 6px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bp-related-item:hover .bp-related-title { color: var(--primary); }
.bp-related-meta {
    font-size: 12px; color: var(--text-light);
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.bp-related-meta .dot { opacity: 0.5; }

.bp-state {
    max-width: 760px; margin: 40px auto; text-align: center;
    color: var(--text-light); padding: 50px 20px;
}
.bp-state .bp-spinner {
    width: 38px; height: 38px; margin: 0 auto 18px;
    border: 3px solid var(--border); border-top-color: var(--primary);
    border-radius: 50%; animation: bp-spin 0.8s linear infinite;
}
@keyframes bp-spin { to { transform: rotate(360deg); } }
.bp-state a.btn {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 18px;
}

/* ============================================================
   Responsive — blog list & detail
   ============================================================ */
@media (max-width: 1100px) {
    .blog-hero-grid { gap: 36px; }
    .blog-featured { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
    .blog-featured-aside { padding: 30px 28px; }
    .bp-main { grid-template-columns: 180px minmax(0, 1fr) 260px; gap: 24px; }
    .bp-hero-meta { padding: 30px 28px; }
}
@media (max-width: 1000px) {
    .blog-hero-grid { grid-template-columns: 1fr; gap: 28px; }
    .blog-hero-visual { order: -1; max-width: 480px; margin: 0 auto; }
    .blog-searchbar-inner { grid-template-columns: 1fr; }
    .blog-main-grid { grid-template-columns: 1fr; }
    .blog-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
    .blog-cats-card { grid-column: 1 / -1; }
    .blog-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .blog-latest-grid { grid-template-columns: repeat(2, 1fr); }
    .blog-featured { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .blog-featured-aside { padding: 26px 24px; }
    .bp-hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
    .bp-hero-meta { padding: 28px 24px; }

    /* Detail 3-col → 1-col stack (TOC at top, body middle, sidebar bottom) */
    .bp-main {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .bp-toc-wrap {
        position: static;
        flex-direction: row;
        gap: 18px;
        align-items: stretch;
    }
    .bp-toc { flex: 1; }
    .bp-toc-list { display: flex; flex-wrap: wrap; gap: 4px; border-left: 0; }
    .bp-toc-list a {
        border-left: 0;
        border-bottom: 2px solid transparent;
        margin-left: 0;
        padding: 6px 10px;
        border-radius: 6px;
    }
    .bp-toc-list a.is-active {
        border-left: 0;
        border-bottom-color: var(--primary);
        background: color-mix(in oklch, var(--primary) 6%, transparent);
    }
    .bp-toc-cta { flex: 0 0 280px; }
    .bp-sidebar { position: static; }

    /* Back-to-top button keeps clear of cookie notice on tablets */
    .bp-back-top { right: 20px; bottom: 76px; }
}
@media (max-width: 700px) {
    /* Mobile hero: centered, illustration above title, pill eyebrow, red divider */
    .blog-hero { padding: 92px 0 18px; }
    .blog-hero-grid { grid-template-columns: 1fr; }
    .blog-hero-visual {
        display: flex;
        order: -1;
        max-width: 340px;
        margin: 0 auto 20px;
    }
    .blog-hero-text { text-align: center; }
    .blog-eyebrow {
        display: inline-block;
        background: color-mix(in oklch, var(--primary) 12%, #fff);
        color: var(--primary);
        padding: 6px 12px;
        border-radius: 999px;
        font-size: 11px;
        letter-spacing: 0.12em;
        margin-bottom: 14px;
    }
    .blog-hero-text h1 { font-size: clamp(32px, 8.5vw, 42px); margin-bottom: 14px; }
    .blog-hero-text h1 br { display: none; }
    .blog-hero-divider {
        display: block;
        width: 36px;
        height: 3px;
        border-radius: 999px;
        background: var(--primary);
        margin: 0 auto 16px;
    }
    .blog-hero-text p {
        font-size: 14.5px;
        color: var(--text-light);
        max-width: 340px;
        margin: 0 auto;
        line-height: 1.6;
    }
    .blog-stats-grid { gap: 8px; }
    .blog-stats-skel { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .blog-stat { padding: 10px; }
    .blog-stat-value { font-size: 21px; }
    .blog-stat-label { font-size: 11px; }
    .blog-sidebar { grid-template-columns: 1fr; }
    /* Featured stacks: preview/image on top, meta below */
    .blog-featured { grid-template-columns: 1fr; }
    .blog-featured-preview {
        min-height: 280px;
        padding: 22px 22px 24px;
        border-right: 0;
        border-bottom: 1px dashed rgba(198, 95, 60, 0.18);
    }
    .blog-featured-preview-inner { max-height: 260px; }
    .blog-featured-image { border-right: 0; border-bottom: 1px dashed rgba(198, 95, 60, 0.18); }
    .blog-featured-aside { padding: 24px 22px; }
    .blog-popular { flex-direction: column; align-items: flex-start; gap: 8px; }
    .blog-search input { padding: 12px 14px; font-size: 14px; }
    .blog-search-btn { padding: 0 16px; }
    .blog-latest-card { border-radius: 12px; }

    /* Detail page: reduce top whitespace + adapt typography */
    .bp-wrap { padding: 92px 0 48px; }
    .bp-hero { grid-template-columns: 1fr; margin-bottom: 28px; border-radius: 16px; }
    .bp-hero-image {
        aspect-ratio: 16 / 10;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }
    .bp-hero-meta { padding: 22px 18px 26px; gap: 12px; }
    .bp-title { font-size: clamp(24px, 6.5vw, 30px); }
    .bp-excerpt { font-size: 14.5px; line-height: 1.55; }
    .bp-title-meta { gap: 8px; font-size: 13px; }
    .bp-title-meta .author { font-size: 13px; }
    .bp-title-meta .role { font-size: 11.5px; }
    .bp-body { font-size: 16px; line-height: 1.75; }
    .bp-body h2 { font-size: 22px; margin-top: 1.4em; scroll-margin-top: 86px; }
    .bp-body h3 { font-size: 18px; margin-top: 1.2em; scroll-margin-top: 86px; }
    .bp-body blockquote { padding: 12px 14px; font-size: 15px; }
    .bp-body table { font-size: 14px; display: block; overflow-x: auto; white-space: nowrap; }
    .bp-read-more { margin-top: 28px; }
    html[data-bp-scroll] { scroll-padding-top: 86px; }

    /* TOC + CTA: stack vertically on small screens */
    .bp-toc-wrap { flex-direction: column; }
    .bp-toc-cta { flex: 0 0 auto; }
}
@media (max-width: 480px) {
    .blog-hero { padding: 86px 0 16px; }
    .blog-hero-visual { max-width: 300px; margin-bottom: 16px; }
    .blog-hero-text h1 { font-size: clamp(30px, 8.5vw, 38px); margin-bottom: 12px; }
    .blog-hero-text p { font-size: 14px; max-width: 300px; }
    /* Stat cards: horizontal icon + text + arrow */
    .blog-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .blog-stats-skel { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .blog-stats-skel .skel-stat { height: 66px; }
    .blog-stat {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        padding: 12px;
        border-radius: 14px;
    }
    .blog-stat-icon {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: color-mix(in oklch, var(--c, var(--primary)) 16%, #fff);
    }
    .blog-stat-icon svg { width: 18px; height: 18px; }
    .blog-stat-text {
        display: flex;
        flex-direction: column;
        gap: 2px;
        flex: 1;
        min-width: 0;
        text-align: left;
    }
    .blog-stat-value { font-size: 18px; }
    .blog-stat-label { font-size: 10.5px; }
    .blog-stat-arrow { display: flex; flex: none; }
    .blog-latest-grid { grid-template-columns: 1fr; }
    .blog-pagination { gap: 6px; }
    .blog-pagination .bp-page { min-width: 36px; height: 36px; font-size: 13px; padding: 0 10px; }
    .blog-featured-title { font-size: 20px; }
    .blog-featured-preview-cta { font-size: 12.5px; }

    /* Detail page further tightening */
    .bp-wrap { padding: 86px 0 40px; }
    .bp-breadcrumb { font-size: 13px; margin-bottom: 16px; }
    .bp-hero { margin-bottom: 24px; border-radius: 14px; }
    .bp-hero-image { aspect-ratio: 16 / 10; }
    .bp-hero-meta { padding: 18px 16px 22px; gap: 10px; }
    .bp-cat { font-size: 11px; padding: 4px 10px; }
    .bp-title { font-size: clamp(22px, 7vw, 27px); }
    .bp-excerpt { font-size: 14px; }
    .bp-title-meta { gap: 6px; font-size: 12px; flex-wrap: wrap; }
    .bp-title-meta .avatar { width: 32px; height: 32px; flex: 0 0 32px; font-size: 12px; }
    .bp-title-meta .author { font-size: 12px; }
    .bp-title-meta .role { font-size: 11px; }
    .bp-title-meta .dot { display: none; }
    .bp-title-meta .bp-date::before,
    .bp-title-meta .bp-read::before { width: 12px; height: 12px; }
    .bp-body { font-size: 15.5px; line-height: 1.7; }
    .bp-body h2 { font-size: 20px; }
    .bp-body h3 { font-size: 17px; }
    .bp-body blockquote { padding: 10px 12px; font-size: 14px; }
    .bp-body table { font-size: 13px; }
    .bp-body th, .bp-body td { padding: 6px 8px; }
    .bp-read-more { margin-top: 24px; }
    .bp-card { padding: 16px; border-radius: 12px; }
    .bp-author-avatar { width: 42px; height: 42px; font-size: 16px; flex: 0 0 42px; }
    .bp-share-btn { width: 36px; height: 36px; }
    .bp-related-thumb { flex: 0 0 76px; width: 76px; }
    .bp-related-title { font-size: 13px; }

    /* Back-to-top button: keep clear of cookie notice on small screens */
    .bp-back-top { right: 16px; bottom: 72px; width: 46px; height: 46px; }
    .bp-back-top svg { width: 18px; height: 18px; }
}