/* BAIVIET_V1 — chỉ phần riêng của bài viết: chữ thân bài, mục lục, bảng, hộp lưu ý, bố cục 2 cột.
   Màu, bo góc, bóng lấy từ biến của site.css (--navy, --line, --r…) để theo giao diện chung khi đổi. */
.bai-dau .w{display:block;padding-top:28px;padding-bottom:40px}
.bai-dau h1{font-size:clamp(1.6rem,4.8vw,2.5rem);max-width:900px}
.bai-dau .dan{max-width:780px}
.bai-duong{margin-bottom:12px;opacity:.85}.bai-duong a{color:inherit;text-decoration:underline;text-underline-offset:3px}
.bai-dau a.nhan{text-decoration:none}
.bai-meta{display:flex;flex-wrap:wrap;gap:6px 18px;margin-top:14px;opacity:.85}.bai-meta span{display:inline-flex;align-items:center;gap:6px}

.bai-khoi{padding-top:28px}
.bai-bo{display:grid;gap:24px}
.bai-chinh{min-width:0}
.bai-ben{display:none}
@media(min-width:1000px){
  .bai-bo{grid-template-columns:minmax(0,1fr) 300px;align-items:start}
  .bai-ben{display:block;position:sticky;top:84px}
  .bai-muc-luc-dt{display:none}
}

/* Thân bài — đọc trên iPhone trước */
.bai-than{font-size:1.04rem;line-height:1.75;max-width:760px}
.bai-than h2{font-size:clamp(1.3rem,3.6vw,1.6rem);margin:1.8em 0 .6em;scroll-margin-top:84px}
.bai-than h3{font-size:1.1rem;margin:1.4em 0 .5em}
.bai-than p{margin:0 0 1.05em}
.bai-than ul,.bai-than ol{margin:0 0 1.15em;padding-left:1.3em}
.bai-than li{margin:.3em 0}
.bai-than li::marker{color:var(--gold2,#c8892b);font-weight:700}
.bai-than a{text-decoration:underline;text-underline-offset:3px}
.bai-than strong{color:var(--navy3,#0e2242)}
.bai-than>*:first-child{margin-top:0}
.bai-luu-y{background:var(--warn-bg,#fff6e0);border-left:4px solid var(--gold,#f2c14e);border-radius:0 var(--r,14px) var(--r,14px) 0;padding:14px 16px;margin:0 0 1.2em}
.bai-luu-y>*:last-child{margin-bottom:0}
.bai-bang{overflow-x:auto;margin:0 0 1.2em;border:1px solid var(--line,#e3e7ef);border-radius:var(--r,14px);background:var(--card,#fff)}
.bai-bang table{border-collapse:collapse;width:100%;font-size:.94rem;line-height:1.5}
.bai-bang th,.bai-bang td{padding:9px 12px;border-bottom:1px solid var(--line,#e3e7ef);text-align:left;vertical-align:top}
.bai-bang th{background:var(--blue-bg,#eaf1fd);color:var(--navy3,#0e2242);font-weight:700}
.bai-bang tr:last-child td{border-bottom:0}
@media(max-width:560px){ /* bảng từ 3 cột thành thẻ trên điện thoại */
  .bai-bang.the-dt{border:0;background:transparent}
  .bai-bang.the-dt thead{display:none}
  .bai-bang.the-dt tr{display:block;background:var(--card,#fff);border:1px solid var(--line,#e3e7ef);border-radius:var(--r,14px);margin-bottom:8px;padding:6px 0}
  .bai-bang.the-dt td{display:block;border:0;padding:4px 12px}
  .bai-bang.the-dt td[data-nhan]::before{content:attr(data-nhan);display:block;font-size:.78rem;font-weight:700;color:var(--mute,#5d667a)}
}

.bai-muc-luc ol{margin:8px 0 0;padding-left:1.2em;font-size:.93rem;line-height:1.5}
.bai-muc-luc li{margin:.35em 0}
.bai-muc-luc summary{cursor:pointer}
.bai-can-cu ul{margin:6px 0 10px;padding-left:1.2em;font-size:.95rem}
.bai-can-cu li{margin:.3em 0}
.bai-faq{margin:26px 0}
.bai-faq>h2{scroll-margin-top:84px}
.bai-faq details summary{cursor:pointer;font-weight:700;color:var(--navy3,#0e2242);line-height:1.4}
.bai-faq details p{margin:10px 0 0}
.bai-cta{margin-top:24px}
.bai-cta-nut{display:grid;gap:10px}
.bai-mien-tru{margin-top:16px}
.bai-cung-tieu{font-size:1.3rem;margin:34px 0 14px}

/* Danh sách */
.bai-h1-ds{font-size:clamp(1.7rem,5vw,2.4rem)}
.bai-the-muc{margin-bottom:8px}
.bai-the-muc a.hop,.bai-tm-dau{display:flex;flex-direction:column;gap:4px;color:inherit;text-decoration:none!important;margin:0}
.bai-the-muc a.hop b{color:var(--navy3,#0e2242);line-height:1.3}
.bai-the-ic{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:12px;background:var(--blue-bg,#eaf1fd);color:var(--navy2,#2451a6);margin-bottom:6px}
.bai-the-so{color:var(--gold2,#c8892b);font-weight:700;margin-top:auto}
.bai-ds-muc{list-style:none;margin:20px 0 26px;padding:0;display:grid;gap:10px}
.bai-ds-muc a.hop{display:flex;gap:14px;align-items:flex-start;color:inherit;text-decoration:none!important;margin:0}
.bai-ds-muc b{display:block;color:var(--navy3,#0e2242);font-size:1.06rem;line-height:1.35;margin-bottom:4px}
.bai-ds-chu{display:flex;flex-direction:column;gap:4px;min-width:0}
.bai-so{flex:none;width:34px;height:34px;border-radius:50%;background:var(--navy,#16325c);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-weight:700}
.bai-gioi-thieu{margin-bottom:6px}

/* Partial trang chủ */
.bai-tm{margin:0}
.bai-tm-dau{flex-direction:row!important;align-items:center;gap:10px!important;margin-bottom:6px!important}
.bai-tm-dau .bai-the-ic{margin:0}
.bai-tm-dau b{color:var(--navy3,#0e2242)}
.bai-tm-dau .mute{margin-left:auto;white-space:nowrap}
.bai-tm ul{list-style:none;margin:0;padding:0}
.bai-tm li{border-top:1px solid var(--line,#e3e7ef);padding:9px 0;line-height:1.4}
.bai-tm li a{color:var(--ink,#1b2333)}
.bai-ds-tt{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}

/* ANHBAI_V1 — ảnh bài (gpt-image-1-mini): thẻ danh sách, danh sách chuyên mục, đầu bài, khối trang chủ; emoji chuyên mục */
.bai .bai-anh{display:block;width:calc(100% + 32px);max-width:none;margin:-16px -16px 6px;height:auto;aspect-ratio:3/2;object-fit:cover;border-radius:var(--r,14px) var(--r,14px) 0 0;background:#eef2f8}
.bai-anh-dau{margin:0 0 22px;border-radius:var(--r2,20px);overflow:hidden;background:#eef2f8;max-width:760px;box-shadow:var(--sh)}
.bai-anh-dau img{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover}
.bai-ds-anh{flex:none;width:108px;height:72px;object-fit:cover;border-radius:10px;background:#eef2f8}
@media(min-width:700px){.bai-ds-anh{width:168px;height:112px}}
.bai-emoji{font-size:22px;line-height:1;background:var(--t,#eaf1fd)!important}
.bai-the-muc a.hop{background:var(--t,#fff)}
.bai-tm-noi{display:flex;flex-direction:column;gap:8px;color:var(--navy3,#0e2242)!important;text-decoration:none!important;margin:4px 0 6px}
.bai-tm-noi b{font-size:.98rem;line-height:1.4}
.bai-tm-anh{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover;border-radius:12px;background:#eef2f8}
.bai-tm-noi:hover b{text-decoration:underline}
@media(min-width:700px){.bai-tm-anh{aspect-ratio:16/9}}
