/**
 * Luat Trieu Phuc: shared public article typography.
 * !important overrides ordinary editor formatting, including nested spans.
 * Only presentation changes; semantic emphasis, links and table cells remain.
 */
body.single-post {
	--ltp-article-font: Arial, "Helvetica Neue", Helvetica, sans-serif;
	--ltp-article-ink: #292d32;
	--ltp-article-heading: #202a35;
	--ltp-article-link: #165c83;
	--ltp-article-muted: #626b75;
	--ltp-article-line: #dce2e7;
	--ltp-article-tint: #f3f6f8;
	--ltp-article-width: 840px;
	--ltp-article-size: 18px;
}

/* Align the title and reading column without changing site navigation. */
body.single-post .blog-single :is(.entry-header, .entry-content.single-page, .entry-author, .entry-meta, .navigation-post) {
	width: 100%;
	max-width: var(--ltp-article-width);
	margin-inline: auto;
}
/* Reserve the left gutter for a future TOC within the existing header grid. */
@media screen and (min-width: 1200px) {
	body.single-post .blog-single article > .article-inner {
		width: 100%;
		max-width: var(--ltp-article-width);
		margin-inline-start: auto;
		margin-inline-end: 0;
	}
}
body.single-post .blog-single .entry-header-text {
	padding: 36px 0 24px;
	text-align: left;
}
body.single-post .blog-single .entry-title {
	margin: 0 0 16px;
	color: var(--ltp-article-heading);
	font-family: var(--ltp-article-font);
	font-size: 36px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.5px;
	text-transform: none;
	text-wrap: pretty;
}
body.single-post .blog-single .entry-header .is-divider {
	width: 100%;
	max-width: none;
	height: 1px;
	margin: 20px 0 0;
	background: var(--ltp-article-line);
}
body.single-post .blog-single .entry-header :is(.entry-meta, .entry-category) {
	color: var(--ltp-article-muted);
	font-family: var(--ltp-article-font);
	font-size: 13px;
	line-height: 1.6;
	letter-spacing: 0;
}
body.single-post .blog-single .entry-content.single-page {
	padding-top: 0;
}
body.single-post .ltp-article-content {
	display: flow-root;
	color: var(--ltp-article-ink);
	font-family: var(--ltp-article-font);
	font-size: var(--ltp-article-size);
	font-weight: 400;
	line-height: 1.75;
	text-align: left;
	overflow-wrap: anywhere;
}

/* Reset pasted text, FONT tags and block colors. Exclude shortcode controls and Fixed TOC. */
body.single-post .ltp-article-content :where(div, p, span, font, a, strong, b, em, i, u, s, del, ins, mark, small, sub, sup, ul, ol, li, dl, dt, dd, blockquote, cite, h1, h2, h3, h4, h5, h6, table, caption, thead, tbody, tfoot, tr, th, td, figure, figcaption):not(:where(.wpcf7, .wpcf7 *, .wp-block-buttons, .wp-block-buttons *, .button, .button *, .social-icons, .social-icons *, [class^="icon-"], [class*=" icon-"], #ftwp-container-outer, #ftwp-container-outer *, #ftwp-container, #ftwp-container *)) {
	font-family: inherit !important;
	font-size: inherit !important;
	line-height: inherit !important;
	color: inherit !important;
	background: transparent !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	text-shadow: none !important;
}
body.single-post .ltp-article-content :where(span, font):not(:where(.wpcf7 *, .wp-block-buttons *, .button *, .social-icons *, [class^="icon-"], [class*=" icon-"], #ftwp-container-outer *, #ftwp-container *)) {
	font-weight: inherit !important;
	font-style: inherit !important;
	white-space: inherit !important;
}
body.single-post .ltp-article-content :where(p, div, li, dt, dd, ul, ol):not(:where(.wpcf7 *, .wp-block-buttons *, .social-icons *, #ftwp-container-outer, #ftwp-container-outer *, #ftwp-container, #ftwp-container *)) {
	text-align: left !important;
}
body.single-post .ltp-article-content :where(p, ul, ol, dl, blockquote, pre, figure, table):not(:where(.wpcf7 *, .wp-block-buttons *, .social-icons *, #ftwp-container-outer *, #ftwp-container *)) {
	margin-block: 0 1.2em !important;
}
body.single-post .ltp-article-content p:not(:where(.wpcf7 p, #ftwp-container-outer *, #ftwp-container *)) {
	font-weight: 400 !important;
	text-indent: 0 !important;
	padding: 0 !important;
}
body.single-post .ltp-article-content :where(strong, b, dt):not(:where(#ftwp-container-outer *, #ftwp-container *)) {
	font-weight: 700 !important;
}
body.single-post .ltp-article-content :where(em, i):not([class^="icon-"]):not([class*=" icon-"]):not(:where(#ftwp-container-outer *, #ftwp-container *)) {
	font-style: italic !important;
}

/* Extra H1 tags in older content use the H2 visual scale; HTML is unchanged. */
body.single-post .ltp-article-content :where(h1, h2, h3, h4, h5, h6):not(:where(#ftwp-container-outer *, #ftwp-container *)) {
	clear: both;
	margin: 1.6em 0 0.65em !important;
	padding: 0 !important;
	border: 0 !important;
	color: var(--ltp-article-heading) !important;
	font-weight: 700 !important;
	font-style: normal !important;
	line-height: 1.4 !important;
	text-align: left !important;
	scroll-margin-top: 100px;
	text-wrap: pretty;
}
body.single-post .ltp-article-content :is(h1, h2):not(:where(#ftwp-container-outer *, #ftwp-container *)) { font-size: 26px !important; }
body.single-post .ltp-article-content h3:not(:where(#ftwp-container-outer *, #ftwp-container *)) { font-size: 22px !important; }
body.single-post .ltp-article-content :is(h4, h5, h6):not(:where(#ftwp-container-outer *, #ftwp-container *)) { font-size: 19px !important; }
body.single-post .ltp-article-content :is(h1, h2, h3, h4, h5, h6):not(:where(#ftwp-container-outer *, #ftwp-container *)) :where(span, font, strong, b, em, i, a) {
	font-weight: inherit !important;
	font-style: inherit !important;
	white-space: inherit !important;
}
body.single-post .ltp-article-content :is(h1, h2, h3, h4, h5, h6):not(:where(#ftwp-container-outer *, #ftwp-container *)):empty { display: none; }
body.single-post .ltp-article-content > :first-child:not(:where(#ftwp-container-outer, #ftwp-container)) { margin-top: 0 !important; }

body.single-post .ltp-article-content a:not(:where(.button, .wp-block-button__link, .wpcf7 *, .social-icons *, #ftwp-container-outer *, #ftwp-container *)) {
	color: var(--ltp-article-link) !important;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}
body.single-post .ltp-article-content a:not(:where(.button, #ftwp-container-outer *, #ftwp-container *)):hover { text-decoration-thickness: 2px; }
body.single-post .ltp-article-content :is(a, summary, .ltp-table-scroll):not(:where(#ftwp-container-outer *, #ftwp-container *)):focus-visible {
	outline: 2px solid var(--ltp-article-link);
	outline-offset: 4px;
}
body.single-post .ltp-article-content :where(ul, ol):not(:where(#ftwp-container-outer *, #ftwp-container *)) {
	padding-left: 1.4em !important;
	margin-left: 0 !important;
}
body.single-post .ltp-article-content li:not(:where(#ftwp-container-outer *, #ftwp-container *)) {
	margin: 0.4em 0 !important;
	padding-left: 0.15em;
}
body.single-post .ltp-article-content li:not(:where(#ftwp-container-outer *, #ftwp-container *)) > :where(p, ul, ol) { margin-block: 0.4em !important; }
body.single-post .ltp-article-content blockquote {
	padding: 18px 22px !important;
	border: 0 !important;
	border-left: 3px solid var(--ltp-article-link) !important;
	background: var(--ltp-article-tint) !important;
	font-style: normal;
}
body.single-post .ltp-article-content blockquote > :last-child { margin-bottom: 0 !important; }
body.single-post .ltp-article-content :where(sup, sub) {
	font-size: 0.75em !important;
	line-height: 0 !important;
}
body.single-post .ltp-article-content :where(pre, code, kbd, samp) {
	font-family: Consolas, "Courier New", monospace !important;
	font-size: 0.9em;
}
body.single-post .ltp-article-content pre {
	padding: 16px;
	background: var(--ltp-article-tint);
	overflow-x: auto;
}

/* Images retain aspect ratio; captions follow a quiet, uniform style. */
body.single-post .ltp-article-content :where(img, video) {
	max-width: 100% !important;
	height: auto !important;
}
body.single-post .ltp-article-content :where(figure, .wp-caption, iframe) {
	max-width: 100% !important;
	margin-inline: auto;
}
body.single-post .ltp-article-content :where(.wp-caption-text, figcaption, caption) {
	margin-top: 10px !important;
	color: var(--ltp-article-muted) !important;
	font-size: 14px !important;
	line-height: 1.55 !important;
	font-style: normal !important;
	text-align: center !important;
}

/* JS wraps native tables in a keyboard-accessible scroll region.
 * With JS disabled the table itself provides a scrolling fallback.
 */
body.single-post .ltp-article-content table {
	display: block;
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	margin-inline: 0 !important;
	border: 1px solid var(--ltp-article-line) !important;
	border-collapse: collapse !important;
	border-spacing: 0 !important;
	table-layout: auto !important;
	font-size: 16px !important;
	line-height: 1.6 !important;
	overflow-x: auto;
}
body.single-post .ltp-article-content :where(thead, tbody, tfoot, tr, th, td, col, colgroup) {
	width: auto !important;
	height: auto !important;
}
body.single-post .ltp-article-content :where(thead, tbody, tfoot, tr, col, colgroup) {
	background: transparent !important;
	border: 0 !important;
}
body.single-post .ltp-article-content :where(th, td) {
	min-width: 120px !important;
	padding: 13px 16px !important;
	border: 1px solid var(--ltp-article-line) !important;
	font-weight: 400 !important;
	text-align: left !important;
	vertical-align: top !important;
	white-space: normal !important;
	word-break: normal !important;
}
body.single-post .ltp-article-content th {
	background: #edf2f5 !important;
	color: var(--ltp-article-heading) !important;
	font-weight: 700 !important;
}
body.single-post .ltp-article-content tbody > tr:nth-child(even) > td { background: #f7f9fa !important; }
/* Tint classic-editor first rows without inventing header semantics. */
body.single-post .ltp-article-content table:not(:has(thead)) > tbody:first-of-type > tr:first-child > td { background: #edf2f5 !important; }
body.single-post .ltp-article-content :where(th, td) > :last-child { margin-bottom: 0 !important; }
body.single-post .ltp-article-content .ltp-table-scroll {
	width: 100%;
	max-width: 100%;
	margin: 0 0 24px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scrollbar-width: thin;
	scrollbar-color: #9aa8b4 #edf2f5;
}
body.single-post .ltp-article-content .ltp-table-scroll > table {
	display: table;
	min-width: var(--ltp-table-min-width, 100%) !important;
	margin-bottom: 0 !important;
	overflow: visible;
}
body.single-post .ltp-article-content .ltp-table-hint {
	margin: 0 0 8px !important;
	color: var(--ltp-article-muted) !important;
	font-size: 13px !important;
	line-height: 1.5 !important;
}
body.single-post .ltp-article-content .ltp-table-hint[hidden] { display: none; }
body.single-post .ltp-article-content hr {
	height: 1px;
	margin: 32px 0;
	border: 0;
	background: var(--ltp-article-line);
}

@media (max-width: 767px) {
	body.single-post .blog-single .entry-header-text { padding: 24px 0 18px; }
	body.single-post .blog-single .entry-title { font-size: 28px; letter-spacing: -0.25px; }
	body.single-post .ltp-article-content :is(h1, h2):not(:where(#ftwp-container-outer *, #ftwp-container *)) { font-size: 23px !important; }
	body.single-post .ltp-article-content h3:not(:where(#ftwp-container-outer *, #ftwp-container *)) { font-size: 20px !important; }
	body.single-post .ltp-article-content :where(.alignleft, .alignright) { float: none !important; margin-inline: auto !important; }
	body.single-post .ltp-article-content blockquote { padding: 14px 16px !important; }
	body.single-post .ltp-article-content :where(th, td) { padding: 11px 13px !important; }
}

@media print {
	body.single-post .ltp-article-content .ltp-table-hint { display: none; }
	body.single-post .ltp-article-content .ltp-table-scroll { overflow: visible; }
	body.single-post .ltp-article-content .ltp-table-scroll > table { min-width: 100% !important; }
	body.single-post .ltp-article-content :is(h1, h2, h3, h4, h5, h6):not(:where(#ftwp-container-outer *, #ftwp-container *)) { break-after: avoid; }
}
