/* =====================================================================
   chukyso.com - Doc bai viet (bai post + trang chinh sach)
   Theo WCAG 2.2 (1.4.3, 1.4.8, 1.4.10, 1.4.12, 2.5.8) & khuyen nghi typography:
   - Chu than bai 17-18px, gian dong 1.7-1.75 (tieng Viet co dau chong)
   - Do dai dong ~65-78 ky tu, khoang cach doan ~1.15em
   - Tieu de: khoang tren > khoang duoi de nhom noi dung
   - Bang cuon ngang tren dien thoai, khong ngat so
   ===================================================================== */
.post-content .entry-content,
.page-content .entry-content {
    --rd-fs: 1.125rem;          /* 18px */
    --rd-lh: 1.75;
    --rd-gap: 1.15em;
    max-width: 44rem;           /* ~704px => ~68-72 ky tu/dong */
    font-size: var(--rd-fs);
    line-height: var(--rd-lh);
    color: var(--cks-text);
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
.post-content .entry-content :is(p, ul, ol, blockquote, figure, pre, .cks-table-scroll),
.page-content .entry-content :is(p, ul, ol, blockquote, figure, pre, .cks-table-scroll) {
    margin-top: 0;
    margin-bottom: var(--rd-gap);
}
.post-content .entry-content :is(p, li, span),
.page-content .entry-content :is(p, li, span) {
    font-size: inherit;
    line-height: inherit;
}
/* Chuan hoa co chu dat cung trong trinh soan thao de nhat quan tren moi thiet bi */
.post-content .entry-content :is(p, li, span, div)[style*="font-size"],
.page-content .entry-content :is(p, li, span, div)[style*="font-size"] { font-size: inherit !important; }
.post-content .entry-content [style*="line-height"],
.page-content .entry-content [style*="line-height"] { line-height: inherit !important; }
.post-content .entry-content p:empty,
.page-content .entry-content p:empty { display: none; }

/* ---------- Tieu de ---------- */
.post-content .entry-content :is(h2, h3, h4, h5),
.page-content .entry-content :is(h2, h3, h4, h5) {
    color: var(--cks-ink);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -.01em;
    scroll-margin-top: 96px;
}
.post-content .entry-content h2, .page-content .entry-content h2 { font-size: 1.6rem; margin: 2em 0 .65em; padding-bottom: .35em; border-bottom: 2px solid var(--cks-line); }
.post-content .entry-content h3, .page-content .entry-content h3 { font-size: 1.3rem; margin: 1.7em 0 .55em; }
.post-content .entry-content h4, .page-content .entry-content h4 { font-size: 1.125rem; margin: 1.5em 0 .5em; }
.post-content .entry-content > :is(h2, h3, h4):first-child,
.page-content .entry-content > :is(h2, h3, h4):first-child { margin-top: 0; }
.post-content .entry-content :is(h2, h3, h4) :is(strong, b, span),
.page-content .entry-content :is(h2, h3, h4) :is(strong, b, span) { font-size: inherit !important; font-weight: inherit; color: inherit; }

/* ---------- Nhan manh, lien ket ---------- */
.post-content .entry-content :is(strong, b), .page-content .entry-content :is(strong, b) { color: var(--cks-ink); font-weight: 700; }
.post-content .entry-content a:not(.cks-btn):not(.cks-cat-cta),
.page-content .entry-content a:not(.cks-btn):not(.cks-cat-cta) {
    color: var(--cks-link, var(--cks-primary));
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: var(--cks-link-line, rgba(11, 99, 206, .35));
}
/* Chu dam / nghieng nam trong link van mang mau link */
.post-content .entry-content a :is(strong, b, em, i, span),
.page-content .entry-content a :is(strong, b, em, i, span) { color: inherit !important; }
.post-content .entry-content :is(strong, b) > a, .page-content .entry-content :is(strong, b) > a { font-weight: 700; }
.post-content .entry-content a:not(.cks-btn):not(.cks-cat-cta):hover,
.page-content .entry-content a:not(.cks-btn):not(.cks-cat-cta):hover { color: var(--cks-link-hover, var(--cks-primary)); text-decoration-color: currentColor; }

/* ---------- Danh sach ---------- */
.post-content .entry-content :is(ul, ol), .page-content .entry-content :is(ul, ol) { padding-left: 1.5em; }
.post-content .entry-content li, .page-content .entry-content li { margin-bottom: .45em; padding-left: .2em; }
.post-content .entry-content li > :is(ul, ol), .page-content .entry-content li > :is(ul, ol) { margin: .45em 0 .2em; }
.post-content .entry-content ul > li::marker, .page-content .entry-content ul > li::marker { color: var(--cks-primary); }
.post-content .entry-content ol > li::marker, .page-content .entry-content ol > li::marker { color: var(--cks-primary); font-weight: 700; }
.post-content .entry-content li > p, .page-content .entry-content li > p { margin-bottom: .4em; }

/* ---------- Trich dan ---------- */
.post-content .entry-content blockquote, .page-content .entry-content blockquote {
    padding: 1em 1.25em;
    border-left: 4px solid var(--cks-primary);
    background: var(--cks-soft);
    border-radius: 0 10px 10px 0;
    color: var(--cks-ink);
    font-style: normal;
}
.post-content .entry-content blockquote > :last-child, .page-content .entry-content blockquote > :last-child { margin-bottom: 0; }

/* ---------- Anh, video ---------- */
.post-content .entry-content img, .page-content .entry-content img { max-width: 100%; height: auto !important; border-radius: 10px; }
.post-content .entry-content :is(p, figure) > img:only-child,
.page-content .entry-content :is(p, figure) > img:only-child { display: block; margin: 1.25em auto; }
.post-content .entry-content figure, .page-content .entry-content figure { margin-left: 0; margin-right: 0; text-align: center; max-width: 100% !important; }
.post-content .entry-content figcaption, .page-content .entry-content figcaption { font-size: .875rem; color: var(--cks-muted); margin-top: .5em; line-height: 1.5; }
.post-content .entry-content iframe, .page-content .entry-content iframe { max-width: 100%; border: 0; border-radius: 10px; }
.post-content .entry-content iframe[src*="youtube"], .page-content .entry-content iframe[src*="youtube"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.post-content .entry-content td img, .page-content .entry-content td img { border-radius: 4px; margin: 0; display: inline-block; }

/* ---------- Bang: cuon ngang khi hep, khong ngat so ---------- */
.cks-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--cks-line); border-radius: 10px; }
.post-content .entry-content table, .page-content .entry-content table {
    width: 100% !important;
    border-collapse: collapse;
    font-size: .9375rem;
    line-height: 1.5;
    margin: 0 0 var(--rd-gap);
}
.post-content .entry-content .cks-table-scroll table, .page-content .entry-content .cks-table-scroll table { margin: 0; min-width: 100%; }
.post-content .entry-content :is(th, td), .page-content .entry-content :is(th, td) {
    padding: .7em .85em !important;
    border: 1px solid var(--cks-line) !important;
    vertical-align: middle;
    height: auto !important;
    font-size: inherit !important;
    line-height: inherit;
}
.post-content .entry-content .cks-table-scroll :is(th, td), .page-content .entry-content .cks-table-scroll :is(th, td) { border-width: 0 1px 1px 0 !important; }
.post-content .entry-content .cks-table-scroll tr > :last-child, .page-content .entry-content .cks-table-scroll tr > :last-child { border-right: 0 !important; }
.post-content .entry-content .cks-table-scroll tr:last-child > *, .page-content .entry-content .cks-table-scroll tr:last-child > * { border-bottom: 0 !important; }
.post-content .entry-content :is(thead th, thead td, tr:first-child > th), .page-content .entry-content :is(thead th, thead td, tr:first-child > th) { background: var(--cks-soft); color: var(--cks-ink); font-weight: 700; }
.post-content .entry-content tbody tr:nth-child(even) > td, .page-content .entry-content tbody tr:nth-child(even) > td { background: rgba(15, 23, 42, .025); }
.post-content .entry-content :is(td, th) p, .page-content .entry-content :is(td, th) p { margin: 0; }
.post-content .entry-content .cks-nowrap, .page-content .entry-content .cks-nowrap { white-space: nowrap; }
.cks-table-hint { display: none; font-size: .8125rem; color: var(--cks-muted); margin: -.6em 0 1em; }
.cks-table-scroll.is-overflowing + .cks-table-hint { display: block; }

/* ---------- Muc luc tu dong ---------- */
.cks-toc { border: 1px solid var(--cks-line); border-radius: 12px; background: var(--cks-soft); margin: 0 0 1.6em; font-size: 1rem; line-height: 1.5; }
.cks-toc summary { cursor: pointer; list-style: none; padding: .8em 1.1em; font-weight: 700; color: var(--cks-ink); display: flex; justify-content: space-between; align-items: center; min-height: 48px; }
.cks-toc summary::-webkit-details-marker { display: none; }
.cks-toc summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--cks-muted); border-bottom: 2px solid var(--cks-muted); transform: rotate(45deg); transition: transform .2s; margin-top: -4px; }
.cks-toc[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.cks-toc ol { list-style: none; counter-reset: toc; margin: 0 !important; padding: 0 1.1em .9em !important; }
.cks-toc li { counter-increment: toc; margin: 0 !important; padding: 0 !important; }
.cks-toc li::marker { content: none; }
.cks-toc a { display: flex; gap: .55em; padding: .4em 0; color: var(--cks-text) !important; text-decoration: none !important; min-height: 32px; align-items: baseline; }
.cks-toc a::before { content: counters(toc, ".") "."; color: var(--cks-primary); font-weight: 700; min-width: 1.6em; flex-shrink: 0; }
.cks-toc a:hover { color: var(--cks-primary) !important; }
.cks-toc .cks-toc-sub { padding: 0 0 0 1.6em !important; counter-reset: toc; }
.cks-toc .cks-toc-sub a { font-size: .9375rem; }

/* ---------- Cot bai viet: tieu de, anh, noi dung cung mot do rong ---------- */
@media (min-width: 992px) {
    .post-content:has(> .entry-content) { max-width: 44rem; }
}

/* ---------- Tieu de & tom tat bai ---------- */
.section-page h1.page-title { font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.25rem); font-weight: 700; line-height: 1.3; letter-spacing: -.015em; color: var(--cks-ink); margin-bottom: .7em; }
.post-content .post-title, .section-post-details h1.title, h1.post-title { line-height: 1.3; letter-spacing: -.015em; }
h2.post-summary { line-height: 1.6; }
.cks-reading-time { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--cks-muted); }

/* ---------- Dien thoai ---------- */
@media (max-width: 767.98px) {
    .post-content .entry-content, .page-content .entry-content { --rd-fs: 1.0625rem; --rd-lh: 1.7; max-width: none; }  /* 17px */
    .post-content .entry-content h2, .page-content .entry-content h2 { font-size: 1.375rem; }
    .post-content .entry-content h3, .page-content .entry-content h3 { font-size: 1.1875rem; }
    .post-content .entry-content h4, .page-content .entry-content h4 { font-size: 1.0625rem; }
    .post-content .entry-content table, .page-content .entry-content table { font-size: .875rem; }
    .post-content .entry-content .cks-table-scroll table, .page-content .entry-content .cks-table-scroll table { width: max-content !important; min-width: 100%; }
    .post-content .entry-content :is(th, td), .page-content .entry-content :is(th, td) { padding: .6em .7em !important; max-width: 15rem; }
    .post-content .entry-content td img, .page-content .entry-content td img { max-width: 88px !important; }
    .section-post-details .container, .section-page .container, .section-page .container-xl { padding-left: 16px; padding-right: 16px; }
}

/* ---------- In bai viet ---------- */
@media print {
    .topbar, #sticky-menu-wrapper, .mobile-nav-container, #footer, .cks-partners, .col-lg-4, .post-share, .cks-cat-cta, .btn-scroll-up, .cks-toc { display: none !important; }
    .post-content .entry-content, .page-content .entry-content { max-width: none; font-size: 12pt; color: #000; }
    .post-content .entry-content a { color: #000; text-decoration: none; }
}
