/* ThanhCAM — Hướng dẫn Post NX. Dùng chung cho mọi bài trong /huong-dan/. */
:root {
  --ink: #061411; --bg: #071917; --text: #f5f7f2; --muted: #a9bbb2;
  --line: rgba(227,244,233,.16); --lime: #b8ef63; --cyan: #79c9c1;
  --body: #10221b; --soft: #5b6d64; --rule: #dbe3de; --amber: #9b651e;
  --max: 1180px; --read: 760px;
}
* { box-sizing: border-box; }
body { margin: 0; background: #f7f9f6; color: var(--body); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; line-height: 1.7; }
a { color: #2f6b12; }
img { display: block; max-width: 100%; height: auto; }
.wrap { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(7,25,23,.95); border-bottom: 1px solid var(--line); color: var(--text); }
.header-inner { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 850; font-size: 1.15rem; letter-spacing: -.04em; text-decoration: none; color: var(--text); }
.brand-mark { display: grid; place-items: center; width: 30px; aspect-ratio: 1; border: 1px solid rgba(184,239,99,.6); color: var(--lime); border-radius: 9px; font: 800 .66rem/1 ui-monospace, monospace; }
.brand b { color: var(--lime); font-weight: inherit; }
.header-nav { display: flex; gap: 20px; }
.header-nav a { color: #d9e3dd; font-size: .9rem; text-decoration: none; padding: 10px 0; }
.header-nav a:hover { color: var(--lime); }
.draft-bar { background: #fff4dc; border-bottom: 1px solid #e8cf96; color: #6b4a10; font-size: .85rem; padding: 8px 0; }
.hero { background: var(--bg); color: var(--text); padding: 48px 0 40px; }
.hero code { background: rgba(255,255,255,.1); color: var(--lime); }
.crumb { color: var(--muted); font: 600 .78rem/1.4 ui-monospace, Consolas, monospace; letter-spacing: .04em; }
.crumb a { color: var(--lime); text-decoration: none; }
h1 { max-width: var(--read); margin: 14px 0 14px; font-size: clamp(2rem, 4.6vw, 3.2rem); line-height: 1.08; letter-spacing: -.045em; }
.lead { max-width: var(--read); color: #c6d4cd; font-size: 1.08rem; margin: 0; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.facts li { border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; font: 600 .76rem/1.4 ui-monospace, Consolas, monospace; color: #dbe9df; }
main { padding: 40px 0 72px; }
article { max-width: var(--read); }
h2 { margin: 48px 0 12px; font-size: 1.5rem; letter-spacing: -.03em; line-height: 1.2; }
h3 { margin: 28px 0 8px; font-size: 1.1rem; }
p, li { color: #26392f; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
.code-box { margin: 18px 0; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; background: #fff; }
.compare .code-box { margin: 0; }
.code-box figcaption { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--rule); background: #f1f5f2; color: var(--soft); font: 600 .76rem/1.4 ui-monospace, Consolas, monospace; }
.code-box.after figcaption { background: #eef7df; color: #3f5f12; }
.code-box mark { background: #fff1a8; color: inherit; padding: 0 2px; border-radius: 3px; }
pre { margin: 0; padding: 14px 16px; overflow-x: auto; font: .88rem/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; color: #10221b; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .92em; background: #eef3ef; padding: 1px 5px; border-radius: 5px; }
pre code { background: none; padding: 0; }
.copy { border: 1px solid #b9cbbf; background: #fff; color: #2f4c3f; border-radius: 7px; padding: 3px 10px; font: 700 .72rem ui-monospace, monospace; cursor: pointer; }
.copy:hover { border-color: #678d1f; color: #3f5f12; }
.step { margin: 30px 0; padding-top: 22px; border-top: 1px solid var(--rule); }
.step-head { display: flex; align-items: baseline; gap: 12px; }
.step-num { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--bg); color: var(--lime); font: 800 .78rem ui-monospace, monospace; }
.step h3 { margin: 0; }
.shot { margin: 14px 0 0; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; background: #fff; }
.shot a { display: block; cursor: zoom-in; }
.shot img { width: 100%; }
.shot figcaption { padding: 9px 14px; border-top: 1px solid var(--rule); color: var(--soft); font-size: .85rem; }
.shot.narrow { max-width: 440px; }
.legend { color: var(--soft); font-size: .9rem; }
.badge { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #143cc8; color: #fff; font: 700 .72rem/1 "Segoe UI", sans-serif; vertical-align: 1px; }
.note { margin: 22px 0; padding: 14px 16px; border-left: 4px solid var(--amber); background: #fff8ec; border-radius: 0 10px 10px 0; }
.note.ok { border-color: #678d1f; background: #f3f9e9; }
.note b { display: block; margin-bottom: 4px; }
.note p { margin: 0; }
.download { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin: 24px 0; padding: 18px 20px; border: 1px solid #c9dcb8; border-radius: 14px; background: #f3f9e9; }
.download p { margin: 0; color: #2f4c3f; }
.download-links { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 10px; background: var(--bg); color: var(--lime); font-weight: 800; text-decoration: none; }
.btn:hover { background: #12332b; }
.btn.ghost { background: #fff; color: #2f4c3f; border: 1px solid #b9cbbf; }
.video { position: relative; aspect-ratio: 16/9; margin: 18px 0; border-radius: 12px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: .95rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { color: var(--soft); font-weight: 700; font-size: .85rem; }
td code { white-space: nowrap; }
.next { margin-top: 56px; padding: 20px; border: 1px solid var(--rule); border-radius: 14px; background: #fff; }
.next h2 { margin-top: 0; font-size: 1.15rem; }
.next ol { margin: 0; padding-left: 20px; color: var(--soft); }
/* Trang mục lục */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 20px 0; }
.card { display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 1px solid var(--rule); border-radius: 14px; background: #fff; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.card:hover { border-color: #8fb06a; transform: translateY(-2px); }
.card .num { color: var(--soft); font: 700 .74rem ui-monospace, monospace; letter-spacing: .06em; }
.card h3 { margin: 0; font-size: 1.08rem; line-height: 1.3; }
.card p { margin: 0; color: var(--soft); font-size: .9rem; }
.card .tags { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; padding-top: 6px; }
.card .tags span { border: 1px solid var(--rule); border-radius: 999px; padding: 2px 8px; font: 600 .7rem ui-monospace, monospace; color: #3f5f12; }
.card.soon { background: #f4f6f3; border-style: dashed; }
.card.soon:hover { transform: none; border-color: var(--rule); }
footer { background: var(--bg); color: var(--muted); padding: 28px 0; font-size: .85rem; }
footer a { color: var(--lime); }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .compare { grid-template-columns: 1fr; }
  .hero { padding: 36px 0 30px; }
  .header-nav a:not(:last-child) { display: none; }
  td code { white-space: normal; overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
