/* MORA HRM – trung tâm trợ giúp. Màu theo chuẩn MORA Platform. */
:root {
  --accent: #0077B2;
  --accent-hover: #00669A;
  --accent-soft: #EEF5FA;
  --on-accent-soft: #00669A;
  --bg: #FFFFFF;
  --bg-subtle: #F6F8FA;
  --bg-elev: #FFFFFF;
  --line: #E5E7EB;
  --line-strong: #D0D5DD;
  --fg: #1F2328;
  --fg-muted: #5B6478;
  --code-bg: #F3F5F8;
  --hero-bg: #0B1220;
  --hero-fg: #E8ECF2;
  --hero-muted: #A9B5CB;
  --note-bg: #EEF5FA; --note-line: #0077B2;
  --tip-bg: #EAF5F3; --tip-line: #0F7468;
  --warn-bg: #FBF3EA; --warn-line: #A85A0A;
  --soon-bg: #F3F1FC; --soon-line: #6650C8;
  --rule-bg: #F6F8FA; --rule-line: #5B6478;
  --tag-new-bg: #E3F1EC; --tag-new-fg: #0B6258;
  --tag-imp-bg: #E6F0F8; --tag-imp-fg: #00669A;
  --tag-fix-bg: #FBEDE4; --tag-fix-fg: #924D08;
  --shadow: 0 8px 24px rgba(16, 24, 40, .12);
  --radius: 8px;
  --topbar-h: 60px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #66ADD1; --accent-hover: #8CC3DE; --accent-soft: #1C2B3D; --on-accent-soft: #8CC3DE;
    --bg: #0B1220; --bg-subtle: #101a2c; --bg-elev: #131E31; --line: #253047; --line-strong: #33415C;
    --fg: #E8ECF2; --fg-muted: #8FA0BD; --code-bg: #172238;
    --hero-bg: #08101C; --hero-fg: #E8ECF2; --hero-muted: #8FA0BD;
    --note-bg: #152133; --note-line: #66ADD1; --tip-bg: #162130; --tip-line: #6FCBBE;
    --warn-bg: #1B202D; --warn-line: #E8AE6B; --soon-bg: #192033; --soon-line: #B3A6F0;
    --rule-bg: #131E31; --rule-line: #8FA0BD;
    --tag-new-bg: #1A2E33; --tag-new-fg: #6FCBBE; --tag-imp-bg: #1C2B3D; --tag-imp-fg: #8CC3DE;
    --tag-fix-bg: #2D2829; --tag-fix-fg: #E8AE6B;
    --shadow: 0 8px 24px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --accent: #66ADD1; --accent-hover: #8CC3DE; --accent-soft: #1C2B3D; --on-accent-soft: #8CC3DE;
  --bg: #0B1220; --bg-subtle: #101a2c; --bg-elev: #131E31; --line: #253047; --line-strong: #33415C;
  --fg: #E8ECF2; --fg-muted: #8FA0BD; --code-bg: #172238;
  --hero-bg: #08101C; --hero-fg: #E8ECF2; --hero-muted: #8FA0BD;
  --note-bg: #152133; --note-line: #66ADD1; --tip-bg: #162130; --tip-line: #6FCBBE;
  --warn-bg: #1B202D; --warn-line: #E8AE6B; --soon-bg: #192033; --soon-line: #B3A6F0;
  --rule-bg: #131E31; --rule-line: #8FA0BD;
  --tag-new-bg: #1A2E33; --tag-new-fg: #6FCBBE; --tag-imp-bg: #1C2B3D; --tag-imp-fg: #8CC3DE;
  --tag-fix-bg: #2D2829; --tag-fix-fg: #E8AE6B;
  --shadow: 0 8px 24px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font); font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -48px; z-index: 100; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: var(--radius); }
.skip:focus { top: 8px; }

/* ---------- thanh trên */
.topbar { position: sticky; top: 0; z-index: 40; height: var(--topbar-h); background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1440px; margin: 0 auto; height: 100%; display: flex; align-items: center; gap: 16px; padding: 0 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none !important; flex: none; }
.logo-mark { width: 26px; height: 26px; color: var(--accent); stroke-width: 1.8; }
.brand-text { font-size: 17px; font-weight: 500; letter-spacing: 0; white-space: nowrap; }
.brand-tag { font-size: 13px; color: var(--fg-muted); padding-left: 12px; border-left: 1px solid var(--line); }
.mainnav { display: flex; gap: 4px; margin-left: 8px; }
.mainnav a { color: var(--fg-muted); font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 6px; white-space: nowrap; }
.mainnav a:hover { color: var(--fg); background: var(--bg-subtle); text-decoration: none; }
.mainnav a.active { color: var(--on-accent-soft); background: var(--accent-soft); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid transparent; border-radius: var(--radius); background: transparent; color: var(--fg-muted); cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--bg-subtle); color: var(--fg); }
.nav-toggle { display: none; }
.mobilenav { display: none; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: block; }
}

/* ---------- tìm kiếm */
.search { position: relative; margin-left: auto; width: 300px; max-width: 100%; }
.search input {
  width: 100%; height: 40px; padding: 0 36px 0 38px; font: inherit; font-size: 14px;
  color: var(--fg); background: var(--bg-subtle); border: 1px solid var(--line); border-radius: var(--radius);
  -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: var(--fg-muted); }
.search input:focus { outline: none; border-color: var(--accent); background: var(--bg); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-icon { position: absolute; left: 11px; top: 10px; color: var(--fg-muted); pointer-events: none; display: flex; }
.search-icon svg { width: 18px; height: 18px; }
.search-kbd { position: absolute; right: 10px; top: 9px; font: 12px var(--mono); color: var(--fg-muted); border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 6px; line-height: 20px; }
.search input:focus ~ .search-kbd, .search input:not(:placeholder-shown) ~ .search-kbd { display: none; }
.search-results {
  position: absolute; right: 0; top: calc(100% + 6px); width: min(520px, calc(100vw - 32px)); max-height: min(70vh, 560px); overflow-y: auto;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; z-index: 60;
}
.sr-item { display: block; padding: 10px 12px; border-radius: 6px; color: var(--fg); text-decoration: none !important; }
.sr-item[aria-selected="true"], .sr-item:hover { background: var(--accent-soft); }
.sr-sec { display: block; font-size: 12px; color: var(--fg-muted); }
.sr-title { display: block; font-weight: 600; font-size: 15px; }
.sr-head { color: var(--accent); font-weight: 500; }
.sr-snip { display: block; font-size: 13px; color: var(--fg-muted); margin-top: 2px; line-height: 1.5; }
.sr-snip mark, .sr-title mark { background: transparent; color: var(--accent); font-weight: 600; }
.sr-empty { padding: 14px 12px; color: var(--fg-muted); font-size: 14px; margin: 0; }

/* ---------- bố cục */
.layout { max-width: 1440px; margin: 0 auto; display: grid; grid-template-columns: 272px minmax(0, 1fr) 240px; gap: 0; min-height: calc(100vh - var(--topbar-h)); }
.layout-nosidebar { grid-template-columns: minmax(0, 1fr) 240px; max-width: 1180px; }
.sidebar { border-right: 1px solid var(--line); }
.sidebar-inner { position: sticky; top: var(--topbar-h); max-height: calc(100vh - var(--topbar-h)); overflow-y: auto; padding: 24px 16px 40px 24px; }
.sidebar-title { margin: 0 0 8px; font-weight: 600; font-size: 15px; }
.sidebar-title a { color: var(--fg); }
.side-group { margin: 20px 0 6px; font-size: 12px; font-weight: 600; color: var(--fg-muted); }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list a { display: block; padding: 6px 10px; margin: 1px 0; border-radius: 6px; color: var(--fg); font-size: 14px; line-height: 1.45; border-left: 2px solid transparent; }
.side-list a:hover { background: var(--bg-subtle); text-decoration: none; }
.side-list a[aria-current="page"] { background: var(--accent-soft); color: var(--on-accent-soft); font-weight: 600; border-left-color: var(--accent); border-radius: 0 6px 6px 0; }
.scrim { display: none; }

.content { padding: 28px 48px 64px; min-width: 0; outline: none; }
.toc { padding: 28px 20px 0 8px; }
.toc > * { position: relative; }
.toc-title { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--fg-muted); }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc { position: sticky; top: var(--topbar-h); align-self: start; max-height: calc(100vh - var(--topbar-h)); overflow-y: auto; }
.toc a { display: block; padding: 4px 0 4px 12px; margin-left: -1px; font-size: 13px; line-height: 1.45; color: var(--fg-muted); border-left: 2px solid transparent; }
.toc a:hover { color: var(--fg); text-decoration: none; }
.toc a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 500; }
.toc-l3 a { padding-left: 24px; }

.breadcrumb ol { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: 13px; color: var(--fg-muted); }
.breadcrumb li + li::before { content: "›"; margin: 0 6px 0 2px; color: var(--line-strong); }
.breadcrumb a { color: var(--fg-muted); }
.breadcrumb a:hover { color: var(--accent); }

/* ---------- nội dung */
.prose { max-width: 760px; }
.prose h1 { font-size: 32px; line-height: 1.25; margin: 0 0 12px; }
.prose .lead { font-size: 18px; color: var(--fg-muted); margin: 0 0 28px; }
.prose h2 { font-size: 22px; line-height: 1.35; margin: 40px 0 12px; padding-top: 8px; position: relative; }
.prose h3 { font-size: 18px; line-height: 1.4; margin: 28px 0 8px; position: relative; }
.prose h4 { font-size: 16px; margin: 20px 0 6px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin: 4px 0; }
.prose li > ul, .prose li > ol { margin: 4px 0; }
.prose ol > li::marker { color: var(--accent); font-weight: 600; }
.prose strong { font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--code-bg); padding: 1px 6px; border-radius: 4px; }
.prose pre { background: var(--code-bg); padding: 14px 16px; border-radius: var(--radius); overflow-x: auto; font-size: 14px; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin: 0 0 14px; padding: 4px 16px; border-left: 3px solid var(--line-strong); color: var(--fg-muted); }
.anchor { position: absolute; left: -22px; top: auto; color: var(--line-strong); font-weight: 400; opacity: 0; text-decoration: none !important; padding-right: 6px; }
h2:hover .anchor, h3:hover .anchor, .anchor:focus { opacity: 1; }
.prose h2 .anchor { padding-top: 0; }

.table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 1.5; }
.prose th, .prose td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--bg-subtle); font-weight: 600; white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }

/* Đường dẫn menu, vd HRM › Cài đặt › Phân quyền */
.menupath { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; vertical-align: baseline; font-size: .92em; }
.mp-item { background: var(--accent-soft); color: var(--on-accent-soft); font-weight: 600; padding: 1px 8px; border-radius: 5px; border: 1px solid transparent; white-space: nowrap; }
.mp-sep { color: var(--fg-muted); font-weight: 600; }

/* Khung ghi chú */
.callout { margin: 0 0 18px; padding: 12px 16px; border-left: 4px solid var(--note-line); background: var(--note-bg); border-radius: 0 var(--radius) var(--radius) 0; }
.callout > :last-child { margin-bottom: 0; }
.callout-title { font-weight: 600; margin: 0 0 4px !important; font-size: 14px; }
.callout-tip { border-color: var(--tip-line); background: var(--tip-bg); }
.callout-warn { border-color: var(--warn-line); background: var(--warn-bg); }
.callout-soon { border-color: var(--soon-line); background: var(--soon-bg); }
.callout-rule { border-color: var(--rule-line); background: var(--rule-bg); }
.callout-note .callout-title { color: var(--note-line); }
.callout-tip .callout-title { color: var(--tip-line); }
.callout-warn .callout-title { color: var(--warn-line); }
.callout-soon .callout-title { color: var(--soon-line); }
.callout-soon .callout-title::before { content: "◷ "; }

/* Thẻ, lưới */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 8px 0 24px; padding: 0; list-style: none; }
.card { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; background: var(--bg-elev); color: var(--fg); text-decoration: none !important; transition: border-color .15s, box-shadow .15s; position: relative; }
.card:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(0, 119, 178, .08); }
.card-title { display: block; font-weight: 600; font-size: 16px; margin-bottom: 4px; color: var(--fg); }
.card-text { display: block; font-size: 14px; color: var(--fg-muted); line-height: 1.55; }
.card-bar { display: block; width: 32px; height: 4px; border-radius: 2px; margin-bottom: 12px; background: var(--accent); }

/* Nhãn trạng thái chấm công dùng trong bảng */
.st { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; white-space: nowrap; border: 1px solid var(--line-strong); }

/* Minh hoạ bố cục HRM (không phải ảnh chụp) */
.wf { display: grid; grid-template-columns: 92px minmax(0, 1fr); border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; margin: 4px 0 8px; font-size: 12px; background: var(--bg); }
.wf-rail { display: flex; flex-direction: column; gap: 6px; padding: 10px 8px; border-right: 1px solid var(--line); background: var(--bg-subtle); }
.wf-tile { display: block; padding: 6px 4px; border-radius: 6px; text-align: center; color: var(--fg-muted); }
.wf-main { display: flex; flex-direction: column; min-width: 0; }
.wf-top { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line); overflow: hidden; }
.wf-tab { padding: 4px 8px; border-radius: 6px; color: var(--fg-muted); white-space: nowrap; }
.wf-gear { margin-left: auto; }
.wf-body { min-height: 88px; display: flex; align-items: center; justify-content: center; color: var(--fg-muted); background: repeating-linear-gradient(0deg, transparent 0 18px, var(--line) 18px 19px); opacity: .9; }
.wf-bottom { display: flex; gap: 2px; padding: 4px 8px 0; border-top: 1px solid var(--line); background: var(--bg-subtle); overflow: hidden; }
.wf-sheet { padding: 4px 10px; border: 1px solid var(--line); border-bottom: 0; border-radius: 6px 6px 0 0; color: var(--fg-muted); white-space: nowrap; background: var(--bg-subtle); }
.wf .wf-active { background: var(--accent-soft); color: var(--on-accent-soft); font-weight: 600; }
.wf-caption { font-size: 13px; color: var(--fg-muted); }

/* Sơ đồ luồng đơn giản */
.flow { border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 0 0 18px; background: var(--bg-subtle); }
.flow-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.flow-node { display: inline-block; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--bg); font-weight: 600; font-size: 14px; }
.flow-pending { border-color: var(--warn-line); color: var(--warn-line); }
.flow-ok { border-color: var(--tip-line); color: var(--tip-line); }
.flow-arrow { color: var(--fg-muted); font-weight: 600; }
.flow-notes { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; font-size: 14px; color: var(--fg-muted); }
.flow-notes b { color: var(--fg); font-weight: 600; }

/* Nhật ký thay đổi */
.tag { display: inline-block; font-size: 12px; font-weight: 600; line-height: 20px; padding: 0 8px; border-radius: 999px; white-space: nowrap; }
.tag-new { background: var(--tag-new-bg); color: var(--tag-new-fg); }
.tag-improve { background: var(--tag-imp-bg); color: var(--tag-imp-fg); }
.tag-fix { background: var(--tag-fix-bg); color: var(--tag-fix-fg); }
.cl-release { border-top: 1px solid var(--line); margin-top: 28px; }
.cl-release h2 { margin-top: 20px; }
.cl-list { list-style: none; padding: 0 !important; margin: 0 0 12px; }
.cl-item { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px dashed var(--line); margin: 0; }
.cl-item:last-child { border-bottom: 0; }
.cl-item .tag { justify-self: start; }
.cl-area { font-size: 12px; color: var(--fg-muted); white-space: nowrap; }
.cl-status { display: inline-block; vertical-align: middle; font-size: 12px; font-weight: 600; padding: 0 8px; line-height: 20px; border-radius: 999px; border: 1px solid var(--soon-line); color: var(--soon-line); margin-left: 6px; }

.updated { margin: 40px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--fg-muted); max-width: 760px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; max-width: 760px; }
.pager a { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; color: var(--fg); text-decoration: none !important; }
.pager a:hover { border-color: var(--accent); }
.pager-next { text-align: right; align-items: flex-end; }
.pager-label { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--fg-muted); }
.pager-label svg { width: 14px; height: 14px; }
.pager-title { font-weight: 600; color: var(--accent); }

/* ---------- trang chủ */
.hero { background: var(--hero-bg); color: var(--hero-fg); }
.hero-inner { max-width: 1180px; margin: 0 auto; padding: 56px 24px 52px; }
.hero-eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: #66ADD1; }
.hero h1 { margin: 0 0 12px; font-size: 40px; line-height: 1.2; max-width: 760px; }
.hero-lead { margin: 0 0 24px; font-size: 18px; color: var(--hero-muted); max-width: 680px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 42px; padding: 0 18px; border-radius: var(--radius); font-weight: 600; font-size: 15px; text-decoration: none !important; border: 1px solid transparent; }
.btn-primary { background: #0077B2; color: #fff; }
.btn-primary:hover { background: #00669A; }
.btn-ghost { border-color: var(--line-strong); color: var(--fg); background: transparent; }
.hero .btn-ghost { border-color: #33415C; color: var(--hero-fg); }
.btn-ghost:hover { border-color: var(--accent); }
.home-body { max-width: 1180px !important; margin: 0 auto; padding: 32px 24px 56px; }
.home-body > p, .home-body > ul { max-width: 760px; }
.home-cl { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.home-cl-release { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: var(--bg-elev); }
.home-cl-date { margin: 0 0 6px !important; font-weight: 600; }
.home-cl-date a { color: var(--fg); }
.home-cl .cl-item { grid-template-columns: 72px minmax(0, 1fr); font-size: 14px; }
.more { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.more svg { width: 16px; height: 16px; }

.notfound { max-width: 640px; margin: 0 auto; padding: 72px 24px; min-height: 60vh; }
.nf-code { font-size: 64px; font-weight: 600; color: var(--accent); margin: 0; line-height: 1; }
.nf-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.footer { border-top: 1px solid var(--line); background: var(--bg-subtle); }
.footer-inner { max-width: 1440px; margin: 0 auto; padding: 24px; font-size: 14px; color: var(--fg-muted); }
.footer-inner p { margin: 0 0 6px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 10px !important; }

/* ---------- đáp ứng */
@media (max-width: 1200px) {
  .layout { grid-template-columns: 260px minmax(0, 1fr); }
  .layout-nosidebar { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .content { padding: 28px 36px 56px; }
}
@media (max-width: 1080px) { .brand-tag { display: none; } }
@media (max-width: 920px) {
  .mainnav { display: none; }
  .mobilenav { display: flex; gap: 4px; overflow-x: auto; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--bg); scrollbar-width: none; }
  .mobilenav::-webkit-scrollbar { display: none; }
  .mobilenav a { flex: none; color: var(--fg-muted); font-size: 14px; font-weight: 500; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); }
  .mobilenav a.active { color: var(--on-accent-soft); background: var(--accent-soft); border-color: transparent; }
  .mobilenav a:hover { text-decoration: none; }
  .nav-toggle { display: inline-flex; margin-left: -8px; }
  body[data-section="home"] .nav-toggle, body[data-section="404"] .nav-toggle, body[data-section="nhat-ky-thay-doi"] .nav-toggle { display: none; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 50; top: var(--topbar-h); bottom: 0; left: 0; width: min(320px, 86vw); background: var(--bg); transform: translateX(-102%); transition: transform .2s ease; border-right: 1px solid var(--line); }
  .sidebar-inner { position: static; max-height: none; height: 100%; }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow); }
  body.nav-open .scrim { display: block; position: fixed; inset: var(--topbar-h) 0 0 0; background: rgba(11, 18, 32, .45); z-index: 45; }
  .content { padding: 20px 16px 48px; }
}
@media (max-width: 640px) {
  .topbar-inner { padding: 0 12px; gap: 8px; }
  .brand-text { font-size: 16px; }
  .search { width: auto; flex: 1; min-width: 0; }
  .search-kbd { display: none; }
  .search-results { position: fixed; left: 12px; right: 12px; top: calc(var(--topbar-h) + 4px); width: auto; }
  .prose h1 { font-size: 26px; }
  .prose .lead { font-size: 16px; }
  .prose h2 { font-size: 20px; }
  .hero-inner { padding: 36px 16px; }
  .hero h1 { font-size: 28px; }
  .hero-lead { font-size: 16px; }
  .home-body { padding: 24px 16px 40px; }
  .home-cl { grid-template-columns: minmax(0, 1fr); }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .cl-item, .home-cl .cl-item { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .anchor { display: none; }
  .footer-inner { padding: 20px 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print {
  .topbar, .sidebar, .toc, .pager, .footer, .scrim { display: none !important; }
  .layout { display: block; }
  .content { padding: 0; }
}
