/* ==========================================================================
   Yomi-Project website – bộ giao diện dùng chung cho mọi trang
   (YomiHub, Yomi-Tử Vi Ứng Dụng, Yomi-Office Open Source, Yomi-Game Mod Launcher, Yomi-Project).
   Khung trang (header/menu/footer) sinh bằng tools/build_site.py.
   ========================================================================== */

/* 1. Phông Be Vietnam Pro tự lưu trữ (assets/fonts, giấy phép OFL) */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/bvp-vietnamese-400.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/bvp-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/bvp-vietnamese-600.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/bvp-latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/bvp-vietnamese-800.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/bvp-latin-800.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   2. Design tokens (sáng / tối) + màu nhấn theo từng dự án
   ========================================================================== */
:root {
  --brand-1: #5a2cb6;
  --brand-2: #2371e1;
  --brand-3: #00bda6;
  --brand-grad: linear-gradient(118deg, var(--brand-1) 0%, var(--brand-2) 52%, var(--brand-3) 100%);

  --bg: #f5f7fc;
  --surface: #ffffff;
  --surface-2: #f0f3fa;
  --ink: #161a2e;
  --ink-2: #2c3350;
  --muted: #5b6178;
  --line: #e1e5f0;
  --line-strong: #cfd6e6;
  --shadow: 0 2px 10px rgba(22, 26, 46, 0.06);
  --shadow-lg: 0 14px 40px rgba(22, 26, 46, 0.12);
  --code-bg: #eef1f8;
  --ok: #0f9d6b;
  --warn: #b7791f;
  --danger: #c0392b;
  --info: #2371e1;

  /* Màu nhấn mặc định (Yomi-Project); mỗi dự án ghi đè ở mục 3 */
  --accent: #2371e1;
  --accent-2: #00bda6;
  --accent-ink: #ffffff;
  --accent-text: #1b5fc4;
  --hero-grad: var(--brand-grad);

  --radius: 16px;
  --radius-sm: 10px;
  --container: 1180px;
  --header-h: 112px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0c0f1d;
  --surface: #141a2d;
  --surface-2: #1a2138;
  --ink: #e9ecf7;
  --ink-2: #cdd3e8;
  --muted: #9aa3c1;
  --line: #262e48;
  --line-strong: #34405f;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 44px rgba(0, 0, 0, 0.45);
  --code-bg: #1e2640;
  --ok: #34d399;
  --warn: #f5b951;
  --danger: #ff7b88;
  --info: #6ea8ff;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg: #0c0f1d;
    --surface: #141a2d;
    --surface-2: #1a2138;
    --ink: #e9ecf7;
    --ink-2: #cdd3e8;
    --muted: #9aa3c1;
    --line: #262e48;
    --line-strong: #34405f;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 44px rgba(0, 0, 0, 0.45);
    --code-bg: #1e2640;
    --ok: #34d399;
    --warn: #f5b951;
    --danger: #ff7b88;
    --info: #6ea8ff;
    color-scheme: dark;
  }
}

/* ==========================================================================
   3. Màu nhấn theo dự án
   ========================================================================== */
.p-hub {
  --accent: #6a4ce0; --accent-2: #00bda6; --accent-text: #5a3cc9;
  --hero-grad: linear-gradient(118deg, #5a2cb6 0%, #2371e1 55%, #00bda6 100%);
}
.p-aa {
  --accent: #c98a1b; --accent-2: #2a9fb0; --accent-ink: #1d1404; --accent-text: #9a6510;
  --hero-grad: radial-gradient(120% 140% at 85% 0%, rgba(229, 181, 103, 0.45) 0%, rgba(229, 181, 103, 0) 55%), linear-gradient(135deg, #12142e 0%, #1d2350 55%, #2b2f6b 100%);
}
.p-office {
  --accent: #2563eb; --accent-2: #06b6d4; --accent-text: #1d4ed8;
  --hero-grad: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #06b6d4 100%);
}
.p-gm {
  --accent: #7c4dff; --accent-2: #14b8a6; --accent-text: #6236e8;
  --hero-grad: radial-gradient(110% 130% at 90% 10%, rgba(42, 211, 189, 0.35) 0%, rgba(42, 211, 189, 0) 55%), linear-gradient(135deg, #1b1446 0%, #3b2a9a 55%, #5b3df0 100%);
}
.p-yp {
  --accent: #2371e1; --accent-2: #00bda6; --accent-text: #1b5fc4;
  --hero-grad: var(--brand-grad);
}
html[data-theme="dark"] .p-hub { --accent-text: #b4a2ff; }
html[data-theme="dark"] .p-aa { --accent: #e5b567; --accent-text: #e9c17f; }
html[data-theme="dark"] .p-office { --accent: #3b82f6; --accent-text: #8ab4ff; }
html[data-theme="dark"] .p-gm { --accent: #8f6bff; --accent-text: #c3b2ff; }
html[data-theme="dark"] .p-yp { --accent-text: #7fb2ff; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .p-hub { --accent-text: #b4a2ff; }
  html:not([data-theme="light"]) .p-aa { --accent: #e5b567; --accent-text: #e9c17f; }
  html:not([data-theme="light"]) .p-office { --accent: #3b82f6; --accent-text: #8ab4ff; }
  html:not([data-theme="light"]) .p-gm { --accent: #8f6bff; --accent-text: #c3b2ff; }
  html:not([data-theme="light"]) .p-yp { --accent-text: #7fb2ff; }
}

/* ==========================================================================
   4. Nền tảng
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-text); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { line-height: 1.28; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; margin: 0 0 0.6rem; }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); font-weight: 800; margin: 2.2rem 0 0.9rem; }
h3 { font-size: 1.12rem; font-weight: 700; margin: 1.4rem 0 0.5rem; }
h4 { font-size: 1rem; font-weight: 700; margin: 1rem 0 0.4rem; }
p { margin: 0 0 0.9rem; }
ul, ol { margin: 0.3rem 0 1rem; padding-left: 1.4rem; }
li { margin: 0.3rem 0; }
li::marker { color: var(--muted); }
strong, b { font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
code, kbd, samp {
  font-family: ui-monospace, 'SF Mono', Consolas, 'Liberation Mono', monospace;
  font-size: 0.86em;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.08em 0.4em;
  overflow-wrap: anywhere;
  color: var(--ink-2);
}
pre {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0.8rem 0 1.1rem;
}
pre code { background: none; border: 0; padding: 0; font-size: inherit; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: var(--surface-2); color: var(--ink-2); font-weight: 700; font-size: 0.88rem; }
tr:last-child td { border-bottom: 0; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 0 0 10px; }
summary { cursor: pointer; font-weight: 700; color: var(--ink); }
details[open] > summary { color: var(--accent-text); margin-bottom: 6px; }
.vi-only, .en-only { }
html[lang="en"] .vi-only { display: none !important; }
html:not([lang="en"]) .en-only { display: none !important; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--surface); color: var(--ink); padding: 8px 14px; border-radius: 8px; box-shadow: var(--shadow-lg); }
.skip-link:focus { top: 12px; }

/* ==========================================================================
   5. Khung trang: thanh hệ sinh thái + thanh trang của dự án
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.eco-bar { background: #0f1326; color: #e7eaf6; font-size: 0.86rem; }
.eco-inner { display: flex; align-items: center; gap: 14px; min-height: 46px; }
.eco-brand { display: inline-flex; align-items: center; gap: 8px; color: inherit; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; }
.eco-brand:hover { text-decoration: none; }
.eco-brand img { border-radius: 7px; background: #fff; }
.eco-nav { display: flex; align-items: center; gap: 2px; flex: 1 1 auto; min-width: 0; margin-left: 10px; }
.eco-link {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px; border-radius: 999px;
  color: #b9c0dc; font-weight: 600; white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.eco-link img { width: 20px; height: 20px; border-radius: 5px; background: #fff; object-fit: contain; }
.eco-link:hover { background: rgba(255, 255, 255, 0.08); color: #fff; text-decoration: none; }
.eco-link[aria-current] { background: rgba(255, 255, 255, 0.14); color: #fff; }
.eco-text { margin-left: 2px; }
.eco-link.eco-text:first-of-type { }
.eco-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.lang-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.16); }
.lang-opt {
  appearance: none; border: 0; background: transparent; font: inherit; cursor: pointer;
  padding: 3px 10px; border-radius: 999px; font-size: 0.76rem; font-weight: 800; letter-spacing: 0.02em;
  color: #c9cfe6; line-height: 1.5;
}
.lang-opt:hover { color: #fff; text-decoration: none; }
.lang-opt.active, .lang-opt[aria-pressed="true"] { background: #fff; color: #1a1f3a; }
.icon-btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; min-width: 30px; padding: 0 8px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.08);
  color: #e7eaf6; font: inherit; font-size: 0.9rem; cursor: pointer;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.16); }
.theme-toggle .i-moon { display: none; }
html[data-theme="dark"] .theme-toggle .i-sun { display: none; }
html[data-theme="dark"] .theme-toggle .i-moon { display: inline; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-toggle .i-sun { display: none; }
  html:not([data-theme="light"]) .theme-toggle .i-moon { display: inline; }
}
.menu-toggle { display: none; }
.menu-label { font-size: 0.78rem; font-weight: 700; }

.product-bar { }
.product-inner { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.product-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 1.08rem; letter-spacing: -0.015em; white-space: nowrap; flex-shrink: 0; }
.product-brand:hover { text-decoration: none; }
.product-brand img { width: 34px; height: 34px; border-radius: 9px; object-fit: contain; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }
.tabs { display: flex; align-items: center; gap: 4px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; padding: 8px 14px; border-radius: 10px;
  color: var(--muted); font-weight: 600; font-size: 0.95rem; white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.tab:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.tab[aria-current="page"] { color: var(--accent-text); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.tab[aria-current="page"]::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: -13px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent);
}
.product-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ==========================================================================
   6. Nút
   ========================================================================== */
.btn, .btn-primary, .btn-secondary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: 0.98rem; line-height: 1.3;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}
.btn:hover, .btn-primary:hover, .btn-secondary:hover, .btn-ghost:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-primary:hover { filter: brightness(1.06); color: var(--accent-ink); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-text); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-text); }
.btn-sm { padding: 7px 14px; font-size: 0.88rem; border-radius: 10px; }
.btn-copy {
  appearance: none; display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 11px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--accent-text); font: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer;
}
.btn-copy:hover { border-color: var(--accent); }
.btn-copy.copied { background: var(--ok); border-color: var(--ok); color: #fff; }

/* ==========================================================================
   7. Vùng nội dung + phần đầu trang (hero / page-head)
   ========================================================================== */
.site-content { max-width: var(--container); margin: 0 auto; padding: 28px 20px 64px; min-height: 50vh; }
.site-content > main, .site-content > .wrap, .site-content main.wrap, .site-content .wrap { max-width: none; margin: 0; padding: 0; position: static; }
.site-content main.narrow, .site-content .narrow { max-width: 900px; margin-left: auto; margin-right: auto; }

.hero, .page-head, .hero.page-hero {
  position: relative; overflow: hidden;
  background: var(--hero-grad);
  color: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}
.hero::before, .page-head::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 80% at 10% 110%, rgba(255, 255, 255, 0.14), transparent 60%),
              radial-gradient(40% 60% at 95% -10%, rgba(255, 255, 255, 0.16), transparent 60%);
}
.hero { text-align: center; padding: clamp(40px, 7vw, 72px) clamp(20px, 5vw, 56px); margin: 0 0 28px; }
.hero h1, .page-head h1 {
  color: #fff; font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; line-height: 1.18; letter-spacing: -0.02em;
  margin: 0 0 14px; background: none; -webkit-text-fill-color: currentColor; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}
.hero h1 span, .page-head h1 span { -webkit-text-fill-color: currentColor; }
.hero p, .hero .hero-lead { color: rgba(255, 255, 255, 0.92); font-size: clamp(1rem, 1.6vw, 1.15rem); max-width: 780px; margin: 0 auto 26px; }
.hero p b, .hero p strong { color: #fff; }
.hero a:not(.btn):not(.btn-primary):not(.btn-secondary) { color: #fff; text-decoration: underline; }
.hero-inner { max-width: 920px; margin: 0 auto; }
.hero-logo { display: block; width: 104px; height: 104px; margin: 0 auto 18px; border-radius: 26px; background: #fff; box-shadow: 0 14px 36px rgba(0, 0, 0, 0.3); }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center;
  padding: 5px 14px; margin: 0 0 18px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.32);
  color: #fff; font-size: 0.85rem; font-weight: 600;
}
.hero-buttons, .hero-cta, .cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.hero .btn-primary, .page-head .btn-primary, .cta-box .btn-primary { background: #fff; color: #1a1f3a; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22); }
.hero .btn-primary:hover, .cta-box .btn-primary:hover { background: #f3f5ff; color: #1a1f3a; }
.hero .btn-secondary, .page-head .btn-secondary, .cta-box .btn-secondary { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: rgba(255, 255, 255, 0.45); }
.hero .btn-secondary:hover, .cta-box .btn-secondary:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }
.hero-meta { margin-top: 16px; font-size: 0.88rem; color: rgba(255, 255, 255, 0.85); }
.hero-meta b { color: #fff; }
.platforms-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.platform-item {
  display: inline-block; text-align: center; padding: 6px 14px; border-radius: 10px;
  background: rgba(0, 0, 0, 0.16); border: 1px solid rgba(255, 255, 255, 0.18); color: rgba(255, 255, 255, 0.92); font-size: 0.88rem;
}
/* Hero chia 2 cột (YomiHub) */
.hero-split { display: grid; grid-template-columns: 1.25fr 1fr; gap: 32px; align-items: center; text-align: left; }
.hero-split .hero-lead, .hero-split p { margin-left: 0; }
.hero-split .hero-cta { justify-content: flex-start; }
.hero-visual { display: flex; justify-content: center; perspective: 900px; }
.book-tilt { width: 100%; max-width: 430px; border-radius: 18px; border: 1.5px solid rgba(255, 255, 255, 0.35); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3); transform: rotateY(-6deg) rotateX(4deg); transition: transform 0.4s ease; }
.book-tilt:hover { transform: none; }

/* Phần đầu trang con */
.page-head { padding: clamp(28px, 5vw, 44px) clamp(20px, 4vw, 44px); margin: 0 0 28px; text-align: left; }
.page-head h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 8px; }
.page-head p, .page-head .hero-compact-lead { color: rgba(255, 255, 255, 0.9); max-width: 760px; margin: 0; font-size: 1.02rem; }
.page-head p.page-meta { font-size: 0.92rem; margin-top: 4px; }
.page-head strong, .page-head b { color: #fff; }
.page-head a { color: #fff; text-decoration: underline; }
.page-head-icon { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.hero-compact-icon { width: 76px; height: 76px; border-radius: 20px; background: #fff; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28); flex-shrink: 0; }
.hero.page-hero { text-align: left; padding: clamp(28px, 5vw, 44px) clamp(20px, 4vw, 44px); }
.hero.page-hero .hero-inner { max-width: none; margin: 0; }
.hero.page-hero h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 8px; }
.hero.page-hero p { margin-left: 0; margin-bottom: 16px; font-size: 1.02rem; }
.hero.page-hero .hero-buttons { justify-content: flex-start; }
.hero.page-hero .hero-badge { margin-bottom: 12px; }

/* Tiêu đề mục */
.section-title, .section-head { text-align: center; max-width: 780px; margin: 3.2rem auto 1.6rem; }
.section-title h2, .section-head h2 { margin: 0 0 8px; font-size: clamp(1.5rem, 3vw, 2rem); }
.section-title p, .section-head p { color: var(--muted); margin: 0 auto; }

/* ==========================================================================
   8. Thành phần dùng chung: thẻ, nhãn, hộp ghi chú, mục lục
   ========================================================================== */
.card, .feature-card, .feature-item, .chapter, .policy-container, .specs-card, .yp-project-card, .yp-stat-card, .yp-cta-card, .stat, .toc-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card { padding: 22px 24px; margin: 0 0 18px; }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card h2 { font-size: 1.35rem; margin: 0 0 0.8rem; }
.card h3 { font-size: 1.08rem; }
.card ul, .card ol { padding-left: 1.3rem; }
.badge, .tag, .tag-arch, .dl-rec, .yp-badge, .yp-lang-pill, .ext-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 0.74rem; font-weight: 700; line-height: 1.6; white-space: nowrap; vertical-align: middle;
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  color: var(--accent-text);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.tag-arch { font-family: ui-monospace, Consolas, monospace; border-radius: 6px; }
.ui { color: var(--accent-text); font-weight: 700; }

/* Hộp ghi chú: tip / note / callout / warn / ok / highlight */
.tip, .note, .callout, .highlight-box, .warn, .note.warn, .note.ok, aside.note {
  position: relative;
  margin: 1rem 0; padding: 13px 16px 13px 18px;
  border-radius: 0 12px 12px 0;
  border: 1px solid var(--line); border-left: 4px solid var(--info);
  background: color-mix(in srgb, var(--info) 7%, var(--surface));
  color: var(--ink); font-size: 0.95rem;
}
.tip { border-left-color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 8%, var(--surface)); }
.callout, aside.note { border-left-color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 7%, var(--surface)); }
.warn, .note.warn, .highlight-box { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn) 9%, var(--surface)); color: var(--ink); }
.note.ok { border-left-color: var(--ok); background: color-mix(in srgb, var(--ok) 8%, var(--surface)); }
.tip > :last-child, .note > :last-child, .callout > :last-child, .warn > :last-child, .highlight-box > :last-child { margin-bottom: 0; }

.table-wrap {
  overflow-x: auto; margin: 0.8rem 0 1.2rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.card .table-wrap { box-shadow: none; }
.table-wrap table { margin: 0; }

/* Các bước đánh số */
.steps { list-style: none; padding-left: 0 !important; counter-reset: yomi-step; margin: 14px 0 18px; }
.steps > li { position: relative; counter-increment: yomi-step; padding-left: 40px; margin: 0 0 11px; }
.steps > li::before {
  content: counter(yomi-step); position: absolute; left: 0; top: 0;
  width: 27px; height: 27px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--accent-ink); font-size: 0.8rem; font-weight: 800;
}

/* Lưới chung */
.features-grid, .feature-grid, .grid, .whatsnew-grid, .dl-grid, .ext-grid, .yp-stats-grid, .yp-quick-selector, .quick-selector, .yp-links-grid, .toc-grid {
  display: grid; gap: 16px;
}
.features-grid { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); margin-top: 1.2rem; }
.feature-grid { grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); margin: 16px 0 32px; }
.grid { grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); }
.whatsnew-grid { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); margin: 12px 0; }

/* Thẻ tính năng */
.feature-card { position: relative; padding: 24px; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.feature-card:hover, .feature-item:hover, .yp-project-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow-lg); }
.feature-card:hover { transform: translateY(-3px); }
.feature-card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.feature-card p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.feature-icon, .card-ic, .yp-project-icon, .ch-icon-box {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 13px; font-size: 1.4rem; line-height: 1;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  flex-shrink: 0;
}
.feature-card .feature-icon { margin-bottom: 14px; }

/* Mục lục kiểu lưới (Tử Vi, Game Mod) và kiểu hộp (Office) */
.p-aa .toc, .p-gm .toc { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 10px; margin: 0 0 1.5rem; }
.p-aa .toc a, .p-gm .toc a {
  display: block; padding: 12px 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  color: var(--ink); font-weight: 600; font-size: 0.95rem;
}
.p-aa .toc a:hover, .p-gm .toc a:hover { border-color: var(--accent); color: var(--accent-text); text-decoration: none; }
.p-office .toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 0 auto 10px; max-width: 900px; box-shadow: var(--shadow); }
.p-office .toc b { color: var(--accent-text); }
.p-office .toc ol { columns: 2; column-gap: 28px; margin: 8px 0 0; }

/* ==========================================================================
   9. YomiHub
   ========================================================================== */
.shelf-note { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.5rem; }
.p-hub .site-content h2 small { font-size: 0.88rem; font-weight: 400; color: var(--muted); margin-left: 6px; }
.p-hub .card h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 12px; }
.card.fix { border-left: 4px solid var(--info); }
.card.new { border-left: 4px solid var(--accent-2); }
.feature-item { padding: 20px; display: flex; flex-direction: column; }
.feature-item.highlight { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.feature-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.feature-title-group { display: flex; align-items: center; gap: 10px; }
.feature-item .feature-icon { width: auto; height: auto; background: none; border: 0; font-size: 1.4rem; }
.feature-title { margin: 0; font-size: 1.08rem; font-weight: 800; }
.feature-list { margin: 0 0 16px; padding-left: 1.2rem; flex-grow: 1; }
.feature-list li { font-size: 0.94rem; }
.feature-link { margin-top: auto; font-size: 0.9rem; font-weight: 700; color: var(--accent-text); }

/* Hướng dẫn: mục lục dính + tìm kiếm */
.guide-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; }
.guide-sidebar {
  position: sticky; top: calc(var(--header-h) + 16px);
  max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
}
.guide-search-box { margin-bottom: 14px; }
.guide-search-input {
  width: 100%; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--bg); color: var(--ink); font: inherit; font-size: 0.92rem;
}
.guide-search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.toc-heading { font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 0 0 8px; }
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list li { margin: 2px 0; }
.toc-link { display: block; padding: 6px 10px; border-radius: 8px; color: var(--ink-2); font-size: 0.9rem; }
.toc-link:hover { background: var(--surface-2); color: var(--accent-text); text-decoration: none; }
.toc-link.active { background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent-text); font-weight: 700; }
.toc-details { display: none; margin-bottom: 18px; }
.toc-summary { font-weight: 700; }
.guide-main { min-width: 0; }
.chapter { padding: 28px 30px; margin: 0 0 22px; }
.chapter h2 { margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.chapter .ch-icon { font-size: 1.35rem; }
.chapter .intro { color: var(--muted); margin-bottom: 14px; }
.chapter .path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 16px; }
.chapter .path span { display: inline-flex; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 0.82rem; font-weight: 600; }
.chapter .path span + span::before { content: "›"; margin-right: 6px; color: var(--muted); font-weight: 800; }
.chapter .tips { padding-left: 1.2rem; }
.search-no-results { display: none; text-align: center; padding: 48px 20px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); }

/* Chính sách */
.doc-privacy { max-width: 860px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 40px); box-shadow: var(--shadow); }
.doc-privacy > h2:first-child { margin-top: 0; }
.doc-privacy h2 { font-size: 1.25rem; margin: 2rem 0 0.7rem; }
.privacy-toc { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin-bottom: 24px; }
.privacy-toc h3 { margin: 0 0 8px; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.privacy-toc ul { margin: 0; }

/* Tải về */
.quick-selector { grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); margin: 0 0 28px; }
.quick-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  color: var(--ink); transition: transform 0.15s, border-color 0.15s;
}
.quick-btn:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.quick-btn.recommended { border-color: var(--accent-2); box-shadow: 0 0 0 1.5px var(--accent-2), var(--shadow); }
.quick-btn-title { font-weight: 800; font-size: 1.02rem; display: flex; align-items: center; gap: 8px; }
.quick-btn-desc { font-size: 0.85rem; color: var(--muted); line-height: 1.45; }
.device-badge { display: inline-flex; margin-top: 6px; padding: 2px 9px; border-radius: 999px; background: var(--accent-2); color: #fff; font-size: 0.72rem; font-weight: 800; }
.p-hub .dl-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; margin: 0 0 22px; box-shadow: var(--shadow); }
.p-hub .dl-group.highlighted { border-color: var(--accent-2); box-shadow: 0 0 0 1.5px var(--accent-2), var(--shadow); }
.p-hub .dl-group h2 { margin: 0 0 8px; display: flex; align-items: center; gap: 10px; }
.p-hub .dl-group .intro { color: var(--muted); margin-bottom: 16px; }
.dl-list { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 10px; }
.dl-item { display: grid; grid-template-columns: 250px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 12px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; margin: 0; }
.dl-primary { display: flex; align-items: center; gap: 10px; }
.p-hub a.dl {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 0.88rem; white-space: nowrap;
}
.p-hub a.dl:hover { filter: brightness(1.08); text-decoration: none; }
.p-hub a.dl svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.p-hub .dl-size { font-size: 0.8rem; font-weight: 700; color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.dl-hint { font-size: 0.88rem; color: var(--muted); line-height: 1.45; }
.dl-hash-box { display: flex; align-items: center; gap: 6px; }
.dl-sha { font-size: 0.76rem; }
.lang-suggestion-banner {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  max-width: var(--container); margin: 14px auto 0; padding: 10px 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 0.9rem;
}
.lang-suggestion-action { font-weight: 700; }
.lang-suggestion-close { appearance: none; border: 0; background: none; color: var(--muted); font-size: 1.2rem; cursor: pointer; }

/* ==========================================================================
   10. Yomi-Tử Vi Ứng Dụng & Yomi-Game Mod Launcher (cùng bộ thành phần)
   ========================================================================== */
.p-aa .card h2, .p-gm .card h2 { color: var(--accent-text); scroll-margin-top: calc(var(--header-h) + 16px); }
.p-aa .dl-group, .p-gm .dl-group { color: var(--accent-text); font-size: 1.1rem; font-weight: 800; margin: 1.8rem 0 0.8rem; }
.dl-section { scroll-margin-top: calc(var(--header-h) + 16px); }
.dl-grid { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 12px; }
.dl-card {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 15px 17px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  color: var(--ink); transition: transform 0.15s, border-color 0.15s;
}
.dl-card:hover, .dl-card:focus-visible { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.dl-btn {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--accent-ink); font-size: 1.1rem;
}
.dl-btn svg { width: 20px; height: 20px; }
.dl-text { font-size: 0.92rem; line-height: 1.5; min-width: 0; }
.dl-text code, .dl-filename { font-size: 0.78rem; word-break: break-all; }
.dl-sub { color: var(--muted); }
.p-gm .dl-size { color: var(--muted); font-size: 0.82rem; }
.dl-rec { margin-left: 6px; background: color-mix(in srgb, var(--accent-2) 15%, transparent); color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 30%, transparent); }
.dl-more, .dl-note { color: var(--muted); font-size: 0.9rem; margin-top: 1.2rem; text-align: center; }
.dl-status-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  margin: 1.2rem 0; padding: 12px 16px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
}
.dl-status-banner a { font-weight: 700; }
.specs-card { padding: 28px; margin-top: 2.5rem; }
.specs-card h3 { color: var(--accent-text); margin: 0 0 1rem; font-size: 1.3rem; }
.policy-container { padding: clamp(20px, 4vw, 40px); }
.policy-container > :first-child { margin-top: 0; }
.policy-section { margin-bottom: 1.8rem; }
.policy-section h2 { font-size: 1.3rem; color: var(--accent-text); margin: 0 0 0.7rem; display: flex; align-items: center; gap: 10px; }
.policy-section code { word-break: break-all; }
.copy-box {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 0.8rem 0 1rem; padding: 10px 14px; border-radius: 12px;
  background: var(--code-bg); border: 1px solid var(--line);
}
.copy-box code { flex: 1 1 240px; background: none; border: 0; padding: 0; }
.game-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 0.7rem; }
.game-pill { padding: 5px 12px; border-radius: 999px; font-size: 0.86rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); }
.hero .game-pill { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.25); color: #fff; }
/* Kho extension (gm.js dựng từ extensions.json) */
.ext-meta { font-size: 0.88rem; color: var(--muted); margin-bottom: 0.9rem; }
.ext-grid { grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 12px; margin: 1rem 0; }
.ext-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.ext-head { display: flex; align-items: center; gap: 11px; }
.ext-icon, .ext-badge-fallback { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; object-fit: cover; background: var(--surface); border: 1px solid var(--line); }
.ext-badge-fallback { display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--accent), var(--brand-2)); color: #fff; font-weight: 800; font-size: 0.82rem; border: 0; }
.ext-name { font-weight: 700; line-height: 1.28; }
.ext-ver { font-size: 0.78rem; color: var(--muted); }
.ext-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.ext-tag-nsfw { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.ext-tag-warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.ext-note { font-size: 0.84rem; color: var(--warn); line-height: 1.45; }
.ext-repo { font-size: 0.82rem; word-break: break-all; }
/* Bảng tác giả */
.credits { padding: 4px 18px 10px; }
.credits h2 { font-size: 1.1rem; margin: 1.4rem 0 0.6rem; }
.credits table { margin-bottom: 1.2rem; font-size: 0.9rem; }
.credits td.st { white-space: nowrap; font-weight: 700; }
.credits td.Integrated, .credits td.Bundled { color: var(--ok); }
.credits td.NotIntegrated, .credits td.Unavailable { color: var(--danger); }
.credits td.Reference { color: var(--muted); }

/* ==========================================================================
   11. Yomi-Office Open Source
   ========================================================================== */
.p-office .section { padding: 0; margin: 0 0 8px; }
.p-office .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: -8px 0 8px; }
.stat { padding: 18px; text-align: center; }
.stat b { display: block; font-size: 1.7rem; color: var(--accent-text); line-height: 1.2; }
.stat span { color: var(--muted); font-size: 0.88rem; }
.p-office .card { margin: 0; }
.p-office .card h3 { margin: 10px 0 6px; }
.p-office .card p, .p-office .card li { color: var(--muted); font-size: 0.95rem; }
.card.feature-new { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--accent) 6%, var(--surface))); }
.p-office .tag { margin-left: 6px; }
.prose { max-width: 900px; margin: 0 auto; }
.prose h2 { color: var(--accent-text); margin: 2.2rem 0 0.7rem; }
.prose h3 { margin: 1.4rem 0 0.5rem; }
.p-office a.dl, .p-office .dl {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 0.88rem; white-space: nowrap;
}
.p-office .dl:hover { filter: brightness(1.08); text-decoration: none; }
.p-office .size { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 3px; }
.big-download { text-align: center; margin: 8px 0 26px; }
.cta { margin: 48px 0 0; padding: 0; }
.cta-box { background: var(--hero-grad); color: #fff; border-radius: 22px; padding: 36px 28px; text-align: center; box-shadow: var(--shadow-lg); }
.cta-box h2 { color: #fff; margin: 0 0 8px; }
.cta-box p { color: rgba(255, 255, 255, 0.92); margin: 0 auto 18px; max-width: 700px; }

/* ==========================================================================
   12. Yomi-Project (Giới thiệu & Liên kết)
   ========================================================================== */
.yp-stats-grid { grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); margin: 0 0 28px; }
.yp-stat-card { padding: 16px 18px; }
.yp-stat-value { font-size: 1.15rem; font-weight: 800; line-height: 1.3; margin-bottom: 4px; }
.yp-stat-label { font-size: 0.86rem; color: var(--muted); }
.yp-quick-selector { grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); margin: 0 0 28px; }
.yp-section-heading { margin: 28px 0 16px; }
.yp-section-heading h2 { margin: 0 0 6px; }
.yp-section-heading p { margin: 0; color: var(--muted); }
.yp-projects-stack { display: flex; flex-direction: column; gap: 20px; margin: 16px 0 32px; }
.yp-project-card { padding: 22px; border-top: 4px solid var(--accent); }
.yp-project-card.accent-violet { border-top-color: #6a4ce0; }
.yp-project-card.accent-blue { border-top-color: #c98a1b; }
.yp-project-card.accent-teal { border-top-color: #2563eb; }
.yp-project-card#game-mod, .yp-project-card[id*="game"] { border-top-color: #7c4dff; }
.yp-project-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.yp-project-title-wrap { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 240px; }
.yp-project-icon { overflow: hidden; background: #fff; }
.yp-project-icon img { width: 46px; height: 46px; object-fit: cover; display: block; }
.yp-project-title { margin: 0; font-size: 1.3rem; }
.yp-project-sub { margin: 3px 0 0; font-size: 0.88rem; color: var(--muted); }
.yp-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.yp-badge-outline { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }
.yp-project-desc { color: var(--ink-2); margin: 0 0 18px; max-width: 82ch; }
.yp-project-body { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; margin-bottom: 18px; }
.yp-features-box { flex: 1.45 1 320px; min-width: 0; }
.yp-features-box h3, .yp-meta-box h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 0 0 10px; }
.yp-feature-list { margin: 0; }
.yp-feature-list li { font-size: 0.93rem; }
.yp-meta-box { flex: 1 1 250px; min-width: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.yp-meta-list { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.yp-meta-row { display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.yp-meta-row:last-child { padding-bottom: 0; border-bottom: 0; }
.yp-meta-row dt { font-size: 0.76rem; font-weight: 700; color: var(--muted); }
.yp-meta-row dd { margin: 0; font-size: 0.9rem; font-weight: 600; overflow-wrap: anywhere; }
.yp-card-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.yp-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 0.88rem; font-weight: 700;
}
.yp-btn:hover { border-color: var(--accent); color: var(--accent-text); text-decoration: none; }
.yp-btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.yp-btn-primary:hover { color: var(--accent-ink); filter: brightness(1.08); }
.yp-links-grid { grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 14px; margin-top: 16px; }
.yp-link-tile { display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 16px; min-width: 0; }
.yp-link-tile-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.yp-link-cat { font-size: 0.92rem; font-weight: 800; }
.yp-link-list { display: flex; flex-direction: column; gap: 8px; }
.yp-link-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.yp-link-row:hover { border-color: var(--accent); color: var(--accent-text); text-decoration: none; }
.yp-link-row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.yp-link-row-title { font-size: 0.9rem; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.yp-link-row-url { font-size: 0.76rem; color: var(--muted); font-family: ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.yp-link-arrow { font-weight: 800; color: var(--accent-text); }
.yp-cta-card { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 20px 22px; border-left: 4px solid var(--accent-2); margin-top: 28px; }
.yp-cta-text { flex: 1 1 320px; }
.yp-cta-card h2 { margin: 0 0 6px; font-size: 1.18rem; }
.yp-cta-card p { margin: 0; color: var(--muted); font-size: 0.93rem; }

/* ==========================================================================
   13. Chân trang
   ========================================================================== */
.site-footer { margin-top: 24px; background: #0f1326; color: #b9c0dc; font-size: 0.9rem; }
.site-footer a { color: #dde2f5; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(5, 1fr); gap: 28px; padding: 44px 0 28px; }
.footer-about p { margin: 12px 0 0; max-width: 34ch; color: #9aa2c2; }
.footer-about .eco-brand { color: #fff; font-size: 1.05rem; }
.footer-title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 0.9rem; font-weight: 800; color: #fff; }
.footer-title img { border-radius: 5px; background: #fff; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: 5px 0; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding: 18px 0 26px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; color: #8f97b8; font-size: 0.84rem; }
.footer-bottom p { margin: 0; }
.footer-note { max-width: 760px; }
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 1.2rem; font-weight: 800; cursor: pointer;
  box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--accent); color: var(--accent-text); }

/* ==========================================================================
   14. Màn hình nhỏ
   ========================================================================== */
@media (max-width: 1100px) {
  .eco-link span { }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .guide-layout { grid-template-columns: 1fr; }
  .guide-sidebar { display: none; }
  .toc-details { display: block; }
  .hero-split { grid-template-columns: 1fr; text-align: center; }
  .hero-split .hero-cta { justify-content: center; }
  .hero-split .hero-lead, .hero-split p { margin-left: auto; }
  .book-tilt { max-width: 340px; transform: none; }
  .p-office .stats { grid-template-columns: repeat(2, 1fr); }
  .product-actions .btn-ghost { display: none; }
}
@media (max-width: 860px) {
  :root { --header-h: 160px; }
  .menu-toggle { display: inline-flex; }
  .eco-nav {
    position: absolute; left: 0; right: 0; top: 46px; z-index: 60;
    display: none; flex-direction: column; align-items: stretch; gap: 2px; margin: 0;
    padding: 10px 14px 14px; background: #0f1326; border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35);
  }
  .site-header.nav-open .eco-nav { display: flex; }
  .eco-link { padding: 10px 12px; border-radius: 10px; font-size: 0.95rem; }
  .eco-text { margin-left: 0; }
  .eco-inner { position: static; }
  .site-header { position: sticky; }
  .eco-bar { position: relative; }
  .product-inner { flex-wrap: wrap; gap: 8px 12px; padding-top: 10px; min-height: 0; }
  .product-brand { flex: 1 1 auto; font-size: 1rem; }
  .tabs { order: 3; flex: 1 0 100%; margin: 0 -20px; padding: 0 16px 8px; }
  .tab[aria-current="page"]::after { bottom: -8px; }
  .p-office .toc ol { columns: 1; }
  .dl-item { grid-template-columns: 1fr; gap: 8px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .container { padding: 0 14px; }
  .site-content { padding: 18px 12px 48px; }
  .hero, .page-head, .hero.page-hero { border-radius: 18px; }
  .page-head-icon .hero-compact-icon { display: none; }
  .hero-badge { border-radius: 14px; }
  .card, .chapter, .p-hub .dl-group { padding: 18px 16px; }
  .eco-brand span { display: none; }
  .menu-label { display: none; }
  .product-brand img { width: 30px; height: 30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .tabs { margin: 0 -14px; padding: 0 10px 8px; }
  .p-office .stats { grid-template-columns: 1fr 1fr; }
  .stat b { font-size: 1.35rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .to-top, .guide-sidebar, .toc-details { display: none !important; }
  .hero, .page-head { background: none; color: #000; box-shadow: none; }
  .hero h1, .page-head h1, .hero p, .page-head p { color: #000; text-shadow: none; }
}
