/* LabManager — website giới thiệu. Token màu/chữ kế thừa labmanager-style-guide.md (app), thoáng và lớn hơn.
 * Ngôn ngữ hình ảnh: ảnh chụp thật của app xếp lớp (cửa sổ phía sau, mảnh giao diện nổi phía trước) trên nền
 * giấy kẻ ô như biểu đồ nội kiểm. Không dùng thuộc tính style="" trong HTML — CSP chỉ cho style-src 'self'. */
@font-face { font-family: "Nunito"; src: url("/assets/fonts/Nunito.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("/assets/fonts/NunitoSans.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }

:root {
  --bg: #fafafa; --surface: #ffffff; --surface-2: #f4f4f5; --field: #ffffff;
  --ink: #18181b; --muted: #71717a; --line: #e4e4e7; --line-strong: #d4d4d8;
  --primary: #1e293b; --primary-contrast: #ffffff;
  --accent: #0f766e; --accent-ink: #0f766e; --accent-soft: rgba(15, 118, 110, 0.10);
  --success: #16a34a; --warning: #d97706; --danger: #dc2626; --info: #0284c7;
  --shadow: 0 2px 10px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 18px 50px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 40px 90px -24px rgba(15, 23, 42, 0.30), 0 14px 30px -14px rgba(15, 23, 42, 0.16);
  --frag-shadow: drop-shadow(0 22px 34px rgba(15, 23, 42, 0.17)) drop-shadow(0 3px 6px rgba(15, 23, 42, 0.06));
  --grid-line: rgba(15, 23, 42, 0.055);
  --bezel: #111114;
  --radius: 6px; --radius-lg: 12px; --radius-xl: 18px;
  --font-head: "Nunito", "Segoe UI", system-ui, sans-serif;
  --font-body: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --container: 1200px; --gutter: 16px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0c0c0e; --surface: #161618; --surface-2: #1f1f23; --field: #1f1f23;
  --ink: #e4e4e7; --muted: #a1a1aa; --line: #2a2a30; --line-strong: #3f3f46;
  --primary: #e4e4e7; --primary-contrast: #18181b;
  --accent: #2dd4bf; --accent-ink: #5eead4; --accent-soft: rgba(45, 212, 191, 0.14);
  --success: #4ade80; --warning: #fbbf24; --danger: #f87171; --info: #38bdf8;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 40px 90px -20px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
  --frag-shadow: drop-shadow(0 22px 34px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 1px rgba(255, 255, 255, 0.14));
  --grid-line: rgba(255, 255, 255, 0.045);
  --bezel: #2a2a2e;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
main { overflow-x: clip; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 800; line-height: 1.15; margin: 0 0 0.4em; letter-spacing: -0.01em; text-wrap: balance; color: var(--ink); }
h1 { font-size: clamp(38px, 5.6vw, 64px); letter-spacing: -0.02em; }
h2 { font-size: clamp(28px, 3.4vw, 42px); letter-spacing: -0.015em; }
h3 { font-size: 20px; }
h4 { font-size: 15px; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--font-mono); font-size: 0.92em; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 24px; } }
.skip { position: absolute; left: -999px; top: 8px; background: var(--primary); color: var(--primary-contrast); padding: 8px 12px; border-radius: var(--radius); z-index: 100; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[id] { scroll-margin-top: 84px; }

/* ===== Nút ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: var(--radius); font-family: var(--font-body); font-weight: 600; font-size: 16px; border: 1px solid transparent; cursor: pointer; transition: background 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease); white-space: nowrap; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: var(--primary-contrast); }
.btn-primary:hover { opacity: 0.92; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover { background: var(--surface-2); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 17px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius); border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.actions.center { justify-content: center; }

/* ===== Header ===== */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; font-size: 20px; color: var(--ink); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav-links { display: none; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a:not(.btn) { color: var(--muted); font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: var(--radius); }
.nav-links a:not(.btn):hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.nav-cta { margin-left: 8px; }
.nav-tools { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links ~ .nav-tools { margin-left: 0; }
.ico-moon { display: none; }
:root[data-theme="dark"] .ico-sun { display: none; }
:root[data-theme="dark"] .ico-moon { display: block; }
@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-burger { display: none; }
}
@media (max-width: 899px) {
  .nav-links.open { display: flex; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch; gap: 2px; padding: 12px var(--gutter) 16px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); }
  .nav-links.open a:not(.btn) { padding: 12px; font-size: 16px; }
  .nav-links.open .nav-cta { margin: 8px 0 0; height: 46px; font-size: 16px; }
}

/* ===== Khối trang ===== */
section { padding: 80px 0; }
@media (min-width: 900px) { section { padding: 112px 0; } }
.alt { background: var(--surface-2); }
:root[data-theme="dark"] .alt { background: #111114; }
.section-head { max-width: 700px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .lead { margin-bottom: 0; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }
.eyebrow { display: inline-block; font-family: var(--font-body); font-weight: 700; font-size: 13px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 12px; }
.lead { font-size: 19px; color: var(--muted); max-width: 52ch; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.ref { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); margin: 20px 0 0; letter-spacing: 0.01em; }
.ref.center { text-align: center; }
.grid { display: grid; gap: 20px; }
.grid-2, .grid-3 { grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid-2, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin-top: 4px; }
.card p:last-child { margin-bottom: 0; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding-left: 26px; margin-bottom: 8px; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 7px; width: 14px; height: 8px; border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg); }
.num-list { counter-reset: n; list-style: none; padding: 0; margin: 0; }
.num-list li { counter-increment: n; position: relative; padding-left: 44px; margin-bottom: 14px; }
.num-list li::before { content: counter(n); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: var(--primary-contrast); font-family: var(--font-head); font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips.center { justify-content: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.chip.mono { font-family: var(--font-mono); font-size: 13px; color: var(--ink); }
.chip b { color: var(--ink); font-weight: 700; }

/* Tiện ích thay cho style="" (CSP) */
.pb-page { padding-bottom: 88px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.items-start { align-items: start; }

/* ===== Nền giấy kẻ ô — motif biểu đồ nội kiểm ===== */
.paper { position: relative; isolation: isolate; }
.paper::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 28px 28px; background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 75%);
}

/* ===== Ảnh chụp giao diện ===== */
picture.shot { display: block; }
picture.shot img { display: block; width: 100%; height: auto; }
.frag img { filter: var(--frag-shadow); }
/* Cửa sổ app kiểu trình duyệt */
.window { border-radius: 12px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-xl); }
.window-bar { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.window-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); flex: none; }
.window-url { flex: 0 1 280px; margin: 0 auto; transform: translateX(-16px); padding: 2px 12px; border-radius: 6px; background: var(--bg); color: var(--muted); font-family: var(--font-mono); font-size: 11.5px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Khung điện thoại */
.phone { background: var(--bezel); border-radius: 34px; padding: 7px; box-shadow: var(--shadow-xl); }
.phone img { border-radius: 27px; }
/* Sân khấu xếp lớp: mọi con nằm chồng trong một ô lưới, vị trí chỉnh bằng lề % theo từng bố cục */
.stage { display: grid; position: relative; }
.stage > * { grid-area: 1 / 1; min-width: 0; }

/* ===== Hero ===== */
.hero { padding: 64px 0 112px; text-align: center; }
@media (min-width: 900px) { .hero { padding: 88px 0 136px; } }
.hero h1 { font-size: clamp(40px, 6.6vw, 78px); max-width: 13ch; margin: 0 auto 20px; }
.hero h1 .hl { color: var(--accent-ink); }
.hero .lead { font-size: clamp(18px, 1.6vw, 21px); margin: 0 auto 30px; max-width: 44ch; }
.hero .actions { justify-content: center; margin-bottom: 22px; }
.hero .chips { justify-content: center; }
.hero-stage { max-width: 1120px; margin: 60px auto 0; }
.hero-stage.paper::before { inset: -60px -8% -40px; }
.hero-window { width: 86%; justify-self: center; }
.hero-board { width: 350px; justify-self: start; align-self: end; margin-bottom: -48px; z-index: 2; text-align: left; }
.hero-phone { width: 196px; justify-self: end; align-self: end; margin-bottom: -72px; z-index: 2; }
@media (max-width: 1039px) {
  .hero-window { width: 94%; }
  .hero-board { width: 310px; }
  .hero-phone { width: 150px; }
}
@media (max-width: 759px) {
  .hero-stage { margin-top: 44px; }
  .hero-stage > .stage { display: block; }
  .hero-window { width: 100%; }
  .hero-board { width: auto; margin: -64px 10px 0; position: relative; }
  .hero-phone { display: none; }
}

/* Bảng nhắc hạn chạy thật — nổi trên cửa sổ ở hero */
.board { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); overflow: hidden; }
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.board-head h3 { font-size: 14.5px; margin: 0; }
.board-clock { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.board-list { list-style: none; margin: 0; padding: 0; }
.board-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); align-items: center; transition: background 400ms var(--ease); }
.board-row:last-child { border-bottom: 0; }
.board-row:nth-child(n+5) { display: none; }
.board-row.pulse { background: var(--accent-soft); }
.board-title { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.board-sub { font-size: 12px; color: var(--muted); }
.board-due { font-family: var(--font-mono); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; padding: 3px 9px; border-radius: 999px; font-weight: 700; }
.due-overdue { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.due-today { background: color-mix(in srgb, var(--warning) 16%, transparent); color: var(--warning); }
.due-soon { background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--info); }
.due-ok { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.due-done { background: var(--surface-2); color: var(--muted); text-decoration: line-through; }

/* ===== Bảy phân hệ (trang chủ): băng chuyền — thẻ giữa nổi bật, hai bên nhỏ và mờ, gói trong khung nội dung ===== */
.carousel { --tile-w: min(78vw, 400px); --tile-h: 360px; --fade: 0px; position: relative; }
@media (min-width: 760px) { .carousel { --tile-w: 460px; --tile-h: 430px; --fade: 32px; } }
@media (min-width: 1040px) { .carousel { --tile-w: 560px; --tile-h: 470px; --fade: 56px; } }
/* Không JS: một hàng thẻ cuộn ngang trong khung nội dung */
.carousel-stage { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 0 24px; }
.carousel-stage > .tile { flex: 0 0 var(--tile-w); height: var(--tile-h); scroll-snap-align: center; }
/* Có JS (site.js thêm .is-ready): thẻ xếp chồng giữa sân khấu; site.js đặt --x --s --o --b theo độ lệch so với thẻ giữa */
.carousel.is-ready .carousel-stage {
  display: block; position: relative; height: calc(var(--tile-h) + 72px); padding: 0;
  overflow: hidden; overflow: clip; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent);
}
.carousel.is-ready .carousel-stage > .tile {
  position: absolute; top: 24px; left: 50%; width: var(--tile-w); margin-left: calc(var(--tile-w) / -2);
  transform: translateX(var(--x, 0px)) scale(var(--s, 1)); opacity: calc(1 - (1 - var(--o, 1)) * var(--fade-k, 1)); filter: blur(var(--b, 0px));
  transition: transform 560ms var(--ease), opacity 560ms var(--ease), filter 560ms var(--ease), border-color 200ms var(--ease), box-shadow 200ms var(--ease);
  will-change: transform, opacity;
}
.carousel.is-ready .tile.is-active { box-shadow: var(--shadow-lg); }
.carousel.is-ready .tile:not(.is-active) { cursor: pointer; }
.carousel.is-ready .tile:not(.is-active):hover { opacity: min(1, calc(var(--o, 1) + 0.2)); box-shadow: none; }
.carousel.is-ready .tile:not(.is-active):hover .tile-go { transform: none; color: var(--muted); border-color: var(--line); }
.carousel.is-ready .tile:not(.is-active):hover .tile-art > .a1 { transform: none; }
.carousel.dragging .carousel-stage { cursor: grabbing; }
.carousel.dragging .carousel-stage > .tile { transition: none; }
/* Nút hai bên, giữa chiều cao thẻ */
.carousel-btn { position: absolute; top: calc((var(--tile-h) + 72px) / 2); z-index: 5; display: grid; place-items: center; width: 48px; height: 48px; margin-top: -24px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); cursor: pointer; transition: background 160ms var(--ease), border-color 160ms var(--ease); }
.carousel-btn svg { width: 20px; height: 20px; }
.carousel-btn:hover { background: var(--surface-2); border-color: var(--muted); }
.carousel-prev { left: 0; }
.carousel-next { right: 0; }
.carousel-btn[hidden], .carousel-dots[hidden] { display: none; }
/* Chấm vị trí: chấm dài = thẻ đang ở giữa; vùng bấm 26px */
.carousel-dots { position: relative; z-index: 5; display: flex; justify-content: center; gap: 2px; margin-top: -18px; } /* đè lên đáy sân khấu (định vị) nên cần z-index để bấm được */
.carousel-dot { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; background: none; cursor: pointer; }
.carousel-dot::before { content: ""; width: 8px; height: 8px; border-radius: 4px; background: var(--line-strong); transition: width 240ms var(--ease), background 240ms var(--ease); }
.carousel-dot:hover::before { background: var(--muted); }
.carousel-dot[aria-current="true"]::before { width: 22px; background: var(--ink); }
@media (max-width: 759px) {
  /* điện thoại: phần thẻ hai bên ló ra ít nên làm mờ đậm hơn; nút nhỏ, lấn ra lề để không che thẻ giữa */
  .carousel { --fade-k: 1.4; }
  .carousel-btn { width: 36px; height: 36px; margin-top: -18px; }
  .carousel-prev { left: -8px; }
  .carousel-next { right: -8px; }
}

/* Thẻ phân hệ: tên + một câu ở trên, ảnh chụp xếp lớp ló ra ở dưới (cắt theo mép thẻ) */
.tile { position: relative; display: flex; flex-direction: column; border-radius: var(--radius-xl); border: 1px solid var(--line); background: var(--surface); overflow: hidden; color: var(--ink); transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease); }
.tile:hover { text-decoration: none; border-color: var(--line-strong); box-shadow: var(--shadow-lg); }
.tile.paper::before { -webkit-mask-image: linear-gradient(160deg, transparent 25%, #000 90%); mask-image: linear-gradient(160deg, transparent 25%, #000 90%); }
.tile-text { position: relative; padding: 26px 76px 0 28px; }
.tile-text h3 { font-size: 21px; margin: 0 0 6px; }
.tile-text p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.5; }
.tile-go { position: absolute; top: 24px; right: 24px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); transition: transform 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease); }
.tile-go svg { width: 16px; height: 16px; }
.tile:hover .tile-go { transform: translateX(3px); color: var(--accent-ink); border-color: var(--accent); }
.tile-art { position: relative; flex: 1; margin-top: 26px; }
.tile-art > .shot { position: absolute; left: 28px; top: 0; max-width: none; transition: transform 320ms var(--ease); }
.tile:hover .tile-art > .a1 { transform: translateY(-5px); }
/* Bố cục ảnh theo thẻ 560 × 470 (màn rộng) */
.t-qc .a1 { width: calc(100% - 56px); }
.t-doc .a1 { width: 780px; }
.t-doc .a2 { width: 480px; left: 60px; top: 146px; }
.t-eq .a1 { width: 540px; }
.t-eq .a2 { width: 500px; left: 44px; top: 128px; }
.t-inv .a1 { width: 560px; }
.t-hr .a1 { width: 520px; }
.t-comp .a1 { width: 540px; }
.t-comp .a2 { width: 190px; left: auto; right: 22px; top: -14px; }
.t-net .a1 { width: 520px; }
.t-net .a2 { width: 420px; left: 120px; top: 212px; }
/* Chấm vi phạm trên biểu đồ Levey-Jennings (toạ độ % theo ảnh frag-lj) */
.lj-wrap { position: relative; }
.lj-mark { position: absolute; left: 86.88%; top: 75.1%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 2px solid #ef4444; pointer-events: none; animation: ping 2.6s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(0.55); opacity: 1; } 75%, 100% { transform: scale(1.7); opacity: 0; } }
@media (max-width: 1039px) {
  .t-doc .a1 { width: 700px; }
  .t-doc .a2 { width: 420px; left: 48px; top: 130px; }
  .t-eq .a1 { width: 500px; }
  .t-eq .a2 { width: 440px; left: 40px; top: 118px; }
  .t-inv .a1 { width: 520px; }
  .t-hr .a1 { width: 480px; }
  .t-comp .a1 { width: 500px; }
  .t-comp .a2 { width: 170px; }
  .t-net .a1 { width: 460px; }
  .t-net .a2 { width: 360px; left: 90px; top: 196px; }
}
@media (max-width: 759px) {
  .tile-text { padding: 22px 62px 0 22px; }
  .tile-text h3 { font-size: 19px; }
  .tile-text p { font-size: 15px; }
  .tile-go { top: 20px; right: 18px; }
  .tile-art { margin-top: 20px; }
  .tile-art > .shot { left: 22px; }
  .tile-art > .a2 { display: none; }
  .t-doc .a1, .t-eq .a1, .t-inv .a1, .t-hr .a1, .t-comp .a1, .t-net .a1 { width: 460px; }
  .t-qc .a1 { width: calc(100% - 44px); }
}

/* ===== Trước → sau ===== */
.shifts { display: grid; gap: 32px; }
@media (min-width: 860px) { .shifts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; } }
.shift { padding-top: 22px; border-top: 2px solid var(--ink); }
.shift-from { margin: 0 0 12px; color: var(--muted); font-size: 16px; text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--danger) 65%, transparent); text-decoration-thickness: 2px; }
.shift-to { margin: 0; font-family: var(--font-head); font-weight: 800; font-size: 22px; line-height: 1.3; text-wrap: balance; }

/* ===== Hai cột chữ + sân khấu ===== */
.split { display: grid; gap: 56px; align-items: center; }
@media (min-width: 1000px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; }
  .split.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .split.flip > :first-child { order: 2; }
}
.split .lead { margin-bottom: 0; }
/* Vai trò */
.role-list { list-style: none; margin: 30px 0 32px; padding: 0; display: grid; gap: 18px; }
.role-list li { display: grid; gap: 2px; padding-left: 16px; border-left: 2px solid var(--accent); }
.role-list b { font-family: var(--font-head); font-size: 17px; }
.role-list span { color: var(--muted); font-size: 15.5px; }
.stage-roles .a1 { width: 90%; justify-self: start; align-self: start; }
.stage-roles .a2 { width: 34%; max-width: 230px; justify-self: end; align-self: start; margin-top: 16%; z-index: 3; }
.stage-roles .a3 { width: 70%; justify-self: start; align-self: start; margin: 44% 0 0 4%; z-index: 2; }
.stage-roles.paper::before { inset: -40px; }

/* Danh sách điểm: nhãn + một câu */
.points { list-style: none; margin: 28px 0 0; padding: 0; display: grid; }
.points li { display: grid; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); }
.points li:last-child { border-bottom: 1px solid var(--line); }
.points b { font-family: var(--font-head); font-size: 16.5px; font-weight: 800; }
.points span { color: var(--muted); font-size: 15.5px; }
.points-row { gap: 0 32px; margin-top: 56px; }
@media (min-width: 700px) { .points-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .points-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } .points-row li:last-child { border-bottom: 0; } .points-row li { border-top: 1px solid var(--line); } }

/* ===== Nền tảng (icon + một câu) ===== */
.feats { display: grid; gap: 34px 32px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .feats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.feat h3 { font-size: 17px; margin: 0 0 4px; }
.feat p { margin: 0; color: var(--muted); font-size: 15px; }
.feat-ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 14px; }
.feat-ico svg { width: 21px; height: 21px; }

/* ===== Bảng tiêu chuẩn ===== */
.std-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
table.std { width: 100%; border-collapse: collapse; font-size: 15px; }
table.std th, table.std td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.std th { font-weight: 700; font-size: 12.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
table.std tr:last-child td { border-bottom: 0; }
table.std td:first-child { font-weight: 700; }
table.std td.mono { color: var(--accent-ink); white-space: nowrap; }
@media (max-width: 599px) { table.std th, table.std td { padding: 11px 12px; font-size: 14px; } table.std td.mono { white-space: normal; } }

/* ===== Ba bước ===== */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; } }
.step { padding-top: 20px; border-top: 1px solid var(--line-strong); }
.step-n { display: block; font-family: var(--font-head); font-weight: 800; font-size: 46px; line-height: 1; color: var(--accent-ink); margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.step h3 { font-size: 19px; margin: 0 0 4px; }
.step p { margin: 0; color: var(--muted); }
.steps + .actions { margin-top: 40px; }

/* ===== FAQ ===== */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; font-family: var(--font-head); font-weight: 800; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 600; color: var(--muted); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 0 0 18px; max-width: 70ch; }

/* ===== CTA cuối ===== */
.cta-band { background: var(--primary); color: var(--primary-contrast); border-radius: var(--radius-xl); padding: 52px 28px; text-align: center; }
.cta-band h2 { color: var(--primary-contrast); }
.cta-band p { color: color-mix(in srgb, var(--primary-contrast) 80%, transparent); max-width: 52ch; margin: 0 auto 26px; }
.cta-band .btn-primary { background: var(--primary-contrast); color: var(--primary); }
.cta-band .btn-outline { color: var(--primary-contrast); border-color: color-mix(in srgb, var(--primary-contrast) 40%, transparent); }
.cta-band .btn-outline:hover { background: color-mix(in srgb, var(--primary-contrast) 10%, transparent); }

/* ===== Trang Tính năng ===== */
.toc-bar { position: sticky; top: 64px; z-index: 40; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); }
.toc-bar .container { position: relative; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-top: 9px; padding-bottom: 9px; }
.toc-bar .container::-webkit-scrollbar { display: none; }
.toc-bar a { flex: none; font-size: 14px; font-weight: 600; color: var(--muted); padding: 6px 12px; border-radius: 999px; }
.toc-bar a:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.toc-bar a.active { color: var(--accent-ink); background: var(--accent-soft); }
.feature-page [id] { scroll-margin-top: 128px; }
.page-head.hero-lite { padding-bottom: 56px; }

/* Tài liệu: cửa sổ trình soạn thảo + bảng phiên bản nổi + luồng duyệt */
.stage-docs.paper::before { inset: -48px; }
.stage-docs .a1 { width: 100%; align-self: start; }
.stage-docs .a2 { width: 84%; justify-self: start; align-self: start; margin: 47% 0 0 -5%; z-index: 2; }
.stage-docs .a3 { justify-self: end; align-self: start; margin: -18px 18px 0 0; z-index: 3; }
.flow { display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-size: 13px; font-weight: 700; }
.flow span { padding: 4px 10px; border-radius: 999px; color: var(--muted); white-space: nowrap; }
.flow span + span::before { content: "→"; margin: 0 8px 0 -8px; color: var(--line-strong); font-weight: 400; }
.flow span:last-child { background: var(--accent-soft); color: var(--accent-ink); }
@media (max-width: 599px) { .flow { font-size: 11.5px; gap: 2px; } .flow span { padding: 3px 7px; } .stage-docs .a3 { justify-self: center; margin: -14px 0 0; } }

/* Nội – ngoại kiểm: dải tối cố định (cả hai theme), biểu đồ lớn */
.band { --bg: #0a0f19; --surface: #111723; --surface-2: #0f1520; --ink: #e5e7eb; --muted: #9ca3af; --line: rgba(148, 163, 184, 0.16); --line-strong: rgba(148, 163, 184, 0.3); --accent: #2dd4bf; --accent-ink: #5eead4; --accent-soft: rgba(45, 212, 191, 0.14); --grid-line: rgba(148, 163, 184, 0.07); --frag-shadow: drop-shadow(0 34px 60px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 1px rgba(255, 255, 255, 0.18)); background: var(--bg); color: var(--ink); color-scheme: dark; }
.band .paper-inner { position: relative; isolation: isolate; }
.band .lj-stage { max-width: 900px; margin: 0 auto; }
.lj-note { position: absolute; top: 62.5%; right: calc(13.12% + 24px); transform: translateY(-50%); padding: 4px 11px; border-radius: 999px; background: rgba(239, 68, 68, 0.16); border: 1px solid rgba(248, 113, 113, 0.45); color: #fecaca; font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; white-space: nowrap; pointer-events: none; }
@media (max-width: 599px) { .lj-note { display: none; } }

/* Thiết bị · Hoá chất · Nhân sự */
.res { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .res { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } .res-hr { grid-column: 1 / -1; } }
.res-card { position: relative; display: flex; flex-direction: column; border-radius: var(--radius-xl); border: 1px solid var(--line); background: var(--surface); overflow: hidden; min-height: 440px; }
.res-text { padding: 28px 28px 0; }
.res-text h3 { font-size: 22px; margin-bottom: 6px; }
.res-text > p { color: var(--muted); margin: 0; max-width: 48ch; }
.mini { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 6px; font-size: 15px; }
.mini li { position: relative; padding-left: 18px; }
.mini li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.res-text .ref { margin-top: 14px; }
.res-art { position: relative; flex: 1; min-height: 240px; margin-top: 28px; }
.res-art > .shot { position: absolute; left: 28px; top: 0; max-width: none; }
.res-eq .a1 { width: 640px; }
.res-eq .a2 { width: 600px; left: 84px; top: 170px; }
@media (min-width: 1000px) { .res-eq, .res-inv { min-height: 520px; } }
.res-inv .a1 { width: 620px; }
@media (min-width: 1000px) {
  .res-hr { flex-direction: row; min-height: 380px; }
  .res-hr .res-text { flex: 0 0 42%; padding-bottom: 28px; align-self: center; }
  .res-hr .res-art { margin-top: 28px; }
  .res-hr .a1 { left: 8px; }
}
.res-hr .a1 { width: 600px; }
@media (max-width: 759px) {
  .res-card { min-height: 0; }
  .res-art { min-height: 220px; }
  .res-art > .a2 { display: none; }
  .res-eq .a1, .res-inv .a1, .res-hr .a1 { width: 480px; }
}

/* Tuân thủ: cửa sổ tổng quan + hồ sơ NC + ô điểm tự đánh giá */
.stage-comp.paper::before { inset: -48px; }
.stage-comp .a1 { width: 100%; align-self: start; }
.stage-comp .a2 { width: 60%; justify-self: end; align-self: start; margin: 27% -3% 0 0; z-index: 2; }
.stage-comp .a3 { width: 28%; justify-self: start; align-self: start; margin: 40% 0 0 -3%; z-index: 3; }
.stage-comp .a4 { justify-self: start; align-self: start; margin: 58% 0 0 0; z-index: 3; display: grid; gap: 8px; justify-items: start; }
.stage-comp .a4 .chip { box-shadow: var(--shadow-lg); }
@media (max-width: 599px) { .stage-comp .a4 { display: none; } }

/* Mạng lưới: ba mảnh chồng chéo có ghim số theo đúng thứ tự thao tác, chữ ba bước bên dưới */
.stage-net { max-width: 1080px; margin: 0 auto 64px; }
.stage-net.paper::before { inset: -40px -20px; }
.stage-net .layer { position: relative; }
.stage-net .a1 { width: 66%; justify-self: start; align-self: start; }
.stage-net .a2 { width: 48%; justify-self: start; align-self: start; margin: 24% 0 0 29%; z-index: 2; }
.stage-net .a3 { width: 42%; justify-self: end; align-self: start; margin-top: 7%; z-index: 3; }
.pin { position: absolute; top: -13px; right: -13px; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: var(--primary-contrast); font-family: var(--font-head); font-weight: 800; font-size: 14px; display: grid; place-items: center; box-shadow: 0 0 0 4px var(--surface-2); z-index: 1; }
@media (max-width: 759px) {
  .stage-net { display: block; margin-bottom: 44px; }
  .stage-net .layer { width: 100%; margin: 0; }
  .stage-net .layer + .layer { margin-top: 26px; }
  .pin { top: -13px; right: -6px; }
}

/* Nền tảng (trang Tính năng) */
.plat { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) {
  .plat { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .p-kg { grid-column: span 7; grid-row: span 2; } .p-daily, .p-dead { grid-column: span 5; }
  .p-phone { grid-column: span 5; } .p-trio { grid-column: span 7; }
}
.p-kg .res-art { min-height: 380px; }
.p-kg .a1 { width: 760px; left: 20px; -webkit-mask-image: radial-gradient(ellipse 60% 62% at 45% 42%, #000 58%, transparent 100%); mask-image: radial-gradient(ellipse 60% 62% at 45% 42%, #000 58%, transparent 100%); }
.p-daily .a1 { width: 640px; }
.p-daily, .p-dead { min-height: 300px; }
.p-dead .a1 { width: 560px; }
.p-phone { min-height: 420px; }
.p-phone .res-art { min-height: 250px; }
.p-phone .a1 { width: 190px; left: 40px; top: 6px; }
.p-phone .a2 { width: 190px; left: 250px; top: 40px; }
.p-trio { min-height: 0; justify-content: center; padding: 32px 28px; }
.p-trio .feats { grid-template-columns: minmax(0, 1fr); gap: 26px; }
@media (min-width: 640px) { .p-trio .feats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 759px) {
  .p-kg .a1 { width: 560px; }
  .p-kg .res-art { min-height: 300px; }
  .p-daily .a1, .p-dead .a1 { width: 480px; }
  .p-phone .a1 { width: 150px; left: 24px; }
  .p-phone .a2 { width: 150px; left: 190px; top: 30px; }
}

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 28px; font-size: 14.5px; color: var(--muted); }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; margin-bottom: 28px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-brand p { max-width: 42ch; margin-top: 12px; }
.site-footer h4 { color: var(--ink); margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.footer-legal { border-top: 1px solid var(--line); padding-top: 18px; font-size: 13px; }
.footer-legal p { margin: 0 0 6px; }

/* ===== Trang nội dung (hướng dẫn, pháp lý) ===== */
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(32px, 4vw, 44px); }
.prose h2 { font-size: 26px; margin-top: 44px; }
.prose h3 { margin-top: 28px; }
.prose p, .prose li { color: var(--ink); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose .note { border-left: 3px solid var(--warning); background: color-mix(in srgb, var(--warning) 8%, transparent); padding: 12px 16px; border-radius: 0 var(--radius) var(--radius) 0; font-size: 15px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.page-head { padding-top: 56px; padding-bottom: 24px; }
.page-head .lead { margin-top: 8px; }
.toc { font-size: 14.5px; color: var(--muted); margin-bottom: 32px; }
.toc a { margin-right: 14px; }
.placeholder { background: color-mix(in srgb, var(--warning) 18%, transparent); padding: 0 4px; border-radius: 3px; }

/* ===== Chuyển động ===== */
/* Chỉ ẩn để hiện dần khi JS đã chạy (html.js) — không JS hay observer lỗi thì nội dung hiện ngay */
html.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 480ms var(--ease), transform 480ms var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }
/* Sân khấu: lớp trước vào sau lớp sau một nhịp */
html.js .stage.reveal > * { opacity: 0; transform: translateY(22px); transition: opacity 560ms var(--ease), transform 560ms var(--ease); }
html.js .stage.reveal.in > * { opacity: 1; transform: none; }
html.js .stage.reveal.in > :nth-child(2) { transition-delay: 140ms; }
html.js .stage.reveal.in > :nth-child(3) { transition-delay: 260ms; }
html.js .stage.reveal.in > :nth-child(4) { transition-delay: 360ms; }
html.js .stage.reveal { opacity: 1; transform: none; }
/* Hero: cửa sổ nghiêng rồi phẳng dần khi cuộn (trình duyệt hỗ trợ scroll-driven animation) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 900px) {
    .hero-stage > .stage { transform-origin: 50% 0; animation: flatten linear both; animation-timeline: view(); animation-range: entry 0% cover 42%; }
    @keyframes flatten { from { transform: perspective(2400px) rotateX(13deg) scale(0.955); } to { transform: none; } }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal, html.js .stage.reveal > * { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
  .board-row, .tile-art > .shot, .tile-go, .carousel-btn, .carousel-dot::before, .carousel.is-ready .carousel-stage > .tile { transition: none; }
  .tile:hover .tile-art > .a1 { transform: none; }
  .lj-mark { animation: none; transform: scale(1.15); }
}
