/* Trang đọc tin / pháp lý */
body { background: var(--cream); }
.tin-top { position: sticky; top: 0; z-index: 50; background: rgba(251, 245, 238, .96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--beige); }
.tin-top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.tin-top .brand img { height: 40px; width: auto; display: block; }
.tin { max-width: 820px; padding-top: 22px; padding-bottom: 36px; }
.tin-crumb { font-size: 13px; color: var(--ink-soft); margin: 0 0 14px; }
.tin-crumb a { color: var(--red); text-decoration: none; font-weight: 500; }
.tin-crumb a:hover { text-decoration: underline; }
.tin-kind { display: inline-block; font-family: var(--font-head, 'Montserrat', sans-serif); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--red); margin: 0 0 8px; }
.tin h1 { font-size: clamp(22px, 5.6vw, 34px); line-height: 1.25; color: var(--ink); margin: 0 0 10px; }
.tin-date { display: block; font-size: 13px; color: var(--ink-soft); margin: 0 0 18px; padding-bottom: 16px; border-bottom: 1px solid var(--beige); }
.tin-body { font-size: 16px; line-height: 1.7; color: var(--ink); }
.tin-body p { margin: 0 0 14px; }
.tin-body h2 { font-size: 18px; margin: 22px 0 10px; color: var(--red); }
.tin-body ul { margin: 0 0 14px; padding-left: 20px; }
.tin-body li { margin-bottom: 6px; }
.tin-sec { margin-top: 26px; }
.tin-sec > h2 { font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); margin: 0 0 12px; }
.tin-imgs { display: grid; gap: 16px; }
.tin-imgs figure { margin: 0; }
.tin-imgs button { display: block; width: 100%; padding: 0; border: 1px solid var(--beige); background: #fff; border-radius: 10px; overflow: hidden; cursor: zoom-in; }
.tin-imgs img { display: block; width: 100%; height: auto; }
.tin-imgs figcaption { font-size: 13px; color: var(--ink-soft); margin-top: 6px; }
.tin-files { display: block; }
.tin-file { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--beige); border-radius: 10px; }
.tin-file-ic { flex: 0 0 auto; width: 40px; height: 48px; border-radius: 6px; background: var(--red); color: #fff; font: 700 11px/48px var(--font-head, 'Montserrat', sans-serif); text-align: center; letter-spacing: .04em; }
.tin-file-txt { flex: 1 1 auto; min-width: 0; }
.tin-file-txt b { display: block; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.tin-file-txt span { font-size: 12px; color: var(--ink-soft); }
.tin-file .btn { flex: 0 0 auto; white-space: nowrap; }
.tin-more { display: grid; gap: 8px; }
.tin-more a { display: flex; gap: 10px; align-items: baseline; padding: 10px 12px; background: #fff; border: 1px solid var(--beige); border-radius: 8px; color: var(--ink); text-decoration: none; }
.tin-more a:hover { border-color: var(--red); }
.tin-more time { flex: 0 0 auto; font-size: 12px; color: var(--ink-soft); }
.tin-foot { border-top: 1px solid var(--beige); background: #fff; padding: 18px 0 28px; }
.tin-foot .wrap { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; max-width: 820px; }
.lightbox { border: 0; padding: 0; background: #1b0704; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(0, 0, 0, .8); }
.lightbox form { position: absolute; top: 10px; right: 10px; z-index: 2; margin: 0; }
.lightbox img { width: 100%; height: 100%; object-fit: contain; }
[hidden] { display: none !important; }
@media (max-width: 520px) { .tin-file { flex-wrap: wrap; } .tin-file .btn { flex: 1 1 auto; text-align: center; } }
@media (max-width: 520px) { .tin-foot .btn { flex: 1 1 100%; text-align: center; } }
/* PDF xem ngay trên trang */
.pdf-view { margin: 10px 0 22px; }
.pdf-page { position: relative; background: #fff; border: 1px solid var(--beige); border-radius: 6px; overflow: hidden; margin-bottom: 12px; }
.pdf-page canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: zoom-in; }
.pdf-lbl { position: absolute; right: 8px; bottom: 6px; z-index: 1; font-size: 11px; color: var(--ink-soft); background: rgba(255, 255, 255, .85); padding: 1px 6px; border-radius: 4px; pointer-events: none; }

/* nội dung bài dạng HTML (dán từ Word/Docs/web, Markdown) */
.tin-body h3 { font-size: 16.5px; margin: 20px 0 8px; color: var(--ink); }
.tin-body h4 { font-size: 15px; margin: 16px 0 6px; color: var(--ink-soft); }
.tin-body ol { margin: 0 0 14px; padding-left: 22px; }
.tin-body ul ul, .tin-body ol ol, .tin-body ul ol, .tin-body ol ul { margin: 6px 0 6px; }
.tin-body a { color: #1a6fd4; text-decoration: underline; word-break: break-word; }
.tin-body blockquote { margin: 0 0 14px; padding: 8px 14px; border-left: 4px solid #f2b5b5; background: #fff8f4; color: #4a3f3a; }
.tin-body blockquote p:last-child { margin-bottom: 0; }
.tin-body hr { border: 0; border-top: 1px solid #eadfd9; margin: 20px 0; }
.tin-body code { padding: 1px 5px; background: #f4ece6; border-radius: 4px; font-size: .92em; }
.tin-body pre { margin: 0 0 14px; padding: 12px; background: #f4ece6; border-radius: 8px; overflow-x: auto; white-space: pre-wrap; }
.tin-body table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: .95em; display: block; overflow-x: auto; }
.tin-body th, .tin-body td { border: 1px solid #e6d6cd; padding: 7px 10px; text-align: left; vertical-align: top; }
.tin-body th { background: #fbf1ea; font-weight: 600; }
.tin-body > :last-child { margin-bottom: 0; }
.tin-body li > p { margin: 0 0 4px; }

/* Bài khác: ảnh bìa nhỏ bên trái */
.tin-more a.has-thumb { align-items: center; }
.tin-more-img { flex: 0 0 auto; width: 96px; height: 64px; object-fit: cover; border-radius: 6px; background: var(--beige); display: block; }
.tin-more a.has-thumb > time { align-self: flex-start; }
@media (max-width: 719px) { .tin-more-img { width: 80px; height: 56px; } }

/* Khung xem ảnh: dùng dvh để nút Đóng không bị thanh địa chỉ che trên điện thoại */
.lightbox { position: fixed; inset: 0; margin: 0; }
@supports (height: 100dvh) { .lightbox { width: 100dvw; height: 100dvh; max-width: 100dvw; max-height: 100dvh; } }
.lightbox form { top: max(10px, env(safe-area-inset-top)); right: max(10px, env(safe-area-inset-right)); }

/* Bài khác: ẩn ngày đăng cho gọn */
.tin-more time { display: none; }
