/*
 * Site Night Desk - kieu dang than bai.
 *
 * Cot doc 720px. Moi san pham la mot khoi co the anh + cot so lieu ben phai,
 * ket bang hop so sanh voi trung binh cac san pham con lai trong bai.
 */

.nd-article {
	max-width: var(--read);
	margin: 0 auto;
	padding: 26px 20px 40px;
}

.nd-art-head { margin-bottom: 26px; }
.nd-art-h1 { font-size: 38px; letter-spacing: -0.03em; margin: 10px 0 0; }
.nd-byline { color: var(--muted); font-size: 13.5px; margin: 14px 0 0; }
.nd-by { color: var(--ink); font-weight: 600; }

.nd-art-body { font-size: 17px; }
.nd-art-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.nd-art-body ul, .nd-art-body ol { padding-left: 20px; }
.nd-art-body li { margin-bottom: 6px; }

/* Doan mo dau: chu to hon mot chut, mau sang hon phan than bai. */
.nd-lede { font-size: 19px; line-height: 1.55; color: #cfd6e2; border-left: 2px solid var(--accent); padding-left: 18px; }
.nd-lede p:last-child { margin-bottom: 0; }

.nd-h2 {
	font-size: 25px; letter-spacing: -0.02em; margin: 46px 0 16px;
	scroll-margin-top: 80px; display: flex; gap: 12px; align-items: baseline;
}
.nd-h2-kicker {
	font-family: var(--display); font-size: 14px; font-weight: 800; color: var(--accent);
	flex: none; padding-top: 2px;
}
.nd-h2-t { min-width: 0; }

/* ---------------------------------------------------------------- */
/* Muc "Which ... Should You Buy"                                    */
/* ---------------------------------------------------------------- */

.nd-picks-body {
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 20px 22px 8px;
}
.nd-picks-list { list-style: none; padding: 0; margin: 0; }
.nd-picks-list li {
	border-top: 1px solid var(--line); padding: 13px 0 13px 26px; position: relative;
	font-size: 15.5px; margin: 0;
}
.nd-picks-list li:first-child { border-top: 0; }
.nd-picks-list li::before {
	content: ""; position: absolute; left: 4px; top: 22px;
	width: 7px; height: 7px; border-radius: 2px; background: var(--accent);
}
.nd-picks-list strong { display: block; font-family: var(--display); font-size: 15px; color: var(--ink); }

/* ---------------------------------------------------------------- */
/* Khoi mot san pham                                                 */
/* ---------------------------------------------------------------- */

.nd-block { border-top: 1px solid var(--line); padding-top: 4px; }
.nd-block:first-of-type { border-top: 0; }

.nd-prod {
	display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 18px;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 16px; margin-bottom: 18px;
}
.nd-prod .nd-shot { border-color: transparent; }
.nd-prod-side { display: flex; flex-direction: column; min-width: 0; }
.nd-prod-brand {
	font-size: 11px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
	color: var(--muted); margin: 0 0 8px;
}

.nd-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin: 0 0 12px; }
.nd-fact-price { font-family: var(--display); font-size: 25px; font-weight: 800; }
.nd-fact-was { font-size: 13px; color: var(--good); }
.nd-fact-was s { color: var(--muted); margin-right: 4px; }
.nd-fact-rate { font-size: 15px; font-weight: 600; display: block; width: 100%; }
.nd-star { color: #ffc94d; }
.nd-fact-note { display: block; font-size: 11.5px; font-weight: 400; color: var(--muted); }

.nd-buy-wrap { margin: 0 0 12px; }
.nd-buy {
	display: inline-block; background: var(--accent); color: var(--accent-ink);
	font-weight: 700; font-size: 14.5px; padding: 10px 18px; border-radius: 8px;
	text-decoration: none;
}
.nd-art-body .nd-buy { text-decoration: none; color: var(--accent-ink); }
.nd-buy:hover { background: #7aa8ff; color: var(--accent-ink); }

.nd-kv {
	margin: auto 0 0; display: grid; gap: 4px 12px; font-size: 12.5px;
	grid-template-columns: minmax(0, auto) minmax(0, 1fr);
}
.nd-kv dt { color: var(--muted); }
.nd-kv dd { margin: 0; }
.nd-kv-note { font-size: 11.5px; color: var(--muted); margin: 8px 0 0; }

.nd-figure { margin: 0; min-width: 0; }
.nd-cap { font-size: 12px; color: var(--muted); margin: 7px 2px 0; line-height: 1.4; }

/* Anh thu hai tro di cua mot khoi van nam trong van bai - cho no cung kieu. */
.nd-block-body figure, .nd-sec-body figure, .nd-guide-body figure { margin: 18px 0; }
.nd-block-body figure img, .nd-sec-body figure img, .nd-guide-body figure img {
	background: var(--tile); border-radius: var(--radius); padding: 8px; width: 100%;
}
.nd-block-body figcaption, .nd-sec-body figcaption, .nd-guide-body figcaption {
	font-size: 12px; color: var(--muted); margin-top: 7px;
}

/* Bang nao khong duoc dung lai (muc la) van phai doc duoc. */
.nd-art-body table { width: 100%; border-collapse: collapse; font-size: 14px; }
.nd-art-body :not(.nd-matrix) > table td, .nd-art-body :not(.nd-matrix) > table th {
	border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top;
}

.nd-bestfor {
	background: var(--surface-2); border-left: 2px solid var(--accent);
	padding: 12px 16px; border-radius: 0 8px 8px 0; font-size: 15.5px;
}
.nd-bestfor strong { font-family: var(--display); color: var(--accent); }

/* Uu / nhuoc hai cot */
.nd-pc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.nd-pc-col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.nd-pc-up { border-top: 2px solid var(--good); }
.nd-pc-down { border-top: 2px solid var(--warn); }
.nd-pc-k { margin: 0 0 8px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.nd-pc-up .nd-pc-k strong { color: var(--good); }
.nd-pc-down .nd-pc-k strong { color: var(--warn); }
.nd-pc ul { margin: 0; padding-left: 18px; font-size: 14.5px; }
.nd-pc li { margin-bottom: 5px; }

/* Danh sach cuoi khoi gap lai */
.nd-more { border: 1px solid var(--line); border-radius: var(--radius); margin: 18px 0; background: var(--surface); }
.nd-more > summary {
	cursor: pointer; padding: 12px 16px; font-family: var(--display); font-weight: 700;
	font-size: 14.5px; list-style: none;
}
.nd-more > summary::-webkit-details-marker { display: none; }
.nd-more > summary::after { content: " +"; color: var(--accent); }
.nd-more[open] > summary::after { content: " \2212"; }
.nd-more-body { padding: 0 16px 8px; }
.nd-more-body ul { font-size: 14.5px; margin: 0; }

/* ---------------------------------------------------------------- */
/* NUOC DI RIENG: hop so sanh voi trung binh trong bai               */
/* ---------------------------------------------------------------- */

.nd-vs {
	border: 1px solid var(--line-2); border-radius: var(--radius);
	background: linear-gradient(180deg, var(--surface-2), var(--surface));
	padding: 16px 18px; margin: 22px 0 40px;
}
.nd-vs-h {
	margin: 0 0 12px; font-family: var(--display); font-weight: 700; font-size: 13px;
	letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.nd-vs-cells {
	list-style: none; margin: 0; padding: 0;
	display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.nd-vs-cell {
	background: rgba(11, 14, 20, 0.55); border: 1px solid var(--line);
	border-radius: 10px; padding: 12px 14px; margin: 0;
}
.nd-vs-k {
	display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
	text-transform: uppercase; color: var(--muted);
}
.nd-vs-v { display: block; font-family: var(--display); font-size: 26px; font-weight: 800; line-height: 1.2; }
.nd-vs-of { font-size: 14px; font-weight: 600; color: var(--muted); }
.nd-vs-sub { display: block; font-size: 11.5px; color: var(--muted); margin-top: -2px; }
.nd-vs-d { display: block; font-size: 12.5px; margin-top: 6px; line-height: 1.4; }
.nd-vs-arrow { font-size: 11px; }
.nd-vs-d.is-good { color: var(--good); }
.nd-vs-d.is-warn { color: var(--warn); }
.nd-vs-d.is-same { color: var(--muted); }
.nd-vs-note { margin: 12px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.5; }

/* ---------------------------------------------------------------- */
/* Bang so sanh ca bai                                               */
/* ---------------------------------------------------------------- */

.nd-matrix { margin: 18px 0 24px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.nd-matrix table { width: 100%; border-collapse: collapse; font-size: 14px; }
.nd-matrix thead th {
	background: var(--surface-2); text-align: left; font-family: var(--display);
	font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
	padding: 11px 14px; border-bottom: 1px solid var(--line-2);
}
.nd-matrix tbody th, .nd-matrix tbody td {
	padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; text-align: left;
}
.nd-matrix tbody tr:first-child th, .nd-matrix tbody tr:first-child td { border-top: 0; }
.nd-matrix tbody th { font-family: var(--display); font-weight: 700; background: var(--surface); }
.nd-matrix tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.015); }

.nd-guide-body > p, .nd-sec-body > p, .nd-faq-lead > p { color: #cfd6e2; }

/* ---------------------------------------------------------------- */
/* FAQ                                                               */
/* ---------------------------------------------------------------- */

.nd-q { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 10px; }
.nd-q > summary {
	cursor: pointer; list-style: none; padding: 14px 16px;
	font-family: var(--display); font-weight: 700; font-size: 16px;
	display: flex; justify-content: space-between; gap: 14px;
}
.nd-q > summary::-webkit-details-marker { display: none; }
.nd-q > summary::after { content: "+"; color: var(--accent); flex: none; }
.nd-q[open] > summary::after { content: "\2212"; }
.nd-a { padding: 0 16px 6px; font-size: 15.5px; }

.nd-tags { margin: 32px 0 0; font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nd-tags-k { color: var(--muted); }
.nd-tags a { border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 12px; }
.nd-tags a:hover { border-color: var(--accent); }

.nd-related { max-width: var(--wrap); margin: 0 auto; padding: 10px 20px 50px; }

/* ---------------------------------------------------------------- */
/* VIEN THUOC duoi canh man hinh                                     */
/* ---------------------------------------------------------------- */

.nd-rail {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
	background: rgba(11, 14, 20, 0.95);
	border-top: 1px solid var(--line-2);
	backdrop-filter: saturate(140%) blur(10px);
	box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.45);
}
.nd-rail-in { max-width: var(--wrap); margin: 0 auto; padding: 8px 20px 10px; }
.nd-rail-k {
	margin: 0 0 6px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em;
	text-transform: uppercase; color: var(--muted);
}
.nd-rail-list {
	list-style: none; margin: 0; padding: 0 0 2px;
	display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin;
}
.nd-rail-list li { margin: 0; flex: none; }
.nd-rail-list a {
	display: flex; align-items: center; gap: 8px; max-width: 260px;
	background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px;
	padding: 5px 14px 5px 5px; font-size: 13px; text-decoration: none;
}
.nd-rail-list a:hover { border-color: var(--accent); color: var(--ink); }
.nd-rail-img {
	flex: none; width: 30px; height: 30px; border-radius: 999px; overflow: hidden;
	background: var(--tile); display: grid; place-items: center;
}
.nd-rail-img img { max-width: 100%; max-height: 100%; width: auto; object-fit: contain; }
.nd-rail-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.nd-rail-p { flex: none; font-weight: 700; color: var(--accent); }

body.has-rail { padding-bottom: 86px; }

/* ---------------------------------------------------------------- */
/* Be ngang hep                                                      */
/* ---------------------------------------------------------------- */

@media (max-width: 720px) {
	.nd-article { padding: 20px 16px 34px; }
	.nd-art-h1 { font-size: 28px; }
	.nd-art-body { font-size: 16px; }
	.nd-lede { font-size: 17px; padding-left: 14px; }
	.nd-h2 { font-size: 21px; margin-top: 36px; }
	.nd-prod { grid-template-columns: 1fr; }
	.nd-pc { grid-template-columns: 1fr; }
	.nd-related { padding-left: 16px; padding-right: 16px; }
	.nd-rail-in { padding: 7px 16px 9px; }
	.nd-rail-list a { max-width: 210px; }

	/* Bang bon cot khong vua 375px: doi moi dong thanh mot the xep doc. */
	.nd-matrix table, .nd-matrix tbody, .nd-matrix tr, .nd-matrix tbody th, .nd-matrix tbody td { display: block; }
	.nd-matrix thead { display: none; }
	.nd-matrix tbody tr { border-top: 1px solid var(--line-2); }
	.nd-matrix tbody tr:first-child { border-top: 0; }
	.nd-matrix tbody th { border-top: 0; font-size: 15px; }
	.nd-matrix tbody td { border-top: 0; padding-top: 0; }
	.nd-matrix tbody tr:nth-child(even) td { background: none; }
	.nd-matrix tbody td::before {
		content: attr(data-label); display: block;
		font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
	}
}
