/*
 * Tino Repo Library: giao diện tối giản theo nhận diện blog Tino.
 * Màu và font lấy từ theme wikitino (tino.vn/blog, 30/10/2026): Inter, xanh #08a581, cam #ec5808, xanh than #2e364e, teal #009688, xám xanh #6a7b96, vàng #ffc107, viền #ededed.
 * Chỉ dùng các màu này; màu danh mục trong categories.json cũng lấy từ bảng này.
 * Mọi selector đều nằm trong .trl để không đè lên theme.
 */
.trl {
	--trl-green: #08a581;
	--trl-green-soft: #f5fffe;
	--trl-orange: #ec5808;
	--trl-ink: #2e364e;
	--trl-text: #424242;
	--trl-muted: #777;
	--trl-line: #ededed;
	--trl-bg-soft: #f7f8fb;
	--trl-red: #d93025;
	--trl-amber: #c77700;
	--trl-blue: #4a6fa5;
	--trl-radius: 8px;

	max-width: 1120px;
	margin: 0 auto;
	padding: 40px 16px 80px;
	font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.65;
	color: var(--trl-text);
}
.trl *, .trl *::before, .trl *::after { box-sizing: border-box; }
.trl a { color: var(--trl-green); text-decoration: none; }
.trl a:hover { text-decoration: underline; text-underline-offset: 3px; }
.trl h1, .trl h2, .trl h3 { color: var(--trl-ink); letter-spacing: -0.01em; }
.trl h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 700; line-height: 1.2; margin: 0; }
.trl h2 { font-size: 20px; font-weight: 600; margin: 0 0 12px; }
.trl h3 { font-size: 16px; font-weight: 600; margin: 20px 0 4px; }
.trl ul, .trl ol { margin: 0; padding-left: 20px; }
.trl li + li { margin-top: 6px; }
.trl .trl-warnings li, .trl .trl-steps li, .trl .trl-related li { margin-top: 0; }
.trl p { margin: 0 0 12px; }

/* Nhãn nhỏ viết hoa dùng chung */
.trl-label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--trl-muted); margin-bottom: 4px; }
.trl-muted { color: var(--trl-muted); font-size: 14px; }

.trl-breadcrumb { font-size: 14px; color: var(--trl-muted); margin-bottom: 32px; }
.trl-breadcrumb a { color: var(--trl-muted); }
.trl-breadcrumb span { margin: 0 6px; }

/* ---------- Trang chi tiết ---------- */
.trl-head { padding-bottom: 32px; border-bottom: 1px solid var(--trl-line); margin-bottom: 40px; }
.trl-owner { color: var(--trl-muted); font-size: 15px; margin: 6px 0 16px; }
.trl-lead { font-size: 18px; line-height: 1.6; max-width: 720px; color: var(--trl-text); margin: 0; }

.trl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.trl-main > section { margin-bottom: 44px; }
.trl-main > section:last-child { margin-bottom: 0; }

.trl-aside { position: sticky; top: 24px; border: 1px solid var(--trl-line); border-radius: var(--trl-radius); padding: 20px; }
.trl-facts { margin: 0; display: grid; gap: 14px; }
.trl-facts div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.trl-facts dt { color: var(--trl-muted); }
.trl-facts dd { margin: 0; font-weight: 600; color: var(--trl-ink); text-align: right; }
.trl-aside .trl-btn { width: 100%; justify-content: center; margin-top: 20px; }
.trl-aside .trl-btn + .trl-btn { margin-top: 10px; }
.trl-aside .trl-muted { margin: 12px 0 0; font-size: 13px; }

.trl-btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 6px; font-size: 15px; font-weight: 600; border: 1px solid var(--trl-line); color: var(--trl-ink); background: #fff; transition: border-color .15s, background-color .15s; }
.trl a.trl-btn:hover { text-decoration: none; border-color: var(--trl-green); color: var(--trl-green); }
.trl-btn-primary, .trl a.trl-btn-primary { background: var(--trl-orange); border-color: var(--trl-orange); color: #fff; }
.trl a.trl-btn-primary:hover { background: #d44f07; border-color: #d44f07; color: #fff; }

/* Cảnh báo: danh sách gọn, chấm màu thay cho khối màu lớn */
.trl .trl-warnings { list-style: none; padding: 0; margin: 0 0 12px; border-top: 1px solid var(--trl-line); }
.trl .trl-warnings li { display: grid; grid-template-columns: 88px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--trl-line); margin: 0; font-size: 15px; }
.trl-level { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.trl-level::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.trl-level-red { color: var(--trl-red); }
.trl-level-yellow { color: var(--trl-amber); }
.trl-level-info { color: var(--trl-blue); }
.trl-ok { padding: 12px 0; border-bottom: 1px solid var(--trl-line); color: var(--trl-green); font-weight: 500; }

.trl-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.trl .trl-cols ul { list-style: none; padding: 0; }
.trl .trl-cols li { position: relative; padding-left: 22px; }
.trl-cols li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.trl-yes li::before { content: "✓"; color: var(--trl-green); }
.trl-no li::before { content: "–"; color: var(--trl-muted); }

/* Danh sách thường (Tính năng chính): theme tắt list-style nên tự vẽ chấm xanh. */
.trl .trl-bullets { list-style: none; padding: 0; }
.trl .trl-bullets li { position: relative; padding-left: 22px; }
.trl .trl-bullets li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--trl-green); }

.trl .trl-steps { list-style: none; padding: 0; counter-reset: step; }
.trl .trl-steps li { counter-increment: step; position: relative; padding: 0 0 20px 44px; margin: 0; }
.trl-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--trl-line); display: grid; place-items: center; font-size: 13px; font-weight: 600; color: var(--trl-ink); }
.trl-steps strong { display: block; color: var(--trl-ink); }

/* Khối thông tin riêng của Tino: viền trái xanh, không nền đậm */
.trl-tino { border-left: 2px solid var(--trl-green); padding: 2px 0 2px 20px; }
.trl-tino .trl-label { color: var(--trl-green); }

.trl-shots { display: grid; gap: 12px; }
.trl-shots img { width: 100%; height: auto; border: 1px solid var(--trl-line); border-radius: var(--trl-radius); }

.trl-faq details { border-bottom: 1px solid var(--trl-line); padding: 14px 0; }
.trl-faq details:first-of-type { border-top: 1px solid var(--trl-line); }
.trl-faq summary { cursor: pointer; font-weight: 600; color: var(--trl-ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.trl-faq summary::-webkit-details-marker { display: none; }
.trl-faq summary::after { content: "+"; color: var(--trl-muted); font-weight: 400; }
.trl-faq details[open] summary::after { content: "–"; }
.trl-faq details p { margin: 10px 0 0; }

.trl-note { padding: 14px 16px; border-radius: var(--trl-radius); background: var(--trl-green-soft); border: 1px solid #d5f2ea; font-size: 15px; margin-bottom: 40px; }
.trl-byline { border-top: 1px solid var(--trl-line); padding-top: 16px; }
.trl .trl-disclaimer { background: var(--trl-bg-soft); border-radius: var(--trl-radius); padding: 16px 20px; font-size: 13px; line-height: 1.6; color: var(--trl-muted); }
.trl .trl-disclaimer h2 { font-size: 14px; margin: 0 0 8px; color: var(--trl-ink); }
.trl .trl-disclaimer p { margin: 0 0 6px; }
.trl .trl-disclaimer p:last-child { margin-bottom: 0; }
.trl .trl-disclaimer-short { margin-top: 40px; font-size: 13px; }

.trl .trl-related { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.trl .trl-related li { margin: 0; }
.trl-related a { display: block; height: 100%; padding: 14px 16px; border: 1px solid var(--trl-line); border-radius: var(--trl-radius); color: var(--trl-text); }
.trl-related a:hover { border-color: var(--trl-green); text-decoration: none; }
.trl-related strong { display: block; color: var(--trl-ink); margin-bottom: 2px; }
.trl-related span { font-size: 14px; color: var(--trl-muted); }

/* ---------- Trang danh sách ---------- */
.trl-archive .trl-head { margin-bottom: 24px; padding-bottom: 24px; }
.trl-archive .trl-lead { margin-top: 10px; }
.trl-filters { display: grid; gap: 10px; margin-bottom: 32px; }
.trl-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.trl-filter .trl-label { width: 120px; margin: 0; }
.trl-chip, .trl a.trl-chip { display: inline-block; padding: 5px 12px; border: 1px solid var(--trl-line); border-radius: 999px; font-size: 14px; color: var(--trl-text); }
.trl a.trl-chip:hover { border-color: var(--trl-green); color: var(--trl-green); text-decoration: none; }
.trl a.trl-chip[aria-current] { background: var(--trl-green); border-color: var(--trl-green); color: #fff; }
.trl-count { font-size: 14px; color: var(--trl-muted); margin-bottom: 16px; }

.trl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.trl-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 1px solid var(--trl-line); border-radius: var(--trl-radius); background: #fff; transition: border-color .15s; }
.trl-card:hover { border-color: var(--trl-green); }
.trl-card h2 { font-size: 17px; margin: 0; }
.trl-card h2 a { color: var(--trl-ink); }
.trl-card h2 a::after { content: ""; position: absolute; inset: 0; } /* cả thẻ bấm được */
.trl-card h2 a:hover { text-decoration: none; }
.trl-card p { font-size: 15px; margin: 0; flex: 1; }
.trl-card-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--trl-muted); padding-top: 12px; border-top: 1px solid var(--trl-line); }
.trl-card-meta .trl-level { font-size: 13px; }
.trl-tag { color: var(--trl-green); font-weight: 600; }

.trl .nav-links { display: flex; gap: 8px; justify-content: center; margin-top: 40px; }
.trl .page-numbers { padding: 6px 12px; border: 1px solid var(--trl-line); border-radius: 6px; color: var(--trl-text); }
.trl .page-numbers.current { background: var(--trl-green); border-color: var(--trl-green); color: #fff; }

@media (max-width: 900px) {
	.trl-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
	.trl-aside { position: static; order: -1; }
}
@media (max-width: 640px) {
	.trl { padding-top: 24px; }
	.trl-cols { grid-template-columns: 1fr; gap: 24px; }
	.trl .trl-warnings li { grid-template-columns: 1fr; gap: 2px; }
	.trl-lead { font-size: 17px; }
	/* Mỗi hàng lọc thành một dải vuốt ngang để danh mục không chiếm nửa màn hình */
	.trl-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
	.trl-filter::-webkit-scrollbar { display: none; }
	.trl-filter .trl-label { width: auto; flex: none; margin-right: 4px; }
	.trl-filter .trl-chip { flex: none; }
	.trl-grid { grid-template-columns: 1fr; }
}

/* ---------- Màu sắc: danh mục, icon, số liệu động ---------- */
.trl { --trl-star: #ffc107; --trl-fork: #2e364e; --trl-license: #08a581; }

/* Màu danh mục truyền qua biến --c (đặt inline từ categories.json) */
.trl-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.trl-cat, .trl a.trl-cat { position: relative; z-index: 1; display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--c, #6a7b96); background: color-mix(in srgb, var(--c, #6a7b96) 10%, #fff); }
.trl a.trl-cat:hover { text-decoration: none; background: color-mix(in srgb, var(--c, #6a7b96) 18%, #fff); }

.trl-avatar { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; font-weight: 700; font-size: 20px; color: var(--c, var(--trl-green)); background: color-mix(in srgb, var(--c, var(--trl-green)) 12%, #fff); }
.trl-title { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.trl-title .trl-avatar { width: 64px; height: 64px; border-radius: 14px; font-size: 28px; }
.trl-title .trl-owner { margin: 4px 0 0; }
.trl-head .trl-cats { margin-bottom: 16px; }

/* Icon bằng mask: màu theo currentColor */
.trl-ico { display: inline-block; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; flex: none; }
.trl-i-star { color: var(--trl-star); --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3.1 6.3 6.9 1-5 4.9 1.2 6.9L12 17.8 5.8 21l1.2-6.9-5-4.9 6.9-1z'/%3E%3C/svg%3E"); }
.trl-i-fork { color: var(--trl-fork); --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='6' cy='5' r='2.5'/%3E%3Ccircle cx='18' cy='5' r='2.5'/%3E%3Ccircle cx='12' cy='19' r='2.5'/%3E%3Cpath d='M6 7.5v1a4 4 0 004 4h4a4 4 0 004-4v-1M12 12.5v4'/%3E%3C/svg%3E"); }
.trl-i-license { color: var(--trl-license); --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18M5 21h14M4 8h16M6 8l-3 7a3.5 3.5 0 006 0zM18 8l-3 7a3.5 3.5 0 006 0z'/%3E%3C/svg%3E"); }

.trl-stat { display: inline-flex; align-items: center; gap: 5px; font-style: normal; }
.trl-stat b { font-weight: 600; color: var(--trl-ink); }
.trl-card-meta .trl-stat.trl-i-license { color: var(--trl-muted); }
.trl-card-meta .trl-stat.trl-i-license .trl-ico { color: var(--trl-license); }

.trl-badge { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.trl-badge-docker { color: #00796b; background: color-mix(in srgb, #009688 12%, #fff); }
.trl-badge-red { color: var(--trl-red); background: #fdecea; }

/* Số sao lớn trong cột phải */
.trl-bigstats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.trl-bigstat { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px; padding: 12px; border-radius: var(--trl-radius); background: color-mix(in srgb, currentColor 8%, #fff); }
.trl-bigstat .trl-ico { width: 18px; height: 18px; grid-row: span 2; }
.trl-bigstat strong { font-size: 20px; line-height: 1.2; color: var(--trl-ink); font-variant-numeric: tabular-nums; }
.trl-bigstat span:last-child { font-size: 12px; color: var(--trl-muted); }
.trl-live-note { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--trl-muted); margin: 16px 0 0; }
.trl-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--trl-green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--trl-green) 20%, transparent); }
[data-trl-stars], [data-trl-forks] { font-variant-numeric: tabular-nums; }
.trl-live { animation: trl-flash 1.2s ease-out; border-radius: 3px; }
@keyframes trl-flash { 0% { background: color-mix(in srgb, var(--trl-star) 35%, transparent); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .trl-live { animation: none; } }

/* Thẻ: avatar + danh mục ở trên, viền đổi theo màu danh mục */
.trl-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.trl-card-top .trl-cats { justify-content: flex-end; }
.trl-card:hover { border-color: var(--c, var(--trl-green)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--trl-green)) 10%, transparent); }
.trl-card h2 a:hover { color: var(--c, var(--trl-green)); }

/* Chip lọc danh mục mang màu danh mục */
.trl a.trl-chip[style*="--c"] { border-color: color-mix(in srgb, var(--c) 30%, #fff); color: var(--c); }
.trl a.trl-chip[style*="--c"]:hover { background: color-mix(in srgb, var(--c) 8%, #fff); border-color: var(--c); color: var(--c); }
.trl a.trl-chip[style*="--c"][aria-current] { background: var(--c); border-color: var(--c); color: #fff; }
.trl-chip small { opacity: .65; font-size: 12px; margin-left: 2px; }

.trl-related a { display: flex; flex-direction: column; gap: 4px; }
.trl-related em { margin-top: 6px; font-size: 13px; }

/* Cảnh báo: nền nhạt theo mức để có màu nhưng vẫn gọn */
.trl .trl-warnings li { padding: 12px; border-bottom: 0; border-radius: 6px; margin-top: 8px; }
.trl .trl-warnings { border-top: 0; }
.trl .trl-warnings li:has(.trl-level-red) { background: #fdf1f0; }
.trl .trl-warnings li:has(.trl-level-yellow) { background: #fdf8eb; }
.trl .trl-warnings li:has(.trl-level-info) { background: #f2f6fc; }
.trl-cols > div { padding: 18px 20px; border-radius: var(--trl-radius); }
.trl-yes { background: #f2fbf8; }
.trl-no { background: #f7f8fb; }
.trl-steps li::before { background: color-mix(in srgb, var(--trl-green) 10%, #fff); border-color: transparent; color: var(--trl-green); }
/* Đường kẻ dưới phần đầu trang mang màu danh mục (trang danh sách: dải màu các danh mục) */
.trl .trl-head { border-bottom: 2px solid; border-image: linear-gradient(90deg, var(--c, var(--trl-green)), color-mix(in srgb, var(--c, var(--trl-green)) 15%, #fff)) 1; }
.trl.trl-archive .trl-head { border-image: linear-gradient(90deg, #08a581, #08a581 55%, #ec5808) 1; }

/* ---------- Deploy ---------- */
.trl-deploy-box { margin-top: 20px; padding: 16px; border-radius: var(--trl-radius); background: color-mix(in srgb, var(--trl-orange) 6%, #fff); border: 1px solid color-mix(in srgb, var(--trl-orange) 20%, #fff); }
.trl-aside .trl-deploy-box .trl-btn { margin-top: 0; }
.trl-deploy-box p { margin: 12px 0 0; font-size: 14px; }
.trl-deploy-box p span { color: var(--trl-muted); }
.trl-btn-sm { padding: 7px 14px; font-size: 14px; margin-top: 10px; }
.trl-deploy .trl-steps li { padding-bottom: 24px; }
.trl-step-note { display: block; font-size: 14px; color: var(--trl-muted); margin-top: 2px; }
.trl-code { position: relative; margin-top: 10px; }
.trl-code pre { margin: 0; padding: 14px 16px; padding-right: 96px; border-radius: var(--trl-radius); background: #1d2534; color: #e6edf3; font: 13.5px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-x: auto; white-space: pre; }
.trl-copy { position: absolute; top: 8px; right: 8px; padding: 4px 10px; border: 1px solid #3a4558; border-radius: 6px; background: #273043; color: #e6edf3; font: 600 12px Inter, sans-serif; cursor: pointer; }
.trl-copy:hover { background: #313c52; }
@media (max-width: 720px) { .trl-copy { padding: 8px 14px; font-size: 13px; } }

.trl-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--trl-line); }
.trl-share-label { width: 100%; font-size: 13px; color: var(--trl-muted); }
.trl .trl-share-btn { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; border: 1px solid var(--trl-line); border-radius: 6px; background: #fff; color: var(--trl-ink); font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1.2; cursor: pointer; }
.trl .trl-share-btn:hover { border-color: var(--trl-green); color: var(--trl-green); }
.trl .trl-share-btn[hidden] { display: none; }
.trl code { font-size: 0.92em; }
.trl :not(pre) > code { padding: 1px 6px; border-radius: 4px; background: var(--trl-bg-soft); color: var(--trl-ink); }
.trl-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.trl-table th, .trl-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--trl-line); vertical-align: top; }
.trl-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--trl-muted); }
/* Khối lệnh dài cuộn ngang bên trong, không kéo giãn cột (grid item mặc định min-width: auto) */
.trl-main, .trl-steps li, .trl-code { min-width: 0; max-width: 100%; }

/* Logo dự án (README hoặc avatar tổ chức) thay cho chữ cái đầu */
.trl-avatar.trl-logo { padding: 6px; background: #fff; border: 1px solid var(--trl-line); overflow: hidden; }
.trl-title .trl-avatar.trl-logo { padding: 8px; }
.trl-avatar.trl-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* Logo ngang (chữ) ở đầu trang: giãn theo chiều ngang thay vì bóp vào ô vuông. */
.trl-title .trl-avatar.trl-logo { width: auto; min-width: 64px; max-width: min(220px, 45vw); }
/* Chiều cao cố định (64 − 2×8 padding − 2×1 viền): height 100% không tính được khi ô rộng tự động, ảnh vuông lớn sẽ tràn và bị cắt. */
.trl-title .trl-avatar.trl-logo img { width: auto; height: 46px; max-width: 100%; }

/* "Dùng để làm gì": khung xanh Tino ngay đầu nội dung */
.trl .trl-uses { padding: 20px 22px; border-radius: var(--trl-radius); background: var(--trl-green-soft); border: 1px solid color-mix(in srgb, var(--trl-green) 25%, #fff); }
.trl .trl-uses h2 { margin-top: 0; }
.trl .trl-uses ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.trl .trl-uses li { position: relative; padding-left: 28px; }
.trl .trl-uses li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--trl-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat; }

/* Ảnh giao diện và video demo */
.trl-media .trl-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.trl-media .trl-gallery a:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.trl-media .trl-gallery img { display: block; width: 100%; height: auto; border-radius: var(--trl-radius); border: 1px solid var(--trl-line); background: var(--trl-bg-soft); }
.trl-yt, .trl-yt-frame { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; margin: 12px 0; border: 0; border-radius: var(--trl-radius); overflow: hidden; background: var(--trl-ink); }
.trl-yt img { width: 100%; height: 100%; object-fit: cover; opacity: .9; transition: opacity .2s; }
.trl-yt:hover img { opacity: 1; }
.trl-yt-play { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; border-radius: 12px; background: var(--trl-orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 26px no-repeat; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
@media (max-width: 600px) { .trl-media .trl-gallery { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Prompt AI Agent (cột phải, trên nút Deploy) ---------- */
.trl-prompt { margin-top: 20px; padding: 14px; border-radius: var(--trl-radius); background: var(--trl-bg-soft); border: 1px solid var(--trl-line); }
.trl-prompt-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.trl-prompt-head strong { color: var(--trl-ink); font-size: 15px; }
.trl-prompt-tabs { display: inline-flex; padding: 2px; border-radius: 999px; background: #fff; border: 1px solid var(--trl-line); }
.trl .trl-prompt-tabs button { border: 0; background: none; padding: 3px 10px; border-radius: 999px; font: inherit; font-size: 13px; color: var(--trl-muted); cursor: pointer; }
.trl .trl-prompt-tabs button[aria-selected="true"] { background: var(--trl-ink); color: #fff; }
.trl .trl-prompt-tabs button:focus-visible, .trl .trl-prompt-copy:focus-visible { outline: 2px solid var(--trl-green); outline-offset: 2px; }
.trl .trl-prompt-text { white-space: pre-line; margin: 0 0 10px; padding: 10px 12px; border-radius: 6px; background: #fff; border: 1px dashed color-mix(in srgb, var(--trl-ink) 25%, #fff); font-size: 13.5px; line-height: 1.55; color: var(--trl-text); }
.trl .trl-aside .trl-prompt-copy { width: 100%; justify-content: center; margin-top: 0; }

/* ---------- Khung theo theme (0.1.6) ---------- */
/* Nội dung thẳng mép với khung .container của theme (1360px, lề 15px → 1330px);
   chỉ dải đầu trang tràn hai mép màn hình. */
.trl {
	--trl-content: 1330px;
	--trl-gutter: 16px;
	box-sizing: border-box;
	max-width: none;
	width: 100%;
	padding-left: max(var(--trl-gutter), calc((100% - var(--trl-content)) / 2));
	padding-right: max(var(--trl-gutter), calc((100% - var(--trl-content)) / 2));
}
/* Dải đầu trang tràn hai mép màn hình (bóng đổ phủ ra ngoài, cắt theo chiều ngang). */
.trl .trl-head {
	position: relative;
	padding-top: 28px;
	background: color-mix(in srgb, var(--c, var(--trl-green)) 6%, #fff);
	box-shadow: 0 0 0 100vmax color-mix(in srgb, var(--c, var(--trl-green)) 6%, #fff);
	clip-path: inset(0 -100vmax);
}
.trl.trl-archive .trl-head { --c: var(--trl-green); }
.trl-lead { max-width: 72ch; }
.trl-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; }
.trl-main p, .trl-main li, .trl-main .trl-step-note { max-width: 75ch; }
.trl-main .trl-code, .trl-main .trl-table, .trl-main .trl-gallery { max-width: none; }
.trl-cols { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.trl-grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
@media (max-width: 1100px) {
	.trl-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; }
}
@media (max-width: 900px) {
	.trl-layout { grid-template-columns: minmax(0, 1fr); }
}
