:root {
    --blog-ink: #1b2a41;
    --blog-muted: #6f7b8a;
    --blog-accent: #db7a12;
    --blog-accent-soft: #fff3e3;
    --blog-line: #d9e0ea;
    --blog-panel: rgba(255, 255, 255, 0.96);
    --blog-grid: rgba(58, 89, 126, 0.03);
    --blog-surface: #fafaf8;
    --blog-shadow: 8px 8px 0 rgba(27, 42, 65, 0.06);
    --font-display: 'Lora', Georgia, serif;
    --font-body: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
    --blog-sticky-top: 110px;
    --blog-sticky-gap: 18px;
    --blog-sticky-max-height: calc(100vh - var(--blog-sticky-top) - var(--blog-sticky-gap));
    --blog-detail-toc-width: 290px;
    --blog-detail-content-width: 740px;
    --blog-detail-related-width: 250px;
    --blog-detail-column-gap: 16px;
}

body.blog-page {
    margin: 0;
    color: var(--blog-ink);
    font-family: var(--font-body);
    background:
        linear-gradient(var(--blog-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--blog-grid) 1px, transparent 1px),
        radial-gradient(circle at top, rgba(219, 122, 18, 0.02), transparent 26%),
        var(--blog-surface);
    background-size: 44px 44px, 44px 44px, auto, auto;
}

.blog-shell {
    min-height: 100vh;
}

.blog-hero {
    padding: 44px 0 30px;
}

.blog-hero__eyebrow,
.blog-panel__title {
    color: #2878a8;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-family: var(--font-body);
}

.blog-panel__title {
    margin-bottom: 10px;
}

.blog-toc-column .blog-panel__title,
.blog-sidebar .blog-panel__title {
    font-size: 1.05rem;
    letter-spacing: 0.18em;
}

.blog-hero h1 {
    margin: 10px 0 12px;
    font-size: clamp(1.7rem, 4vw, 2.8rem);
    font-family: var(--font-display);
    color: var(--blog-accent);
    line-height: 1.2;
}

.blog-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--blog-muted);
    font-size: 1.08rem;
    line-height: 1.8;
}

.blog-layout,
.blog-detail-layout {
    display: grid;
    gap: var(--blog-detail-column-gap);
    padding-bottom: 36px;
}

.blog-layout {
    grid-template-columns: 300px minmax(0, 1fr);
    align-items: start;
}

.blog-detail-layout {
    grid-template-columns: var(--blog-detail-toc-width) minmax(0, 1fr) var(--blog-detail-related-width);
    grid-template-rows: auto 1fr;
    align-items: start;
}

.blog-toc-column {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.blog-detail-layout > .blog-breadcrumb {
    grid-column: 2;
    grid-row: 1;
}

.blog-article {
    grid-column: 2;
    grid-row: 2;
}

.blog-related-column {
    grid-column: 3;
    grid-row: 1 / span 2;
}

.blog-toc-column,
.blog-related-column {
    align-self: start;
    position: sticky;
    top: var(--blog-sticky-top);
    max-height: var(--blog-sticky-max-height);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(27, 42, 65, 0.28) transparent;
    padding-right: 4px;
}

.blog-toc-column {
    padding-left: 1rem;
}

.blog-related-column {
    padding-right: 1rem;
}

.blog-wide-shell {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.blog-panel,
.blog-card,
.blog-related-card,
.blog-empty-state {
    background: var(--blog-panel);
    border: 1px solid rgba(27, 42, 65, 0.18);
    border-radius: 14px;
    box-shadow: var(--blog-shadow);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.blog-card:hover {
    border-color: rgba(219, 122, 18, 0.45);
    box-shadow: 8px 8px 0 rgba(219, 122, 18, 0.08);
}

.blog-panel {
    padding: 18px 20px 14px;
}

.blog-toc-column .blog-panel {
    border-color: rgba(27, 42, 65, 0.34);
    box-shadow: 0 4px 12px rgba(27, 42, 65, 0.09);
}

.blog-toc-column::-webkit-scrollbar,
.blog-related-column::-webkit-scrollbar {
    width: 8px;
}

.blog-toc-column::-webkit-scrollbar-thumb,
.blog-related-column::-webkit-scrollbar-thumb {
    background: rgba(27, 42, 65, 0.2);
    border-radius: 999px;
}

.blog-toc-column::-webkit-scrollbar-track,
.blog-related-column::-webkit-scrollbar-track {
    background: transparent;
}

.blog-sticky-panel {
    position: relative;
}

.blog-related-list,
.blog-feed {
    display: grid;
    gap: 14px;
}

.blog-category-tree,
.blog-category-children {
    display: grid;
    gap: 2px;
}

.blog-mobile-categories {
    display: none;
    gap: 8px;
    flex-wrap: wrap;
}

.blog-mobile-chip {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    color: var(--blog-ink);
    border: 1px solid rgba(27, 42, 65, 0.14);
    text-decoration: none;
}

.blog-mobile-chip.is-active {
    background: var(--blog-accent-soft);
    color: var(--blog-accent);
    border-color: rgba(219, 122, 18, 0.25);
}

.blog-category-children {
    margin-left: 14px;
    padding-left: 12px;
    border-left: 1px solid var(--blog-line);
}

.blog-category-link {
    display: block;
    padding: 9px 14px;
    text-decoration: none;
    color: var(--blog-ink);
    border: 1px solid transparent;
    border-radius: 10px;
    transition: 0.2s ease;
    font-size: 1rem;
    line-height: 1.35;
}

.blog-category-link:hover,
.blog-category-link.is-active {
    color: var(--blog-accent);
    background: var(--blog-accent-soft);
    border-color: rgba(219, 122, 18, 0.22);
}

@media (max-width: 640px) {
    .blog-category-link {
        padding: 10px 14px;
        font-size: 1.02rem;
        line-height: 1.38;
    }
}

.blog-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 4px;
}

.blog-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 10px 10px 0 0;
    border: 1px solid var(--blog-line);
    border-bottom: none;
    background: #fff;
    color: var(--blog-muted);
    font-size: 0.92rem;
    font-weight: 500;
    font-family: var(--font-body);
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
}

.blog-tab:hover {
    color: var(--blog-accent);
    background: var(--blog-accent-soft);
}

.blog-tab.is-active {
    color: var(--blog-ink);
    background: var(--blog-panel);
    border-color: rgba(27, 42, 65, 0.18);
    font-weight: 600;
}

.blog-tab--internal.is-active {
    color: #7b4f00;
    background: #fff8e1;
    border-color: #f0c040;
}

.blog-feed__meta {
    display: flex;
    gap: 12px;
    align-items: center;
    color: var(--blog-muted);
}

.blog-card {
    padding: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    overflow: hidden;
}

.blog-card__cover {
    display: block;
    flex: 0 0 38%;
    overflow: hidden;
    background: var(--blog-surface);
    align-self: stretch;
    min-height: 160px;
    border-radius: 12px 0 0 12px;
}

.blog-card__cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.blog-card__body {
    flex: 1 1 0;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.blog-card__tags,
.blog-card__footer,
.blog-card__byline,
.blog-article__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.blog-card__tags {
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 8px;
}

.blog-card__tags-left {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    min-width: 0;
}

.blog-card__meta-date {
    color: var(--blog-ink);
    font-size: 1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    white-space: nowrap;
    flex-shrink: 0;
}

.blog-badge,
.blog-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 9999px;
    border: none;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0.04em;
}

.blog-badge {
    color: #0369a1;
    background: #e0f2fe;
    text-transform: uppercase;
}

.blog-tag {
    color: var(--blog-muted);
    background: #f1f5f9;
}

.blog-badge--internal {
    color: #92400e;
    background: #fef3c7;
}

.blog-card h2 {
    margin: 4px 0 4px;
    font-size: 20px;
    font-family: var(--font-display);
    font-weight: 800;
    line-height: 1.28;
    letter-spacing: -0.01em;
    color: var(--blog-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card h2 a,
.blog-related-card,
.blog-breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.blog-card__summary,
.blog-muted,
.blog-related-card span,
.blog-article__summary {
    color: var(--blog-muted);
}

.blog-card__summary {
    font-size: 0.82rem;
    line-height: 1.55;
    margin-bottom: 10px;
    white-space: pre-line;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__footer {
    justify-content: space-between;
    gap: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--blog-line);
}

.blog-card__author {
    display: flex;
    align-items: center;
}

.blog-card__comment-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--blog-muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.blog-card__comment-count:hover {
    color: var(--blog-accent);
}

.author-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.author-chip__avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--blog-line);
}
.author-chip__avatar-fallback {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #d6e4f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #1a5276;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: 0;
}
.author-chip__name {
    font-weight: 600;
    color: var(--blog-ink);
    font-size: 0.88rem;
}

.blog-card__action {
    padding: 8px 14px;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid rgba(219, 122, 18, 0.35);
    color: var(--blog-accent);
    background: var(--blog-accent-soft);
    font-weight: 700;
    font-size: 0.82rem;
}

.blog-breadcrumb {
    padding: 24px 30px 24px;
    font-size: 1rem;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.blog-breadcrumb .breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.blog-breadcrumb .breadcrumb-item {
    display: inline-flex;
    align-items: center;
    color: var(--blog-muted);
}

.blog-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    color: var(--blog-muted);
    font-size: 1rem;
    margin: 0 8px;
    padding: 0;
    float: none;
    opacity: 0.5;
}

.blog-breadcrumb .breadcrumb-item a {
    color: var(--blog-muted);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.15s;
}

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

.blog-breadcrumb .breadcrumb-item.active {
    color: var(--blog-ink);
    font-weight: 500;
}

/* ── Article ── */
.blog-article {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0 30px 32px;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.blog-article__top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.blog-article__date {
    color: var(--blog-ink);
    font-size: 1rem;
    font-weight: 700;
}

.blog-article__category {
    display: inline-flex;
    margin-bottom: 0;
    padding: 6px 11px;
    border-radius: 8px;
    background: #eef8fd;
    color: #2f8fb7;
    border: 1px solid rgba(47, 143, 183, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    font-weight: 700;
}

.blog-article h1 {
    margin: 16px 0 20px;
    font-size: clamp(1.75rem, 3.2vw, 3rem);
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.18;
    color: var(--blog-ink);
    text-align: center;
    padding-left: 0;
    border-left: none;
}

.blog-article__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--blog-line);
    color: var(--blog-muted);
    font-size: 0.95rem;
}

.blog-article__meta-sep {
    opacity: 0.5;
}

.blog-article__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.blog-article__summary {
    margin: 16px 0 24px;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.65;
    color: #1a1a1a;
    white-space: pre-wrap;
}

.blog-article__cover {
    margin: 18px 0 24px;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(27, 42, 65, 0.1);
}

.blog-article__cover img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    background-color: var(--blog-surface);
}

/* ── Article content typography ── */
.blog-article__content {
    font-size: 20px;
    line-height: 1.9;
    font-family: var(--font-display);
}

.blog-article__content h2,
.blog-article__content h3,
.blog-article__content h4 {
    font-family: var(--font-display);
    font-weight: 700;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    scroll-margin-top: calc(var(--blog-sticky-top) + 1rem);
    color: var(--blog-ink);
    line-height: 1.2;
}

.blog-article__content h2 {
    font-size: clamp(1.38rem, 2.2vw, 1.7rem);
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--blog-accent-soft);
}

.blog-article__content h3 {
    font-size: clamp(1.2rem, 1.85vw, 1.44rem);
}

.blog-article__content h4 {
    font-size: clamp(1.1rem, 1.6vw, 1.28rem);
    color: var(--blog-muted);
}

.blog-article__content p {
    margin: 0 0 1.1rem;
}

.blog-article__content ul,
.blog-article__content ol {
    padding-left: 1.6rem;
    margin-bottom: 1.1rem;
}

.blog-article__content li {
    margin-bottom: 0.45rem;
    line-height: 1.75;
}

.blog-article__content li > ul,
.blog-article__content li > ol {
    margin-top: 0.3rem;
    margin-bottom: 0;
}

.blog-article__content strong {
    color: var(--blog-ink);
    font-weight: 700;
}

.blog-article__content a {
    color: var(--blog-accent);
    text-decoration-line: underline;
    text-underline-offset: 2px;
}

.blog-article__content a:hover {
    opacity: 0.8;
}

.blog-article__content hr {
    border: none;
    border-top: 1.5px solid var(--blog-line);
    margin: 1.8rem auto;
    width: 40%;
    display: block;
    height: 0;
}

.blog-article__content hr::after {
    content: none;
}

.blog-article__content mark {
    background-color: rgba(255, 214, 10, 0.38);
    color: inherit;
    border-radius: 3px;
    padding: 0 2px;
}

.blog-article__content img {
    max-width: 100%;
    border-radius: 10px;
    display: block;
    margin: 1.2rem auto;
}

.blog-article__content figure {
    margin: 1.5rem 0;
}

.blog-article__content figure img {
    margin: 0 auto 0.5rem;
}

.blog-article__content figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: var(--blog-muted);
    font-style: italic;
}

/* ── Code blocks — reset then let Pygments handle colors ── */
.blog-article__content pre {
    padding: 0;
    background: none;
    color: inherit;
    border-radius: 0;
    overflow: visible;
}

.blog-article__content code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

/* Inline code (not inside .highlight) */
.blog-article__content :not(pre) > code {
    font-size: 0.88em;
    padding: 2px 6px;
    border-radius: 4px;
    background: #f0f4f8;
    color: #c7522a;
}

.blog-article__content blockquote {
    margin: 1.1rem 0;
    padding: 0.85rem 1rem;
    border-left: 3px solid var(--blog-accent);
    background: #fff8ef;
    border-radius: 0 8px 8px 0;
    color: var(--blog-ink);
    font-style: italic;
}

.blog-article__content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.84rem;
}

.blog-article__content th,
.blog-article__content td {
    border: 1px solid var(--blog-line);
    padding: 8px 9px;
    text-align: left;
}

.blog-article__content th {
    background: #f4f7fb;
    font-weight: 700;
}

/* ── Progress bar ── */
.bm-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--blog-accent), #f5a623);
    z-index: 9999;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* ── TOC ── */
.blog-toc .toc ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.blog-toc .toc li {
    margin: 0 0 2px;
}

.blog-toc .toc ul ul {
    margin-left: 12px;
    padding-left: 9px;
    border-left: 1px solid var(--blog-line);
    margin-top: 4px;
    display: none;
}
.blog-toc .toc ul ul ul {
    display: none !important;
}
.blog-toc .toc li.toc-open > ul {
    display: block;
}

.blog-toc a {
    text-decoration: none;
    color: var(--blog-muted);
    font-size: 0.92rem;
    line-height: 1.32;
    display: block;
    padding: 6px 7px;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: color 0.15s, background-color 0.15s, border-color 0.15s;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-toc a:hover {
    color: var(--blog-accent);
    background: rgba(219, 122, 18, 0.08);
}

.blog-toc a.is-active {
    color: var(--blog-accent);
    background: rgba(219, 122, 18, 0.14);
    border-color: rgba(219, 122, 18, 0.28);
    font-weight: 700;
    box-shadow: inset 3px 0 0 var(--blog-accent);
}

.blog-toc a.is-active:hover {
    background: rgba(219, 122, 18, 0.16);
}

@media (max-width: 640px) {
    .blog-toc a {
        font-size: 0.96rem;
        line-height: 1.35;
        padding: 7px 8px;
        -webkit-line-clamp: 5;
    }
}

/* TOC toggle wrap */
.toc-toggle-wrap {
    display: flex;
    align-items: flex-start;
    gap: 2px;
}
.toc-toggle-wrap > a {
    flex: 1;
    min-width: 0;
}
.toc-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-top: 4px;
    flex-shrink: 0;
    border: none;
    background: none;
    color: var(--blog-muted);
    font-size: 0.65rem;
    cursor: pointer;
    border-radius: 3px;
    transition: transform 0.18s ease, color 0.15s;
    line-height: 1;
}
.toc-toggle:hover {
    color: var(--blog-accent);
}
.toc-open > .toc-toggle-wrap > .toc-toggle {
    transform: rotate(90deg);
    color: var(--blog-accent);
}

.blog-related-card {
    display: grid;
    gap: 5px;
    padding: 12px;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
    transition: background 0.15s;
}

.blog-related-card:hover {
    background: var(--blog-accent-soft);
}

.blog-related-card strong {
    font-size: 0.86rem;
    line-height: 1.35;
    color: var(--blog-ink);
}

.blog-related-card span {
    font-size: 0.76rem;
}

.blog-empty-state {
    padding: 48px 32px;
    text-align: center;
}

.blog-mobile-panel {
    display: none;
    margin-top: 22px;
    border: 1px solid rgba(27, 42, 65, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    overflow: hidden;
}

.blog-mobile-panel summary {
    padding: 14px 16px;
    cursor: pointer;
    font-weight: 700;
    list-style: none;
    font-size: 0.95rem;
}

.blog-mobile-panel summary::-webkit-details-marker {
    display: none;
}

.blog-mobile-panel .blog-toc,
.blog-mobile-panel .blog-related-list {
    padding: 0 16px 16px;
}

@media (max-width: 1120px) {
    .blog-layout,
    .blog-detail-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar,
    .blog-toc-column,
    .blog-related-column {
        display: none;
    }

    .blog-mobile-categories {
        display: flex;
    }

    .blog-toc-column,
    .blog-related-column,
    .blog-detail-layout > .blog-breadcrumb,
    .blog-article {
        grid-column: auto;
        grid-row: auto;
    }

    .blog-breadcrumb {
        max-width: none;
        margin-left: 0;
        margin-bottom: 10px;
        padding: 16px 0 6px;
    }

    .blog-mobile-panel {
        display: block;
    }

    .blog-article {
        padding: 24px 22px 30px;
    }

    .blog-card__body {
        padding: 16px 18px;
    }

    .blog-card {
        flex-direction: column;
    }

    .blog-card__cover {
        flex: none;
        width: 100%;
    }

    .blog-card__cover img {
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

/* ── Lightbox ── */
.blog-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.blog-lightbox.is-open {
    opacity: 1;
    pointer-events: all;
}

.blog-lightbox__img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 80vh;
}

.blog-lightbox__img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    display: block;
    outline: none;
}

.blog-lightbox__close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    font-size: 1.3rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.blog-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.blog-lightbox__prev,
.blog-lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.13);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    width: 44px;
    height: 64px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.blog-lightbox__prev:hover,
.blog-lightbox__next:hover {
    background: rgba(255, 255, 255, 0.26);
}

.blog-lightbox__prev { left: 14px; }
.blog-lightbox__next { right: 14px; }

.blog-lightbox__footer {
    display: flex;
    gap: 1.5rem;
    margin-top: 12px;
    align-items: center;
}

.blog-lightbox__caption {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.88rem;
    max-width: 60vw;
    text-align: center;
}

.blog-lightbox__counter {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.82rem;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .blog-lightbox__prev { left: 6px; }
    .blog-lightbox__next { right: 6px; }
    .blog-lightbox__prev,
    .blog-lightbox__next {
        width: 36px;
        height: 52px;
        font-size: 1.1rem;
    }
}

@media (max-width: 640px) {
    .blog-hero {
        padding: 28px 0 22px;
    }

    .blog-hero h1 {
        font-size: clamp(1.4rem, 8vw, 2rem);
    }

    .blog-hero p,
    .blog-card__summary,
    .blog-article__summary,
    .blog-article__content {
        font-size: 1.1rem;
    }

    .blog-card__footer,
    .blog-feed__meta {
        align-items: flex-start;
        flex-direction: column;
    }
}

.blog-article__content .echarts-block {
    width: 100%;
    height: 400px;
    border-radius: 10px;
    margin: 1.5rem 0;
    background: #fafafa;
    border: 1px solid var(--blog-line);
}

@media (max-width: 640px) {
    .blog-article__content .echarts-block {
        height: 280px;
    }
}

/* ── Custom content blocks ── */
.blog-article__content .blog-callout {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin: 1.4rem 0;
    padding: 0.9rem 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--blog-accent);
    background: #e8f4fd;
    font-size: 0.95rem;
    line-height: 1.7;
}

.blog-article__content .blog-callout--note {
    background: #e8f4fd;
    border-left-color: #2878a8;
}

.blog-article__content .blog-callout--warning {
    background: var(--blog-accent-soft);
    border-left-color: var(--blog-accent);
}

.blog-article__content .blog-callout__icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 0.05rem;
}

.blog-article__content .blog-callout__body {
    flex: 1;
    min-width: 0;
}

.blog-article__content .blog-callout__body p:last-child {
    margin-bottom: 0;
}

.blog-article__content .blog-highlight {
    margin: 1.4rem 0;
    padding: 0.85rem 1.1rem;
    border-radius: 8px;
    background: #fffbe6;
    border-left: 4px solid #f0c040;
    font-style: italic;
    line-height: 1.75;
}

.blog-article__content .blog-highlight p:last-child {
    margin-bottom: 0;
}

.blog-article__content .blog-quote-block {
    margin: 1.6rem 0;
    padding: 1rem 1.2rem;
    border-left: 4px solid var(--blog-accent);
    background: #fff8ef;
    border-radius: 0 10px 10px 0;
}

.blog-article__content .blog-quote-block p {
    font-size: 1.08rem;
    font-style: italic;
    font-family: var(--font-display);
    color: var(--blog-ink);
    margin-bottom: 0;
    line-height: 1.65;
}

.blog-article__content .blog-align-left {
    text-align: left;
    margin: 0.8rem 0;
}

.blog-article__content .blog-align-center {
    text-align: center;
    margin: 0.8rem 0;
}

.blog-article__content .blog-align-right {
    text-align: right;
    margin: 0.8rem 0;
}

.blog-write-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 8px;
    background: var(--blog-accent);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity .15s;
}
.blog-write-btn:hover { opacity: .85; color: #fff; }

/* ── Author VPS badge (dòng tác giả đầu bài) ── */
.blog-author-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.vps-badge {
    display: inline-block;
    padding: 2px 9px;
    background: #1a5276;
    color: #fff;
    font-size: 0.70em;
    font-weight: 700;
    border-radius: 4px;
    letter-spacing: 0.06em;
    vertical-align: middle;
    font-family: var(--font-body);
}

/* ── Box tư vấn CTA cuối bài ── */
.author-cta-box {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    margin: 40px 0 32px;
    padding: 20px 24px;
    border: 1px solid var(--blog-line);
    border-radius: 12px;
    background: var(--blog-surface);
}
.author-cta-box__left { flex-shrink: 0; }
.author-cta-box__avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
}
.author-cta-box__avatar-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--blog-line);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blog-muted);
    font-size: 1.8em;
}
.author-cta-box__info { flex: 1; min-width: 0; }
.author-cta-box__name {
    font-size: 1.05em;
    font-weight: 700;
    color: var(--blog-ink);
    font-family: var(--font-display);
}
.author-cta-box__role {
    font-size: 0.82em;
    color: var(--blog-muted);
    margin-top: 3px;
}
.author-cta-box__id {
    font-size: 0.88em;
    color: #1a5276;
    margin-top: 8px;
}
.author-cta-box__id strong {
    font-weight: 700;
    letter-spacing: 0.04em;
}
.author-cta-box__qr {
    flex-shrink: 0;
    text-align: center;
}
.author-cta-box__qr img {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    display: block;
}
.author-cta-box__qr small {
    display: block;
    font-size: 0.68em;
    color: var(--blog-muted);
    margin-top: 4px;
}
@media (max-width: 520px) {
    .author-cta-box {
        flex-wrap: wrap;
        gap: 14px;
    }
    .author-cta-box__qr { order: 3; }
}

/* Text alignment blocks */
.blog-align-left   { text-align: left; }
.blog-align-center { text-align: center; }
.blog-align-right  { text-align: right; }

.blog-quick-edit-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    margin-top: 16px;
    padding: 10px 12px;
    border: 1px solid rgba(219, 122, 18, 0.28);
    border-radius: 6px;
    background: var(--blog-accent-soft);
    color: var(--blog-accent);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(219, 122, 18, 0.08);
}

.blog-quick-edit-trigger:hover {
    background: #ffe8ca;
    border-color: rgba(219, 122, 18, 0.5);
    color: #b85f08;
}

.blog-quick-edit-trigger--mobile {
    margin: 16px 0 4px;
    font-size: 0.8rem;
}

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

.blog-quick-edit {
    position: fixed;
    inset: 0;
    z-index: 9000;
}

.blog-quick-edit__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 24, 28, 0.52);
}

.blog-quick-edit__dialog {
    position: relative;
    width: min(1080px, calc(100vw - 28px));
    max-height: calc(100vh - 36px);
    margin: 18px auto;
    padding: 18px;
    overflow: auto;
    border: 1px solid var(--blog-line);
    border-radius: 8px;
    background: var(--blog-surface);
    color: var(--blog-ink);
    box-shadow: 0 22px 70px rgba(15, 18, 22, 0.28);
}

.blog-quick-edit__header,
.blog-quick-edit__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.blog-quick-edit__header {
    margin-bottom: 14px;
}

.blog-quick-edit__eyebrow {
    color: var(--blog-accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.blog-quick-edit__header h2 {
    margin: 2px 0 0;
    color: var(--blog-ink);
    font-family: var(--font-display);
    font-size: 1.15rem;
}

.blog-quick-edit__icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--blog-line);
    border-radius: 6px;
    background: var(--blog-panel);
    color: var(--blog-muted);
    cursor: pointer;
}

.blog-quick-edit__icon-btn:hover {
    color: var(--blog-accent);
    border-color: var(--blog-accent);
}

.blog-quick-edit__status {
    margin-bottom: 10px;
    padding: 9px 11px;
    border: 1px solid var(--blog-line);
    border-radius: 6px;
    background: var(--blog-panel);
    color: var(--blog-muted);
    font-size: 0.86rem;
}

.blog-quick-edit__status.is-error {
    border-color: #d65a45;
    color: #b83c28;
}

.blog-quick-edit__textarea {
    width: 100%;
    min-height: 420px;
    padding: 12px;
    border: 1px solid var(--blog-line);
    border-radius: 6px;
    background: var(--blog-panel);
    color: var(--blog-ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92rem;
    line-height: 1.55;
}

.blog-quick-edit__footer {
    margin-top: 14px;
    justify-content: flex-end;
}

.blog-quick-edit__btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 6px;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
}

.blog-quick-edit__btn--ghost {
    border: 1px solid var(--blog-line);
    background: transparent;
    color: var(--blog-muted);
}

.blog-quick-edit__btn--primary {
    border: 1px solid var(--blog-accent);
    background: var(--blog-accent);
    color: #fff;
}

.blog-quick-edit__btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.blog-quick-edit .EasyMDEContainer {
    border: 1px solid var(--blog-line);
    border-radius: 6px;
    overflow: visible;
}

.blog-quick-edit .editor-toolbar {
    border: 0;
    border-bottom: 1px solid var(--blog-line);
    background: var(--blog-panel);
    position: sticky;
    top: 0;
    z-index: 30;
    border-radius: 6px 6px 0 0;
}

.blog-quick-edit .CodeMirror {
    border: 0;
    min-height: 520px;
}

.blog-quick-edit .CodeMirror-scroll {
    min-height: 520px;
}

.blog-quick-edit .EasyMDEContainer.sided--no-fullscreen .editor-toolbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 50%;
    z-index: 9200;
    border-radius: 0;
    box-sizing: border-box;
}

.blog-quick-edit .editor-toolbar.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9200;
    border-radius: 0;
}

.blog-quick-edit .EasyMDEContainer.sided--no-fullscreen .CodeMirror-wrap {
    margin-top: 48px;
}

.blog-quick-edit-open {
    overflow: hidden;
}

.editor-color-picker,
.editor-highlight-picker {
    position: absolute;
    z-index: 9999;
    background: #fff;
    border: 1px solid #d9e0ea;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 4px 20px rgba(27, 42, 65, 0.15);
}

.editor-color-picker {
    min-width: 210px;
}

.editor-highlight-picker {
    min-width: 180px;
}

.ecp-title {
    margin-bottom: 10px;
    color: #6f7b8a;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ecp-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 10px;
}

.ecp-swatch {
    width: 30px;
    height: 30px;
    border: 2px solid transparent;
    border-radius: 7px;
    cursor: pointer;
    transition: transform 0.12s, border-color 0.12s;
}

.ecp-swatch:hover {
    border-color: #1b2a41;
    transform: scale(1.12);
}

.ecp-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6f7b8a;
    font-size: 0.82rem;
}

.ecp-color-input {
    width: 32px;
    height: 28px;
    padding: 0;
    border: 1px solid #d9e0ea;
    border-radius: 6px;
    cursor: pointer;
}

/* Quick edit chart builder inherits blog palette instead of admin palette. */
.blog-quick-edit-chart-builder {
    --blog-admin-primary: var(--blog-accent);
    --blog-admin-heading: var(--blog-ink);
    --blog-admin-text: var(--blog-ink);
    --blog-admin-text-soft: var(--blog-muted);
    --blog-admin-surface: #fffdf9;
    --blog-admin-surface-soft: var(--blog-accent-soft);
    --blog-admin-border: var(--blog-line);
    --blog-admin-border-strong: rgba(27, 42, 65, 0.34);
    --blog-admin-danger: #c0392b;
    --blog-admin-radius-sm: 6px;
    --blog-admin-radius-lg: 8px;
}

.cb-modal {
    position: fixed;
    inset: 0;
    z-index: 9100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cb-modal[hidden] {
    display: none;
}

.cb-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
}

.cb-modal__dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(94vw, 1120px);
    height: min(88vh, 720px);
    overflow: hidden;
    border-radius: var(--blog-admin-radius-lg);
    background: var(--blog-admin-surface);
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.22);
}

.cb-modal__header,
.cb-modal__footer {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    padding: 14px 20px;
    border-color: var(--blog-admin-border);
    color: var(--blog-admin-heading);
    font-size: 0.95rem;
    font-weight: 700;
}

.cb-modal__header {
    justify-content: space-between;
    border-bottom: 1px solid var(--blog-admin-border);
}

.cb-modal__header i {
    margin-right: 6px;
    color: var(--blog-admin-primary);
}

.cb-modal__body {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.cb-modal__footer {
    justify-content: flex-end;
    border-top: 1px solid var(--blog-admin-border);
}

.cb-sidebar {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: 4px;
    width: 196px;
    padding: 10px 8px;
    overflow: auto;
    border-right: 1px solid var(--blog-admin-border);
    background: var(--blog-admin-surface-soft);
}

.cb-sidebar-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 6px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--blog-admin-border);
}

.cb-sidebar-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.cb-sidebar-group__title {
    padding: 4px 8px 6px;
    color: var(--blog-admin-text-soft);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.cb-type-btn {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    width: 100%;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: var(--blog-admin-radius-sm);
    background: none;
    color: var(--blog-admin-text);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.84rem;
    text-align: left;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
    white-space: normal;
}

.cb-type-btn i {
    width: 16px;
    margin-top: 2px;
    color: var(--blog-admin-text-soft);
    flex-shrink: 0;
    font-size: 0.9rem;
    text-align: center;
}

.cb-type-btn__text {
    min-width: 0;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.cb-type-btn:hover {
    background: #f0f4fa;
    border-color: var(--blog-admin-border);
    color: var(--blog-admin-primary);
}

.cb-type-btn:hover i {
    color: var(--blog-admin-primary);
}

.cb-type-btn.is-active {
    background: #e8eef7;
    border-color: var(--blog-admin-primary);
    color: var(--blog-admin-primary);
    font-weight: 600;
}

.cb-type-btn.is-active i {
    color: var(--blog-admin-primary);
}

.cb-preview {
    flex: 0 0 min(42%, 400px);
    border-right: 1px solid var(--blog-admin-border);
    background: #fafbfc;
    min-width: 240px;
}

.cb-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cb-form {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cb-series-list,
.cb-nv-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 6px;
}

.cb-stack-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 8px;
}

.cb-panel-row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.cb-series-row,
.cb-xy-row,
.cb-radar-series-row {
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    background: var(--blog-admin-surface-soft);
    border: 1px solid var(--blog-admin-border);
    border-radius: var(--blog-admin-radius-sm);
}

.cb-series-row__controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
}

.cb-series-name-input {
    flex: 1 1 120px;
    min-width: 100px;
}

.cb-xy-size-input {
    flex: 0 0 80px;
    min-width: 60px;
}

.cb-series-row .cb-textarea,
.cb-xy-row .cb-textarea,
.cb-radar-series-row .cb-textarea {
    width: 100%;
    box-sizing: border-box;
}

.cb-series-row__controls .cb-remove-btn {
    margin-left: auto;
    flex-shrink: 0;
}

.cb-nv-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.cb-nv-row .baf-input {
    flex: 1;
    min-width: 0;
}

.cb-nv-row .baf-input:first-child {
    flex: 0 0 150px;
}

.cb-row-grid {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 8px;
}

.cb-row-grid--double {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cb-row-grid--triple {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cb-row-grid--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cb-row-grid--five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.cb-row-grid--six {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.cb-row-grid--single {
    grid-template-columns: 1fr;
}

.cb-row-grid--combo {
    grid-template-columns: minmax(150px, 1fr) minmax(260px, 1.2fr);
}

.cb-textarea {
    min-height: 70px;
    resize: vertical;
    line-height: 1.45;
}

.cb-series-meta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 1px dashed var(--blog-admin-border);
    border-radius: var(--blog-admin-radius-sm);
    background: #fafbfc;
    color: var(--blog-admin-text-soft);
    font-size: 0.78rem;
    padding: 0 10px;
    white-space: nowrap;
}

.cb-series-advanced-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cb-series-advanced-controls .baf-input {
    flex: 1 1 80px;
    min-width: 72px;
}

.cb-series-line-type.is-hidden {
    display: none;
}

.cb-inline-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.cb-color-block {
    padding: 12px;
    border: 1px solid var(--blog-admin-border);
    border-radius: var(--blog-admin-radius-sm);
    background: #fafbfc;
}

.cb-palette-row {
    display: grid;
    grid-template-columns: minmax(180px, 220px) 1fr;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.cb-color-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 52px 32px;
    gap: 8px;
    align-items: center;
    padding: 6px 0;
    border-top: 1px dashed var(--blog-admin-border);
}

.cb-color-row:first-child {
    border-top: none;
}

.cb-color-label {
    min-width: 0;
    color: var(--blog-admin-text);
    font-size: 0.84rem;
}

.cb-color-input {
    width: 52px;
    height: 34px;
    border: 1px solid var(--blog-admin-border);
    border-radius: var(--blog-admin-radius-sm);
    background: #fff;
    padding: 2px;
    cursor: pointer;
}

.cb-color-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--blog-admin-border);
    border-radius: var(--blog-admin-radius-sm);
    background: #fff;
    color: var(--blog-admin-text-soft);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s, color 0.12s, border-color 0.12s, background 0.12s;
}

.cb-color-reset.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.cb-color-reset:hover {
    color: var(--blog-admin-primary);
    border-color: var(--blog-admin-primary);
    background: #f0f4fa;
}

.cb-remove-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--blog-admin-border);
    border-radius: var(--blog-admin-radius-sm);
    background: #fff;
    color: var(--blog-admin-danger);
    cursor: pointer;
    font-size: 0.75rem;
    transition: background 0.12s, border-color 0.12s;
}

.cb-remove-btn:hover {
    background: #fef2f2;
    border-color: var(--blog-admin-danger);
}

.cb-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px dashed var(--blog-admin-border-strong);
    border-radius: var(--blog-admin-radius-sm);
    background: none;
    color: var(--blog-admin-text-soft);
    font-size: 0.82rem;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.12s, border-color 0.12s, background 0.12s;
    align-self: flex-start;
}

.cb-add-btn:hover {
    color: var(--blog-admin-primary);
    border-color: var(--blog-admin-primary);
    background: #f0f4fa;
}

/* ── Tags ở cuối bài (kiểu VnEconomy) ── */
.bm-tags--footer {
    margin-top: 1.5rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--blog-line);
}

.blog-article__tags--footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--blog-line);
}

/* ── Blog comments ── */
.blog-comments {
    margin-top: 2.5rem;
    padding-top: 1.35rem;
    border-top: 2px solid rgba(27, 42, 65, 0.12);
}

/* Topbar: tiêu đề trái, toggle button phải */
.blog-comments__topbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.blog-comments__topbar .blog-comments__eyebrow {
    margin-bottom: 2px;
}

.blog-comments__topbar h2 {
    margin: 0;
    color: var(--blog-ink);
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    line-height: 1.25;
}

/* Toggle button collapse/expand */
.blog-comments__toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    align-self: flex-end;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(27, 42, 65, 0.14);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--blog-muted);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}

.blog-comments__toggle:hover,
.blog-comments__toggle.is-open {
    border-color: rgba(40, 120, 168, 0.3);
    background: rgba(40, 120, 168, 0.06);
    color: var(--blog-ink);
}

.blog-comments__toggle-chevron {
    font-size: 0.72rem;
    transition: transform 0.18s ease;
}

.blog-comments__toggle.is-open .blog-comments__toggle-chevron {
    transform: rotate(180deg);
}

.blog-comments__body {
    margin-top: 0;
}

/* Nút mở/đóng phản hồi (replies toggle) */
.blog-comment__replies-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    padding: 3px 9px;
    border: 1px solid rgba(40, 120, 168, 0.22);
    border-radius: 6px;
    background: transparent;
    color: #2878a8;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.blog-comment__replies-toggle:hover {
    background: rgba(40, 120, 168, 0.08);
    border-color: rgba(40, 120, 168, 0.4);
}

.blog-comment__replies-toggle.is-open {
    color: var(--blog-muted);
    border-color: rgba(27, 42, 65, 0.16);
}

/* Animation collapse/expand mượt mà (không giật màn hình) */
.blog-comment__replies-toggle + .blog-comment__replies {
    position: relative;
    overflow: hidden;
    max-height: 4000px;
    margin-top: 6px;
    padding-left: 12px;
    /* Expand: ease-out để nội dung bung ra nhanh từ đầu */
    transition: max-height 0.4s ease-out, opacity 0.25s ease;
    opacity: 1;
}

.blog-comment__replies-toggle + .blog-comment__replies.is-collapsed {
    max-height: 0;
    opacity: 0;
    /* Collapse: ease-in để co lại mượt từ dưới, không giật */
    transition: max-height 0.3s ease-in, opacity 0.15s ease;
}

/* Nested comment indent — padding-left của replies container đã xử lý indent */
.blog-comment--reply {
    margin-left: 0;
}

.blog-comments__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.blog-comments__eyebrow {
    margin: 0 0 4px;
    color: #2878a8;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.blog-comments h2 {
    margin: 0;
    color: var(--blog-ink);
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    line-height: 1.25;
}

.blog-comments__status {
    flex-shrink: 0;
    max-width: 280px;
    padding: 7px 10px;
    border: 1px solid rgba(40, 120, 168, 0.22);
    border-radius: 8px;
    background: #eef8fd;
    color: #2878a8;
    font-size: 0.82rem;
    font-weight: 600;
}

.blog-comments__status.is-error {
    border-color: rgba(190, 18, 60, 0.22);
    background: #fff1f2;
    color: #be123c;
}

.blog-comments__tabs {
    display: inline-flex;
    gap: 4px;
    margin: 0 0 14px;
    padding: 3px;
    border: 1px solid rgba(27, 42, 65, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.64);
}

.blog-comments__tabs button {
    min-height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--blog-muted);
    font-family: var(--font-body);
    font-size: 0.84rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.blog-comments__tabs button:hover {
    color: var(--blog-ink);
    background: rgba(40, 120, 168, 0.08);
}

.blog-comments__tabs button.is-active {
    background: var(--blog-ink);
    color: #fff;
    box-shadow: 3px 3px 0 rgba(219, 122, 18, 0.18);
}

.blog-comments__form {
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid var(--blog-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.74);
}

.blog-comments__label {
    display: block;
    margin-bottom: 8px;
    color: var(--blog-ink);
    font-size: 0.92rem;
    font-weight: 700;
}

.blog-comments__form textarea {
    display: block;
    width: 100%;
    min-height: 118px;
    resize: vertical;
    padding: 12px 13px;
    border: 1px solid rgba(27, 42, 65, 0.16);
    border-radius: 8px;
    background: #fff;
    color: var(--blog-ink);
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.65;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.blog-comments__form textarea:focus {
    border-color: rgba(219, 122, 18, 0.6);
    box-shadow: 0 0 0 3px rgba(219, 122, 18, 0.12);
}

.blog-comments__form textarea.is-sensitive,
.blog-comment__reply-form textarea.is-sensitive {
    border-color: rgba(190, 18, 60, 0.55);
    box-shadow: 0 0 0 3px rgba(190, 18, 60, 0.1);
}

.blog-comments__sensitive-warning,
.blog-comment__sensitive-warning {
    display: block;
    margin-top: 6px;
    padding: 7px 10px;
    border: 1px solid rgba(190, 18, 60, 0.2);
    border-radius: 7px;
    background: #fff1f2;
    color: #be123c;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.5;
}

.blog-comments__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 10px;
}

.blog-comments__hint {
    color: var(--blog-muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

.blog-comments__actions button,
.blog-comments__login a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 15px;
    border: 1px solid var(--blog-accent);
    border-radius: 8px;
    background: var(--blog-accent);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease;
}

.blog-comments__actions button:hover,
.blog-comments__login a:hover {
    box-shadow: 4px 4px 0 rgba(27, 42, 65, 0.11);
    transform: translate(-1px, -1px);
}

.blog-comments__actions button:disabled {
    cursor: progress;
    opacity: 0.65;
    transform: none;
    box-shadow: none;
}

.blog-comments__login {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    padding: 14px;
    border: 1px dashed rgba(219, 122, 18, 0.35);
    border-radius: 8px;
    background: var(--blog-accent-soft);
}

.blog-comments__login strong,
.blog-comments__login span {
    display: block;
}

.blog-comments__login strong {
    color: var(--blog-ink);
    font-size: 0.95rem;
}

.blog-comments__login span {
    margin-top: 3px;
    color: var(--blog-muted);
    font-size: 0.84rem;
}

.blog-comments__list {
    display: grid;
    gap: 12px;
}

.blog-comments__empty {
    padding: 20px 14px;
    border: 1px solid var(--blog-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.58);
    color: var(--blog-muted);
    text-align: center;
    font-size: 0.92rem;
}

.blog-comment {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 11px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(27, 42, 65, 0.09);
}

.blog-comment:last-child {
    border-bottom: none;
}

.blog-comment__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(40, 120, 168, 0.22);
    border-radius: 50%;
    background: #eef8fd;
    color: #2878a8;
    font-size: 0.95rem;
    font-weight: 800;
}

.blog-comment__body {
    min-width: 0;
}

/* Thread line: đường dọc clickable bên trái replies container */
.blog-comment__thread-line {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 12px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    z-index: 1;
}

.blog-comment__thread-line::after {
    content: '';
    position: absolute;
    top: 2px;
    bottom: 2px;
    left: 5px;
    width: 2px;
    background: rgba(40, 120, 168, 0.22);
    border-radius: 2px;
    transition: background 0.15s ease;
}

.blog-comment__thread-line:hover::after {
    background: #2878a8;
}

.blog-comment__thread-line.is-open::after {
    background: rgba(40, 120, 168, 0.38);
}

.blog-comment__meta {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 7px 10px;
    margin-bottom: 4px;
}

.blog-comment__meta strong {
    color: var(--blog-ink);
    font-size: 0.93rem;
}

.blog-comment__meta time {
    color: var(--blog-muted);
    font-size: 0.78rem;
}

.blog-comment p {
    margin: 0;
    color: var(--blog-ink);
    font-size: 0.94rem;
    line-height: 1.72;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.blog-comment__tools {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 9px;
    flex-wrap: nowrap;
}

/* Primary buttons: Thích, Trả lời, Báo cáo, Sửa */
.blog-comment__like,
.blog-comment__reply-button,
.blog-comment__report-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    padding: 0 8px;
    border: 1px solid rgba(27, 42, 65, 0.12);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--blog-muted);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.14s ease, color 0.14s ease, background 0.14s ease, transform 0.14s ease;
}

.blog-comment__like:hover,
.blog-comment__reply-button:hover,
.blog-comment__report-button:hover {
    border-color: rgba(219, 122, 18, 0.36);
    background: var(--blog-accent-soft);
    color: var(--blog-accent);
    transform: translateY(-1px);
}

.blog-comment__like.is-active {
    border-color: rgba(219, 122, 18, 0.42);
    background: var(--blog-accent-soft);
    color: var(--blog-accent);
}

.blog-comment__like:disabled,
.blog-comment__reply-submit:disabled {
    cursor: progress;
    opacity: 0.72;
    transform: none;
}

/* Menu "..." wrap */
.blog-comment__menu-wrap {
    position: relative;
    margin-left: auto;
    flex-shrink: 0;
}

.blog-comment__menu-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 28px;
    padding: 0 6px;
    border: 1px solid rgba(27, 42, 65, 0.12);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--blog-muted);
    font-family: var(--font-body);
    font-size: 0.72rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}

.blog-comment__menu-trigger:hover,
.blog-comment__menu-trigger[aria-expanded="true"] {
    border-color: rgba(27, 42, 65, 0.22);
    background: rgba(27, 42, 65, 0.06);
    color: var(--blog-ink);
}

.blog-comment__menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 300;
    min-width: 148px;
    padding: 4px;
    border: 1px solid rgba(27, 42, 65, 0.14);
    border-radius: 9px;
    background: #fff;
    box-shadow: 4px 6px 18px rgba(27, 42, 65, 0.13);
}

.blog-comment__menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 34px;
    padding: 0 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--blog-muted);
    font-family: var(--font-body);
    font-size: 0.84rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

.blog-comment__menu-item:hover {
    background: rgba(27, 42, 65, 0.06);
    color: var(--blog-ink);
}

.blog-comment__menu-item--danger {
    color: #be123c;
}

.blog-comment__menu-item--danger:hover {
    background: #fff1f2;
    color: #be123c;
}

.blog-comment__menu-item--warn {
    color: #8a4b0f;
}

.blog-comment__menu-item--warn:hover {
    background: var(--blog-accent-soft);
    color: #8a4b0f;
}

/* Giữ lại class cũ để không vỡ selector :disabled */
.blog-comment__report-button:disabled,
.blog-comment__admin-button:disabled {
    cursor: progress;
    opacity: 0.72;
}

.blog-comment__like-count {
    min-width: 1ch;
    color: inherit;
}

.blog-comment.is-highlighted {
    border-radius: 8px;
    background: rgba(219, 122, 18, 0.08);
    box-shadow: inset 3px 0 0 rgba(219, 122, 18, 0.74);
}

.blog-comment__edited-badge {
    color: var(--blog-muted);
    font-size: 0.74rem;
    font-weight: 400;
    font-style: italic;
}

.blog-comment__edit-form {
    margin-top: 6px;
}

.blog-comment__edit-form textarea {
    display: block;
    width: 100%;
    min-height: 72px;
    resize: vertical;
    padding: 9px 11px;
    border: 1px solid rgba(219, 122, 18, 0.45);
    border-radius: 7px;
    background: #fff;
    color: var(--blog-ink);
    font-family: var(--font-body);
    font-size: 0.93rem;
    line-height: 1.6;
    outline: none;
}

.blog-comment__edit-form textarea:focus {
    border-color: rgba(219, 122, 18, 0.7);
    box-shadow: 0 0 0 3px rgba(219, 122, 18, 0.1);
}

.blog-comment__edit-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    margin-top: 6px;
}

.blog-comment__edit-save,
.blog-comment__edit-cancel {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 7px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    transition: opacity 0.12s ease;
}

.blog-comment__edit-save {
    border: 1px solid var(--blog-accent);
    background: var(--blog-accent);
    color: #fff;
}

.blog-comment__edit-save:disabled {
    cursor: progress;
    opacity: 0.65;
}

.blog-comment__edit-cancel {
    border: 1px solid rgba(27, 42, 65, 0.14);
    background: transparent;
    color: var(--blog-muted);
}

.blog-comment__edit-cancel:hover {
    background: rgba(27, 42, 65, 0.06);
    color: var(--blog-ink);
}

.blog-comment-ban {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(27, 42, 65, 0.28);
}

.blog-comment-ban__panel {
    width: min(420px, 100%);
    padding: 16px;
    border: 1px solid var(--blog-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 8px 8px 0 rgba(27, 42, 65, 0.12);
}

.blog-comment-report {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(27, 42, 65, 0.28);
}

.blog-comment-report__panel {
    width: min(420px, 100%);
    padding: 16px;
    border: 1px solid var(--blog-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 8px 8px 0 rgba(27, 42, 65, 0.12);
}

.blog-comment-ban__panel strong {
    display: block;
    margin-bottom: 12px;
    color: var(--blog-ink);
    font-size: 1rem;
}

.blog-comment-report__panel strong {
    display: block;
    margin-bottom: 12px;
    color: var(--blog-ink);
    font-size: 1rem;
}

.blog-comment-ban__options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 10px;
}

.blog-comment-ban__options button {
    min-height: 34px;
    border: 1px solid rgba(27, 42, 65, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.74);
    color: var(--blog-muted);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
}

.blog-comment-ban__options button.is-active {
    border-color: rgba(219, 122, 18, 0.42);
    background: var(--blog-accent-soft);
    color: var(--blog-accent);
}

.blog-comment-ban textarea {
    width: 100%;
    min-height: 84px;
    resize: vertical;
    padding: 10px 11px;
    border: 1px solid rgba(27, 42, 65, 0.14);
    border-radius: 8px;
    background: #fff;
    color: var(--blog-ink);
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.6;
    outline: none;
}

.blog-comment-report textarea {
    width: 100%;
    min-height: 84px;
    resize: vertical;
    padding: 10px 11px;
    border: 1px solid rgba(27, 42, 65, 0.14);
    border-radius: 8px;
    background: #fff;
    color: var(--blog-ink);
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.6;
    outline: none;
}

.blog-comment-ban textarea:focus {
    border-color: rgba(219, 122, 18, 0.56);
    box-shadow: 0 0 0 3px rgba(219, 122, 18, 0.1);
}

.blog-comment-report textarea:focus {
    border-color: rgba(219, 122, 18, 0.56);
    box-shadow: 0 0 0 3px rgba(219, 122, 18, 0.1);
}

.blog-comment-ban__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
}

.blog-comment-report__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
}

.blog-comment-ban__cancel,
.blog-comment-ban__submit,
.blog-comment-report__cancel,
.blog-comment-report__submit {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.84rem;
    font-weight: 800;
    cursor: pointer;
}

.blog-comment-ban__cancel,
.blog-comment-report__cancel {
    border: 1px solid rgba(27, 42, 65, 0.12);
    background: #fff;
    color: var(--blog-muted);
}

.blog-comment-ban__submit,
.blog-comment-report__submit {
    border: 1px solid var(--blog-accent);
    background: var(--blog-accent);
    color: #fff;
}

.blog-comment__replies {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.blog-comment--reply {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    padding: 9px 0;
    border-bottom: 0;
}

.blog-comment--reply .blog-comment__avatar {
    width: 34px;
    height: 34px;
    font-size: 0.78rem;
}

.blog-comment--reply .blog-comment__meta strong {
    font-size: 0.88rem;
}

.blog-comment--reply p {
    font-size: 0.9rem;
}

.blog-comment__reply-form {
    display: grid;
    gap: 8px;
    margin-top: 4px;
    padding: 10px;
    border: 1px solid rgba(27, 42, 65, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.62);
}

.blog-comment__reply-form textarea {
    width: 100%;
    min-height: 86px;
    resize: vertical;
    padding: 10px 11px;
    border: 1px solid rgba(27, 42, 65, 0.14);
    border-radius: 8px;
    background: #fff;
    color: var(--blog-ink);
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.6;
    outline: none;
}

.blog-comment__reply-form textarea:focus {
    border-color: rgba(219, 122, 18, 0.56);
    box-shadow: 0 0 0 3px rgba(219, 122, 18, 0.1);
}

.blog-comment__reply-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.blog-comment__reply-cancel,
.blog-comment__reply-submit {
    min-height: 32px;
    padding: 0 11px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
}

.blog-comment__reply-cancel {
    border: 1px solid rgba(27, 42, 65, 0.12);
    background: #fff;
    color: var(--blog-muted);
}

.blog-comment__reply-submit {
    border: 1px solid var(--blog-accent);
    background: var(--blog-accent);
    color: #fff;
}

.blog-tags-label {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--blog-muted);
    margin-right: 6px;
    white-space: nowrap;
}

/* ── Video embed responsive 16:9 ── */
.video-embed-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    margin: 1.5rem 0;
    background: #000;
}

.video-embed-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.tiktok-player-wrap {
    width: min(100%, 360px);
    margin: 1.5rem auto;
}

.tiktok-player-wrap iframe {
    display: block;
    width: 100%;
    aspect-ratio: 9 / 16;
    height: auto;
    min-height: 580px;
    border: 0;
    border-radius: 10px;
    background: #000;
}

.tiktok-player-link {
    display: block;
    margin-top: 0.45rem;
    text-align: center;
    font-size: 0.86rem;
}

@media (max-width: 640px) {
    .blog-comments {
        margin-top: 2rem;
        padding-top: 1.1rem;
    }

    .blog-comments__topbar {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .blog-comments__header,
    .blog-comments__actions,
    .blog-comments__login {
        align-items: stretch;
        flex-direction: column;
    }

    .blog-comments__status {
        max-width: none;
    }

    .blog-comments__tabs {
        display: flex;
        width: 100%;
    }

    .blog-comments__tabs button {
        flex: 1 1 0;
        padding: 0 8px;
    }

    .blog-comments__actions button,
    .blog-comments__login a {
        width: 100%;
    }

    .blog-comment {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .blog-comment__avatar {
        width: 36px;
        height: 36px;
        font-size: 0.84rem;
    }

    .blog-comment__tools {
        flex-wrap: wrap;
    }

    .blog-comment--reply {
        grid-template-columns: 30px minmax(0, 1fr);
        gap: 8px;
    }

    .blog-comment--reply .blog-comment__avatar {
        width: 30px;
        height: 30px;
    }

    .blog-comment__reply-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .blog-comment-ban__options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .blog-comment-ban__actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .blog-comment-report__actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .blog-quick-edit__dialog {
        width: calc(100vw - 18px);
        max-height: calc(100vh - 18px);
        margin: 9px auto;
        padding: 14px;
    }

    .blog-quick-edit__header h2 {
        font-size: 1rem;
    }

    .blog-quick-edit__footer {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .blog-quick-edit__btn {
        justify-content: center;
        width: 100%;
    }

    .blog-quick-edit__textarea,
    .blog-quick-edit .CodeMirror {
        min-height: 360px;
    }

    .blog-quick-edit .CodeMirror-scroll {
        min-height: 360px;
    }

    .cb-modal {
        padding: 9px;
    }

    .cb-modal__dialog {
        width: calc(100vw - 18px);
        height: calc(100vh - 18px);
    }

    .cb-modal__body {
        flex-direction: column;
    }

    .cb-sidebar {
        width: 100%;
        max-height: 180px;
        flex-direction: row;
        flex-wrap: wrap;
        border-right: 0;
        border-bottom: 1px solid var(--blog-admin-border);
    }

    .cb-preview {
        flex: 0 0 200px;
        border-right: 0;
        border-bottom: 1px solid var(--blog-admin-border);
    }

    .cb-row-grid--double,
    .cb-row-grid--triple,
    .cb-row-grid--four,
    .cb-row-grid--five,
    .cb-row-grid--six,
    .cb-row-grid--combo,
    .cb-palette-row,
    .cb-inline-grid {
        grid-template-columns: 1fr;
    }

    .cb-color-row {
        grid-template-columns: 1fr auto auto;
    }
}

@media (max-width: 380px) {
    .tiktok-player-wrap {
        width: 100%;
    }

    .tiktok-player-wrap iframe {
        min-height: auto;
    }
}

/* ─── Pagination desktop ─── */
.blog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 32px 0 16px;
    flex-wrap: wrap;
}

.blog-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--blog-line);
    background: var(--blog-panel);
    color: var(--blog-ink);
    font-size: 0.88rem;
    font-weight: 600;
    font-family: var(--font-body);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    text-decoration: none;
}

.blog-page-btn:hover:not(.is-active):not(.is-disabled) {
    background: var(--blog-accent-soft);
    border-color: var(--blog-accent);
    color: var(--blog-accent);
}

.blog-page-btn.is-active {
    background: var(--blog-accent);
    border-color: var(--blog-accent);
    color: #fff;
    cursor: default;
}

.blog-page-btn.is-disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.blog-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 38px;
    color: var(--blog-muted);
    font-size: 0.88rem;
}

/* ── Tag và Author clickable links ── */
.blog-tag--link,
.bm-tag--link {
    cursor: pointer;
    text-decoration: none;
    transition: background .14s, color .14s, border-color .14s;
}
.blog-tag--link:hover {
    background: #db7a12;
    color: #fff;
    border-color: transparent;
}
.bm-tag--link:hover {
    background: var(--blog-accent);
    color: #fff;
    border-color: transparent;
}

.author-chip--link {
    text-decoration: none;
    border-radius: 20px;
    padding: 2px 6px 2px 2px;
    transition: background .14s;
}
.author-chip--link:hover {
    background: var(--blog-accent-soft);
}
.author-chip--link:hover .author-chip__name {
    color: var(--blog-accent);
}

a.bm-author-chip {
    text-decoration: none;
    border-radius: 20px;
    padding: 2px 6px 2px 2px;
    transition: background .14s;
}
a.bm-author-chip:hover {
    background: var(--blog-accent-soft);
}
a.bm-author-chip:hover .bm-author-chip__name {
    color: var(--blog-accent);
}
