/*
Theme Name: Marketingseotop.com
Theme URI: https://marketingseotop.com/
Author: Marketingseotop.com
Author URI: https://marketingseotop.com/
Description: Theme gốc cho website review truyện, sách và tiếp thị liên kết. Bố cục chia section / row / col bằng shortcode theo kiểu Flatsome nên dễ chỉnh sửa. Thiết kế: Marketingseotop.com.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: marketingseotop
*/

/* ==========================================================================
   1. Biến màu & nền tảng
   ========================================================================== */
:root {
	--mst-primary: #446084;
	--mst-secondary: #d26e4b;
	--mst-success: #5b8c3a;
	--mst-danger: #c0392b;
	--mst-text: #2b2f36;
	--mst-muted: #6b7280;
	--mst-bg: #ffffff;
	--mst-bg-alt: #f6f5f1;
	--mst-border: #e5e3dc;
	--mst-radius: 8px;
	--mst-container: 1140px;
	--mst-shadow: 0 2px 10px rgba(20, 30, 50, .07);
	--mst-star: #f5a623;
	--mst-gap: 28px; /* nhịp dọc chung giữa các khối trong bài */
	--mst-shopee: #ee4d2d;
	--mst-tiki: #1a94ff;
	--mst-fahasa: #c92127;
	--mst-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	/* Georgia thiếu một số chữ tiếng Việt hai dấu (ấ, ề…) nên không dùng cho tiêu đề. */
	--mst-font-head: "Noto Serif", "Times New Roman", Times, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--mst-font);
	font-size: 16px;
	line-height: 1.65;
	color: var(--mst-text);
	background: var(--mst-bg);
	overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--mst-primary); text-decoration: none; }
a:hover { color: var(--mst-secondary); }
h1, h2, h3, h4, h5 { font-family: var(--mst-font-head); line-height: 1.3; margin: 0 0 .6em; color: #1c2430; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }
button, input, select, textarea { font: inherit; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 999; width: auto; height: auto; clip: auto; padding: 8px 14px; background: #fff; border-radius: 4px; }

/* ==========================================================================
   2. Lưới section / row / col (kiểu Flatsome)
   ========================================================================== */
.container { width: 100%; max-width: var(--mst-container); margin: 0 auto; padding: 0 15px; }
.section { position: relative; padding: 30px 0; }
.section.dark { color: #fff; }
.section.dark h1, .section.dark h2, .section.dark h3 { color: #fff; }
.row { display: flex; flex-flow: row wrap; width: 100%; max-width: var(--mst-container); margin: 0 auto; }
.row.row-full-width { max-width: 100%; }
.row .row { width: auto; margin-left: -15px; margin-right: -15px; }
.col { position: relative; width: 100%; padding: 0 15px 30px; }
.row-small > .col { padding: 0 10px 20px; }
.row-collapse > .col { padding: 0; }
.row.align-middle { align-items: center; }
.row.align-center { justify-content: center; }
.col-inner { position: relative; width: 100%; height: 100%; }

.small-1 { width: 8.3333%; } .small-2 { width: 16.6667%; } .small-3 { width: 25%; }
.small-4 { width: 33.3333%; } .small-5 { width: 41.6667%; } .small-6 { width: 50%; }
.small-7 { width: 58.3333%; } .small-8 { width: 66.6667%; } .small-9 { width: 75%; }
.small-10 { width: 83.3333%; } .small-11 { width: 91.6667%; } .small-12 { width: 100%; }
.small-columns-1 > .col { width: 100%; } .small-columns-2 > .col { width: 50%; }
.small-columns-3 > .col { width: 33.3333%; } .small-columns-4 > .col { width: 25%; }

@media (min-width: 550px) {
	.medium-1 { width: 8.3333%; } .medium-2 { width: 16.6667%; } .medium-3 { width: 25%; }
	.medium-4 { width: 33.3333%; } .medium-5 { width: 41.6667%; } .medium-6 { width: 50%; }
	.medium-7 { width: 58.3333%; } .medium-8 { width: 66.6667%; } .medium-9 { width: 75%; }
	.medium-10 { width: 83.3333%; } .medium-11 { width: 91.6667%; } .medium-12 { width: 100%; }
	.medium-columns-1 > .col { width: 100%; } .medium-columns-2 > .col { width: 50%; }
	.medium-columns-3 > .col { width: 33.3333%; } .medium-columns-4 > .col { width: 25%; }
	.medium-columns-5 > .col { width: 20%; } .medium-columns-6 > .col { width: 16.6667%; }
}
@media (min-width: 850px) {
	.large-1 { width: 8.3333%; } .large-2 { width: 16.6667%; } .large-3 { width: 25%; }
	.large-4 { width: 33.3333%; } .large-5 { width: 41.6667%; } .large-6 { width: 50%; }
	.large-7 { width: 58.3333%; } .large-8 { width: 66.6667%; } .large-9 { width: 75%; }
	.large-10 { width: 83.3333%; } .large-11 { width: 91.6667%; } .large-12 { width: 100%; }
	.large-columns-1 > .col { width: 100%; } .large-columns-2 > .col { width: 50%; }
	.large-columns-3 > .col { width: 33.3333%; } .large-columns-4 > .col { width: 25%; }
	.large-columns-5 > .col { width: 20%; } .large-columns-6 > .col { width: 16.6667%; }
}
.gap-element { display: block; width: 100%; }
.is-divider { height: 3px; width: 40px; margin: 1em 0; background: var(--mst-border); border: 0; }
.text-center { text-align: center; }
.hide-for-small { display: none; }
@media (min-width: 550px) { .hide-for-small { display: block; } .show-for-small { display: none !important; } }

/* Tiêu đề khối */
.section-title { display: flex; align-items: center; gap: 14px; margin: 0 0 20px; }
.section-title-main { margin: 0; font-size: 1.3rem; padding-bottom: 6px; border-bottom: 3px solid var(--mst-primary); white-space: normal; }
.section-title b { flex: 1; height: 1px; background: var(--mst-border); display: block; }
.section-title a { font-size: .85rem; font-weight: 600; white-space: nowrap; }
.section-title-center { justify-content: center; text-align: center; }
.section-title-center b:first-child { display: block; }
.section-title:not(.section-title-center) b:first-child { display: none; }

/* Nút */
.button {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	padding: 9px 18px; border: 2px solid var(--mst-primary); border-radius: 6px;
	background: var(--mst-primary); color: #fff; font-weight: 600; font-size: .92rem; line-height: 1.3;
	cursor: pointer; transition: filter .15s, transform .15s;
}
.button:hover { color: #fff; filter: brightness(1.08); transform: translateY(-1px); }
.button.secondary { background: var(--mst-secondary); border-color: var(--mst-secondary); }
.button.is-outline { background: transparent; color: var(--mst-primary); }
.button.is-outline:hover { background: var(--mst-primary); color: #fff; }
.button.is-small { padding: 6px 12px; font-size: .82rem; }
.button.is-large { padding: 12px 26px; font-size: 1.02rem; }
.button.btn-shopee { background: var(--mst-shopee); border-color: var(--mst-shopee); }
.button.btn-tiki { background: var(--mst-tiki); border-color: var(--mst-tiki); }
.button.btn-fahasa { background: var(--mst-fahasa); border-color: var(--mst-fahasa); }
.button.btn-extra { background: #fff; color: var(--mst-text); border-color: var(--mst-border); }
.button.btn-extra:hover { color: var(--mst-primary); border-color: var(--mst-primary); }

/* ==========================================================================
   3. Thanh trên, header, menu
   ========================================================================== */
.topbar { background: var(--mst-primary); color: #fff; font-size: .82rem; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; }
.topbar a { color: #fff; font-weight: 600; }
.topbar-left { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.topbar-right { display: flex; gap: 16px; white-space: nowrap; }

.header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--mst-border); }
.header.is-stuck { box-shadow: var(--mst-shadow); }
.header-inner { display: flex; align-items: center; gap: 18px; min-height: 66px; }
.logo { flex: 0 0 auto; }
.logo a { display: flex; align-items: center; gap: 10px; color: #1c2430; }
.logo img { max-height: 46px; width: auto; }
.logo-mark { width: 38px; height: 38px; border-radius: 8px; background: var(--mst-primary); color: #fff; display: grid; place-items: center; font-family: var(--mst-font-head); font-weight: 700; font-size: 1.2rem; }
.logo-text { font-family: var(--mst-font-head); font-weight: 700; font-size: 1.25rem; line-height: 1.1; }
.logo-text small { display: block; font-family: var(--mst-font); font-weight: 400; font-size: .7rem; color: var(--mst-muted); }
.nav-main { flex: 1; display: none; }
.nav-main ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.nav-main li { position: relative; }
.nav-main a { display: block; padding: 10px 12px; color: var(--mst-text); font-weight: 600; font-size: .93rem; border-radius: 6px; }
.nav-main a:hover, .nav-main .current-menu-item > a, .nav-main .current-menu-parent > a { color: var(--mst-primary); background: var(--mst-bg-alt); }
.nav-main ul ul { position: absolute; top: 100%; left: 0; min-width: 210px; display: none; flex-direction: column; background: #fff; border: 1px solid var(--mst-border); border-radius: var(--mst-radius); box-shadow: var(--mst-shadow); padding: 6px; z-index: 10; }
.nav-main li:hover > ul, .nav-main li:focus-within > ul { display: flex; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--mst-text); cursor: pointer; }
.icon-btn:hover { background: var(--mst-bg-alt); color: var(--mst-primary); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.header-search { display: none; border-top: 1px solid var(--mst-border); padding: 12px 0; background: #fff; }
.header-search.is-open { display: block; }
/* Menu ngang cần đủ rộng cho 7–8 mục; dưới 992px dùng menu trượt. */
@media (min-width: 992px) {
	.nav-main { display: block; }
	.menu-toggle { display: none; }
}
@media (min-width: 992px) and (max-width: 1199px) {
	.nav-main a { padding: 10px 8px; font-size: .88rem; }
}

.search-form { display: flex; gap: 8px; width: 100%; }
.search-form input[type="search"] { flex: 1; min-width: 0; padding: 10px 14px; border: 1px solid var(--mst-border); border-radius: 6px; background: #fff; }
.search-form input[type="search"]:focus { outline: 2px solid var(--mst-primary); outline-offset: 0; border-color: transparent; }

.mobile-menu { position: fixed; inset: 0 auto 0 0; width: 290px; max-width: 86vw; z-index: 100; background: #fff; transform: translateX(-100%); transition: transform .22s ease; overflow-y: auto; padding: 18px; }
.mobile-menu.is-open { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
.mobile-menu ul { list-style: none; margin: 14px 0; padding: 0; }
.mobile-menu li a { display: block; padding: 11px 4px; border-bottom: 1px solid var(--mst-border); color: var(--mst-text); font-weight: 600; }
.mobile-menu ul ul { margin: 0 0 0 14px; }
.mobile-menu ul ul a { font-weight: 400; }
.menu-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .45); opacity: 0; pointer-events: none; transition: opacity .2s; }
.menu-overlay.is-open { opacity: 1; pointer-events: auto; }

/* ==========================================================================
   4. Hero trang chủ & ô thể loại
   ========================================================================== */
.hero { padding: 44px 0 36px; background: linear-gradient(135deg, #2f4563 0%, var(--mst-primary) 55%, #6d5a7c 100%); color: #fff; }
.hero h1 { color: #fff; font-size: 2rem; margin-bottom: .4em; }
.hero p { font-size: 1.05rem; opacity: .92; max-width: 640px; }
.hero .search-form { max-width: 560px; margin-top: 18px; }
.hero .search-form input[type="search"] { border-color: transparent; padding: 13px 16px; }
.hero .button { background: var(--mst-secondary); border-color: var(--mst-secondary); }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding: 0; list-style: none; }
.hero-tags a { display: block; padding: 5px 12px; border: 1px solid rgba(255, 255, 255, .45); border-radius: 99px; color: #fff; font-size: .85rem; }
.hero-tags a:hover { background: #fff; color: var(--mst-primary); }
@media (min-width: 850px) { .hero { padding: 64px 0 56px; } .hero h1 { font-size: 2.6rem; } }

.cat-box { display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; padding: 18px 10px; border: 1px solid var(--mst-border); border-radius: var(--mst-radius); background: #fff; color: var(--mst-text); text-align: center; transition: transform .15s, box-shadow .15s, border-color .15s; }
.cat-box:hover { transform: translateY(-3px); box-shadow: var(--mst-shadow); border-color: var(--mst-primary); color: var(--mst-primary); }
.cat-box__icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; background: var(--mst-bg-alt); }
.cat-box__name { font-weight: 700; font-size: .95rem; }
.cat-box__count { font-size: .78rem; color: var(--mst-muted); }

/* ==========================================================================
   5. Thẻ bài viết, bìa sách, sao đánh giá
   ========================================================================== */
.cover { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden; background: #ddd; box-shadow: 0 6px 16px rgba(20, 30, 50, .18); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover--auto { --h: 210; background: linear-gradient(160deg, hsl(var(--h) 42% 36%), hsl(calc(var(--h) + 38) 48% 22%)); color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 12% 10% 10% 16%; }
.cover--auto::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 7%; background: rgba(0, 0, 0, .22); }
.cover--auto::after { content: ""; position: absolute; inset: 6% 6% 6% 12%; border: 1px solid rgba(255, 255, 255, .35); border-radius: 2px; pointer-events: none; }
.cover__title { position: relative; font-family: var(--mst-font-head); font-weight: 700; font-size: clamp(.8rem, 1.5vw + .5rem, 1.05rem); line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.cover__author { position: relative; font-size: .72rem; opacity: .85; text-transform: uppercase; letter-spacing: .04em; }

.stars { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; white-space: nowrap; }
.stars__icons { --p: 0%; font-size: 1rem; letter-spacing: 1px; background: linear-gradient(90deg, var(--mst-star) var(--p), #d4d4d4 var(--p)); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.stars__num { font-weight: 700; color: var(--mst-text); }

.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; background: var(--mst-bg-alt); color: var(--mst-primary); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.badge--accent { background: var(--mst-secondary); color: #fff; }

.post-card { display: flex; flex-direction: column; height: 100%; }
.post-card__cover { margin-bottom: 12px; }
.post-card__title { font-size: 1.02rem; margin: 6px 0 6px; }
.post-card__title a { color: #1c2430; }
.post-card__title a:hover { color: var(--mst-primary); }
.post-card__meta { font-size: .8rem; color: var(--mst-muted); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.post-card__excerpt { font-size: .9rem; color: #4b5563; margin: 8px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.post-list { display: flex; gap: 14px; height: 100%; padding: 14px; border: 1px solid var(--mst-border); border-radius: var(--mst-radius); background: #fff; }
.post-list__cover { flex: 0 0 92px; }
.post-list__body { min-width: 0; }

.rank-list { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.rank-list li { counter-increment: rank; display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px dashed var(--mst-border); }
.rank-list li::before { content: counter(rank); flex: 0 0 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--mst-bg-alt); color: var(--mst-primary); font-weight: 700; font-size: .9rem; }
.rank-list li:nth-child(-n+3)::before { background: var(--mst-secondary); color: #fff; }
.rank-list a { color: #1c2430; font-weight: 600; line-height: 1.4; display: block; }
.rank-list a:hover { color: var(--mst-primary); }
.rank-list small { color: var(--mst-muted); }

/* ==========================================================================
   6. Trang bài viết
   ========================================================================== */
.breadcrumbs { font-size: .83rem; color: var(--mst-muted); margin: 0 0 14px; }
.breadcrumbs a { color: var(--mst-muted); }
.breadcrumbs a:hover { color: var(--mst-primary); }
.breadcrumbs .sep { margin: 0 6px; opacity: .6; }
.page-wrap { padding: 26px 0 10px; }
.entry-header { margin-bottom: 18px; }
.entry-title { font-size: 1.75rem; margin: 8px 0 10px; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .85rem; color: var(--mst-muted); }
@media (min-width: 850px) { .entry-title { font-size: 2.15rem; } }

.quick-answer { margin: 0 0 var(--mst-gap); padding: 16px 20px; border: 1px solid #cddbeb; border-left: 5px solid var(--mst-primary); border-radius: var(--mst-radius); background: #f2f6fb; font-size: 1rem; line-height: 1.65; }
.quick-answer__title { margin: 0 0 8px; font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--mst-primary); }
.quick-answer ul { margin: 0; padding-left: 1.2em; }
.quick-answer li { padding: 3px 0; }
.quick-answer p:last-child { margin: 0; }
.book-item__fit { margin: 0 0 8px; font-size: .9rem; color: #444; }

.aff-note { margin: 0 0 var(--mst-gap); padding: 9px 14px; border-left: 3px solid var(--mst-secondary); background: var(--mst-bg-alt); border-radius: 0 6px 6px 0; font-size: .84rem; color: #555; }

.review-box { display: grid; grid-template-columns: 1fr; gap: 20px; margin: 0 0 var(--mst-gap); padding: 20px; border: 1px solid var(--mst-border); border-radius: var(--mst-radius); background: #fffdf8; }
.review-box__cover { max-width: 170px; margin: 0 auto; width: 100%; }
.review-box__title { font-size: 1.25rem; margin: 0 0 6px; }
.review-box__facts { list-style: none; margin: 10px 0; padding: 0; font-size: .93rem; }
.review-box__facts li { display: flex; gap: 12px; padding: 3px 0; }
.review-box__facts li > span:first-child { flex: 0 0 118px; color: var(--mst-muted); }
.review-box__verdict { margin: 10px 0 0; font-style: italic; color: #444; }
.score { display: inline-flex; align-items: baseline; gap: 4px; padding: 4px 12px; border-radius: 6px; background: var(--mst-primary); color: #fff; font-weight: 700; }
.score b { font-size: 1.5rem; font-family: var(--mst-font-head); }
@media (min-width: 550px) { .review-box { grid-template-columns: 170px 1fr; } .review-box__cover { margin: 0; } }

.buy-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.buy-buttons__label { width: 100%; font-size: .82rem; font-weight: 700; color: var(--mst-muted); text-transform: uppercase; letter-spacing: .04em; }

.pros-cons { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 0 0 var(--mst-gap); }
.pros-cons > div { padding: 16px 18px; border-radius: var(--mst-radius); border: 1px solid var(--mst-border); }
.pros-cons h3, .pros-cons h4 { font-family: var(--mst-font); font-size: 1rem; margin: 0 0 8px; }
.pros-cons ul { list-style: none; margin: 0; padding: 0; }
.pros-cons li { position: relative; padding: 4px 0 4px 24px; font-size: .95rem; }
.pros-cons li::before { position: absolute; left: 0; font-weight: 700; }
.pros { background: #f3f9ee; border-color: #cfe5bd !important; }
.pros li::before { content: "✓"; color: var(--mst-success); }
.cons { background: #fdf3f1; border-color: #f2cdc6 !important; }
.cons li::before { content: "✕"; color: var(--mst-danger); }
.who { background: #f2f6fb; border-color: #cddbeb !important; }
.who li::before { content: "→"; color: var(--mst-primary); }
@media (min-width: 550px) { .pros-cons { grid-template-columns: 1fr 1fr; } .pros-cons .who { grid-column: 1 / -1; } }

.verdict-box { margin: var(--mst-gap) 0; padding: 22px; border: 2px solid var(--mst-primary); border-radius: var(--mst-radius); background: #fff; }
.verdict-box__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.verdict-box__head h2 { margin: 0; font-size: 1.25rem; }

/* Mục lục: thẻ có vạch nhấn, mục chính đánh số trong chấm tròn, mục con thụt vào theo đường kẻ. */
.toc { margin: 0 0 var(--mst-gap); padding: 16px 22px 14px; border: 1px solid var(--mst-border); border-left: 5px solid var(--mst-primary); border-radius: var(--mst-radius); background: linear-gradient(180deg, #fcfbf8, var(--mst-bg-alt)); box-shadow: var(--mst-shadow); }
.toc__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px dashed #d8d5c9; }
.toc__title { display: flex; align-items: center; gap: 10px; margin: 0; font-family: var(--mst-font); font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mst-primary); }
.toc__title::before { content: ""; flex: 0 0 auto; width: 16px; height: 12px; background: linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat, linear-gradient(currentColor, currentColor) 0 50% / 70% 2px no-repeat, linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat; }
.toc__toggle { border: 1px solid #d8d5c9; border-radius: 99px; background: #fff; color: var(--mst-primary); font-size: .78rem; font-weight: 600; line-height: 1; cursor: pointer; padding: 6px 12px; }
.toc__toggle:hover { border-color: var(--mst-primary); }
.toc ol { margin: 0; padding: 0; list-style: none; font-size: .95rem; line-height: 1.5; }
.toc > ol { margin-top: 10px; counter-reset: toc; }
.toc > ol > li { position: relative; counter-increment: toc; margin: 0; padding: 6px 0 6px 36px; }
.toc > ol > li::before { content: counter(toc); position: absolute; left: 0; top: 7px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--mst-primary); color: #fff; font-size: .74rem; font-weight: 700; line-height: 1; }
.toc > ol > li > a { font-weight: 600; }
.toc ol ol { margin: 6px 0 2px; padding-left: 14px; border-left: 2px solid #e1ded3; font-size: .9rem; }
.toc ol ol li { position: relative; margin: 0; padding: 3px 0 3px 14px; }
.toc ol ol li::before { content: ""; position: absolute; left: 0; top: 1em; width: 5px; height: 5px; border-radius: 50%; background: var(--mst-secondary); }
.toc a, .entry-content nav.toc a { color: #2b3a4f; text-decoration: none; }
.toc a:hover, .entry-content nav.toc a:hover { color: var(--mst-secondary); }
.toc.is-collapsed ol { display: none; }
.toc.is-collapsed .toc__head { padding-bottom: 0; border-bottom: 0; }

.entry-content { font-size: 1.06rem; line-height: 1.8; overflow-wrap: break-word; }
.entry-content h2 { margin-top: 2em; margin-bottom: .75em; padding-bottom: 8px; border-bottom: 2px solid var(--mst-border); scroll-margin-top: 84px; }
.entry-content h3 { margin-top: 1.6em; margin-bottom: .55em; scroll-margin-top: 84px; }
.entry-content h2 + h3 { margin-top: 1em; }
.entry-content .verdict-box__head h2 { margin: 0; padding: 0; border-bottom: 0; }
.entry-content p + :is(.table-wrap, .quick-answer, .book-item, .faq, .pros-cons, .review-box, .toc), .entry-content ul + :is(.table-wrap, .book-item, .faq) { margin-top: var(--mst-gap); }
.entry-content li { margin-bottom: .35em; }
.entry-content li:last-child { margin-bottom: 0; }
.entry-content a:not(.button) { text-decoration: underline; text-underline-offset: 3px; }
.entry-content img { border-radius: 6px; margin: 0 auto 1.1em; }
.entry-content blockquote { margin: 1.5em 0; padding: 12px 18px; border-left: 4px solid var(--mst-secondary); background: var(--mst-bg-alt); font-style: italic; border-radius: 0 6px 6px 0; }
.entry-content blockquote p:last-child { margin: 0; }
.table-wrap { overflow-x: auto; margin: 0 0 var(--mst-gap); border: 1px solid var(--mst-border); border-radius: var(--mst-radius); }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .93rem; margin: 0; }
.entry-content th, .entry-content td { padding: 10px 12px; border-bottom: 1px solid var(--mst-border); text-align: left; vertical-align: top; }
.entry-content th { background: var(--mst-bg-alt); font-weight: 700; white-space: nowrap; }
.entry-content tr:last-child td { border-bottom: 0; }

.book-item { position: relative; display: grid; grid-template-columns: 1fr; gap: 16px; margin: 0 0 var(--mst-gap); padding: 20px; border: 1px solid var(--mst-border); border-radius: var(--mst-radius); background: #fff; box-shadow: var(--mst-shadow); scroll-margin-top: 84px; }
.book-item__rank { position: absolute; top: -12px; left: -8px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--mst-secondary); color: #fff; font-family: var(--mst-font-head); font-weight: 700; font-size: 1.1rem; box-shadow: var(--mst-shadow); z-index: 1; }
.book-item__cover { max-width: 130px; width: 100%; margin: 0 auto; }
.book-item__title { margin: 6px 0 4px !important; font-size: 1.2rem; }
.book-item__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: .88rem; color: var(--mst-muted); margin-bottom: 8px; }
.book-item__desc { font-size: .98rem; line-height: 1.7; }
.book-item__desc p:last-child { margin-bottom: 0; }
@media (min-width: 550px) { .book-item { grid-template-columns: 130px 1fr; } .book-item__cover { margin: 0; } }

.faq { margin: 0 0 var(--mst-gap); }
.faq details { border: 1px solid var(--mst-border); border-radius: var(--mst-radius); margin-bottom: 10px; background: #fff; }
.faq summary { padding: 12px 16px; font-weight: 700; cursor: pointer; list-style: none; position: relative; padding-right: 40px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 1.3rem; color: var(--mst-primary); }
.faq details[open] summary::after { content: "–"; }
.faq__answer { padding: 0 16px 12px; font-size: .98rem; }
.faq__answer p:last-child { margin: 0; }

.entry-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--mst-gap) 0; padding: 0; list-style: none; }
.entry-tags a { display: block; padding: 4px 12px; border: 1px solid var(--mst-border); border-radius: 99px; font-size: .83rem; color: var(--mst-muted); }
.entry-tags a:hover { border-color: var(--mst-primary); color: var(--mst-primary); }

.author-box { display: flex; gap: 14px; margin: var(--mst-gap) 0; padding: 18px; border-radius: var(--mst-radius); background: var(--mst-bg-alt); }
.author-box img { border-radius: 50%; flex: 0 0 auto; }
.author-box h3, .author-box h4 { margin: 0 0 4px; font-family: var(--mst-font); font-size: 1rem; }
.author-box p { margin: 0; font-size: .9rem; color: #555; }
.author-box p + p { margin-top: 6px; }
.author-box__badge { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--mst-primary); color: #fff; font-weight: 700; font-size: .85rem; letter-spacing: .04em; }

/* Bìa sách thật, ảnh đầu bài và ghi nguồn ảnh */
.cover-wrap { display: block; }
.cover--real { background: #eee; }
.cover__credit { display: block; margin-top: 6px; font-size: .7rem; line-height: 1.3; color: var(--mst-muted); text-align: center; }
.entry-hero { margin: 0 0 var(--mst-gap); }
.entry-hero__img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--mst-radius); }
.entry-hero figcaption { margin-top: 6px; font-size: .78rem; color: var(--mst-muted); }
.image-note { margin: 22px 0 0; padding-top: 12px; border-top: 1px solid var(--mst-border); font-size: .8rem; color: var(--mst-muted); }

.related { margin: calc(var(--mst-gap) + 10px) 0 10px; }

/* Truyện cũ (plugin Madara) */
.chapter-list { list-style: none; margin: 0; padding: 0; columns: 1; }
.chapter-list li { padding: 8px 0; border-bottom: 1px dashed var(--mst-border); break-inside: avoid; display: flex; justify-content: space-between; gap: 10px; }
.chapter-list small { color: var(--mst-muted); white-space: nowrap; }
.chapter-nav { display: flex; justify-content: space-between; gap: 10px; margin: 18px 0; }
@media (min-width: 550px) { .chapter-list { columns: 2; column-gap: 30px; } }

/* ==========================================================================
   7. Sidebar, phân trang, bình luận
   ========================================================================== */
.sidebar-inner { position: sticky; top: 84px; }
.widget { margin: 0 0 26px; padding: 18px; border: 1px solid var(--mst-border); border-radius: var(--mst-radius); background: #fff; }
.widget-title { font-family: var(--mst-font); font-size: 1rem; font-weight: 700; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--mst-primary); display: inline-block; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul:not(.rank-list) li { padding: 6px 0; border-bottom: 1px dashed var(--mst-border); }
.widget ul:not(.rank-list) li:last-child { border-bottom: 0; }

.archive-header { margin: 0 0 22px; padding: 22px; border-radius: var(--mst-radius); background: var(--mst-bg-alt); }
.archive-header h1 { margin: 0 0 6px; }
.archive-header p { margin: 0; color: #555; }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 10px 0 30px; }
.pagination .page-numbers { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px; border: 1px solid var(--mst-border); border-radius: 6px; color: var(--mst-text); font-weight: 600; }
.pagination .page-numbers.current, .pagination a.page-numbers:hover { background: var(--mst-primary); border-color: var(--mst-primary); color: #fff; }

.comments-area { margin: 34px 0; }
.comment-list { list-style: none; margin: 0 0 24px; padding: 0; }
.comment-list .children { list-style: none; margin-left: 24px; padding: 0; }
.comment-body { padding: 14px 0; border-bottom: 1px solid var(--mst-border); }
.comment-author img { border-radius: 50%; float: left; margin-right: 10px; }
.comment-metadata { font-size: .8rem; }
.comment-form input:not([type="submit"]):not([type="checkbox"]), .comment-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--mst-border); border-radius: 6px; }
.comment-form .submit { padding: 10px 22px; border: 0; border-radius: 6px; background: var(--mst-primary); color: #fff; font-weight: 600; cursor: pointer; }

/* ==========================================================================
   8. Footer
   ========================================================================== */

.footer { margin-top: 30px; background: #1f2a3a; color: #c5cedb; font-size: .92rem; }
.footer-main { padding: 40px 0 10px; }
.footer h3, .footer h4 { color: #fff; font-family: var(--mst-font); font-size: 1rem; margin: 0 0 14px; text-transform: uppercase; letter-spacing: .04em; }
.footer a { color: #c5cedb; }
.footer a:hover { color: #fff; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { padding: 4px 0; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 16px 0; font-size: .84rem; }
.footer-bottom .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; }

.back-to-top { position: fixed; right: 16px; bottom: 16px; z-index: 40; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--mst-primary); color: #fff; font-size: 1.2rem; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .2s; box-shadow: var(--mst-shadow); }
.back-to-top.is-visible { opacity: 1; pointer-events: auto; }

.alignleft { float: left; margin: 0 1.2em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.2em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: .85rem; color: var(--mst-muted); text-align: center; }

/* Form liên hệ */
.contact-form { max-width: 620px; }
.contact-form label { display: block; font-weight: 600; margin-bottom: 4px; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--mst-border); border-radius: 6px; font: inherit; }
.contact-form .hp-field { position: absolute; left: -9999px; }
.form-notice { padding: 10px 14px; border-radius: 6px; }
.form-notice.is-ok { background: #f3f9ee; border: 1px solid #cfe5bd; }
.form-notice.is-error { background: #fdf3f1; border: 1px solid #f2cdc6; }
