/* ============================================================
   WPE — Thư Viện Tri Thức  (/thu-vien-tri-thuc/)
   ============================================================
   Thay cho Tailwind Play CDN mà page 3773 dùng trước 09/08/2026.
   Bản CDN biên dịch CSS trong trình duyệt mỗi lượt tải — chậm,
   nháy giao diện, và sống ngoài hệ token của theme.

   MỌI SỐ ĐO Ở ĐÂY LÀ SỐ ĐO THẬT, đọc bằng getComputedStyle trên
   trang đang chạy ngày 09/08/2026 (viewport 1536px). Không tự chế.

   ☠️☠️ VÌ SAO FILE NÀY GHI SỐ PX THẲNG, KHÔNG DÙNG var(--sp-*):
   `style.css` ĐỊNH NGHĨA LẠI toàn bộ thang --sp-* theo một thang
   KHÁC, và nó nạp SAU tokens.css nên nó thắng. Đo trên trang thật
   09/08/2026:

     biến      tokens.css   trang thật
     --sp-2       8px          16px
     --sp-3      12px          24px
     --sp-4      16px          32px
     --sp-6      24px          48px
     --sp-8      32px          64px
     --sp-10     40px          80px
     (--sp-5 · --sp-16 · --sp-20 · --sp-24 thì trùng)

   Dùng var(--sp-8) tưởng là 32px thì thực tế ra 64px — gấp đôi mọi
   khoảng cách mà không báo lỗi gì. Bản đầu của file này mắc đúng
   lỗi đó, phát hiện lúc nghiệm thu vì hero cao 802px thay vì ~490px.

   HAI MÀU CHỮ cũng lệch tương tự: --text ra #1F2937 (tokens ghi
   #1b1b21) và --text-2 ra #374151 (tokens ghi #454652). Nên hai chỗ
   đó ghi mã màu thẳng, có chú thích tại chỗ.

   Màu còn lại lấy từ token vì đã đo là khớp: --primary --primary-2
   --accent --secondary --card --white --max --r-md --r-lg --tr.
   ============================================================ */

.tv-hero {
	position: relative;
	overflow: hidden;
	background-color: var(--primary);
}

.tv-hero-anh {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: .32;              /* đo được: 0.32 */
	pointer-events: none;
}

.tv-container {
	position: relative;
	max-width: var(--max);      /* 1440px */
	margin: 0 auto;
	padding: 0 32px;
}

.tv-hero-trong {
	padding-top: 64px;
	padding-bottom: 80px;
}

/* Thanh chia 80×6 nằm TRÊN tiêu đề — khuôn chung của trang công khai */
.tv-hero-divider {
	width: 80px;
	height: 6px;
	background: var(--accent);
	border-radius: 100px;
	margin-bottom: 28px;
}

.tv-hero h1 {
	font-family: var(--font-head);
	font-weight: 800;
	font-size: clamp(2.5rem, 5.5vw, 4.5rem);
	line-height: 1.05;
	margin: 0 0 24px 0;
	letter-spacing: normal;
}

.tv-hero h1 .tv-d1 {
	display: block;
	color: var(--white);
}

/* Dòng hai: chữ nghiêng, tô bằng dải màu — đúng bản gốc */
.tv-hero h1 .tv-d2 {
	display: block;
	font-style: italic;
	background: linear-gradient(90deg, #ffffff 0%, #bdc2ff 50%, #93c5fd 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.tv-hero-mo-ta {
	font-family: var(--font-body);
	font-size: 20px;
	line-height: 28px;
	max-width: 672px;
	margin: 0 0 40px 0;
	color: rgba(232, 236, 255, .95);   /* chữ mờ trên nền navy — không có trong token */
}

/* ── Ô tìm kiếm ── */
.tv-tim {
	position: relative;
	max-width: 672px;
}

.tv-tim-icon {
	position: absolute;
	inset-block: 0;
	left: 0;
	padding-left: 24px;
	display: flex;
	align-items: center;
	pointer-events: none;
	z-index: 10;
	color: var(--primary);
}

.tv-tim input {
	width: 100%;
	height: 40px;              /* đo được: 40px. Trông chật so với chữ 18px,
	                              nhưng đây ĐÚNG là bản đang chạy — không tự "sửa đẹp" */
	padding: 0 136px 0 56px;
	border: 0;
	border-radius: 9999px;
	background: var(--white);
	font-family: var(--font-body);
	font-size: 18px;
	color: #475569;                       /* slate — màu chữ ô nhập, giữ đúng bản gốc */
	box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

.tv-tim input:focus {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.tv-tim button {
	position: absolute;
	top: 8px;
	bottom: 8px;
	right: 8px;
	padding: 0 24px;
	border: 0;
	border-radius: 9999px;
	background: var(--primary);
	color: var(--white);
	font-family: var(--font-body);
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: background var(--tr);
}

.tv-tim button:hover { background: var(--primary-2); }

/* ── Thân trang ── */
.tv-than {
	padding-top: 40px;
	padding-bottom: 40px;
}

/* Hai thẻ (trước là ba). Chặn bề ngang để thẻ giữ đúng tỷ lệ cũ
   — ba thẻ trên 1440px rộng 437px; hai thẻ trên 960px rộng 464px. */
.tv-luoi {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 32px;
	max-width: 960px;
	margin: 0 auto 96px;
}

/* ── Thẻ ── */
.tv-the {
	display: flex;
	flex-direction: column;
	background: var(--card);
	border-radius: var(--r-md);    /* 8px — đo được */
	border: 1px solid rgba(198, 197, 212, .2);
	box-shadow: 0 30px 40px -15px rgba(27, 27, 33, .05);
	overflow: hidden;
	text-decoration: none;
	transition: transform var(--tr-slow), border-color var(--tr), box-shadow var(--tr-slow);
}

/* Hover phải bao TRỌN cả thẻ — quy tắc giao diện số 1 của dự án */
.tv-the:hover {
	transform: translateY(-8px);
	border-color: rgba(0, 6, 102, .4);
	box-shadow: 0 36px 48px -16px rgba(27, 27, 33, .12);
}

.tv-the-dau {
	position: relative;
	overflow: hidden;
	padding: 32px;
	background: var(--primary);
}

.tv-the-dau .material-symbols-outlined {
	position: relative;
	z-index: 10;
	color: var(--white);
	font-size: 24px;   /* đo được trên bản cũ: 24px. Lớp Tailwind ghi text-[48px]
	                      nhưng KHÔNG thắng được rule gốc của material-symbols, nên
	                      thực tế trang cũ hiện 24px. Giữ đúng bản đang chạy.
	                      Muốn icon to như thiết kế định: đổi dòng này thành 48px. */
	line-height: 1;
}

/* Chữ cái khổng lồ mờ làm nền — cùng ngôn ngữ với trang Từ Điển */
.tv-the-chu {
	position: absolute;
	right: -24px;
	bottom: -40px;
	font-family: var(--font-head);
	font-size: 144px;
	font-weight: 900;
	line-height: 1;
	color: rgba(26, 35, 126, .6);   /* var(--primary-2) ở 60% */
	user-select: none;
	pointer-events: none;
}

.tv-the-than {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 32px;
}

.tv-the-nhan {
	font-family: var(--font-body);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 2.4px;
	text-transform: uppercase;
	color: var(--secondary);
	margin: 0 0 12px 0;
}

.tv-the-ten {
	font-family: var(--font-head);
	font-size: 24px;
	font-weight: 800;
	line-height: 32px;
	color: var(--primary);
	margin: 0 0 16.8px 0;
}

.tv-the:hover .tv-the-ten { text-decoration: underline; }

.tv-the-mo-ta {
	flex: 1;
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 26px;
	color: #1b1b21;   /* KHONG dung var(--text) — xem chu thich dau file */
	margin: 0 0 24px 0;
}

.tv-the-chan {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-top: 20px;
	border-top: 1px solid rgba(198, 197, 212, .3);
}

.tv-the-chan span:first-child {
	font-family: var(--font-body);
	font-size: 14px;
	color: #454652;   /* KHONG dung var(--text-2) — xem chu thich dau file */
}

.tv-the-chan .material-symbols-outlined {
	font-size: 24px;
	color: var(--primary);
	transition: transform var(--tr);
}

.tv-the:hover .tv-the-chan .material-symbols-outlined { transform: translateX(4px); }

/* ── Khối kêu gọi ── */
.tv-goi {
	position: relative;
	overflow: hidden;
	text-align: center;
	background: var(--primary);
	border-radius: 24px;            /* đo được: 24px — không có trong thang token */
	box-shadow: 0 30px 40px -15px rgba(27, 27, 33, .05);
}

.tv-goi-trong { padding: 56px; }

.tv-goi h2 {
	font-family: var(--font-head);
	font-size: 36px;
	font-weight: 800;
	color: var(--white);
	margin: 0 0 25.2px 0;
}

.tv-goi p {
	font-family: var(--font-body);
	font-size: 18px;
	max-width: 672px;
	margin: 0 auto 32px auto;
	color: rgba(232, 236, 255, .9);    /* chữ mờ trên nền navy — không có trong token */
}

.tv-goi-nut {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 32px;
	border-radius: var(--r-lg);     /* 12px */
	background: var(--white);
	color: var(--primary);
	font-family: var(--font-body);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	transition: opacity var(--tr);
}

.tv-goi-nut:hover { opacity: .9; }
.tv-goi-nut .material-symbols-outlined { font-size: 18px; }

/* ── Responsive: 1200 → 768 → 375 ── */
@media (max-width: 1200px) {
	.tv-luoi { max-width: 100%; }
}

@media (max-width: 768px) {
	.tv-container      { padding: 0 20px; }
	.tv-hero-trong     { padding-top: 56px; padding-bottom: 56px; }
	.tv-hero-mo-ta     { font-size: 18px; }
	.tv-luoi           { grid-template-columns: 1fr; gap: 24px; margin-bottom: 64px; }
	.tv-goi-trong      { padding: 32px; }
	.tv-goi h2         { font-size: 28px; }
	.tv-goi p          { font-size: 16px; }
}

@media (max-width: 375px) {
	.tv-tim input      { padding-right: 20px; padding-left: 48px; }
	.tv-tim button     { position: static; inset: auto; width: 100%; height: 44px; margin-top: 12px; }
	.tv-the-dau,
	.tv-the-than       { padding: 20px; }
	.tv-the-chu        { font-size: 110px; }
}