@import url('https://fonts.googleapis.com/css2?family=Faster+One&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@800&display=swap');

/* ============================================================
   DESIGN TOKENS — đổi thương hiệu/màu tại đây, không sửa nơi khác
   ============================================================ */
:root {
  /* Màu nội dung */
  --ink: #201c18;
  --ink-soft: #201c18;
  --paper: #ffffff;
  --canvas: #faf3ea;
  --line: #ece2d5;

  /* Màu thương hiệu — 5 tông cam đơn sắc từ gốc #ea580c + trắng. Cam chỉ đóng vai trò accent/active/highlight,
     không dùng làm nền cho vùng lớn. Thứ tự nhấn khi cần nhiều cấp độ: đậm nhất → nhạt nhất:
     accent-darkest → accent-dark → accent → accent-light → accent-lighter → accent-soft.
     Chữ nội dung (--ink/--ink-soft/--text-*) giữ đen/nâu đậm để đảm bảo dễ đọc. */
  --accent: #ea580c;
  --accent-dark: #9a3412;
  --accent-darkest: #431407;
  --accent-light: #fb923c;
  --accent-lighter: #fed7aa;
  --accent-soft: #fff7ed;      /* nền cam rất nhẹ — card highlight, tab/menu active */
  --accent-softer: #fffbf7;    /* nền section cực nhẹ */
  --accent-dark-soft: rgba(154, 52, 18, .14);
  --white: #ffffff;

  /* Xám trung tính dùng chung cho card/table/box (viền + nền nhạt) — đổi 1 chỗ này áp dụng toàn wiki.
     Thêm 2026-09-06 để thay thế dần viền/nền cam cho các khối cấu trúc (không phải nội dung nhấn mạnh).
     Thống nhất 2026-09-06: MỌI nền xám dạng này dùng đúng rgba(0,0,0,.05) — không tự chế thêm sắc độ khác,
     --neutral-bg-strong giữ lại chỉ để code cũ không phải sửa tên, giá trị luôn bằng --neutral-bg. */
  --neutral-border: rgba(0, 0, 0, .15);
  --neutral-bg: rgba(0, 0, 0, .05);
  --neutral-bg-strong: rgba(0, 0, 0, .05);

  /* Màu trung tính — white-first: nền chính luôn trắng, trung tính lo phần còn lại của giao diện */
  --bg: #ffffff;
  --bg-subtle: #f8fafc;
  --surface: #ffffff;
  --text-primary: #1c1917;
  --text-secondary: #57534e;
  --text-muted: #78716c;
  --border: #e7e5e4;
  --border-light: #f5f5f4;

  /* Màu nền tối — dùng cho Topbar (đen) */
  --dark: #1c1a17;
  --dark-text: #f5efe6;
  --dark-soft: #b9ada0;
  --dark-line: #33302b;

  /* Semantic — mỗi trạng thái 1 màu riêng (không dùng cam cho tất cả trạng thái nữa).
     Cam chỉ còn giữ vai trò accent/active. "tip"/"warn" là alias tương thích code cũ. */
  --success: #0f6e56;      --success-bg: #e1f5ee;   /* thành công / còn hạn / đã sao chép */
  --error: #a32d2d;        --error-bg: #fcebeb;      /* lỗi / quá hạn */
  --warning: #854d0e;      --warning-bg: #fef9c3;    /* cảnh báo — vàng cam */
  --info: #1e40af;         --info-bg: #dbeafe;       /* thông tin — xanh dương */
  --note: #57534e;         --note-bg: #f5f5f4;       /* ghi chú — trung tính */
  --purple: #6d28d9;       --purple-bg: #f3e8ff;     /* phân nhóm phụ (không mang nghĩa trạng thái) */
  --tip: var(--success);   --tip-bg: var(--success-bg);
  --warn: var(--warning);  --warn-bg: var(--warning-bg);

  /* Kích thước & khoảng cách */
  --sidebar-w: 200px;
  --toc-w: 220px;
  --topbar-h: 70px;
  --subtab-h: 52px;
  --radius: 16px;
  --gap: 24px;
  /* Chiều rộng tối đa của vùng nội dung căn giữa (desktop) — chỉ ảnh hưởng màn hình ≥1200px,
     vì mọi nơi dùng var này đều là max-width nên ở màn hẹp hơn vẫn co theo viewport như cũ */
  --content-max: 1440px;
  /* Chiều rộng đọc thoải mái cho văn bản (đoạn văn/danh sách) trong bài viết,
     tách riêng khỏi --content-max để card/bảng/biểu đồ vẫn được dùng hết chiều rộng mới */
  --read-max: 760px;
  /* Khoảng cách trên/dưới gạch ngang phân đoạn giữa các <section> trong bài viết — đổi 1 chỗ này để chỉnh đều cho mọi trang */
  --section-divider-gap: 26px;
  /* Khoảng cách giữa label và ô input/textarea trong các form điền nhanh (wow-tool, v.v.) */
  --field-label-gap: 6px;

  /* ── Typography rules (bắt buộc, không override) ──────────────
     Font chính : Inter (body) + Inter (heading) — phải load từ Google Fonts
     Font size tối thiểu : 14px cho MỌI text nội dung (đổi từ 15px ngày 2026-07-28)
     Ngoại lệ duy nhất: UI chrome siêu nhỏ (badge uppercase, TOC indent)
     — phải comment rõ lý do nếu dùng < 14px
     Đổi cỡ chữ sàn: chỉ sửa --font-min bên dưới, mọi nơi dùng var(--font-min) sẽ tự cập nhật.
     ─────────────────────────────────────────────────────────── */
  --font-min: 15px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ===== BASE ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
code, pre { font-family: var(--font); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--font-min);
  color: var(--ink);
  background: #ffffff; /* nền trắng trơn */
  line-height: 1.6;
  overflow-x: hidden; /* cần thiết để dải nền full-width của .quicklinks không tạo thanh cuộn ngang */
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== TOPBAR (Tab cấp 1) ===== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 24px;
  /* Cùng công thức padding-inline với .hero để logo/brand thẳng hàng với nội dung Hero
     (không căn theo mép trình duyệt — co giãn theo cùng --content-max) */
  padding: 0 max(58px, calc((100vw - var(--content-max)) / 2 + 58px));
  min-height: var(--topbar-h);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.topbar__brand {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  justify-self: start; background: none; border-radius: 0;
  font-family: 'Faster One', sans-serif; font-size: 31px; font-weight: 400;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 60%, var(--accent-lighter) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.topbar__brand:hover { text-decoration: none; opacity: 0.85; }
.topbar__logo { height: 67px; width: auto; display: block; }
.tabbar {
  display: flex; gap: 2px;
  justify-self: center;
  overflow-x: auto; scrollbar-width: none;
}
.tabbar::-webkit-scrollbar { display: none; }
.tab {
  font-family: var(--font);
  padding: 10px 12px; border-radius: 999px;
  font-size: var(--font-min); font-weight: 600; white-space: nowrap;
  color: var(--ink);
}
.tab:hover { background: var(--canvas); text-decoration: none; }
button.tab { border: none; background: none; cursor: pointer; }
.tab.is-active { color: var(--accent); font-weight: 700; background: none; }

/* Tab trong tabbar chính: icon phía trên, nhãn phía dưới; tab active chữ + icon màu cam, không nền.
   min-width cố định để khoảng cách giữa các tab đều nhau dù nhãn dài ngắn khác nhau (Team vs Processes...). */
.tabbar .tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 6px 14px; border-radius: 12px; min-width: 92px;
  font-size: var(--font-min); font-weight: 700; color: var(--ink-soft);
}
.tabbar .tab__icon { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; }
.tabbar .tab__icon svg { width: 20px; height: 20px; stroke: currentColor; }
.tabbar .tab.is-active {
  background: none;
  color: var(--accent);
  font-weight: 700;
}
.tabbar .tab.is-active:hover { background: none; }

/* ===== SUBTABBAR (Tab cấp 2) ===== */
.subtabbar {
  position: sticky; top: var(--topbar-h); z-index: 45;
  display: flex; gap: 8px; align-items: center; justify-content: center;
  min-height: var(--subtab-h);
  padding: 0 24px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none;
}
.subtabbar::-webkit-scrollbar { display: none; }
.subtab {
  padding: 6px 14px; border-radius: 999px;
  border: 1.5px solid var(--line);
  font-size: var(--font-min); font-weight: 600; white-space: nowrap;
  color: var(--ink-soft);
}
.subtab:hover { text-decoration: none; filter: brightness(0.95); }

/* Mỗi mục 1 màu cố định — không chỉ đổi màu lúc active */
.subtab--blue   { background: var(--info-bg);   border-color: var(--info);   color: var(--info); }
.subtab--green  { background: var(--tip-bg);    border-color: var(--tip);    color: var(--tip); }
.subtab--purple { background: var(--purple-bg); border-color: var(--purple); color: var(--purple); }
.subtab--orange { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark); }

/* Trạng thái đang chọn: tô đặc màu của chính nó, chữ trắng — vẫn phân biệt được đang ở đâu */
.subtab.is-active.subtab--blue   { background: var(--info);   color: #fff; }
.subtab.is-active.subtab--green  { background: var(--tip);    color: #fff; }
.subtab.is-active.subtab--purple { background: var(--purple); color: #fff; }
.subtab.is-active.subtab--orange { background: var(--accent); color: #fff; }

/* ===== LAYOUT (sidebar dọc + content) ===== */
/* Mặc định 2 cột; >1200px thêm cột TOC bên phải */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  align-items: start;
  max-width: var(--content-max); margin: 0 auto;
}


/* ===== SIDEBAR DỌC (mục con trong 1 danh mục — thay Subtabbar ngang) ===== */
.page-sidebar {
  position: sticky; top: var(--topbar-h);
  align-self: start; height: calc(100vh - var(--topbar-h));
  overflow-y: auto; padding: 20px 12px;
  border-right: 1px solid var(--line); background: var(--paper);
}
.page-sidebar__title {
  display: none; /* bỏ nhãn danh mục (VD "Team Overview") ở đầu sidebar dọc theo yêu cầu */
  font-family: var(--font); font-weight: 700; font-size: var(--font-min);
  letter-spacing: 0; color: var(--ink-soft);
  padding: 0 12px 12px;
}
.page-sidebar__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.page-sidebar__item {
  font-family: var(--font);
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius);
  font-size: var(--font-min); font-weight: 600;
}
.page-sidebar__icon { font-size: 20px; flex-shrink: 0; width: 22px; text-align: center; }
.page-sidebar__icon svg { width: 18px; height: 18px; stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.page-sidebar__item:hover { background: var(--canvas); text-decoration: none; }
/* Item đang active (nền cam): icon trái luôn trắng cho nổi trên nền cam */
.page-sidebar__item.is-active .page-sidebar__icon svg { stroke: #fff; }

/* Mặc định 1 màu trung tính; mục đang chọn (is-active) chuyển màu cam đồng bộ với accent chung */
.page-sidebar__item { color: var(--ink-soft); }
.page-sidebar__item.is-active { background: var(--accent); color: #fff; }

/* Submenu thu gọn/mở rộng trong sidebar dọc (VD: Overview → Mission/Scope/Values/Structure)
   — render bởi components.js sidebar(), dữ liệu khai báo ở data/site-config.js */
.page-sidebar__item[data-has-submenu] { justify-content: space-between; }
.page-sidebar__chevron { font-size: 14px; color: var(--ink-soft); transition: transform .2s ease; margin-left: auto; }
.page-sidebar__item.is-active .page-sidebar__chevron { color: #fff; }
.page-sidebar__group.is-open > .page-sidebar__item .page-sidebar__chevron { transform: rotate(90deg); }
.page-sidebar__submenu {
  display: flex; flex-direction: column; gap: 2px;
  max-height: 0; overflow: hidden; padding-left: 34px;
  transition: max-height .25s ease;
}
.page-sidebar__group.is-open .page-sidebar__submenu { max-height: 260px; padding-top: 4px; padding-bottom: 4px; }
.page-sidebar__subitem {
  font-family: var(--font);
  /* Đã nâng lên 14px để tuân thủ quy tắc sàn font-size toàn site (không còn ngoại lệ). */
  font-size: 14px; font-weight: 500; color: var(--ink-soft);
  padding: 6px 10px; border-radius: 8px; line-height: 1.3;
}
.page-sidebar__subitem:hover { background: var(--canvas); text-decoration: none; color: var(--accent-dark); }
.page-sidebar__subitem.is-active { color: var(--accent); font-weight: 700; background: var(--accent-soft); }

/* ===== CONTENT ===== */
.content {
  /* Cố định luôn ở cột 2 (cột rộng) của .layout — nếu không, ngay lúc HTML vừa
     parse xong nhưng components.js chưa kịp đổ nội dung vào #wikiSidebar (đang
     rỗng, display:contents), .content sẽ bị auto-place tạm vào cột 1 (hẹp,
     dành cho sidebar) rồi "nhảy" sang cột đúng khi sidebar render xong — gây
     hiện tượng chữ bị bó hẹp/nhảy vị trí trong chớp mắt mỗi khi chuyển trang. */
  grid-column: 2;
  padding: 28px 40px 60px;
  background: var(--paper);
  min-height: calc(100vh - var(--topbar-h));
  font-size: var(--font-min);
}

/* Breadcrumb */
.breadcrumb { font-size: var(--font-min); color: var(--ink-soft); margin-bottom: 16px; }
.breadcrumb a { color: var(--ink-soft); } /* link breadcrumb màu xám thay vì cam */
.breadcrumb__sep { margin: 0 6px; color: var(--line); }
.breadcrumb__current { color: var(--ink); }

/* Page header */
.page-header__title {
  font-family: var(--font-heading); font-weight: 700;
  font-size: 18px; line-height: 1.8; margin: 0 0 8px; letter-spacing: -.01em;
  text-align: left;
  background: linear-gradient(90deg, var(--accent-dark) 0%, var(--accent) 50%, var(--accent-light) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-header__title::before { content: "🔸 "; -webkit-text-fill-color: initial; }
.page-header__desc { font-size: var(--font-min); color: var(--ink-soft); margin: 0 0 16px; }
.hub-back-link {
  position: fixed; right: max(24px, calc((100vw - var(--content-max)) / 2 + 24px)); bottom: 78px; z-index: 20;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--paper); border: 1.5px solid var(--accent-light); border-radius: 999px;
  padding: 10px 18px;
  box-shadow: 0 2px 10px var(--neutral-border);
  font-size: var(--font-min); font-weight: 700; color: var(--accent); text-decoration: none;
}
.hub-back-link:hover { background: var(--neutral-bg); text-decoration: none; }
.meta {
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center;
  padding: 12px 0 20px; border-bottom: 1px solid var(--line);
  font-size: var(--font-min); color: var(--ink-soft); margin-bottom: 28px;
}
.meta__item strong { color: var(--ink); font-weight: 600; }

/* Ghi chú nguồn tài liệu ở cuối bài (dẫn chiếu file/slide gốc) */
.source-note { font-size: var(--font-min); color: var(--ink-soft); }

/* Typography nội dung */
.article h2 {
  font-family: var(--font-heading); font-weight: 700;
  font-size: 16px; line-height: 1.8; margin: 28px 0 16px; padding-top: 4px; letter-spacing: 0;
  text-align: left;
  color: var(--accent);
  scroll-margin-top: calc(var(--topbar-h) + 12px);
}
.article h2::before {
  content: ""; display: inline-block; width: 15px; height: 15px; margin-right: 7px; vertical-align: -2px;
  background-color: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2l2.4 7.4H22l-6.2 4.5 2.4 7.4L12 16.8l-6.2 4.5 2.4-7.4L2 9.4h7.6z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2l2.4 7.4H22l-6.2 4.5 2.4 7.4L12 16.8l-6.2 4.5 2.4-7.4L2 9.4h7.6z'/%3E%3C/svg%3E") no-repeat center / contain;
}
/* Utility dùng chung: heading không đánh số nhưng vẫn muốn tắt sao (VD: Mục đích/Vai trò trên trang đã có heading đánh số khác) —
   trước đây mỗi trang tự khai báo lại .no-star/.no-bar nên dễ thiếu, giờ có sẵn ở đây dùng chung toàn wiki. */
.article h2.no-star::before { content: none; }
.article h2.no-bar { border-left: none; padding-left: 0; }
.article p { font-size: var(--font-min); margin: 0 0 14px; max-width: var(--read-max); }
.article h3, .article h4, .article h5, .article h6 { font-family: var(--font-heading); font-weight: 700; font-size: var(--font-min); margin: 16px 0 10px; color: var(--ink); }
.article ul, .article ol { font-size: var(--font-min); max-width: var(--read-max); }
/* Dùng cho đoạn/list cần hiển thị full-width thay vì bị bó hẹp theo --read-max như văn bản thân bài
   (VD: đứng cạnh bảng/card rộng, hoặc list có câu dài mà bó hẹp sẽ ngắt dòng xấu).
   Gắn thêm class "lead" vào <p>, <ul> hoặc <ol> trong .article cần full-width, không cần viết CSS riêng mỗi trang. */
.article p.lead, .article ul.lead, .article ol.lead { max-width: none; }
/* Card/box rộng dùng chung (kb-box, ll-card...) tự động full-width, không cần gắn "lead" tay từng trang —
   trước đây mỗi trang tự khai báo lại kb-box nên fix ở 1 trang không lan sang trang khác. */
.article .kb-box p, .article .kb-box ul, .article .kb-box ol,
.article .ll-card p, .article .ll-card ul, .article .ll-card ol,
.article .faq-a p, .article .faq-a ul, .article .faq-a ol,
.article .wow-flow-card p, .article .wow-flow-card ul, .article .wow-flow-card ol,
.article .wow-example p, .article .wow-example ul, .article .wow-example ol { max-width: none; }

/* Gạch ngang phân cách giữa các mảng nội dung (mỗi <section> trong bài viết) */
.article section + section {
  margin-top: var(--section-divider-gap);
  padding-top: var(--section-divider-gap);
  border-top: 1px solid var(--line);
}
/* h2 đầu tiên trong section đã có padding-top = --section-divider-gap lo khoảng cách với gạch ngang phía trên rồi,
   nếu để h2 tự cộng thêm margin-top riêng (28px) sẽ làm khoảng dưới gạch to hơn khoảng trên gạch. */
.article section + section > h2:first-child { margin-top: 0; }

.list { padding-left: 22px; margin: 0 0 14px; }
.list li { margin-bottom: 6px; }

/* ===== CALLOUT (4 biến thể) — mỗi loại 1 màu semantic riêng để phân biệt được bằng mắt,
   không phải "một màu cam bôi kín 4 loại" như trước ===== */
.callout {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 18px; margin: 16px 0;
  border-radius: var(--radius);
  border: 1.5px solid var(--neutral-border);
  background: var(--neutral-bg);
  box-shadow: 0 2px 10px var(--neutral-bg-strong);
  font-size: var(--font-min);
}
.callout__icon { flex-shrink: 0; font-size: 18px; line-height: 1.4; }
.callout__icon svg { width: 20px; height: 20px; stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.callout__body { min-width: 0; color: var(--ink); line-height: 1.6; }
.callout--info    { background: var(--neutral-bg); }
.callout--tip     { background: var(--neutral-bg); }
.callout--warning { background: var(--neutral-bg); }
.callout--note    { background: var(--neutral-bg); }
.callout--info .callout__icon svg    { stroke: var(--info); }
.callout--tip .callout__icon svg     { stroke: var(--tip); }
.callout--warning .callout__icon svg { stroke: var(--warn); }
.callout--note .callout__icon svg    { stroke: var(--note); }

/* ===== TABLE (đồng bộ style card chuẩn: viền cam nhạt bo góc, header nền cam nhạt) ===== */
.table-wrap {
  overflow-x: auto; overflow-y: hidden;
  border: 1.5px solid var(--neutral-border); border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(234,88,12,.07);
  margin: 8px 0 20px;
}
.table { width: 100%; border-collapse: collapse; margin: 0; font-size: var(--font-min); }
.table th, .table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table thead th {
  background: var(--neutral-bg);
  color: var(--accent); font-weight: 700;
  border-bottom: 1.5px solid var(--neutral-border); white-space: nowrap;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--neutral-bg); }
/* Ô nhóm (rowspan gộp nhiều dòng) — canh giữa ngang & dọc thay vì top/left mặc định */
.table td.group-cell { text-align: center; vertical-align: middle; border: 1.5px solid var(--neutral-border); }

/* ===== BADGE & TAG ===== */
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: var(--font-min); font-weight: 600;
}
.badge--active { background: var(--tip-bg); color: var(--tip); }
.tag {
  display: inline-block; padding: 2px 10px; border-radius: var(--radius);
  background: var(--neutral-bg); color: var(--accent-dark);
  font-size: var(--font-min); font-weight: 600;
}

/* ===== FAQ (accordion) ===== */
.faq__item { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; overflow: hidden; }
.faq__q {
  width: 100%; text-align: left; cursor: pointer;
  padding: 14px 16px; border: none; background: var(--paper);
  font: inherit; font-weight: 600; font-size: 17px; color: var(--ink);
}
.faq__q:hover { background: var(--canvas); }
.faq__q::after { content: "+"; float: right; color: var(--ink-soft); }
.faq__q.is-open::after { content: "−"; }
.faq__a { display: none; padding: 0 16px 14px; font-size: 17px; }
.faq__q.is-open + .faq__a { display: block; }

/* ===== PARTNER PORTFOLIO (accordion render từ partner-data.js) ===== */
.partner-filter {
  width: 100%; max-width: 360px; padding: 10px 16px; font-size: var(--font-min); font-family: var(--font);
  border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--paper); color: var(--ink); margin-bottom: 16px;
}
.partner-filter:focus { outline: none; border-color: var(--accent); }
.partner-filter::placeholder { color: var(--ink-soft); }
.partner-item { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; overflow: hidden; }
.partner-q {
  width: 100%; text-align: left; cursor: pointer;
  padding: 14px 16px; border: none; background: var(--paper);
  font: inherit; font-weight: 600; font-size: 17px; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.partner-q:hover { background: var(--canvas); }
.partner-q__zh { font-weight: 400; color: var(--ink-soft); font-size: var(--font-min); }
.partner-q__count { font-weight: 400; color: var(--ink-soft); font-size: var(--font-min); }
.partner-q__chevron { flex-shrink: 0; color: var(--ink-soft); transition: transform .15s; }
.partner-q.is-open .partner-q__chevron { transform: rotate(180deg); }
.partner-body { display: none; padding: 0 16px 16px; }
.partner-body__license { font-size: var(--font-min); color: var(--ink-soft); margin: 0 0 10px; }
.partner-q__expired {
  display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px;
  background: var(--warn-bg); color: var(--warn); font-size: var(--font-min); font-weight: 700;
}
.partner-contact-cell { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.partner-contact-text { white-space: pre-line; }
.partner-copy-btn {
  flex-shrink: 0; cursor: pointer; white-space: nowrap;
  font-family: var(--font); font-size: var(--font-min); font-weight: 600;
  padding: 3px 8px; border-radius: 999px; line-height: 1.3;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink-soft);
}
.partner-copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.partner-copy-btn.is-copied { border-color: var(--tip); color: var(--tip); }

/* ===== HOME: banner cảnh báo game quá hạn giấy phép (JS đổ nội dung, ẩn nếu rỗng) ===== */
.license-banner {
  display: flex; gap: 10px; align-items: flex-start;
  max-width: var(--content-max); margin: 0 auto; padding: 12px 40px;
  background: var(--warn-bg); border-left: 4px solid var(--warn);
  font-size: var(--font-min); line-height: 1.6;
}
.license-banner__text { color: var(--ink); }
.license-banner__text strong { color: var(--warn); }
.license-banner__text a { color: var(--accent-dark); text-decoration: underline; margin: 0 2px; }
.license-banner__note { color: var(--ink-soft); }

/* ===== RELATED CARDS ===== */
/* Bỏ hẳn khối "Các mục trong [danh mục]" ở cuối bài — sidebar dọc đã đủ lo việc điều hướng
   giữa các trang con, khối này chỉ trùng lặp (và nhiều nơi vẫn còn link "#" chưa gắn thật).
   Ẩn nguyên cả <section> chứa .related (kể cả tiêu đề h2 phía trên) chứ không chỉ ẩn .related,
   để không còn sót lại tiêu đề mồ côi không có nội dung bên dưới. */
.article section:has(.related) { display: none; }
.related { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.card {
  display: block; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper);
  transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,.06); text-decoration: none; }
.card__title { display: block; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.card__desc { display: block; font-size: var(--font-min); color: var(--ink-soft); }

/* ===== CARD LƯỚI ĐÁNH SỐ (num-card) ===== */
/* Dùng cho: liệt kê nguyên tắc/giá trị/bước theo dạng ô ngang, có số thứ tự.
   Dùng lại 3 màu semantic sẵn có (accent/tip/info) để không phá bảng màu. */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin: 8px 0 20px;
}
.num-card {
  background: var(--paper); border-radius: var(--radius);
  padding: 20px; border-top: 4px solid var(--accent);
  box-shadow: 0 1px 3px var(--neutral-bg-strong);
}
.num-card--b { border-top-color: var(--tip); }
.num-card--c { border-top-color: var(--info); }
.num-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.num-card__num {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-family: var(--font-heading); font-weight: 700; font-size: var(--font-min);
  display: flex; align-items: center; justify-content: center;
}
.num-card--b .num-card__num { background: var(--tip); }
.num-card--c .num-card__num { background: var(--info); }
.num-card__icon { font-size: 23px; }
.num-card__title { font-family: var(--font-heading); font-size: 19px; font-weight: 700; margin: 0 0 8px; color: var(--ink); }
.num-card__desc { font-size: var(--font-min); color: var(--ink-soft); margin: 0; line-height: 1.6; }

/* ===== CHECK CARD (card chuẩn: header icon/số + checklist tick cam) =====
   Style chốt dùng chung cho mọi card dạng "nhóm nội dung + danh sách gạch đầu dòng"
   kể từ nay. Không dùng màu ngoài hệ cam để giữ đúng quy tắc đơn sắc của wiki. */
.check-card-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; margin: 8px 0 20px; align-items: stretch;
}
@media (max-width: 1000px) { .check-card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .check-card-grid { grid-template-columns: 1fr; } }
.check-card {
  background: var(--paper); border: 1.5px solid var(--neutral-border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 2px 10px rgba(234,88,12,.07);
}
.check-card__head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 22px;
  background: var(--neutral-bg);
  border-bottom: 1.5px solid var(--neutral-border);
}
.check-card__icon {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 700; font-size: 16px;
}
.check-card__icon svg { width: 20px; height: 20px; stroke: var(--accent); fill: none; stroke-width: 2; }
.check-card__head .check-card__title { font-family: var(--font); font-weight: 700; font-size: 16px; color: var(--accent); margin: 0; }
.check-card__body { list-style: none; margin: 0; padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.check-card__body li { display: flex; align-items: flex-start; gap: 12px; }
.check-card__check {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; margin-top: 1px;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--font-min); font-weight: 700; line-height: 1;
}
.check-card__text { font-size: var(--font-min); color: var(--ink); line-height: 1.6; text-align: justify; }
.check-card__text strong { color: var(--accent); font-weight: 700; }
.check-card .check-card__desc { margin: 0; padding: 14px 22px; font-size: var(--font-min); color: var(--ink-soft); font-style: italic; line-height: 1.6; }
.check-card__desc + .check-card__body { padding-top: 1px; }

/* ===== SCOPE CARD LIST (In/Out of Scope dạng card ngang, thay cho bảng rowspan) ===== */
.scope-group { margin-bottom: 24px; }
.scope-group:last-child { margin-bottom: 0; }
.scope-group .scope-group__title {
  font-family: var(--font-heading); font-size: var(--font-min); font-weight: 700;
  color: var(--accent); margin: 0 0 12px;
}
.scope-card-list { display: flex; flex-direction: column; gap: 10px; }
.scope-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-radius: 14px;
  background: var(--paper); border: 1.5px solid var(--accent-lighter);
  box-shadow: 0 2px 10px rgba(234,88,12,.06);
}
.scope-card .check-card__icon { background: var(--accent); }
.scope-card .check-card__icon svg { stroke: #fff; }
.scope-card__body { font-size: var(--font-min); color: var(--ink); line-height: 1.6; }
.scope-card__body strong { color: var(--ink); font-weight: 700; }
/* Biến thể "loại trừ" cho Out of Scope: icon dấu X thay vì check */
.scope-card--x .check-card__icon { background: rgba(67,20,7,.08); color: var(--accent-darkest); }
.scope-card--x .check-card__icon svg { stroke: var(--accent-darkest); }

/* ===== PRINCIPLE CARD (3 nguyên tắc làm việc — icon tròn viền cam, số mờ cạnh icon) ===== */
.principle-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px; margin: 8px 0 20px;
  background: var(--canvas); border-radius: var(--radius);
  padding: 40px 32px;
}
.principle-card__combo {
  display: block; width: 100%; max-width: 300px; height: auto; margin-bottom: 12px;
}
.principle-card__title {
  font-family: var(--font-heading); font-size: 25px; font-weight: 700;
  margin: 0 0 10px; color: var(--ink);
}
.principle-card__desc {
  font-size: 17px; color: var(--ink-soft); margin: 0; line-height: 1.6;
}

/* ===== VALUE CARD (3 giá trị cốt lõi — tiêu đề Anh/Việt, khung quote, gạch cam, list) ===== */
.value-grid {
  display: flex; flex-wrap: wrap; align-items: stretch;
  gap: 24px; margin: 16px 0 24px;
}
.value-card {
  flex: 1 1 240px;
  display: flex; flex-direction: column; align-items: center;
  background: var(--canvas); border: 1px solid var(--accent-lighter);
  border-radius: var(--radius); padding: 28px 22px 24px;
}
.value-card__icon {
  flex-shrink: 0; width: 76px; height: 76px; border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin: 0 0 16px;
}
.value-card__title {
  font-family: var(--font-heading); font-weight: 800; text-transform: uppercase;
  text-align: center; letter-spacing: 0; line-height: 1.3;
  font-size: 19px; color: var(--accent-dark); margin: 0 0 16px;
}
.value-card__title::after {
  content: ""; display: block; width: 40px; height: 3px;
  background: var(--accent); margin: 10px auto 0;
}
.value-card__title-vi { display: block; color: var(--accent); }
.value-card__quote {
  margin-bottom: 18px; min-height: 130px;
  display: flex; align-items: flex-start; justify-content: center;
}
.value-card__quote p { font-size: 17px; text-align: center; color: var(--ink-soft); margin: 0; }
@media (max-width: 720px) {
  .value-card__quote { min-height: 0; }
}
.value-card__divider {
  width: 100%; height: 0; border: none; border-top: 2px dashed var(--accent-light);
  margin: 0 0 20px;
}
.value-card__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; align-self: stretch; }
.value-card__list li { padding-left: 28px; position: relative; font-size: 17px; }
.value-card__list li::before {
  content: "✓"; position: absolute; left: 0; top: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: var(--font-min); font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}

/* ===== KHỐI SO SÁNH 2 CỘT (split-compare) ===== */
/* Dùng cho: Nên làm / Không nên làm, Before / After, Power Off / Power On... */
.split-compare {
  display: grid; grid-template-columns: 1fr 1fr;
  margin: 8px 0 20px; border-radius: var(--radius); overflow: hidden;
  border: 1.5px solid var(--accent); background: transparent;
}
.split-compare__col { padding: 20px 24px; background: transparent; }
.split-compare--off { border-right: 1px solid var(--accent-soft); }
.split-compare__label {
  font-family: var(--font-heading); font-weight: 700; font-size: var(--font-min);
  letter-spacing: 0; text-transform: uppercase; margin-bottom: 12px;
}
.split-compare--off .split-compare__label { color: var(--warn); }
.split-compare--on .split-compare__label { color: var(--tip); }
.split-compare__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 17px; }
.split-compare__list li { display: flex; align-items: center; gap: 8px; }
.split-compare__list li::before { font-weight: 700; }
.split-compare--off .split-compare__list li::before { content: "✕"; color: var(--warn); }
.split-compare--on .split-compare__list li::before { content: "✓"; color: var(--tip); }

/* ===== KHỐI SO SÁNH 2 CỘT VAI TRÒ (role-compare) ===== */
/* Dùng cho: Member / Mentor, hoặc các cặp vai trò khác — không có ý nghĩa đúng/sai như split-compare.
   Nền kính mờ (glass) trắng xám, phân biệt 2 cột bằng viền trên màu thay vì nền màu. */
.role-compare {
  display: grid; grid-template-columns: 1fr 1fr;
  margin: 8px 0 20px;
}
.role-compare__col { padding: 4px 24px; }
.role-compare__col--member { border-right: 1px solid var(--line); padding-left: 4px; }
.role-compare__col--mentor { padding-right: 4px; }
.role-compare__label {
  font-family: var(--font-heading); font-weight: 700; font-size: var(--font-min);
  letter-spacing: 0; text-transform: uppercase; margin-bottom: 12px;
  text-align: center;
}
.role-compare__col--member .role-compare__label { color: var(--info); }
.role-compare__col--mentor .role-compare__label { color: var(--purple); }
.role-compare__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 17px; }
.role-compare__list li { padding-left: 22px; position: relative; }
.role-compare__list li::before { content: "✓"; position: absolute; left: 0; font-weight: 700; }
.role-compare__col--member .role-compare__list li::before { color: var(--info); }
.role-compare__col--mentor .role-compare__list li::before { color: var(--purple); }

@media (max-width: 640px) {
  .role-compare { grid-template-columns: 1fr; }
  .split-compare { grid-template-columns: 1fr; }
}

/* ===== HOME: QUICK-LINK CARDS (6 danh mục chính) ===== */
/* Nền trải full màn hình: bỏ max-width, dùng width:100vw + margin âm để tràn viền,
   rồi bù lại bằng padding max(40px, ...) để 6 ô vẫn thẳng hàng với nội dung như cũ */
.quicklinks {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  width: 100%; margin: 8px auto 10px;
  padding: 19px max(48px, calc((100vw - var(--content-max)) / 2 + 48px)) 32px;
  border-radius: 0; /* bo tròn không hiển thị được khi nền chạm sát viền màn hình nên bỏ luôn */
  /* nền giống Hero: Hero đang không set màu riêng nên để trong suốt, lộ màu --canvas của body */
  background: transparent;
}
.quick-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 12px 14px;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(0,0,0,.096), 0 3px 6px rgba(0,0,0,.06); /* giảm 40% so với trước */
  transition: background .15s, border-color .15s, box-shadow .15s, transform .15s;
}
.quick-card:hover {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 14px 28px rgba(0,0,0,.12); /* giảm 40% so với trước */
  transform: translateY(-2px);
  text-decoration: none;
}
.quick-card:hover .quick-card__title,
.quick-card:hover .quick-card__desc { color: #fff; }
.quick-card__icon { width: 65px; height: 65px; object-fit: contain; flex-shrink: 0; }
.quick-card__icon-emoji { font-size: 41px; line-height: 1; width: 56px; text-align: center; flex-shrink: 0; }
.quick-card__body { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.quick-card__title { font-family: var(--font); font-weight: 700; font-size: var(--font-min); color: var(--ink); }
.quick-card__desc {
  display: none; /* ẩn dòng mô tả — chỉ giữ tên danh mục màu cam */
  font-size: var(--font-min); font-weight: 700; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
  transform: translateY(-10%);
}

/* ===== HOME: HERO ===== */
/* hero__top: 2 cột (text | illustration). Bên dưới, tách biệt: hero__mini-grid — 5 card "Bắt đầu nhanh" xếp hàng ngang. */
.hero {
  --hero-scale: 1.44;
  width: 100vw; margin: 0 calc(50% - 50vw);
  box-sizing: border-box;
  padding: calc(62px * var(--hero-scale)) max(58px, calc((100vw - var(--content-max)) / 2 + 58px)) 26px;
  background-color: var(--canvas);
  background-image:
    linear-gradient(rgba(32,28,24,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32,28,24,.05) 1px, transparent 1px);
  background-size: 32px calc(32px * var(--hero-scale));
  border-radius: 0;
}
.hero__top {
  display: grid; grid-template-columns: 1.4fr 0.7fr; gap: 48px; align-items: start;
}
.hero__text { min-width: 0; }
.hero__eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font); font-size: 14px; font-weight: 700; letter-spacing: 0;
  text-transform: uppercase; color: var(--accent); margin: 4px 0 60px;
}
.hero__eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent); flex-shrink: 0; }
.hero__art { display: flex; align-items: center; justify-content: center; width: 90%; margin-left: auto; margin-top: 0; transform: translateX(-10%); }
.hero__art svg, .hero__art img { width: 100%; height: auto; flex-shrink: 0; }
.hero__title {
  font-family: "Be Vietnam Pro", var(--font-heading); font-weight: 800; font-size: 54px; line-height: 1.95;
  letter-spacing: -.01em; margin: 0 0 30px; text-wrap: balance;
  color: var(--ink);
}
.hero__title-hl { color: var(--accent); }
.hero__title-sub2 { font-size: .9em; }
.hero__desc {
  font-size: 17px; font-weight: 400; line-height: 1.6; color: var(--ink-soft); margin: 0 0 24px; transform: translateY(40px); max-width: 70%;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; text-overflow: ellipsis;
}
.hero__cta {
  display: inline-block; padding: 11px 23px; background: var(--accent); color: #fff;
  border-radius: 999px; font-weight: 700; font-size: var(--font-min);
}
.hero__cta:hover { background: var(--accent-dark); text-decoration: none; }

/* Ô tìm kiếm — nằm cuối khối hero__text */
.hero__search { position: relative; width: 75%; max-width: 588px; margin: 30px 0 0; }
.mid-search-wrap {
  width: 100vw; margin: -100px calc(50% - 50vw) 0; box-sizing: border-box;
  padding: 36px max(58px, calc((100vw - var(--content-max)) / 2 + 58px)) 40px;
  display: flex; justify-content: flex-start;
}
.hero__search-icon {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  color: var(--accent); pointer-events: none;
}
.hero__search-input {
  width: 100%; padding: 14px 46px 14px 22px; font-size: 17px; font-family: var(--font);
  border: 1.5px solid var(--line); border-radius: 8px;
  background: var(--paper); color: var(--ink);
  box-shadow: 0 2px 10px rgba(32,28,24,.05);
}
.hero__search-input:focus { outline: none; border-color: var(--accent); }
.hero__search-input::placeholder { color: var(--ink-soft); }
.hero__search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 10;
  list-style: none; margin: 0; padding: 8px; max-height: 320px; overflow-y: auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(0,0,0,.14);
}
.hero__search-results li + li { border-top: 1px solid var(--line); }
.hero__search-results a { display: block; padding: 10px 12px; border-radius: 10px; }
.hero__search-results a:hover { background: var(--canvas); text-decoration: none; }
.hero__search-result-title { display: block; font-weight: 600; color: var(--ink); font-size: var(--font-min); }
.hero__search-result-desc {
  display: block; font-size: var(--font-min); color: var(--ink-soft); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 6 card "Bắt đầu nhanh" — section RIÊNG, tách khỏi .hero (không còn nằm trong section hero).
   Bảng màu riêng theo spec card (không dùng token --accent chung của site). */
.quickstart-section {
  width: 100vw; margin: 0 calc(50% - 50vw); box-sizing: border-box;
  padding: 0 max(58px, calc((100vw - var(--content-max)) / 2 + 58px)) 48px;
}
.hero__mini-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; margin-top: 40px; transform: translateY(-70px); }
/* .hero__mini-card = outer slot, giữ nguyên aspect-ratio gốc (2/3) và neo nội dung xuống đáy,
   để __inner co ngắn 20% chiều cao mà cạnh dưới không đổi vị trí. */
.hero__mini-card {
  display: block; position: relative;
  aspect-ratio: 2 / 3.9;
  color: var(--ink); text-decoration: none;
  pointer-events: none;
}
.hero__mini-card:hover { text-decoration: none; }
.hero__mini-card__inner {
  --mc-primary: var(--accent-light);
  --mc-secondary: var(--accent-lighter);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  position: absolute; left: 0; bottom: 0; width: 100%; box-sizing: border-box;
  pointer-events: auto;
  padding: 21px 17px;
  background: linear-gradient(to bottom, #FFF8F1 0%, #FFF8F1 50%, #FFFFFF 50%, #FFFFFF 100%);
  border: 1px solid rgba(250, 137, 64, .16);
  border-radius: 20px;
  box-shadow: 0 0 0 4px #FFFFFF, 0 10px 26px rgba(250, 137, 64, .16);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.hero__mini-card:hover .hero__mini-card__inner {
  border-color: rgba(250, 137, 64, .32);
  box-shadow: 0 0 0 4px #FFFFFF, 0 14px 32px rgba(250, 137, 64, .22);
  transform: translateY(-2px);
}
.hero__mini-card__icon { display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.hero__mini-card__icon svg { width: 73px; height: 73px; }
.hero__mini-card__title {
  display: block; min-width: 0; font-size: 14px; font-weight: 700; color: var(--mc-primary);
  padding-bottom: 8px; margin-bottom: 8px; border-bottom: 2px solid var(--mc-primary);
}
.hero__mini-card__desc {
  display: -webkit-box; min-width: 0; font-size: 14px; line-height: 1.6; color: var(--ink-soft);
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero__mini-card__arrow { display: none; }

@media (max-width: 900px) {
  .hero { padding: 34px 24px 48px; }
  .hero__top { grid-template-columns: 1fr; }
  /* height:180px cũ chỉ đủ cho ảnh minh hoạ tĩnh trước đây — thẻ "Rút quẻ hôm nay"
     hiện cao hơn nhiều (widget + thẻ ~360px), height cứng làm cắt mất thẻ. Bỏ height
     cố định, để tự co theo nội dung, thêm margin-bottom tách khỏi "Game Studio 2". */
  .hero__art { order: -1; height: auto; width: 100%; margin: 0 auto 28px; }
  .hero__mini-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .hero__mini-grid { grid-template-columns: 1fr; }
}

/* Quicklinks: co xuống 2 cột trước khi tới mốc mobile 768px (nơi đã có sẵn rule xuống 1 cột),
   tránh cảm giác "không đổi gì" khi kéo màn hình từ full width xuống từ từ */
@media (max-width: 1100px) {
  .quicklinks { grid-template-columns: repeat(3, 1fr); }
}

/* ===== HOME: "You may need" — dải nền màu, cuộn ngang ===== */
.needs { background: var(--neutral-bg); padding: 47px 0 57px; }
.needs__head {
  display: flex; justify-content: space-between; align-items: flex-end;
  max-width: var(--content-max); margin: 0 auto 20px; padding: 0 40px; gap: 16px; flex-wrap: wrap;
}
.needs__title { font-family: var(--font-heading); font-size: 26px; font-weight: 700; margin: 0 0 4px; color: var(--ink); }
.needs__sub { font-size: var(--font-min); color: var(--ink-soft); margin: 0; }
.needs__nav { display: flex; gap: 8px; flex-shrink: 0; }
.needs__nav button {
  width: 34px; height: 34px; border-radius: 50%; border: none;
  background: var(--paper); color: var(--accent-dark); font-size: 19px; cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.needs__nav button:hover { background: var(--accent); color: #fff; }
.needs__row {
  display: flex; gap: 16px; overflow-x: auto; scroll-behavior: smooth;
  max-width: var(--content-max); margin: 0 auto; padding: 0 40px 4px; scrollbar-width: none;
}
.needs__row::-webkit-scrollbar { display: none; }
.need-card { flex: 0 0 220px; background: var(--paper); border-radius: var(--radius); padding: 18px; }
.need-card__icon { font-size: 26px; margin-bottom: 10px; display: block; }
.need-card__title { font-family: var(--font-heading); font-weight: 700; font-size: 18px; color: var(--ink); margin-bottom: 4px; }
.need-card__desc { font-size: var(--font-min); color: var(--ink-soft); }

/* ===== HOME: tiêu đề section (VD "Bắt đầu nhanh", "Duyệt theo danh mục") ===== */
.section-head { max-width: var(--content-max); margin: 24px auto 12px; padding: 0 40px; }
.section-head__title { font-family: var(--font-heading); font-size: 23px; font-weight: 700; color: var(--ink); margin: 0; }
.section-head__sub { font-size: var(--font-min); color: var(--ink-soft); margin: 6px 0 0; }

/* ===== HOME: Bắt đầu nhanh — 5 thẻ lối tắt theo nhu cầu ===== */
.quickstart-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px;
  max-width: var(--content-max); margin: 0 auto 8px; padding: 0 40px;
}
.quickstart-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 16px; color: var(--ink);
}
.quickstart-card:hover { border-color: var(--accent); text-decoration: none; box-shadow: 0 8px 20px rgba(0,0,0,.08); }
.quickstart-card__icon {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
}
.quickstart-card__icon svg { width: 20px; height: 20px; }
.quickstart-card__title { font-family: var(--font-heading); font-weight: 700; font-size: 15px; color: var(--accent-light); }
.quickstart-card__desc { font-size: var(--font-min); color: var(--ink-soft); line-height: 1.6; flex: 1; }
.quickstart-card__arrow { font-size: var(--font-min); font-weight: 700; color: var(--accent); }
@media (max-width: 1100px) { .quickstart-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .quickstart-grid { grid-template-columns: 1fr; } }

.proj-list, .contact-list { list-style: none; margin: 0; padding: 0; }
.proj-list li {
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.proj-list li:last-child { border-bottom: none; }
.proj-list__info { display: flex; flex-direction: column; gap: 2px; font-size: var(--font-min); }
.proj-list__meta { font-size: var(--font-min); color: var(--ink-soft); }
.status { font-size: var(--font-min); font-weight: 600; padding: 2px 10px; border-radius: 999px; white-space: nowrap; flex-shrink: 0; }
.status--ok { background: #e1f5ee; color: #0f6e56; } /* còn hạn — xanh lá */
.status--warn { background: var(--accent-lighter); color: var(--accent-dark); } /* sắp hết hạn ≤90 ngày — cam */
.status--soon { background: var(--accent-soft); color: var(--accent-dark); } /* cận hạn — cam nhạt */
.status--risk { background: #fcebeb; color: #a32d2d; } /* quá hạn — đỏ */

/* ===== PARTNER PORTFOLIO: dashboard thẻ thống kê ===== */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 4px 0 20px; }
.stat-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px;
}
.stat-card__num { font-family: var(--font-heading); font-size: 31px; font-weight: 700; line-height: 1.1; color: var(--ink); }
.stat-card__label { font-size: var(--font-min); color: var(--ink-soft); margin-top: 6px; }
.stat-card--danger .stat-card__num { color: #a32d2d; }
.stat-card--soon .stat-card__num { color: var(--accent-dark); }
.stat-card--ok .stat-card__num { color: #0f6e56; }
@media (max-width: 900px) { .stat-cards { grid-template-columns: repeat(2, 1fr); } }

.contact-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; font-size: var(--font-min); }
.contact-list li strong { display: block; }
.contact-list__icon { font-size: 21px; line-height: 1.3; flex-shrink: 0; }
.contact-list__icon svg { width: 20px; height: 20px; stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.contact-list__sub { font-size: var(--font-min); color: var(--ink-soft); }

@media (max-width: 900px) {
  .home-panels { grid-template-columns: 1fr; }
}


/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed; bottom: 24px; right: max(24px, calc((100vw - var(--content-max)) / 2 + 24px)); z-index: 20;
  width: 42px; height: 42px; border-radius: 50%;
  border: none; cursor: pointer; font-size: 20px;
  background: var(--accent); color: #fff;
  box-shadow: 0 2px 10px var(--neutral-border);
  opacity: 0; visibility: hidden; transition: opacity .2s;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; }

/* ===== FOOTER ===== */
.footer {
  text-align: center; padding: 24px; font-size: var(--font-min); color: var(--ink-soft);
  background: var(--paper); border-top: 1px solid var(--line);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* Màn hình trung bình (tablet / laptop nhỏ): ẩn sidebar dọc để content rộng hơn */
@media (max-width: 1100px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .content { grid-column: 1; }
  .page-sidebar { display: none; }
}

/* Mobile: sidebar dọc → thanh pill ngang cuộn được, nằm ngay dưới Topbar
   (giữ điều hướng giữa các trang trong cùng danh mục mà không tốn chỗ dọc) */
@media (max-width: 768px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .page-sidebar {
    display: block; position: static; height: auto; width: 100%;
    padding: 10px 16px;
    border-right: none; border-bottom: 1px solid var(--line);
    overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none;
  }
  .page-sidebar::-webkit-scrollbar { display: none; }
  .page-sidebar__list { flex-direction: row; flex-wrap: nowrap; gap: 8px; }
  .page-sidebar__group { display: contents; }
  .page-sidebar__item {
    flex-shrink: 0; white-space: nowrap;
    border: 1.5px solid var(--line); border-radius: 999px;
  }
  .page-sidebar__item.is-active { border-color: var(--accent); }
  /* Submenu thu gọn không hợp với dải ngang — ẩn trên mobile, vào trang rồi cuộn tới mục con */
  .page-sidebar__chevron, .page-sidebar__submenu { display: none; }
  .topbar { grid-template-columns: 1fr; padding: 10px 16px; min-height: auto; row-gap: 8px; }
  .topbar__brand { justify-self: center; width: 100%; }
  .tabbar { justify-self: stretch; width: 100%; order: 3; }
  .content { padding: 20px 18px 48px; border-right: none; }
  .page-header__title { font-size: 30px; }

  /* Home: quicklinks/hero/banner co lại vừa màn hình, không tràn ngang */
  .quicklinks { grid-template-columns: repeat(2, 1fr); padding: 20px; }
  .hero { padding: 24px 24px 38px; }
  .hero__title { font-size: 29px; }
  .hero__search { max-width: 100%; }
  .license-banner { padding: 12px 18px; flex-wrap: wrap; }

  /* Bảng dữ liệu (table, kể cả bảng PIC ở Partner Portfolio): cho phép bẻ dòng các chuỗi dài
     không có khoảng trắng (Wechat ID, email...) để bảng tự co vừa màn hình, không đẩy tràn cả trang */
  .table td, .table th { word-break: break-word; }
  .partner-q { flex-wrap: wrap; }
  .partner-contact-cell { flex-wrap: wrap; }
}

/* ===== TEAM OVERVIEW: ORG CHART ===== */
.org-tree {
  display: flex; flex-direction: column; align-items: center;
  padding: 24px; background: var(--canvas);
  border-radius: var(--radius); margin: 8px 0 4px;
}
.org-box {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; background: var(--paper);
  border: 1.5px solid var(--accent-lighter); border-radius: 12px;
  min-width: 180px;
}
.org-box--lead { border-color: var(--accent); background: var(--neutral-bg); }
.org-box__icon { font-size: 23px; flex-shrink: 0; }
.org-box__name { display: block; font-weight: 700; font-size: var(--font-min); color: var(--ink); }
.org-box__sub  { display: block; font-size: var(--font-min); color: var(--ink-soft); }
.org-root-connector { width: 2px; height: 24px; background: var(--line); }
.org-levels { display: flex; justify-content: center; gap: 16px; }
.org-col { display: flex; flex-direction: column; align-items: center; position: relative; }
.org-col::before {
  content: ''; position: absolute; top: 0; height: 2px; background: var(--line);
}
.org-col:first-child::before  { left: 50%; right: -8px; }
.org-col:nth-child(2)::before { left: -8px; right: -8px; }
.org-col:last-child::before   { left: -8px; right: 50%; }
.org-vert { width: 2px; height: 24px; background: var(--line); }

/* ===== TEAM OVERVIEW: ORG CHART V2 (multi-level) ===== */
.org-v2 {
  background: var(--canvas); border-radius: var(--radius);
  padding: 20px 24px; margin: 8px 0 4px;
  display: flex; flex-direction: column; gap: 2px;
}
.org-v2__row {
  display: flex; align-items: flex-start; gap: 14px; padding: 8px 0;
  border-top: 1px solid var(--line);
}
.org-v2__row:first-child { border-top: none; }
.org-v2__level {
  font-size: var(--font-min); font-weight: 700; color: var(--ink-soft);
  width: 20px; flex-shrink: 0; padding-top: 12px; text-align: right;
}
.org-v2__nodes { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.org-v2__node {
  border: 1.5px solid var(--line); border-radius: 8px;
  padding: 8px 14px; background: var(--paper);
  min-width: 130px; text-align: center;
}
.org-v2__node--l3  { border-color: var(--accent); background: var(--neutral-bg); }
.org-v2__node--l2  { border-color: var(--accent-dark); }
.org-v2__name { display: block; font-weight: 700; font-size: var(--font-min); color: var(--ink); }
.org-v2__name--l3 { color: var(--accent); }
.org-v2__name--l2 { color: var(--accent-dark); }
.org-v2__sub { display: block; font-size: var(--font-min); color: var(--ink-soft); margin-top: 2px; }

/* ===== TEAM OVERVIEW: ORG CHART WITH LINES ===== */
.oc-wrap {
  background: var(--canvas); border-radius: var(--radius);
  padding: 28px 20px 20px; margin: 8px 0 4px;
}

/* Root node (XuongTK) — centered, creates vertical line below */
.oc-root {
  display: flex; justify-content: center;
  position: relative; margin-bottom: 20px;
}
.oc-root::after {
  content: '';
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  width: 2px; height: 20px; background: var(--line);
}

/* 3-column branch grid */
.oc-cols {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 20px;
}

/* Hàng L2 manager — 6 cột, CucTT và NhaTT3 span 2 */
.oc-mgr-band {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 10px; margin-bottom: 10px;
}
.oc-mgr-cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.oc-mgr-cell--span2 { grid-column: span 2; }

/* Hàng L1 — 6 cột đều nhau */
.oc-l1-band {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

/* Each branch column — horizontal + vertical connectors at top */
.oc-col {
  display: flex; flex-direction: column; align-items: center;
  position: relative; padding-top: 20px;
}
/* Horizontal segment (gap=20px → half=10px) */
.oc-col:nth-child(1)::before { content: ''; position: absolute; top: 0; left: 50%; right: -10px; height: 2px; background: var(--line); }
.oc-col:nth-child(2)::before { content: ''; position: absolute; top: 0; left: -10px; right: -10px; height: 2px; background: var(--line); }
.oc-col:nth-child(3)::before { content: ''; position: absolute; top: 0; left: -10px; right: -10px; height: 2px; background: var(--line); }
.oc-col:nth-child(4)::before { content: ''; position: absolute; top: 0; left: -10px; right: 50%; height: 2px; background: var(--line); }
/* Vertical segment from horizontal down */
.oc-col::after {
  content: ''; position: absolute; top: 0; left: 50%;
  transform: translateX(-50%); width: 2px; height: 20px; background: var(--line);
}

/* Manager box wrapper — creates vertical line to children */
.oc-col-mgr {
  display: flex; flex-direction: column; align-items: center; width: 100%;
}
.oc-col-mgr::after {
  content: ''; width: 2px; height: 16px; background: var(--line); flex-shrink: 0;
}
/* Direct branch: dashed label instead of manager box */
.oc-direct-label {
  font-size: var(--font-min); font-weight: 600; color: var(--ink-soft);
  padding: 5px 12px; border: 1.5px dashed var(--line); border-radius: 6px;
}

/* Children list */
.oc-col-children {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%;
}
.oc-col--direct .oc-col-children {
  grid-template-columns: 1fr;
}

/* Node box */
.oc-node {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid var(--line); border-radius: 8px;
  background: var(--paper); text-align: center;
}
.oc-node--l3 { border-color: var(--accent); background: var(--neutral-bg); width: calc((100% - 40px) / 3); }
.oc-node--l2 { border-color: var(--accent-dark); }
.oc-node__name { display: block; font-weight: 700; font-size: var(--font-min); color: var(--ink); }
.oc-node__name--l3 { color: var(--accent); }
.oc-node__name--l2 { color: var(--accent-dark); }
.oc-node__sub  { display: block; font-size: var(--font-min); color: var(--ink-soft); margin-top: 2px; }
.oc-node__tag  {
  display: inline-block; font-size: var(--font-min); font-weight: 700; color: var(--ink-soft);
  padding: 1px 6px; border-radius: 999px; background: var(--canvas); margin-top: 4px;
}

@media (max-width: 768px) {
  .oc-cols { grid-template-columns: 1fr; gap: 12px; }
  .oc-col { padding-top: 0; }
  .oc-col::before, .oc-col::after { display: none; }
  .oc-root::after { display: none; }
  .oc-root { margin-bottom: 8px; }
}

/* ===== TEAM OVERVIEW: MEMBER TABLE ===== */
.member-table-wrap {
  border: 1.5px solid var(--accent-lighter);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(234,88,12,.07);
}
.member-table {
  width: 100%; border-collapse: collapse; font-size: var(--font-min);
}
.member-table thead tr {
  background: var(--neutral-bg);
}
.member-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: var(--font-min); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0;
  color: var(--accent);
  border-bottom: 1.5px solid var(--accent-lighter);
  white-space: nowrap;
}
.member-table td {
  padding: 12px 16px;
  vertical-align: middle;
  border-bottom: 1px solid var(--accent-lighter);
  color: var(--ink);
  font-size: var(--font-min);
}
.member-table tbody tr:last-child td { border-bottom: none; }
.member-table tbody tr:hover td { background: var(--accent-soft); }

/* Generic data table — same look as member-table, for non-member tabular data */
.data-table-wrap {
  border: 1.5px solid var(--accent-lighter);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(234,88,12,.07);
}
.data-table {
  width: 100%; border-collapse: collapse; font-size: var(--font-min);
}
.data-table thead tr {
  background: var(--neutral-bg);
}
.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: var(--font-min); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0;
  color: var(--accent);
  border-bottom: 1.5px solid var(--accent-lighter);
  white-space: nowrap;
}
.data-table td {
  padding: 12px 16px;
  vertical-align: middle;
  border-bottom: 1px solid var(--accent-lighter);
  color: var(--ink);
  font-size: var(--font-min);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--accent-soft); }
.member-cell {
  display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: var(--font-min);
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-soft); border: 2px solid var(--accent-lighter);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.role-badge { display: inline-block; font-size: var(--font-min); font-weight: 600; }
.role-badge--lead    { color: var(--accent); }
.role-badge--pm      { color: var(--accent-dark); }
.role-badge--coord   { color: var(--accent-light); }
.role-badge--support { color: var(--accent-darkest); }
.teams-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 6px;
  background: #5059c9; color: #fff;
  font-size: var(--font-min); font-weight: 700; text-decoration: none; flex-shrink: 0;
}
.teams-link:hover { background: #3b45a1; text-decoration: none; }
.contact-email-cell { display: flex; align-items: center; gap: 8px; font-size: var(--font-min); }

/* ===== TEAM OVERVIEW: STATUS BADGES (product portfolio) ===== */
.status--live { background: #e1f5ee; color: #0f6e56; }
.status--dev  { background: #dbeafe; color: #1e40af; }
.status--plan { background: #fef9c3; color: #854d0e; }

/* ===== TEAM OVERVIEW: STAKEHOLDER GROUP LABEL ===== */
.stakeholder-group-label {
  font-size: var(--font-min); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0; color: var(--ink-soft);
  margin: 0 0 10px; padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.stakeholder-supergroup-label {
  font-size: var(--font-lg, 1.05rem); font-weight: 700;
  color: var(--accent); margin: 0 0 12px;
}

/* ===== Generic anchor target for sidebar submenu jumps (multi-section pages) ===== */
.anchor-section { scroll-margin-top: calc(var(--topbar-h) + 12px); }

/* ===== TEAM OVERVIEW: CONTACT INFO LIST ===== */
.contact-info { display: flex; flex-direction: column; gap: 10px; margin: 8px 0; }
.contact-info__row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 14px; background: var(--canvas); border-radius: 10px; font-size: var(--font-min);
}
.contact-info__icon { font-size: 19px; flex-shrink: 0; margin-top: 2px; }
.contact-info__label { display: block; font-weight: 600; color: var(--ink-soft); font-size: var(--font-min); margin-bottom: 2px; }
.contact-info__value { display: block; color: var(--ink); }

/* ===== TEAM OVERVIEW: QUICK LINKS GRID ===== */
.quick-links-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.quick-link-card {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; background: var(--canvas);
  border: 1px solid var(--line); border-radius: 10px;
  font-size: var(--font-min); font-weight: 600; color: var(--accent);
  transition: border-color .15s, background .15s;
}
.quick-link-card:hover { border-color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.quick-link-card__icon { font-size: 17px; flex-shrink: 0; }

/* ===== TEAM OVERVIEW: 2-COL LAYOUT (Contact + Quick Links) ===== */
.section-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 900px) {
  .section-2col { grid-template-columns: 1fr; }
  .quick-links-2col { grid-template-columns: 1fr; }
  .org-levels { gap: 8px; }
}

/* Tôn trọng người dùng tắt hiệu ứng chuyển động */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ============================================================
   SHARED COMPONENTS — generated from data/site-config.js
   ============================================================ */
#wikiHeader, #wikiSidebar, #wikiBreadcrumb, #wikiToc { display: contents; }
.hero__search-results a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; color: var(--ink); }
.hero__search-results a:hover { background: var(--canvas); text-decoration: none; }
.hero__search-results span { font-size: var(--font-min); color: var(--ink-soft); }
.search-empty { padding: 12px; color: var(--ink-soft); }
.toc__link { display: block; padding: 5px 0; color: var(--ink-soft); font-size: var(--font-min); line-height: 1.6; }
.toc__link--h3 { padding-left: 14px; font-size: var(--font-min); }
.toc__link:hover { color: var(--accent); text-decoration: none; }
.template-card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.template-card { display:flex; flex-direction:column; min-height:210px; padding:20px; border:1px solid var(--line); border-radius:var(--radius); background:var(--paper); box-shadow:0 8px 24px rgba(32,28,24,.06); }
.template-card__head { margin-bottom:12px; }
.template-card__tag { display:inline-flex; padding:4px 9px; border-radius:999px; background:var(--neutral-bg); color:var(--accent-dark); font-size:var(--font-min); font-weight:700; }
.template-card h3 { margin:0 0 8px; font-size:18px; }
.template-card p { flex:1; margin:0 0 16px; color:var(--ink-soft); }
.template-card__action { font-weight:700; }
@media (max-width: 900px) { .template-card-grid { grid-template-columns:1fr 1fr; } }

/* ============================================================
   CATEGORY CARD GRID — "inscope" style
   Dùng cho: nhóm nội dung chia theo danh mục (In Scope, Steps, Pillars…)
   Cấu trúc:
     <div class="cat-grid">
       <div class="cat-card">
         <div class="cat-card__header">
           <div class="cat-card__icon"><!-- SVG --></div>
           <span class="cat-card__title">Tên nhóm</span>
         </div>
         <ul class="cat-list">
           <li><span class="cat-check">…</span><span>Nội dung</span></li>
         </ul>
       </div>
     </div>
   ============================================================ */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 4px;
}
.cat-card {
  border: 1.5px solid var(--neutral-border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 2px 10px rgba(234,88,12,.07);
}
.cat-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--neutral-bg);
  border-bottom: 1.5px solid var(--neutral-border);
}
.cat-card__icon {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}
.cat-card__icon svg { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cat-card__title {
  font-size: var(--font-min);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0;
}
.cat-list {
  list-style: none;
  margin: 0; padding: 14px 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.cat-list li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: var(--font-min); color: var(--ink); line-height: 1.6;
}
.cat-cell { display: flex; align-items: center; gap: 8px; }
.cat-check {
  width: 18px; height: 18px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 3px;
}
@media (max-width: 800px) { .cat-grid { grid-template-columns: 1fr; } }

/* ============================================================
   FLOW STEPS — numbered horizontal workflow stepper
   Dùng cho: quy trình, working flow, step-by-step
   Cấu trúc:
     <div class="flow-steps">
       <div class="flow-step">
         <div class="flow-step__track">
           <div class="flow-step__num">1</div>
           <div class="flow-step__line"></div>   ← bỏ ở step cuối
         </div>
         <div class="flow-step__card">
           <div class="flow-step__icon"><!-- SVG --></div>
           <p class="flow-step__title">Tên bước</p>
           <p class="flow-step__desc">Mô tả ngắn.</p>
         </div>
       </div>
     </div>
   ============================================================ */
.flow-steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  position: relative;
}
/* Connecting line chạy qua tâm tất cả các số */
.flow-steps::before {
  content: '';
  position: absolute;
  top: 17px; /* = half chiều cao số (34px / 2) */
  left: 12.5%; /* tâm step 1 trong 4 cột đều = 1/8 */
  right: 12.5%; /* tâm step 4 từ phải */
  height: 2px;
  background: linear-gradient(to right, var(--accent), var(--accent-lighter));
  z-index: 0;
}
.flow-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.flow-step__track {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
  width: 100%;
}
.flow-step__num {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: var(--font-min); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(234,88,12,.28);
}
.flow-step__card {
  width: calc(100% - 12px);
  padding: 16px;
  background: var(--neutral-bg);
  border: 1.5px solid var(--neutral-border);
  border-radius: 14px;
}
.flow-step__icon {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  margin-bottom: 10px;
}
.flow-step__title {
  font-size: var(--font-min); font-weight: 700;
  color: var(--accent);
  margin: 0 0 5px;
}
.flow-step__desc {
  font-size: var(--font-min); color: var(--ink-soft);
  line-height: 1.6; margin: 0;
}
@media (max-width: 800px) {
  .flow-steps { flex-direction: column; gap: 12px; }
  .flow-steps::before { display: none; }
  .flow-step__card { width: 100%; }
}

/* ============================================================
   MEMBER CARDS — lưới thành viên team
   Cấu trúc:
     <div class="member-grid">
       <div class="member-card">
         <div class="member-card__avatar">🧑</div>
         <div class="member-card__body">
           <div class="member-card__name">Họ tên</div>
           <div class="member-card__handle">@username</div>
           <span class="role-pill role-pill--lead">Vai trò</span>
           <div class="member-card__projects">Dự án A, B</div>
           <div class="member-card__contact">email · <a class="teams-link">T</a></div>
         </div>
       </div>
     </div>
   ============================================================ */
.member-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.member-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border: 1.5px solid var(--neutral-border);
  border-radius: 14px;
  background: var(--neutral-bg);
  box-shadow: 0 2px 10px rgba(234,88,12,.07);
}
.member-card__avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 2px solid var(--accent-lighter);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.member-card__body { flex: 1; min-width: 0; }
.member-card__name { font-size: var(--font-min); font-weight: 700; color: var(--ink); margin-bottom: 1px; }
.member-card__handle { font-size: var(--font-min); color: var(--ink-soft); margin-bottom: 7px; }
.member-card__projects { font-size: var(--font-min); color: var(--ink-soft); margin-top: 7px; line-height: 1.6; }
.member-card__contact { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: var(--font-min); color: var(--ink-soft); }

/* Role pill badges — dùng trong member card */
.role-pill { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: var(--font-min); font-weight: 600; }
.role-pill--lead    { background: rgba(234,88,12,.15);  color: var(--accent); }
.role-pill--pm      { background: rgba(154,52,18,.15);  color: var(--accent-dark); }
.role-pill--coord   { background: rgba(251,146,60,.20); color: var(--accent-dark); }
.role-pill--support { background: rgba(67,20,7,.10);    color: var(--accent-darkest); }

/* Knowledge category tag — same orange family as role-pill, one shade per category */
.kb-tag { display: inline-block; font-size: var(--font-min); font-weight: 600; padding: 2px 9px; border-radius: 20px; margin-right: 4px; }
.kb-tag--comm { background: rgba(234,88,12,.10);  color: var(--accent); }
.kb-tag--plan { background: rgba(234,88,12,.20);  color: var(--accent); }
.kb-tag--proc { background: rgba(154,52,18,.15);  color: var(--accent-dark); }
.kb-tag--tech { background: rgba(154,52,18,.28);  color: var(--accent-dark); }
.kb-tag--pub  { background: rgba(67,20,7,.10);     color: var(--accent-darkest); }
.kb-tag--game { background: rgba(67,20,7,.20);     color: var(--accent-darkest); }

/* Contact chips & report chain */
.contact-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.contact-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 14px;
  background: var(--neutral-bg);
  border: 1px solid var(--neutral-border);
  border-radius: 20px;
  font-size: var(--font-min); font-weight: 600;
  color: var(--accent-dark);
}
.report-chain { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.report-chain__step {
  padding: 5px 14px;
  background: var(--neutral-bg);
  border-radius: 20px;
  font-size: var(--font-min); font-weight: 600;
  color: var(--accent-dark);
}
.report-chain__arrow { color: var(--accent-light); font-weight: 700; font-size: var(--font-min); }

/* cat-grid modifier */
.cat-grid--2col { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 680px) {
  .member-grid { grid-template-columns: 1fr; }
  .cat-grid--2col { grid-template-columns: 1fr; }
}

/* cat-x — dùng thay cat-check khi muốn biểu thị "ngoài phạm vi / không áp dụng" */
.cat-x {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 3px;
  color: var(--accent);
}
@media (max-width: 600px) { .template-card-grid { grid-template-columns:1fr; } }

/* Tabs — pill lớn, dễ nhận biết và dễ bấm */
.ob-tabs { display: flex; gap: 10px; margin-bottom: 24px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.ob-tab { appearance: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; background: var(--paper); border: 1.5px solid var(--line); cursor: pointer; font-family: var(--font); font-weight: 700; font-size: var(--font-min); color: var(--ink-soft); white-space: nowrap; padding: 10px 18px; border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.03); transition: color .15s ease, background .15s ease, border-color .15s ease, transform .15s ease; }
.ob-tab__icon { display: flex; width: 20px; height: 20px; align-items: center; justify-content: center; color: var(--accent); }
.ob-tab__icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ob-tab:hover { color: var(--accent-dark); border-color: var(--accent-lighter); background: var(--accent-soft); transform: translateY(-1px); }
.ob-tab.is-active { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); box-shadow: 0 3px 8px rgba(234,88,12,.12); }
.ob-tabpanel { display: none; }
.ob-tabpanel.is-active { display: block; }
@media (max-width: 600px) { .ob-tabs { gap: 8px; margin-right: -8px; } .ob-tab { min-height: 42px; padding: 9px 14px; } }

/* ============================================================
   WOW COMPONENTS — bộ khối dùng chung cho các trang ways-of-working
   (Communication, Task & Execution, Decision & Escalation, Risk & Issue,
   Partner Engagement, Meeting Facilitation, System & Improvement, Working Principles).
   Dồn về đây để mọi trang dùng đúng 1 nguồn cách dòng/khoảng cách — không khai báo lại trong <style> riêng từng trang.
   ============================================================ */
.wow-note { font-size: var(--font-min); color: var(--ink-soft); margin: 0 0 4px; line-height: 1.6; }
.wow-list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wow-list:last-child { margin-bottom: 0; }
.wow-list li { padding-left: 14px; position: relative; font-size: var(--font-min); color: var(--ink); line-height: 1.6; }
.wow-list li::before { content: "•"; position: absolute; left: 0; color: var(--accent); font-weight: 700; font-size: var(--font-min); line-height: 1.6; }
.wow-callout {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; border-radius: 12px; margin: 8px 0 16px;
  background: var(--paper); border: 1.5px solid var(--neutral-border);
  font-size: var(--font-min); font-weight: 400; line-height: 1.6; color: var(--ink);
}
.wow-callout::before {
  content: "☆"; flex-shrink: 0;
  width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff;
  font-size: var(--font-min);
  display: flex; align-items: center; justify-content: center;
}
.wow-callout strong { color: var(--accent); font-weight: 700; }
.wow-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 16px; }
.wow-chain__step { background: var(--neutral-bg-strong); color: var(--ink); font-weight: 700; font-size: var(--font-min); padding: 6px 12px; border-radius: 20px; }
.wow-chain__arrow { color: var(--accent-light); font-weight: 700; }
.wow-table-wrap { overflow-x: auto; border: 1.5px solid var(--neutral-border); border-radius: var(--radius); box-shadow: 0 2px 10px rgba(234,88,12,.07); margin: 4px 0 16px; }
.wow-table { width: 100%; border-collapse: collapse; font-size: var(--font-min); }
.wow-table th { background: var(--neutral-bg); color: var(--accent-dark); font-weight: 700; font-size: var(--font-min); padding: 10px 14px; text-align: left; border-bottom: 1.5px solid var(--neutral-border); }
.wow-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--ink); vertical-align: top; font-size: var(--font-min); line-height: 1.55; }
.wow-table tbody tr:last-child td { border-bottom: none; }
.wow-table tbody tr:hover td { background: var(--neutral-bg); }
.wow-check-list { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 16px; }
.wow-check-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper); cursor: pointer; }
.wow-check-item input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; cursor: pointer; }
.wow-check-item span { font-size: var(--font-min); color: var(--ink); line-height: 1.6; }
.wow-check-item.is-checked { border-color: var(--accent-light); background: var(--accent-soft); }
.wow-tool { margin: 4px 0 16px; }
.wow-tool__field { margin-bottom: 12px; }
.wow-tool__field:last-of-type { margin-bottom: 14px; }
.wow-tool__field label { display: block; font-size: var(--font-min); font-weight: 700; color: var(--accent-dark); margin-bottom: var(--field-label-gap); }
.wow-tool__field textarea, .wow-tool__field input[type="text"] {
  width: 100%; box-sizing: border-box; border: 1.5px solid var(--accent-lighter); border-radius: 10px;
  padding: 10px 12px; font-size: var(--font-min); font-family: inherit; color: var(--ink); background: var(--paper); resize: vertical;
}
.wow-tool__field textarea:focus, .wow-tool__field input:focus { outline: none; border-color: var(--accent); }
.wow-tool__actions { display: flex; align-items: center; gap: 12px; }
.wow-tool__copy { background: var(--accent); color: #fff; border: none; border-radius: 20px; padding: 9px 20px; font-size: var(--font-min); font-weight: 700; cursor: pointer; font-family: inherit; }
.wow-tool__copy:hover { background: var(--accent-dark); }
.wow-tool__status { font-size: var(--font-min); color: var(--ink-soft); }
.wow-sub { margin: 22px 0 0; }
.wow-sub:first-child { margin-top: 0; }
.wow-sub__title {
  font-family: 'Inter', sans-serif; font-size: var(--font-min); font-weight: 700;
  color: var(--accent-dark); margin: 0 0 10px;
}

/* ===== Mục đích / Vai trò — card 2 cột đầu mỗi trang quy trình (ways-of-working) ===== */
.mp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 4px 0 16px; align-items: stretch; }
.mp-grid--single { grid-template-columns: 1fr; }
@media (max-width: 760px) { .mp-grid { grid-template-columns: 1fr; } }
.mp-card { border-radius: 16px; padding: 12px 22px; display: flex; flex-direction: column; }
.mp-card--purpose { background: var(--paper); border: 1.5px dashed var(--accent-light); }
.mp-card--role { background: var(--paper); border: 1.5px dashed var(--accent-light); }
.mp-card__head { display: flex; align-items: center; gap: 16px; margin-bottom: 11px; }
.mp-card__icon { width: 44px; height: 44px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.mp-card__icon svg { width: 44px; height: 44px; }
.article h2.mp-card__title { font-family: var(--font-heading); font-weight: 800; font-size: 16px; margin: 0; padding-top: 0; line-height: 1.3; scroll-margin-top: calc(var(--topbar-h) + 12px); }
.mp-card--purpose h2.mp-card__title { color: var(--accent); }
.mp-card--role h2.mp-card__title { color: var(--accent-dark); }
.mp-card__head .mp-card__subtitle { margin: 2px 0 0; }
.mp-card__subtitle { font-size: var(--font-min); color: var(--ink-soft); margin: 2px 0 0; }
.mp-card ul.mp-list { list-style: none; margin: 0; padding: 0; max-width: none; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.mp-list li { position: relative; padding-left: 18px; font-size: var(--font-min); color: var(--ink); line-height: 1.6; }
.mp-list li::before { content: ""; position: absolute; left: 0; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.mp-freq { display: flex; align-items: center; gap: 12px; background: var(--neutral-bg); border-radius: 12px; padding: 14px 16px; margin-top: 16px; }
.mp-freq__icon { width: 26px; height: 26px; flex-shrink: 0; }
.mp-freq__icon svg { width: 26px; height: 26px; }
.mp-freq p { margin: 0; font-size: var(--font-min); color: var(--ink); line-height: 1.6; }
.mp-role-list { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.mp-role { display: flex; align-items: center; gap: 14px; background: var(--neutral-bg); border-radius: 12px; padding: 14px 16px; }
.mp-role__icon { width: 38px; height: 38px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.mp-role__icon svg { width: 38px; height: 38px; }
.mp-role p.mp-role__name { font-family: var(--font-heading); font-weight: 700; font-size: var(--font-min); color: var(--ink); margin: 0; }
.mp-role ul.mp-role__list { list-style: none; margin: 0; padding: 0; max-width: none; display: flex; flex-direction: column; gap: 4px; }
.mp-role__list li { position: relative; padding-left: 14px; font-size: var(--font-min); color: var(--ink); line-height: 1.6; }
.mp-role__list li::before { content: "•"; position: absolute; left: 0; color: var(--ink-soft); }

/* Lane-flow connectors — đường nối SVG giữa các .lane-step kế tiếp trong 1 quy trình
   (áp dụng chung cho mọi trang *-processes.html và popup Documents/Game Hub, vẽ bởi
   laneConnectors() trong assets/js/components.js). */
.lane-connectors { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 1; }
