/* Restore the existing Layers palette where WordPress global styles override it. */
body.single-post { background: #080809; color: var(--ink); }
.single-post-layout a:not(.island-cta-btn):not(.btn) { color: var(--signal); }
.single-post-layout a:not(.island-cta-btn):not(.btn):hover { color: var(--link-hover); }
.post-editorial-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; column-gap: 48px; }
.post-editorial-grid--without-toc { grid-template-columns: minmax(0, 1fr); }
.post-content-review { display: contents; }
.post-editorial-grid .post-hero { grid-column: 1 / -1; }
.post-editorial-grid > .post-sidebar-column { grid-column: 2; grid-row: 2; }
/* Có mục lục: cột bài lấp đúng rãnh 1fr (1120 − 280 − 48 = 792 px) để mép trái thẳng với ảnh bìa và khối sau bài (14/10/2026). */
.post-editorial-grid:not(.post-editorial-grid--without-toc) .post-main-column { max-inline-size: none; }
.single-post-layout .table-responsive { max-inline-size: 100%; overflow-x: auto; }
.single-post-layout .table-responsive table { min-inline-size: 680px; }

/* Center the article introduction and let its lead image span the post frame. */
.single-post-layout .post-hero {
    padding-block: 0 2.5rem;
    text-align: center;
}
.single-post-layout .post-breadcrumb-wrapper { padding-block-start: clamp(1.75rem, 4vw, 2.75rem); }
.single-post-layout .post-breadcrumb-wrapper .breadcrumb-list { justify-content: center; }
.single-post-layout .post-hero-title {
    margin-block: 1.25rem 0;
    padding-block: 0;
    /* cỡ, font, độ đậm: quy tắc H1 trang chung ở layers.css */
}
.single-post-layout .post-hero-summary {
    max-inline-size: 760px;
    margin: 1.25rem auto 0;
    font-size: var(--text-lg);
    line-height: 1.75;
}
.single-post-layout .post-hero-details {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0 1.25rem;
    margin-block-start: 1.25rem;
    font-size: var(--text-xs);
}
.single-post-layout .post-hero-meta {
    justify-content: center;
    gap: 0.375rem 1.25rem;
    margin-block-start: 0;
    font-size: inherit;
}
.single-post-layout .post-copy-control {
    min-inline-size: min(11.5em, 100%);
    min-block-size: 44px;
}
.single-post-layout .post-copy-btn { padding-inline: 0.25rem; text-align: center; }
.single-post-layout #post-copy-status { margin-inline: auto; }
.single-post-layout .post-featured-image {
    max-inline-size: none;
    margin: 1.5rem 0 0;
    overflow: visible;
    border-radius: 0;
}
.single-post-layout .post-featured-img {
    inline-size: 100%;
    block-size: auto;
    max-block-size: none;
    border-radius: var(--radius-sm);
}

/* Bài dùng <section> cho từng mục; nhịp chữ đi xuyên qua section nằm ở studio.css (luật dùng chung cho mọi vùng nội dung). */
.single-post-layout .post-article-body {
    font-size: var(--text-md);
    line-height: 1.8;
}
/* Fill the available line before wrapping; do not balance editorial headings. */
.single-post-layout .post-hero-title,
.single-post-layout .post-article-body :is(h1, h2, h3, h4, h5, h6) {
    max-inline-size: none;
    white-space: normal;
    text-wrap: wrap;
}
/* Khoảng cách giữa các khối trong bài lấy từ nhịp chữ dùng chung (studio.css, token --flow-*); ở đây chỉ còn phần riêng của hình. */
.single-post-layout .post-article-body section > figure {
    margin-block-end: var(--flow-media);
    overflow: visible;
    border-radius: 0;
}
.single-post-layout .post-article-body figure img {
    display: block;
    inline-size: 100%;
    block-size: auto;
    border-radius: var(--radius-sm);
}
.single-post-layout .post-article-body figcaption,
.single-post-layout .post-featured-image figcaption {
    margin: 0.625rem 0 0;
    padding: 0;
    border: 0;
    color: var(--muted);
    font-size: var(--text-sm);
    font-weight: 400;
    font-style: normal;
    line-height: 1.5;
    text-align: center;
}
.single-post-layout .post-article-body section > .table-responsive {
    margin-block: var(--flow-media);
}
@media (max-width: 600px) {
    .single-post-layout .post-article-body { font-size: var(--text-md); }
    .single-post-layout .post-article-body section > figure { margin-block: 1.75rem; }
}
@media (max-width: 1024px) {
    .post-editorial-grid { grid-template-columns: minmax(0, 1fr); column-gap: 0; }
    /* Mục lục ẩn thì cột bài không trải hết khung (976px ở 1024 ≈ 110 ký tự/dòng): giữ cột đọc 780px, căn giữa (15/10/2026). */
    .post-editorial-grid:not(.post-editorial-grid--without-toc) .post-main-column { max-inline-size: 780px; }
}
/* Sau bài (15/10/2026): thẻ mời dùng công cụ + thẻ tác giả đứng cạnh nhau như lưới "Bài viết liên quan" bên dưới
 * (2 cột, cách 20px), cao bằng nhau, nút cùng nằm ở đáy thẻ; dưới 900px xếp chồng. */
.single-post-layout .post-after-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-block-start: var(--section-space); }
@media (min-width: 900px) {
    .single-post-layout .post-after-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
/* One restrained editorial credit shared by every article. */
.single-post-layout .post-author-bio-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    margin: 0;
    padding: clamp(22px, 3vw, 32px);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--paper);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.single-post-layout .post-author-bio-card__content { min-inline-size: 0; }
.single-post-layout .post-author-bio-card__eyebrow {
    margin: 0;
    color: var(--muted);
    font-size: var(--text-2xs);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.single-post-layout .post-author-name {
    margin-block-start: 5px;
    font-size: var(--text-lg);
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.single-post-layout .post-author-name a { display: inline-flex; align-items: center; min-block-size: var(--tap-min); text-decoration: none; }
.single-post-layout .post-author-name a:hover { color: var(--link-hover); }
.single-post-layout .post-author-bio-card__summary {
    margin-block-start: 6px;
    color: var(--muted);
    font-size: var(--text-sm);
    line-height: 1.6;
}
.single-post-layout .post-author-bio-card__method-link.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex: 0 0 auto;
    min-block-size: 44px;
    margin-block-start: auto;
    padding: 10px 16px;
    border: 1px solid var(--control-line);
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
    text-align: center;
}
.single-post-layout .post-author-bio-card__method-link.btn:hover {
    border-color: var(--line-strong);
    background: var(--signal-soft);
    color: var(--ink);
    transform: none;
}
.single-post-layout .post-author-bio-card__method-link.btn:active { background: var(--surface-strong); }
.single-post-layout .post-author-bio-card__method-link.btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
@media (max-width: 700px) {
    .single-post-layout .post-author-bio-card { gap: 16px; }
    .single-post-layout .post-author-bio-card__method-link.btn { max-inline-size: 100%; }
}
/* Điện thoại: nút của hai thẻ rộng hết thẻ, chữ bên trái, mũi tên bên phải; chữ dài xuống dòng đều hai dòng. */
@media (max-width: 480px) {
    .single-post-layout .post-cta-island__action { align-self: stretch; }
    .single-post-layout .island-cta-btn,
    .single-post-layout .post-author-bio-card__method-link.btn { inline-size: 100%; justify-content: space-between; text-align: start; }
    .single-post-layout .island-cta-btn__text { line-height: 1.4; text-wrap: balance; }
}
