/**
 * Giao diện bài viết — trang danh mục và trang chi tiết.
 *
 * Bám brand guideline: navy nền tảng, cam Trí Tín (#F98E30 — đúng màu logo)
 * điểm nhấn, mảng cam đặc chỉ ở nút hành động. Không bo góc, không gradient,
 * không đổ bóng đậm.
 *
 * Mọi thứ nằm trong body.ttb để không đụng phần còn lại của site (theme cha
 * đang để Quicksand cho toàn trang, hai font thương hiệu chỉ áp ở đây).
 */

body.ttb {
	--ttb-navy: #0F1E33;
	--ttb-navy-900: #0A1626;
	--ttb-navy-700: #16283F;
	--ttb-navy-400: #8FA3BD;
	--ttb-cream: #F7F5F0;
	/* Hai nấc cam nhấn: sáng cho nền navy, nung cho nền kem. `--ttb-gold` là
	   nấc đang hiệu lực, được đổi theo nền ở khối ngay bên dưới. */
	--ttb-gold-lit: #F0A45E;
	--ttb-gold-dark: #A85B0E;
	--ttb-gold: var(--ttb-gold-lit);
	/* Màu chữ đặt trên mảng cam đặc — lật theo nấc: navy trên cam nhạt,
	   trắng trên cam nung. */
	--ttb-gold-fg: var(--ttb-navy);
	--ttb-orange: #F98E30;
	--ttb-orange-dark: #D9720F;
	--ttb-mist: #D7DEE8;
	--ttb-ink: #1C2B3F;
	--ttb-muted: #6B7686;
	--ttb-line: #E4DFD4;
	/* Header dính cao 70px — chừa thêm cho tiêu đề không bị che khi nhảy neo. */
	--ttb-stick: 92px;
}

/* --------------------------------------------------------------------------
   Nấc cam theo nền
   Khác trang chủ/giới thiệu: cả thân trang blog là nền kem, các khối navy chỉ
   là đảo nhỏ. Nên mặc định trong thân trang là cam nung #A85B0E (4.6:1 trên
   kem), còn từng khối navy bật ngược lại nấc sáng #F0A45E (8.1:1 trên navy).
   -------------------------------------------------------------------------- */

body.ttb #content.page-wrapper {
	--ttb-gold: var(--ttb-gold-dark);
	--ttb-gold-fg: #fff;
}

body.ttb .ttb-hero,
body.ttb .ttb-cta,
body.ttb .ttb-related,
body.ttb .ttb-card.is-dark,
body.ttb .ttb-feature__media,
body.ttb .ttb-card__media,
body.ttb .ttb-side__widgets .badge-inner,
body.ttb .ttb-article thead th,
body.ttb .ttb-share__copied {
	--ttb-gold: var(--ttb-gold-lit);
	--ttb-gold-fg: var(--ttb-navy);
}

/*
 * Đang đăng nhập: WP chèn #wpadminbar (position:fixed) và đẩy <html> xuống một
 * đoạn bằng chiều cao thanh đó. Không cộng vào thì mục lục dính, cột bên và
 * điểm dừng của neo đều bị header che mất.
 *
 * Lấy chiều cao từ biến của chính WordPress (`--wp-admin--admin-bar--height`,
 * có từ WP 6.4) thay vì gõ cứng 32px — Flatsome cũng cộng đúng đại lượng này
 * vào `--flatsome-scroll-padding-top` của nó.
 */
body.admin-bar.ttb {
	--ttb-stick: calc(92px + var(--wp-admin--admin-bar--height, 32px));
}

body.admin-bar.ttb .ttb-progress {
	top: var(--wp-admin--admin-bar--height, 32px);
}

/* Từ 782px trở xuống admin bar chuyển sang position:absolute — nó cuộn đi
   cùng trang nên không phải trừ hao nữa. */
@media screen and (max-width: 782px) {
	body.admin-bar.ttb {
		--ttb-stick: 92px;
	}

	body.admin-bar.ttb .ttb-progress {
		top: 0;
	}
}

/* Nền kem cho cả vùng nội dung, bỏ padding mặc định để dải hero chạm sát header. */
body.ttb #content.page-wrapper {
	padding-top: 0;
	padding-bottom: 0;
	background-color: var(--ttb-cream);
}

/* Chỉ đặt lề ngang bằng longhand — dùng shorthand `padding` ở đây sẽ đè mất
   padding dọc của .ttb-layout / .ttb-single / .ttb-adjacent. */
body.ttb .ttb-wrap {
	max-width: 1250px;
	margin: 0 auto;
	padding-right: 20px;
	padding-left: 20px;
}

body.ttb .ttb-icon {
	flex: 0 0 auto;
	vertical-align: middle;
}

/* ==========================================================================
   Dải hero
   ========================================================================== */

/*
 * Bám theo .bdsl-hero của trang Bất động sản: ảnh nền phủ hai lớp gradient
 * (dọc để chữ tách khỏi ảnh trên mobile, ngang để nửa trái luôn đủ tối cho
 * chữ trắng), padding rộng 76/84.
 *
 * Khi KHÔNG có ảnh thì nền lùi về navy-700 sáng hơn header một bậc — header
 * của site cũng đúng --ttb-navy #0F1E33, để cùng màu thì hai khối dính liền và
 * lúc cuộn chữ tiêu đề trôi lên rồi tan mất chứ không thấy nó chui xuống dưới
 * thanh nào. Có ảnh thì lớp phủ đã tự tách hai khối nên giữ navy gốc.
 */
.ttb-hero {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	background-color: var(--ttb-navy-700);
	border-bottom: 1px solid rgba(240, 164, 94, .28);
}

/*
 * Làm mờ mạnh, khác với .bdsl-hero để nguyên ảnh.
 *
 * Ảnh đại diện bên BĐS là ảnh chụp căn hộ nên dùng thẳng được. Ảnh của blog
 * phần lớn là banner có chữ vẽ sẵn: để nguyên thì chữ hiện mờ xuyên lớp phủ
 * trông như lỗi render, lại trùng đúng tấm ảnh hiện full ngay bên dưới hero.
 * Mờ đi thì nó chỉ còn là mảng màu — hết cả hai vấn đề.
 *
 * scale(1.1) để mép ảnh không bị blur ăn vào thành viền nhoè.
 */
.ttb-hero__bg {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: blur(14px);
	transform: scale(1.1);
}

/* Ảnh bìa do biên tập viên chọn riêng cho chuyên mục thì để nguyên nét như
   .bdsl-hero — nó được chọn để làm nền, không phải ảnh minh hoạ đang hiện lại
   ngay bên dưới. */
.ttb-hero.has-custom-image .ttb-hero__bg {
	filter: none;
	transform: none;
}

.ttb-hero.has-image::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(90deg, rgba(15, 30, 51, .95) 0%, rgba(15, 30, 51, .82) 42%, rgba(15, 30, 51, .35) 100%),
		linear-gradient(180deg, rgba(10, 22, 38, .5) 0%, rgba(10, 22, 38, .1) 45%, rgba(10, 22, 38, .55) 100%);
}

.ttb-hero__inner {
	position: relative;
	padding-top: 76px;
	padding-bottom: 84px;
}

.ttb-hero--post .ttb-hero__inner {
	padding-top: 68px;
	padding-bottom: 72px;
}

.ttb-hero__eyebrow {
	margin: 0 0 12px;
	color: var(--ttb-gold);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 2.4px;
	text-transform: uppercase;
}

/*
 * Không chặn bề ngang và không dùng text-wrap: balance — balance chia đều các
 * dòng nên chủ động chừa lề, tiêu đề không lấp hết chiều rộng. Đo trên trang
 * chuyên mục: có balance thì thẻ nổi bật ra 459/458px, bỏ đi thành 724/193px
 * trên cùng 760px và vẫn đúng 2 dòng — đổi lại dòng cuối ngắn.
 */
.ttb-hero__title {
	max-width: none;
	margin: 0;
	color: #fff;
	font-size: clamp(30px, 4vw, 50px);
	font-weight: 600;
	line-height: 1.18;
	letter-spacing: -.01em;
	text-transform: none;
}

/*
 * Rộng hơn tiêu đề archive dù cỡ chữ nhỏ hơn: tên chuyên mục luôn ngắn nên mức
 * chặn không bao giờ chạm tới, còn tiêu đề bài thì trung bình 54 ký tự và đuôi
 * dài tới 122. Đo trên chính hai bài dài nhất: 900px đẩy tiêu đề 93 ký tự
 * xuống 3 dòng, 1040px cho ra 2 dòng và vẫn chừa lề phải cho dải hero.
 */
/*
 * Không chặn bề ngang: tiêu đề bài dùng trọn chiều rộng dải hero. Phải ghi
 * `none` chứ không thể bỏ dòng đi — bỏ thì rơi về `max-width: 16em` của
 * .ttb-hero__title, còn hẹp hơn nữa.
 */
.ttb-hero--post .ttb-hero__title {
	max-width: none;
	font-size: clamp(27px, 3.4vw, 43px);
}

.ttb-hero__desc {
	max-width: 34em;
	margin: 18px 0 0;
	color: var(--ttb-mist);
	font-size: 15px;
	font-weight: 300;
	line-height: 1.7;
}

.ttb-hero__count {
	margin: 18px 0 0;
	color: var(--ttb-navy-400);
	font-size: 12px;
	letter-spacing: 1.4px;
	text-transform: uppercase;
}

.ttb-hero__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 26px;
	margin-top: 22px;
	color: var(--ttb-mist);
	font-size: 13px;
	font-weight: 300;
}

.ttb-hero__meta > span {
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.ttb-hero__meta .ttb-icon {
	color: var(--ttb-gold);
}

/* Đường dẫn phân cấp ------------------------------------------------------ */

.ttb-crumbs {
	margin-bottom: 18px;
}

.ttb-crumbs ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 8px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 12px;
	letter-spacing: .4px;
}

.ttb-crumbs li {
	display: inline-flex;
	align-items: center;
	margin: 0;
	color: var(--ttb-navy-400);
}

.ttb-crumbs li + li::before {
	content: "";
	width: 5px;
	height: 5px;
	margin-right: 8px;
	border-top: 1px solid currentColor;
	border-right: 1px solid currentColor;
	transform: rotate(45deg);
	opacity: .7;
}

.ttb-crumbs a {
	color: var(--ttb-navy-400);
	text-decoration: none;
	transition: color .18s ease;
}

.ttb-crumbs a:hover {
	color: var(--ttb-gold);
}

.ttb-crumbs span {
	color: var(--ttb-mist);
}

/* ==========================================================================
   Trang danh mục
   ========================================================================== */

.ttb-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 56px;
	align-items: start;
	padding-top: 52px;
	padding-bottom: 72px;
}

/* Bài nổi bật ------------------------------------------------------------- */

/*
 * Ảnh đại diện của site phần lớn là banner ngang ~2.4:1 có chữ vẽ sẵn trên đó.
 * Xếp ảnh cạnh cột chữ thì phải cắt về gần vuông, mất luôn phần chữ — nên ảnh
 * nằm trên, cắt 21:9 (2.33:1), gần như giữ nguyên khung banner.
 */
.ttb-feature {
	display: block;
	background-color: #fff;
	border: 1px solid var(--ttb-line);
	margin-bottom: 44px;
	transition: border-color .2s ease;
}

.ttb-feature:hover {
	border-color: var(--ttb-gold);
}

.ttb-feature__media {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 12 / 5;
	overflow: hidden;
	background-color: var(--ttb-navy-700);
}

.ttb-feature__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	transition: transform .5s ease;
}

.ttb-feature:hover .ttb-feature__media img {
	transform: scale(1.04);
}

.ttb-feature__body {
	padding: 30px 36px 34px;
}

.ttb-feature__flag {
	margin: 0 0 12px;
	color: var(--ttb-gold-dark);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 2.2px;
	text-transform: uppercase;
}

.ttb-feature__title {
	margin: 0 0 14px;
	font-size: clamp(23px, 2.5vw, 33px);
	font-weight: 600;
	line-height: 1.25;
	text-transform: none;
}

.ttb-feature__title a {
	color: var(--ttb-navy);
	text-decoration: none;
	transition: color .18s ease;
}

.ttb-feature__title a:hover {
	color: var(--ttb-gold-dark);
}

/*
 * Đo thật trong thân thẻ (rộng 760px): 7,07px/ký tự nên trải hết bề ngang là
 * 108 ký tự/dòng — quá dài cho cỡ chữ 15px. 620px cho ra ~88 ký tự/dòng và
 * hẹp hơn tiêu đề một chút, tạo bậc thứ tự đọc.
 */
.ttb-feature__excerpt {
	max-width: 620px;
	margin: 0 0 18px;
	color: var(--ttb-muted);
	font-size: 15px;
	font-weight: 300;
	line-height: 1.7;
}

/* Lưới thẻ ---------------------------------------------------------------- */

.ttb-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 36px 30px;
}

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

.ttb-card {
	display: flex;
	flex-direction: column;
	background-color: #fff;
	border: 1px solid var(--ttb-line);
	transition: border-color .2s ease, transform .2s ease;
}

.ttb-card:hover {
	border-color: var(--ttb-gold);
	transform: translateY(-3px);
}

.ttb-card__media {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background-color: var(--ttb-navy-700);
}

.ttb-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	transition: transform .5s ease;
}

.ttb-card:hover .ttb-card__media img {
	transform: scale(1.05);
}

.ttb-card__placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(240, 164, 94, .5);
	font-size: 20px;
	letter-spacing: 4px;
}

.ttb-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 22px 24px 24px;
}

.ttb-card__cat {
	align-self: flex-start;
	margin-bottom: 10px;
	color: var(--ttb-gold-dark);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1.8px;
	text-transform: uppercase;
	text-decoration: none;
	transition: color .18s ease;
}

.ttb-card__cat:hover {
	color: var(--ttb-navy);
}

/* Số thứ tự đọc thay chỗ nhãn chuyên mục ở loạt bài — cùng dáng chữ, nhưng là
   <p> nên phải gỡ margin trên mặc định của trình duyệt. */
.ttb-card__num {
	margin-top: 0;
}

.ttb-card__title {
	margin: 0 0 10px;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.32;
	letter-spacing: 0;
	text-transform: none;
}

.ttb-card__title a {
	color: var(--ttb-navy);
	text-decoration: none;
	transition: color .18s ease;
}

.ttb-card__title a:hover {
	color: var(--ttb-gold-dark);
}

.ttb-card__excerpt {
	margin: 0 0 16px;
	color: var(--ttb-muted);
	font-size: 14px;
	font-weight: 300;
	line-height: 1.65;
}

.ttb-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 9px;
	margin-top: auto;
	padding-top: 14px;
	border-top: 1px solid var(--ttb-line);
	color: var(--ttb-muted);
	font-size: 12px;
	letter-spacing: .3px;
}

.ttb-feature .ttb-card__meta {
	margin-top: 0;
	border-top: 0;
	padding-top: 0;
}

/* .ttb-card__cat vốn nằm trong thân thẻ dọc (flex column) nên mang sẵn
   align-self:flex-start và margin-bottom:10px. Đưa vào hàng meta ngang thì hai
   thuộc tính đó nhấc nó lên lệch 5px so với ngày tháng — gỡ cả hai. */
.ttb-feature .ttb-card__meta .ttb-card__cat {
	align-self: auto;
	margin-bottom: 0;
}

.ttb-dot {
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background-color: var(--ttb-gold);
	opacity: .8;
}

/* Phân trang -------------------------------------------------------------- */

.ttb-pagination {
	margin-top: 48px;
}

.ttb-pagination ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ttb-pagination li {
	margin: 0;
}

.ttb-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 12px;
	border: 1px solid var(--ttb-line);
	background-color: #fff;
	color: var(--ttb-ink);
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}

.ttb-pagination a.page-numbers:hover {
	border-color: var(--ttb-gold);
	color: var(--ttb-gold-dark);
}

.ttb-pagination .page-numbers.current {
	background-color: var(--ttb-navy);
	border-color: var(--ttb-navy);
	color: #fff;
}

.ttb-pagination .page-numbers.dots {
	border-color: transparent;
	background: none;
	color: var(--ttb-muted);
}

.ttb-pagination .prev .ttb-icon {
	transform: rotate(180deg);
}

/* Không có bài ------------------------------------------------------------ */

.ttb-empty {
	padding: 64px 32px;
	background-color: #fff;
	border: 1px solid var(--ttb-line);
	text-align: center;
	color: var(--ttb-muted);
}

.ttb-empty__title {
	margin-bottom: 8px;
	color: var(--ttb-navy);
	font-size: 24px;
	font-weight: 600;
}

/* ==========================================================================
   Cột bên
   ========================================================================== */

/*
 * Dính theo trang, nhưng trên màn thấp cột này cao hơn khung nhìn — không chặn
 * thì phần cuối (widget bài mới) không bao giờ kéo tới được. max-height +
 * overflow chỉ sinh thanh cuộn khi thực sự tràn.
 */
.ttb-side {
	position: sticky;
	top: var(--ttb-stick);
	max-height: calc(100vh - var(--ttb-stick) - 24px);
	overflow-y: auto;
}

.ttb-side__block {
	margin-bottom: 32px;
	background-color: #fff;
	border: 1px solid var(--ttb-line);
	padding: 24px 24px 8px;
}

.ttb-side__title,
body.ttb .ttb-side .widget-title {
	display: block;
	margin: 0 0 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--ttb-line);
	color: var(--ttb-navy);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 2px;
	line-height: 1.4;
	text-transform: uppercase;
}

.ttb-side__title::after,
body.ttb .ttb-side .widget-title::after {
	content: "";
	display: block;
	width: 34px;
	height: 2px;
	margin-top: 12px;
	margin-bottom: -13px;
	background-color: var(--ttb-gold);
}

/* Chủ đề */

.ttb-topics {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ttb-topics li {
	margin: 0;
	border-bottom: 1px solid var(--ttb-line);
}

.ttb-topics li:last-child {
	border-bottom: 0;
}

.ttb-topics a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 11px 0;
	color: var(--ttb-ink);
	font-size: 14px;
	line-height: 1.45;
	text-decoration: none;
	transition: color .18s ease;
}

.ttb-topics a:hover,
.ttb-topics .is-current > a {
	color: var(--ttb-gold-dark);
}

.ttb-topics .is-current > a {
	font-weight: 600;
}

.ttb-topics em {
	flex: 0 0 auto;
	color: var(--ttb-muted);
	font-size: 11px;
	font-style: normal;
	letter-spacing: .5px;
}

/* Khối kêu gọi ------------------------------------------------------------ */

.ttb-cta {
	margin-bottom: 32px;
	padding: 26px 24px 28px;
	background-color: var(--ttb-navy);
	border: 1px solid var(--ttb-navy);
}

.ttb-cta__eyebrow {
	margin: 0 0 10px;
	color: var(--ttb-gold);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 2.2px;
	text-transform: uppercase;
}

.ttb-cta__title {
	margin: 0 0 12px;
	color: #fff;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.3;
	text-transform: none;
}

.ttb-cta__text {
	margin: 0 0 20px;
	color: var(--ttb-mist);
	font-size: 13.5px;
	font-weight: 300;
	line-height: 1.7;
}

.ttb-btn {
	display: inline-block;
	padding: 13px 26px;
	border: 1px solid transparent;
	border-radius: 0;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

.ttb-btn--primary {
	background-color: var(--ttb-orange);
	border-color: var(--ttb-orange);
	color: #fff;
}

.ttb-btn--primary:hover {
	background-color: var(--ttb-orange-dark);
	border-color: var(--ttb-orange-dark);
	color: #fff;
}

.ttb-btn--ghost {
	background-color: transparent;
	border-color: var(--ttb-gold);
	color: var(--ttb-gold-dark);
}

.ttb-btn--ghost:hover {
	background-color: var(--ttb-gold);
	color: var(--ttb-gold-fg);
}

/* Widget của theme cha trong cột bên --------------------------------------- */

body.ttb .ttb-side__widgets .widget {
	margin-bottom: 32px;
	padding: 24px;
	background-color: #fff;
	border: 1px solid var(--ttb-line);
}

body.ttb .ttb-side__widgets .is-divider {
	display: none;
}

body.ttb .ttb-side__widgets ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

body.ttb .ttb-side__widgets .recent-blog-posts-li {
	margin: 0;
	border-bottom: 1px solid var(--ttb-line);
}

body.ttb .ttb-side__widgets .recent-blog-posts-li:last-child {
	border-bottom: 0;
}

body.ttb .ttb-side__widgets .recent-blog-posts {
	padding: 14px 0;
}

body.ttb .ttb-side__widgets .badge,
body.ttb .ttb-side__widgets .badge-inner {
	width: 62px;
	height: 46px;
	border-radius: 0;
	background-color: var(--ttb-navy-700);
}

body.ttb .ttb-side__widgets .badge {
	margin: 0;
	padding: 0;
}

body.ttb .ttb-side__widgets .recent-blog-posts a {
	color: var(--ttb-ink);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.45;
	text-decoration: none;
	transition: color .18s ease;
}

body.ttb .ttb-side__widgets .recent-blog-posts a:hover {
	color: var(--ttb-gold-dark);
}

/* Dòng "Chức năng bình luận bị tắt" — bình luận đang đóng toàn site, hiện ra
   chỉ làm rối. */
body.ttb .ttb-side__widgets .post_comments {
	display: none;
}

/* ==========================================================================
   Trang chi tiết — khung
   ========================================================================== */

.ttb-progress {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 9999;
	width: 100%;
	height: 3px;
	pointer-events: none;
	background-color: transparent;
}

.ttb-progress span {
	display: block;
	width: 0;
	height: 100%;
	background-color: var(--ttb-gold);
	transition: width .1s linear;
}

body.ttb .ttb-single {
	display: grid;
	grid-template-columns: 250px minmax(0, 1fr);
	gap: 60px;
	align-items: start;
	max-width: 1140px;
	padding-top: 48px;
	padding-bottom: 64px;
}

body.ttb .ttb-single.has-no-toc {
	grid-template-columns: minmax(0, 1fr);
	max-width: 860px;
}

/* Mục lục ----------------------------------------------------------------- */

.ttb-toc {
	position: sticky;
	top: var(--ttb-stick);
	max-height: calc(100vh - var(--ttb-stick) - 24px);
	overflow-y: auto;
	padding-right: 4px;
}

.ttb-toc__summary {
	display: flex;
	align-items: center;
	gap: 9px;
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--ttb-line);
	color: var(--ttb-navy);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
	list-style: none;
	cursor: default;
}

.ttb-toc__summary::-webkit-details-marker {
	display: none;
}

.ttb-toc__summary .ttb-icon {
	color: var(--ttb-gold);
}

.ttb-toc__list {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: ttb-toc;
}

.ttb-toc__sub {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ttb-toc__item {
	margin: 0;
}

.ttb-toc__link {
	display: block;
	padding: 8px 0 8px 16px;
	border-left: 2px solid var(--ttb-line);
	color: var(--ttb-muted);
	font-size: 13.5px;
	font-weight: 400;
	line-height: 1.5;
	text-decoration: none;
	transition: color .18s ease, border-color .18s ease;
}

.ttb-toc__item::before {
	display: none;
}

.ttb-toc__list > .ttb-toc__item > .ttb-toc__link {
	counter-increment: ttb-toc;
}

.ttb-toc__list > .ttb-toc__item > .ttb-toc__link::before {
	content: counter(ttb-toc) ". ";
	color: var(--ttb-gold);
	font-weight: 600;
}

.ttb-toc__item.is-sub .ttb-toc__link {
	padding-left: 30px;
	font-size: 12.5px;
	color: var(--ttb-navy-400);
}

.ttb-toc__link:hover {
	color: var(--ttb-navy);
	border-left-color: var(--ttb-gold);
}

.ttb-toc__link.is-active {
	color: var(--ttb-navy);
	border-left-color: var(--ttb-gold);
	font-weight: 600;
}

/* ==========================================================================
   Trang chi tiết — chữ trong bài
   ========================================================================== */

body.ttb .ttb-article {
	max-width: 780px;
	color: var(--ttb-ink);
	font-size: 17px;
	font-weight: 400;
	line-height: 1.85;
}

body.ttb .ttb-article p {
	margin: 0 0 1.35em;
	/* Nội dung cũ dán vào editor kèm text-align:justify inline; tiếng Việt căn
	   đều ở khổ hẹp bị hở khoảng trắng rất rõ. */
	text-align: left;
}

body.ttb .ttb-article > p:first-of-type {
	font-size: 18.5px;
	color: var(--ttb-navy-700);
}

body.ttb .ttb-article h2,
body.ttb .ttb-article h3,
body.ttb .ttb-article h4 {
	color: var(--ttb-navy);
	text-align: left;
	text-transform: none;
	scroll-margin-top: var(--ttb-stick);
}

body.ttb .ttb-article h2 {
	position: relative;
	margin: 2.2em 0 .7em;
	padding-top: 20px;
	font-size: clamp(23px, 2.4vw, 29px);
	font-weight: 600;
	line-height: 1.3;
}

body.ttb .ttb-article h2::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 44px;
	height: 2px;
	background-color: var(--ttb-gold);
}

body.ttb .ttb-article h3 {
	margin: 1.8em 0 .5em;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.4;
}

body.ttb .ttb-article h4 {
	margin: 1.5em 0 .4em;
	font-size: 17px;
	font-weight: 600;
}

/* Tiêu đề chỉ bọc ảnh (nội dung cũ hay bị) — không kẻ vạch vàng lên đầu ảnh. */
body.ttb .ttb-article h1,
body.ttb .ttb-article h2:has(> img),
body.ttb .ttb-article h3:has(> img) {
	margin: 1.6em 0;
	padding-top: 0;
}

body.ttb .ttb-article h2:has(> img)::before {
	display: none;
}

body.ttb .ttb-article strong,
body.ttb .ttb-article b {
	color: var(--ttb-navy);
	font-weight: 600;
}

body.ttb .ttb-article a {
	color: var(--ttb-navy);
	text-decoration: underline;
	text-decoration-color: var(--ttb-gold);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color .18s ease;
}

body.ttb .ttb-article a:hover {
	color: var(--ttb-gold-dark);
}

body.ttb .ttb-article ul,
body.ttb .ttb-article ol {
	margin: 0 0 1.35em;
	padding-left: 4px;
	list-style: none;
}

body.ttb .ttb-article ol {
	counter-reset: ttb-ol;
}

body.ttb .ttb-article li {
	position: relative;
	margin: 0 0 .5em;
	padding-left: 26px;
	text-align: left;
}

body.ttb .ttb-article ul > li::before {
	content: "";
	position: absolute;
	top: .72em;
	left: 4px;
	width: 6px;
	height: 6px;
	background-color: var(--ttb-gold);
}

body.ttb .ttb-article ol > li {
	counter-increment: ttb-ol;
}

body.ttb .ttb-article ol > li::before {
	content: counter(ttb-ol) ".";
	position: absolute;
	left: 0;
	color: var(--ttb-gold-dark);
	font-weight: 600;
	font-size: 15px;
}

body.ttb .ttb-article li > ul,
body.ttb .ttb-article li > ol {
	margin: .5em 0 0;
}

body.ttb .ttb-article blockquote {
	margin: 1.8em 0;
	padding: 22px 26px;
	background-color: #fff;
	border: 0;
	border-left: 3px solid var(--ttb-gold);
	color: var(--ttb-navy-700);
	font-size: 19px;
	line-height: 1.6;
}

body.ttb .ttb-article blockquote p:last-child {
	margin-bottom: 0;
}

body.ttb .ttb-article img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 0 auto;
}

body.ttb .ttb-article figure,
body.ttb .ttb-article .wp-caption {
	max-width: 100%;
	margin: 1.8em auto;
}

body.ttb .ttb-article figcaption,
body.ttb .ttb-article .wp-caption-text {
	margin-top: 10px;
	color: var(--ttb-muted);
	font-size: 13px;
	line-height: 1.5;
	text-align: center;
}

body.ttb .ttb-article hr {
	margin: 2.4em 0;
	border: 0;
	border-top: 1px solid var(--ttb-line);
}

/* Bảng — style.css của child đặt table{display:block} cho bảng chương trình;
   trong bài viết cần bảng thật, phần tràn ngang do .ttb-table-scroll lo. */
body.ttb .ttb-article .ttb-table-scroll {
	margin: 1.8em 0;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid var(--ttb-line);
}

body.ttb .ttb-article table {
	display: table;
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	background-color: #fff;
	font-size: 15px;
}

body.ttb .ttb-article th,
body.ttb .ttb-article td {
	padding: 12px 16px;
	border: 1px solid var(--ttb-line);
	color: var(--ttb-ink);
	text-align: left;
	vertical-align: top;
	line-height: 1.6;
}

body.ttb .ttb-article thead th {
	background-color: var(--ttb-navy);
	border-color: var(--ttb-navy);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .6px;
	text-transform: uppercase;
}

body.ttb .ttb-article tbody tr:nth-child(even) td {
	background-color: var(--ttb-cream);
}

/* Lượt xem do plugin chèn đầu bài — số đã hiện ở dải hero. */
body.ttb .ttb-article .post-views {
	display: none;
}

/* Thẻ --------------------------------------------------------------------- */

.ttb-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 2.4em 0 0 !important;
	padding: 0 !important;
	list-style: none;
}

body.ttb .ttb-article .ttb-tags li {
	margin: 0;
	padding: 0;
}

body.ttb .ttb-article .ttb-tags li::before {
	display: none;
}

body.ttb .ttb-article .ttb-tags a {
	display: inline-block;
	padding: 6px 14px;
	border: 1px solid var(--ttb-line);
	background-color: #fff;
	color: var(--ttb-muted);
	font-size: 12.5px;
	text-decoration: none;
	transition: border-color .18s ease, color .18s ease;
}

body.ttb .ttb-article .ttb-tags a:hover {
	border-color: var(--ttb-gold);
	color: var(--ttb-gold-dark);
}

/* Tuyên bố miễn trách nhiệm ------------------------------------------------
 *
 * Trước 28/08/2026 khối này do plugin `tritininvest` chèn vào cuối bài, mang
 * theo một cặp <style>/<script> inline; phần ở đây chỉ vá lại chuyển động
 * đóng/mở. Plugin đã gỡ — markup dời về ttb_disclaimer() và dựng bằng
 * <details> như hộp mục lục phía trên, nên đóng/mở là việc của trình duyệt,
 * không còn dòng JS nào dính vào.
 *
 * Đổi lại, chiều cao bật tắt tức thì: mẹo grid 0fr → 1fr của bản cũ chỉ chạy
 * được khi có JS gạt thuộc tính `hidden`, mà giờ thì không còn JS. Bù bằng
 * một nhịp hiện chữ ngắn — chạy ở mọi trình duyệt, kể cả bản không hỗ trợ
 * animation cho <details>.
 */

.ttb-disclaimer {
	margin-top: 2.4em;
	padding: 16px 20px;
	border: 1px solid var(--ttb-line);
	background-color: #fff;
}

.ttb-disclaimer__summary {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 14px;
	cursor: pointer;
	color: var(--ttb-ink);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
	/* Tam giác mặc định: Chrome và Safari mỗi bên vẽ một kiểu. Ẩn cả hai, mũi
	   tên tự vẽ ở .ttb-disclaimer__cue::after cho khớp với mục lục. */
	list-style: none;
}

.ttb-disclaimer__summary::-webkit-details-marker {
	display: none;
}

.ttb-disclaimer__label {
	transition: color .18s ease;
}

.ttb-disclaimer__summary:hover .ttb-disclaimer__label {
	color: var(--ttb-gold);
}

.ttb-disclaimer__cue {
	display: inline-flex;
	align-items: center;
	color: var(--ttb-gold);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
	white-space: nowrap;
}

.ttb-disclaimer__cue::after {
	content: "";
	width: 6px;
	height: 6px;
	margin-left: 8px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform .3s ease;
}

/* Hai chữ gợi ý in sẵn cả hai, ẩn/hiện theo [open] — đỡ phải nhét chữ vào
   thuộc tính `content`, vốn không dịch được và không bôi đen chép được. */
.ttb-disclaimer__cue-close,
.ttb-disclaimer[open] .ttb-disclaimer__cue-open {
	display: none;
}

.ttb-disclaimer[open] .ttb-disclaimer__cue-close {
	display: inline;
}

.ttb-disclaimer[open] .ttb-disclaimer__cue::after {
	transform: translateY(1px) rotate(-135deg);
}

.ttb-disclaimer__body {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--ttb-line);
	animation: ttb-disclaimer-in .28s ease both;
}

body.ttb .ttb-article .ttb-disclaimer__body p {
	margin: 0 0 10px;
	color: var(--ttb-muted);
	font-size: 14px;
	line-height: 1.7;
}

body.ttb .ttb-article .ttb-disclaimer__body p:last-child {
	margin-bottom: 0;
}

@keyframes ttb-disclaimer-in {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ttb-disclaimer__body {
		animation: none;
	}

	.ttb-disclaimer__label,
	.ttb-disclaimer__cue::after {
		transition: none;
	}
}

/* Chia sẻ ----------------------------------------------------------------- */

.ttb-share {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 2.4em;
	padding-top: 24px;
	border-top: 1px solid var(--ttb-line);
}

.ttb-share__label {
	color: var(--ttb-muted);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
}

.ttb-share__list {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

/*
 * Nút chép link là <button>, bốn nút kia là <a>. Flatsome đặt sẵn
 * margin-bottom và line-height cho mọi <button>, làm nút đó cao 41px thay vì
 * 40px và độn thêm ~16px khoảng trống dưới .ttb-share__list. Hàng ngoài căn
 * giữa theo cái hộp đã bị độn đó, nên nhãn "CHIA SẺ" tụt xuống ~9px so với
 * dãy icon. Ép cả hai về 0/1 để <button> và <a> đo ra đúng như nhau.
 */
body.ttb .ttb-share__btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	line-height: 1;
	border: 1px solid var(--ttb-line);
	border-radius: 0;
	background-color: #fff;
	box-shadow: none;
	color: var(--ttb-navy);
	cursor: pointer;
	text-decoration: none;
	transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}

body.ttb .ttb-share__btn:hover {
	border-color: var(--ttb-gold);
	background-color: var(--ttb-gold);
	color: var(--ttb-gold-fg);
}

.ttb-share__copied {
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%);
	padding: 5px 10px;
	background-color: var(--ttb-navy);
	color: var(--ttb-mist);
	font-size: 11px;
	letter-spacing: .5px;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	transition: opacity .18s ease, visibility .18s ease;
}

.ttb-share__btn.is-copied .ttb-share__copied {
	opacity: 1;
	visibility: visible;
}

/* Form tư vấn sau bài (theme mod blog_after_post) -------------------------- */

body.ttb .html-before-comments {
	max-width: 860px;
	margin: 0 auto 56px;
	padding: 0 20px;
}

body.ttb .google-form-container iframe {
	width: 100% !important;
	max-width: 100%;
	border: 1px solid var(--ttb-line);
	background-color: #fff;
}

/* Bài trước / bài sau ------------------------------------------------------ */

.ttb-adjacent {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	padding-bottom: 64px;
}

.ttb-adjacent__link {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 22px 24px;
	background-color: #fff;
	border: 1px solid var(--ttb-line);
	text-decoration: none;
	transition: border-color .18s ease;
}

.ttb-adjacent__link:hover {
	border-color: var(--ttb-gold);
}

.ttb-adjacent__link.is-next {
	text-align: right;
	grid-column: 2;
}

.ttb-adjacent__label {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: var(--ttb-gold-dark);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1.8px;
	text-transform: uppercase;
}

.ttb-adjacent__link.is-next .ttb-adjacent__label {
	justify-content: flex-end;
}

.ttb-adjacent__link.is-prev .ttb-icon {
	transform: rotate(180deg);
}

.ttb-adjacent__title {
	color: var(--ttb-navy);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.35;
}

.ttb-adjacent__link:hover .ttb-adjacent__title {
	color: var(--ttb-gold-dark);
}

/* Bài liên quan — dải navy khép lại nhịp kem ↔ navy --------------------------- */

.ttb-related {
	padding: 64px 0 72px;
	background-color: var(--ttb-navy);
}

.ttb-related__eyebrow {
	margin: 0 0 10px;
	color: var(--ttb-gold);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 2.4px;
	text-transform: uppercase;
}

.ttb-related__title {
	margin: 0 0 34px;
	color: #fff;
	font-size: clamp(24px, 2.6vw, 32px);
	font-weight: 600;
	text-transform: none;
}

.ttb-card.is-dark {
	background-color: var(--ttb-navy-900);
	border-color: rgba(240, 164, 94, .22);
}

.ttb-card.is-dark:hover {
	border-color: var(--ttb-gold);
}

.ttb-card.is-dark .ttb-card__title a {
	color: #fff;
}

.ttb-card.is-dark .ttb-card__title a:hover,
.ttb-card.is-dark .ttb-card__cat {
	color: var(--ttb-gold);
}

.ttb-card.is-dark .ttb-card__meta {
	border-top-color: rgba(215, 222, 232, .14);
	color: var(--ttb-navy-400);
}

/* ==========================================================================
   Màn hình nhỏ
   ========================================================================== */

@media (min-width: 1025px) {
	/* Trên desktop mục lục luôn mở — bấm vào tiêu đề không đóng được. */
	.ttb-toc__summary {
		pointer-events: none;
	}
}

@media (max-width: 1024px) {
	.ttb-layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 48px;
		padding-top: 40px;
	}

	.ttb-side {
		position: static;
		max-height: none;
		overflow: visible;
	}

	body.ttb .ttb-single,
	body.ttb .ttb-single.has-no-toc {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
		max-width: 820px;
	}

	.ttb-toc {
		position: static;
		max-height: none;
		overflow: visible;
		padding: 20px 22px;
		background-color: #fff;
		border: 1px solid var(--ttb-line);
	}

	.ttb-toc__summary {
		margin-bottom: 0;
		padding-bottom: 0;
		border-bottom: 0;
		cursor: pointer;
	}

	.ttb-toc[open] .ttb-toc__summary {
		margin-bottom: 14px;
		padding-bottom: 12px;
		border-bottom: 1px solid var(--ttb-line);
	}

	.ttb-toc__summary::after {
		content: "";
		width: 8px;
		height: 8px;
		margin-left: auto;
		border-right: 1.5px solid var(--ttb-gold);
		border-bottom: 1.5px solid var(--ttb-gold);
		transform: translateY(-2px) rotate(45deg);
		transition: transform .2s ease;
	}

	.ttb-toc[open] .ttb-toc__summary::after {
		transform: translateY(2px) rotate(-135deg);
	}

	body.ttb .ttb-article {
		max-width: none;
	}
}

@media (max-width: 849px) {
	.ttb-feature__media {
		aspect-ratio: 16 / 9;
	}

	.ttb-feature__body {
		padding: 26px 24px 28px;
	}

	.ttb-grid,
	.ttb-grid--3 {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}

	.ttb-adjacent {
		grid-template-columns: minmax(0, 1fr);
	}

	.ttb-adjacent__link.is-next {
		grid-column: 1;
		text-align: left;
	}

	.ttb-adjacent__link.is-next .ttb-adjacent__label {
		justify-content: flex-start;
	}
}

@media (max-width: 640px) {
	.ttb-hero__inner,
	.ttb-hero--post .ttb-hero__inner {
		padding-top: 40px;
		padding-bottom: 44px;
	}

	.ttb-hero__meta {
		gap: 8px 18px;
		font-size: 12.5px;
	}

	body.ttb .ttb-article {
		font-size: 16.5px;
		line-height: 1.8;
	}

	body.ttb .ttb-article > p:first-of-type {
		font-size: 17px;
	}

	body.ttb .ttb-single {
		padding-top: 32px;
		padding-bottom: 48px;
	}

	.ttb-related {
		padding: 44px 0 52px;
	}
}
