/* tokens.css */
/* tokens.css — màu, bóng, phông của Công cụ SEO AI (cùng họ studioAIrender).
   Giấy kem ấm, ô-liu là màu chính, đất nung là điểm nhấn. Không gradient, không quầng sáng.
   MỌI mã màu của giao diện nằm ở file này (test/ui-style-guard.test.js canh giữ).
   Nền tối: theo prefers-color-scheme khi chưa chọn; data-theme="light|dark" trên <html> ép một nền.
   Hai khối màu tối giống hệt nhau (CSS thuần không gộp được media query với bộ chọn). */
:root {
  --bg: #fdfcf8; --surface: #ffffff; --sunken: #f6f5ee;
  --text: #4a4439; --heading: #2f2b23; --muted: #6f6859;
  --border: #d1d5c2; --line: #e8eadf; --field-border: #868c72;
  --primary: #7a8a4c; --primary-strong: #556b2f; --primary-soft: #eef0e4; --on-primary: #ffffff;
  --accent: #d06a4c; --accent-strong: #a2472f;
  --danger: #b83a2a; --ok: #557226; --warn: #8a5a10; --info: #3f6690;
  --bar-bg: #e8eadf;
  --overlay: rgba(20, 18, 14, .35);
  --scrim: rgba(0, 0, 0, .6); --on-scrim: #ffffff; /* nhãn/nút đè lên ảnh: cùng giá trị ở cả hai nền */
  --toast-bg: #2f2b23; --toast-text: #fdfcf8;
  --chart-1: #6f7f42; --chart-2: #c05a3c; --chart-3: #4f7cac; --chart-4: #a8861a; --chart-5: #8a5aa8; --chart-6: #3f8a7d;
  --shadow-sm: 0 1px 3px rgba(85, 107, 47, .10);
  --shadow: 0 4px 20px -2px rgba(138, 154, 91, .12), 0 2px 8px -1px rgba(138, 154, 91, .08);
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Mono", "JetBrains Mono", Consolas, ui-monospace, monospace;
  --radius: 8px; --radius-card: 14px;
  --topbar-h: 60px; --sidebar-w: 236px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #181713; --surface: #211f1a; --sunken: #1b1a15;
    --text: #e3ddcf; --heading: #f4efe3; --muted: #a39c8b;
    --border: #3b3a30; --line: #2d2c25; --field-border: #6c6a58;
    --primary: #a9b97a; --primary-strong: #90a161; --primary-soft: #2b3020; --on-primary: #16170f;
    --accent: #e08466; --accent-strong: #e8957a;
    --danger: #ec7462; --ok: #a9c26d; --warn: #e2ad4d; --info: #86aed8;
    --bar-bg: #34332a;
    --overlay: rgba(0, 0, 0, .55);
    --toast-bg: #f4efe3; --toast-text: #181713;
    --chart-1: #a9b97a; --chart-2: #e08466; --chart-3: #7ea6d8; --chart-4: #e2c15a; --chart-5: #b48ad0; --chart-6: #6cc3b3;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 4px 20px -4px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #181713; --surface: #211f1a; --sunken: #1b1a15;
  --text: #e3ddcf; --heading: #f4efe3; --muted: #a39c8b;
  --border: #3b3a30; --line: #2d2c25; --field-border: #6c6a58;
  --primary: #a9b97a; --primary-strong: #90a161; --primary-soft: #2b3020; --on-primary: #16170f;
  --accent: #e08466; --accent-strong: #e8957a;
  --danger: #ec7462; --ok: #a9c26d; --warn: #e2ad4d; --info: #86aed8;
  --bar-bg: #34332a;
  --overlay: rgba(0, 0, 0, .55);
  --toast-bg: #f4efe3; --toast-text: #181713;
  --chart-1: #a9b97a; --chart-2: #e08466; --chart-3: #7ea6d8; --chart-4: #e2c15a; --chart-5: #b48ad0; --chart-6: #6cc3b3;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 4px 20px -4px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

/* base.css */
/* base.css — nền trang, chữ, liên kết, tiêu điểm. Nền đặc: không vân giấy, không kính mờ. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 400 14px/1.55 var(--font); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { color: var(--heading); margin: 0; text-wrap: balance; }
h1 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 14.5px; font-weight: 700; }
h4 { font-size: 13.5px; font-weight: 600; }
p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 10px; padding-left: 20px; }
a { color: var(--primary-strong); text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }
img { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
b, strong { font-weight: 700; color: var(--heading); }
small { font-size: 12.5px; }
code, pre, kbd, .mono { font-family: var(--mono); font-size: 12.5px; }
code { background: var(--sunken); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; overflow-wrap: anywhere; }
pre { margin: 0; background: var(--sunken); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  overflow: auto; white-space: pre-wrap; color: var(--heading); line-height: 1.6; }
pre code { background: none; border: 0; padding: 0; }
kbd { font-weight: 600; font-size: 11px; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--border); background: var(--sunken); }
details > summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13px; }
details[open] > summary { margin-bottom: 8px; }
[hidden], .hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--primary-strong); outline-offset: 2px; }
::selection { background: var(--primary-soft); color: var(--heading); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }
::-webkit-scrollbar-track { background: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
.icon.sm { width: 15px; height: 15px; vertical-align: -3px; }
[data-icon]:empty { display: inline-flex; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; }
}

/* components-buttons.css */
/* components-buttons.css — nút bấm lún xuống khi nhấn; mỗi vùng màn hình tối đa một nút .primary.
   Biến thể: .primary .danger .ok .warn .ghost · cỡ: .tiny .small .big · .icon-only (nút chỉ có icon, cần aria-label). */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 14px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text);
  font: 600 13.5px/1.3 var(--font); cursor: pointer; white-space: nowrap; text-decoration: none; box-shadow: var(--shadow-sm);
  transition: background .15s, border-color .15s, color .15s, transform .15s, box-shadow .15s; }
.btn:hover { border-color: var(--primary); color: var(--primary-strong); }
.btn:active:not(:disabled) { transform: scale(.98) translateY(1.5px); box-shadow: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--primary-strong); border-color: var(--primary-strong); color: var(--on-primary); }
.btn.primary:hover { background: color-mix(in srgb, var(--primary-strong) 86%, var(--heading)); color: var(--on-primary); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); color: var(--danger); }
.btn.ok { color: var(--ok); }
.btn.ok:hover { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 8%, var(--surface)); }
.btn.warn { color: var(--warn); }
.btn.warn:hover { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 8%, var(--surface)); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--primary-soft); border-color: transparent; }
.btn.danger.ghost:hover { background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.btn.small { padding: 5px 11px; font-size: 12.5px; }
.btn.tiny { padding: 3px 9px; font-size: 12px; border-radius: 6px; gap: 5px; }
.btn.big { padding: 10px 22px; font-size: 14.5px; }
.btn.icon-only { padding: 6px; line-height: 0; }
.btn.icon-only.tiny { padding: 3px; }
.btn.block { width: 100%; }
.btn .icon { width: 16px; height: 16px; vertical-align: 0; }
.btn.tiny .icon { width: 14px; height: 14px; }
.btn.is-active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-strong); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn-row.end { justify-content: flex-end; }

/* Liên kết trông như chữ, dùng cho hành động phụ trong câu */
.link-btn { border: 0; padding: 0; background: none; color: var(--primary-strong); font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link-btn:hover { color: var(--accent-strong); }

/* Thẻ chọn được (chip) — từ khoá gợi ý, bộ lọc nhanh */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--surface); color: var(--text); font: 600 12.5px var(--font); cursor: pointer;
  transition: background .15s, border-color .15s, color .15s; }
.chip:hover { border-color: var(--primary); color: var(--primary-strong); }
.chip.is-active, .chip[aria-pressed="true"] { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-strong); }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }

/* Nút gạt (tab nhỏ) — khối nền chìm, mục đang chọn nền nổi */
.seg, .tabs { display: inline-flex; flex-wrap: wrap; max-width: 100%; gap: 2px; padding: 3px; background: var(--sunken);
  border: 1px solid var(--line); border-radius: 9px; }
.seg button, .tabs .tab-btn { border: 0; background: none; color: var(--muted); padding: 6px 14px; border-radius: 6px;
  font: 600 13px var(--font); cursor: pointer; transition: background .15s, color .15s; }
.seg button:hover, .tabs .tab-btn:hover { color: var(--heading); }
.seg button[aria-selected="true"], .seg button.active, .tabs .tab-btn.active, .tabs .tab-btn[aria-selected="true"] {
  background: var(--surface); color: var(--primary-strong); box-shadow: var(--shadow-sm); }
.tabs { margin-bottom: 18px; }
.tabs.full { display: flex; }
.tabs.full .tab-btn { flex: 1; }

/* site-layout.css */
/* site-layout.css — khung trang công khai (trang chủ, trang thông tin, blog): chữ lớn hơn app,
   mobile trước, màu chỉ từ tokens.css. Thanh trên và chân trang ở site-chrome.css.
   Thang khoảng cách: --gap-section giữa các khối lớn, --gap-head giữa tiêu đề khối và nội dung,
   --gap-item giữa các mục trong danh sách. */
/* Thang cỡ chữ (chỉ 6 cỡ): sm 14 = phụ/meta/chú thích, ui 16 = chữ giao diện và thẻ, body 18 = văn bài/lead,
   lg 20 = h3/tiêu đề thẻ, xl 26 = h2, 2xl 40 = h1. Không đặt cỡ lẻ ngoài thang này. */
body.site { --gap-section: 40px; --gap-head: 24px; --gap-item: 14px; --measure: 760px;
  --fs-sm: 14px; --fs-ui: 16px; --fs-body: 18px; --fs-lg: 20px; --fs-xl: 26px; --fs-2xl: 40px;
  font-size: var(--fs-ui); line-height: 1.65; display: flex; flex-direction: column; }
@media (min-width: 900px) { body.site { --gap-section: 64px; } }
body.site h1 { font-size: clamp(28px, 5vw, var(--fs-2xl)); line-height: 1.2; letter-spacing: -.02em; }
body.site h2 { font-size: clamp(22px, 3vw, var(--fs-xl)); line-height: 1.3; }
body.site h3 { font-size: var(--fs-lg); line-height: 1.4; }
body.site p { margin: 0 0 14px; }
/* Nút dùng chung với app (13.5/12.5/14.5px) → về thang của site: nút nhỏ 14, nút thường và nút lớn 16. */
body.site .btn { font-size: var(--fs-ui); }
body.site .btn.small, body.site .btn.tiny, body.site small { font-size: var(--fs-sm); }

.site-wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.site-main { flex: 1 0 auto; outline: none; }
.site-section { padding-top: var(--gap-section); padding-bottom: var(--gap-section); }
/* "> .site-wrap > h2": khối nền màu (.band) bọc tiêu đề trong .site-wrap → vẫn cùng khoảng cách tiêu đề–nội dung. */
.site-section > h2, .site-section > .site-wrap > h2, .site-section .section-head { margin-bottom: var(--gap-head); }
.site-section > h2 + .section-lead, .site-section > .site-wrap > h2 + .section-lead { margin-top: calc(var(--gap-head) * -0.5); }
.section-lead { max-width: var(--measure); margin-bottom: var(--gap-head); color: var(--text); }

.skip-link { position: absolute; left: 16px; top: -48px; z-index: 10; padding: 8px 14px; border-radius: var(--radius);
  background: var(--surface); color: var(--heading); border: 1px solid var(--border); font-weight: 600; }
.skip-link:focus { top: 12px; }

.breadcrumb { padding-top: 16px; font-size: var(--fs-sm); color: var(--muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--border); }
.breadcrumb a { display: inline-block; padding: 2px 0; color: var(--muted); }
.breadcrumb a:hover { color: var(--accent-strong); }

.eyebrow { margin: 0 0 10px; color: var(--accent-strong); font-weight: 700; font-size: var(--fs-sm); letter-spacing: .02em; }
.lead { font-size: var(--fs-body); color: var(--text); }
.hero { padding-top: 48px; padding-bottom: var(--gap-section); }
.hero h1 { max-width: 20ch; }
.hero .lead { margin-top: 16px; max-width: 60ch; }
.hero .btn-row { margin-top: 28px; }
.hero-note { margin-top: 14px; color: var(--muted); font-size: var(--fs-sm); }

/* Trang con: khung ngoài = .site-wrap (thẳng mép thanh trên/chân trang). Tiêu đề, đoạn dẫn và chữ dài
   cùng giới hạn --measure nên đoạn dẫn không hẹp hơn thân bài; màn rộng có cột phụ 280px
   (mục lục dính, hộp dùng thử). Màn hẹp: mục lục lên trước nội dung. */
.page-shell { padding-top: 28px; padding-bottom: var(--gap-section); }
/* Trang không có đường dẫn (breadcrumb) ngay dưới thanh trên → đệm thêm cho bằng trang có đường dẫn. */
.site-header + .site-main > .page-shell:first-child { padding-top: 56px; }
.page-head { display: grid; gap: 20px; align-items: center; padding-bottom: 28px; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.page-head-text { max-width: var(--measure); }
.page-head .lead { margin: 14px 0 0; }
.page-head .post-meta { margin-top: 12px; }
.page-head-art { justify-self: start; width: 160px; }
.page-body { display: grid; gap: 28px; }
.page-main { min-width: 0; max-width: var(--measure); }
.page-main > .btn-row:last-child, .page-main > .cta-panel { margin-top: 40px; }
.page-aside { display: grid; gap: 16px; align-content: start; min-width: 0; }
.page-aside .toc { margin: 0; }
/* Cột bên trượt theo bài (sticky) → mục lục gọn để cả cột lọt chiều cao màn hình, không cần thanh cuộn riêng. */
.page-aside .toc li { margin: 0; font-size: var(--fs-sm); line-height: 1.45; }
.page-aside .toc > summary { margin-bottom: 6px; }
.aside-cta { display: none; padding: 20px; background: var(--primary-soft); border: 1px solid var(--border); border-radius: var(--radius-card); font-size: var(--fs-ui); }
.aside-cta-title { margin: 0 0 6px; color: var(--heading); font-weight: 700; }
.aside-cta .btn { width: 100%; justify-content: center; }
@media (min-width: 720px) {
  .page-head.has-art { grid-template-columns: minmax(0, 1fr) 200px; }
  .page-head-art { justify-self: end; width: 200px; }
}
@media (min-width: 960px) {
  .page-body.has-aside { grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; }
  .page-body.has-aside .page-aside { grid-column: 2; grid-row: 1; align-self: start; }
  .page-body.has-aside .page-main { grid-column: 1; grid-row: 1; }
  .page-body.has-aside .page-main, .page-head.has-art .page-head-text { max-width: none; }
  /* Trang có cột bên (bài blog): tiêu đề + đoạn dẫn rộng bằng thanh trên/chân trang, không co về 760px. */
  .page-shell:has(.page-body.has-aside) .page-head-text { max-width: none; }
  .aside-cta { display: block; }
}
/* Chỉ trượt theo bài khi màn hình đủ cao để thấy trọn cột bên (không cắt nút "Vào ứng dụng"). */
@media (min-width: 960px) and (min-height: 800px) {
  .page-body.has-aside .page-aside { position: sticky; top: 24px; }
}

/* site-chrome.css */
/* site-chrome.css — thanh trên (menu ngang trên màn rộng, nút "Menu" mở danh sách trên màn hẹp,
   không cần script) và chân trang chia cột. */
.site-header { position: relative; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.site-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--heading); text-decoration: none; font-size: var(--fs-body); white-space: nowrap; }
.site-brand:hover { color: var(--heading); }
.site-brand b { color: var(--accent-strong); }
.site-cta { margin-left: auto; }
.site-nav { display: none; }
.site-nav ul, .site-menu-panel ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.site-nav a, .site-menu-panel a:not(.btn) { display: block; padding: 8px 12px; border-radius: var(--radius); color: var(--text);
  font-weight: 600; font-size: var(--fs-ui); text-decoration: none; }
.site-nav a:hover, .site-menu-panel a:not(.btn):hover { background: var(--primary-soft); color: var(--primary-strong); }
.site-nav a[aria-current="page"], .site-menu-panel a[aria-current="page"] { color: var(--primary-strong); background: var(--primary-soft); }

.site-menu > summary { list-style: none; }
.site-menu > summary::-webkit-details-marker { display: none; }
.site-menu-button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; margin: 0;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--heading); font-size: var(--fs-ui); }
.site-menu-button .icon { width: 20px; height: 20px; }
.site-menu[open] > .site-menu-button { margin: 0; background: var(--primary-soft); border-color: var(--primary); }
.site-menu-panel { position: absolute; left: 0; right: 0; top: 100%; padding: 12px 16px 16px; background: var(--surface);
  border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
.site-menu-panel ul { flex-direction: column; }
.site-menu-panel a:not(.btn) { padding: 12px; font-size: var(--fs-ui); }
.site-menu-cta { width: 100%; justify-content: center; margin-top: 12px; }
@media (max-width: 479px) { .site-cta { display: none; } .site-menu { margin-left: auto; } }
@media (min-width: 900px) {
  .site-header-inner { min-height: 64px; gap: 16px; }
  .site-nav { display: flex; flex: 1 1 auto; justify-content: flex-end; }
  .site-cta { margin-left: 0; }
  .site-menu { display: none; }
}

.site-footer { margin-top: 0; padding: 40px 0 28px; background: var(--sunken); border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.site-footer-grid { display: grid; gap: 28px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.site-footer-brand { grid-column: 1 / -1; max-width: 360px; }
/* Tiền tố .site-footer: "body.site p" (0,1,2) đè margin của các <p> trong chân trang. */
.site-footer .site-footer-brand p { margin: 10px 0 0; color: var(--muted); }
.site-footer .site-footer-title { margin: 0 0 12px; color: var(--heading); font-weight: 700; }
.site-footer-group ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.site-footer a:not(.site-brand) { color: var(--text); text-decoration: none; }
.site-footer a:not(.site-brand):hover { color: var(--accent-strong); text-decoration: underline; }
.site-footer .site-footer-note { margin: 36px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); }
@media (min-width: 720px) {
  .site-footer-grid { grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); }
  .site-footer-brand { grid-column: auto; }
}

/* site-components.css */
/* site-components.css — khối dùng lại trên trang công khai: lưới tính năng, bước làm, hộp kêu gọi,
   thẻ bài, thẻ (tag), phân trang, bài trước/sau, câu hỏi thường gặp, bảng, mục lục. */
.feature-grid, .post-grid { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.feature-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-sm); }
@media (min-width: 640px) { .feature-grid, .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .feature-grid, .post-grid { grid-template-columns: repeat(3, 1fr); } }

.band { background: var(--sunken); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.cta-box { margin-top: 32px; padding: 24px; background: var(--primary-soft); border: 1px solid var(--border); border-radius: var(--radius-card); }
.cta-box h2 { margin-bottom: 8px; }
.cta-box p:last-child { margin-bottom: 0; }
.site-section.cta-box { margin-bottom: 8px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 600; }

.post-card { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-card); box-shadow: var(--shadow-sm); }
.post-card-media img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--sunken); }
.post-card-body { display: flex; flex-direction: column; gap: 8px; padding: 18px; flex: 1; }
/* Tiền tố .post-card: "body.site h2/p" (0,1,2) đè cỡ chữ và margin. Tiêu đề tối đa 2 dòng, mô tả 3 dòng. */
.post-card .post-card-body h2, .post-card .post-card-body h3 { margin: 0; font-size: var(--fs-lg); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card-body h2 a, .post-card-body h3 a { color: var(--heading); text-decoration: none; }
.post-card-body h2 a:hover, .post-card-body h3 a:hover { color: var(--accent-strong); text-decoration: underline; }
.post-card .post-card-excerpt { margin: 0; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .tag-list { margin-top: auto; padding-top: 4px; }
/* Lưới bài nằm trong .page-main (giới hạn bề rộng đọc 760px) → bỏ giới hạn khi trang là danh sách bài. */
.page-main:has(> .post-grid) { max-width: none; }
.post-meta { margin: 0; color: var(--muted); font-size: var(--fs-sm); }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tag-list a { display: inline-block; padding: 3px 12px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text); font-size: var(--fs-sm); font-weight: 600; text-decoration: none; }
.tag-list a:hover { border-color: var(--primary); color: var(--primary-strong); }

.pagination ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 32px 0 0; padding: 0; list-style: none; }
.pagination a, .pagination span { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; justify-content: center;
  padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-decoration: none; font-weight: 600; }
.pagination [aria-current="page"] { background: var(--primary-strong); border-color: var(--primary-strong); color: var(--on-primary); }

.post-nav { display: grid; gap: 12px; margin-top: 32px; }
.post-nav a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-card);
  background: var(--surface); color: var(--heading); font-weight: 600; text-decoration: none; }
.post-nav a:hover { border-color: var(--primary); }
.post-nav span { display: block; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.post-nav-next { text-align: right; }
@media (min-width: 720px) { .post-nav { grid-template-columns: 1fr 1fr; } .post-nav-next:only-child { grid-column: 2; } }


.table-wrap { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--line); border-radius: var(--radius-card); }
.site-table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: var(--fs-ui); }
.site-table th, .site-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.site-table thead th { background: var(--sunken); color: var(--heading); }
.site-table tbody th { font-weight: 600; color: var(--text); }
.site-table tr:last-child th, .site-table tr:last-child td { border-bottom: 0; }
.contact-list { padding-left: 20px; }

.toc { margin: 24px 0; padding: 14px 18px; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--radius-card); }
.toc > summary { color: var(--heading); font-size: var(--fs-ui); }
.toc ol { margin: 0; padding-left: 20px; }
.toc ol ol { margin-top: 4px; }
.toc li { margin: 4px 0; }
/* inline-block + đệm: vùng bấm cao ≥ 24px (Lighthouse "target-size"). */
.toc a { display: inline-block; padding: 2px 0; text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* site-prose.css */
/* site-prose.css — chữ dài: trang pháp lý, nội dung bài blog. Dòng vừa mắt (~70 ký tự), khoảng cách rộng. */
.post-cover { margin: 0 0 24px; }
.post-cover img { display: block; width: 100%; border-radius: var(--radius-card); background: var(--sunken); }
.post-tags { margin-top: 24px; }

.prose { font-size: 17px; line-height: 1.75; overflow-wrap: break-word; }
.prose > * + * { margin-top: 0; }
.prose h2 { margin: 36px 0 12px; scroll-margin-top: 16px; }
.prose h3 { margin: 28px 0 10px; scroll-margin-top: 16px; }
.prose h4 { margin: 22px 0 8px; font-size: var(--fs-ui); }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose figure, .prose pre, .prose table { margin: 0 0 18px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin: 6px 0; }
.prose li > ul, .prose li > ol { margin: 6px 0 0; }
.prose a { color: var(--primary-strong); }
.prose a:hover { color: var(--accent-strong); }
.prose img { display: block; max-width: 100%; height: auto; border-radius: var(--radius); background: var(--sunken); }
.prose figure img { margin: 0 auto; }
.prose figcaption { margin-top: 8px; color: var(--muted); font-size: var(--fs-sm); text-align: center; }
.prose blockquote { padding: 8px 0 8px 18px; border-left: 3px solid var(--accent); color: var(--heading); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code { font-size: var(--fs-sm); }
.prose pre { font-size: var(--fs-sm); }
.prose hr { margin: 32px 0; }
.prose table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: var(--fs-ui); }
.prose th, .prose td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--sunken); color: var(--heading); }
.prose .lead { font-size: var(--fs-body); }
/* Bài blog: đoạn mô tả dưới tiêu đề (.lead ngay sau .post-meta) và đoạn văn, danh sách, trích dẫn trong thân bài
   căn đều hai bên; tiêu đề, chú thích ảnh, bảng giữ căn trái/giữa. Trang khác không có .post-meta → không đổi. */
.post-content p, .post-content li, .post-content blockquote, .post-meta + .lead { text-align: justify; text-justify: inter-word; }
@media (min-width: 720px) { .prose { font-size: var(--fs-body); } }

/* site-sections.css */
/* site-sections.css — khối riêng của từng trang công khai: ô biểu tượng, thẻ tính năng, các bước,
   hộp kêu gọi có hình, thẻ giá trị (Giới thiệu), thẻ dùng thử (Bảng giá), thẻ liên hệ, câu hỏi
   thường gặp, blog trống, tiêu đề mục trang pháp lý. */
.icon { width: 1em; height: 1em; flex-shrink: 0; }
.icon-tile { display: inline-grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px;
  background: var(--primary-soft); color: var(--primary-strong); }
.icon-tile .icon { width: 22px; height: 22px; }
.icon-tile.strong { width: 52px; height: 52px; border-radius: 14px; background: var(--primary-strong); color: var(--on-primary); }
.icon-tile.strong .icon { width: 26px; height: 26px; }

ul.icon-list, ul.value-grid, ul.contact-cards { margin: 0 0 var(--gap-head); padding: 0; list-style: none; }
.icon-list { display: grid; gap: var(--gap-item); }
.icon-list li { display: flex; align-items: flex-start; gap: 14px; margin: 0; }
.icon-list li > div { padding-top: 7px; }

/* Trang chủ */
.feature-card { display: flex; flex-direction: column; gap: 12px; padding: 24px; }
.feature-media { display: grid; place-items: center; padding: 16px; border-radius: 10px; background: var(--sunken); }
.feature-media .illo { width: 120px; }
.feature-title { display: flex; align-items: center; gap: 12px; margin: 4px 0 0; }
.feature-card p { margin: 0; }
.feature-grid { gap: 20px; }

.step-list { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }
.step { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 24px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-card); }
.step-num { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary-strong); color: var(--on-primary); font-weight: 700; }
.step-art .illo { width: 112px; }
.step h3, .step p { margin: 0; }
.step:not(:last-child)::after { content: ""; position: absolute; left: 41px; bottom: -21px; width: 2px; height: 20px; background: var(--border); }
@media (min-width: 900px) {
  .step-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
  .step:not(:last-child)::after { left: 68px; right: -25px; top: 41px; bottom: auto; width: auto; height: 2px; }
}

.cta-panel { display: grid; gap: 20px; align-items: center; padding: 28px 24px; background: var(--primary-soft);
  border: 1px solid var(--border); border-radius: var(--radius-card); }
p.cta-panel-title, h2.cta-panel-title { margin: 0 0 8px; color: var(--heading); font-size: clamp(22px, 3vw, var(--fs-xl)); font-weight: 700; line-height: 1.3; }
.cta-panel-text > p:not(.cta-panel-title) { margin: 0 0 18px; }
.cta-panel-text > .btn-row { margin: 0; }
.cta-panel-art { justify-self: center; width: 160px; }
@media (min-width: 720px) {
  .cta-panel { grid-template-columns: minmax(0, 1fr) 180px; padding: 32px 36px; gap: 32px; }
  .cta-panel-art { width: 180px; }
}

/* Giới thiệu */
.value-grid { display: grid; gap: 16px; }
li.value-card { margin: 0; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); }
.prose .value-card h3 { margin: 14px 0 6px; }
.value-card p { margin: 0; font-size: var(--fs-ui); line-height: 1.6; }
@media (min-width: 640px) { .value-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Bảng giá */
.trial-card { display: flex; gap: 18px; align-items: flex-start; margin: 0 0 var(--gap-head); padding: 22px 24px;
  background: var(--primary-soft); border: 1px solid var(--primary); border-radius: var(--radius-card); }
.trial-card p { margin: 0; }
.prose .trial-card-amount { margin: 0 0 6px; color: var(--heading); font-size: var(--fs-xl); font-weight: 700; line-height: 1.2; }
.site-table .num { text-align: right; white-space: nowrap; }
.site-table tbody th { display: flex; align-items: flex-start; gap: 10px; }
.cell-icon { display: inline-grid; place-items: center; color: var(--primary-strong); padding-top: 3px; }
.cell-icon .icon { width: 18px; height: 18px; }
.table-wrap + .table-note { margin-top: 20px; }
@media (max-width: 559px) { .site-table .num { white-space: normal; } }

/* Liên hệ */
.contact-cards { display: grid; gap: 16px; }
li.contact-card { display: flex; gap: 14px; align-items: flex-start; margin: 0; padding: 20px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-card); }
.prose .contact-card h3 { margin: 0 0 4px; font-size: var(--fs-body); }
.contact-card p { margin: 0; font-size: var(--fs-ui); line-height: 1.55; overflow-wrap: anywhere; }
.contact-card > div { padding-top: 2px; }

/* Câu hỏi thường gặp */
.faq-list { display: grid; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); }
.faq-item[open] { border-color: var(--border); }
.faq-item > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0; padding: 18px 20px;
  color: var(--heading); list-style: none; }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary h2 { margin: 0; font-size: var(--fs-body); line-height: 1.45; }
.faq-item > summary:hover h2 { color: var(--primary-strong); }
.faq-chevron { width: 20px; height: 20px; color: var(--primary-strong); transition: transform .2s ease; }
.faq-item[open] .faq-chevron { transform: rotate(180deg); }
.faq-answer { padding: 0 20px 18px; }
.faq-answer p { margin: 0; }
@media (prefers-reduced-motion: reduce) { .faq-chevron { transition: none; } }

/* Blog trống */
.empty-state { display: grid; gap: 20px; align-items: center; padding: 32px 24px; background: var(--surface);
  border: 1px dashed var(--border); border-radius: var(--radius-card); }
.empty-state h2 { margin: 0 0 8px; }
.empty-state .btn-row { margin: 18px 0 0; }
.empty-state-art { justify-self: center; width: 180px; }
@media (min-width: 720px) { .empty-state { grid-template-columns: 200px minmax(0, 1fr); padding: 40px; gap: 36px; } }

/* Trang pháp lý: mục đánh số có đường kẻ tách, thở rộng hơn */
.legal .prose h2 { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.legal .prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal .prose li { margin: 10px 0; }
.legal .toc ol { padding-left: 0; list-style: none; }

/* site-illustrations.css */
/* site-illustrations.css — màu cho hình SVG vẽ tay của trang công khai (lib/site/pages/illustrations).
   Mọi màu lấy từ token nên tự đổi theo nền sáng/tối; SVG không mang style riêng (CSP). */
svg.illo { display: block; width: 100%; height: auto; overflow: visible; }
.illo .ill-ink { fill: none; stroke: var(--heading); stroke-linecap: round; stroke-linejoin: round; }
.illo .ill-paper { fill: var(--surface); stroke: var(--heading); stroke-linejoin: round; }
.illo .ill-sunken { fill: var(--sunken); }
.illo .ill-line { fill: var(--line); }
.illo .ill-border { fill: var(--border); }
.illo .ill-primary { fill: var(--primary); }
.illo .ill-primary-soft { fill: var(--primary-soft); }
.illo .ill-primary-strong { fill: var(--primary-strong); }
.illo .ill-accent { fill: var(--accent); }
.illo .ill-stroke-primary { fill: none; stroke: var(--primary-strong); stroke-linecap: round; stroke-linejoin: round; }
.illo .ill-stroke-accent { fill: none; stroke: var(--accent); stroke-linecap: round; stroke-linejoin: round; }
.illo .ill-stroke-on { fill: none; stroke: var(--on-primary); stroke-linecap: round; stroke-linejoin: round; }

/* Vị trí và cỡ */
.hero-art { max-width: 520px; margin: 8px auto 0; }
.page-head-art { width: 100%; max-width: 200px; }
.post-card-media .illo-cover { aspect-ratio: 16 / 9; }

@media (min-width: 900px) {
  .hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 40px; }
  .hero-art { margin: 0; max-width: none; }
}
