/* hdsd.css — Trang Hướng dẫn sử dụng (công khai) + bố cục in / PDF (body.in). */
:root {
  --evn: #2451a3; --evn-deep: #16336e; --evn-2: #2f6fce; --evn-red: #e4002b;
  --ink: #1c2b3f; --ink-soft: #52627a; --ink-mute: #8796ab; --line: #e2e8f2; --bg: #f3f6fb; --panel: #fff;
  --so: #e5484d; --meo: #e7f0fc; --meo-l: #bcd3f5; --luu-y: #fdf3e1; --luu-y-l: #f1d9a8;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; font: 15px/1.65 "Be Vietnam Pro", system-ui, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--evn-2); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: "JetBrains Mono", Consolas, monospace; font-size: .88em; }
code { background: #eef2f8; border-radius: 4px; padding: 1px 5px; }

/* ---- đầu trang ---- */
.dau { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 10px clamp(16px, 3vw, 32px);
  background: linear-gradient(90deg, var(--evn-deep), var(--evn)); color: #fff; box-shadow: 0 2px 10px rgba(16, 32, 64, .18); }
.dau-tt { display: flex; align-items: center; gap: 12px; color: #fff; }
.dau-tt:hover { text-decoration: none; }
.dau-tt img { width: 38px; height: 38px; background: #fff; border-radius: 9px; padding: 3px; }
.dau-tt b { display: block; font-size: 16px; }
.dau-tt small { display: block; font-size: 12px; opacity: .8; }
.sp { flex: 1; }
.nut { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 8px; font-weight: 600; font-size: 13.5px;
  color: #fff; border: 1px solid rgba(255, 255, 255, .35); white-space: nowrap; }
.nut:hover { background: rgba(255, 255, 255, .12); text-decoration: none; }
.nut.chinh { background: #fff; color: var(--evn-deep); border-color: #fff; }
.nut.chinh:hover { background: #e9f0fb; }

/* ---- bố cục ---- */
.khung { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 28px; max-width: 1240px; margin: 0 auto; padding: 24px clamp(16px, 3vw, 32px) 60px; }
.muc-luc { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 96px); overflow: auto; font-size: 13.5px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 10px 14px 14px; }
.ml-tieu-de { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-mute); margin-bottom: 6px; }
.muc-luc ul { list-style: none; margin: 0; padding: 0; }
.muc-luc > ul > li { margin: 6px 0; }
.muc-luc > ul > li > a { font-weight: 600; color: var(--ink); }
.muc-luc ul ul { margin: 3px 0 6px 10px; border-left: 2px solid var(--line); padding-left: 10px; }
.muc-luc ul ul a { color: var(--ink-soft); display: block; padding: 1px 0; }
.muc-luc li.noi > a { color: var(--evn); }
.muc-luc li.noi > a::after { content: " · trọng tâm"; font-size: 11px; font-weight: 600; color: var(--so); }
.noi-dung { min-width: 0; }
.chuong { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 26px clamp(18px, 3vw, 34px) 22px; margin-bottom: 22px;
  box-shadow: 0 1px 2px rgba(16, 32, 64, .04); }
h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-size: 24px; color: var(--evn-deep); }
h2 .c { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--evn); color: #fff; font-size: 18px; flex: none; }
h3 { font-size: 18.5px; color: var(--evn-deep); margin: 30px 0 10px; padding-top: 14px; border-top: 1px solid var(--line); }
h2 + p + h3, h2 + h3 { border-top: 0; padding-top: 0; margin-top: 12px; }
h4 { font-size: 15.5px; margin: 20px 0 8px; color: var(--ink); }
p { margin: 8px 0; }
.nho { font-size: 13.5px; color: var(--ink-soft); }

/* ---- bước, số đánh dấu ---- */
.so { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: var(--so); color: #fff;
  font-size: 12px; font-weight: 700; line-height: 1; vertical-align: 1px; margin: 0 2px; box-shadow: 0 1px 3px rgba(229, 72, 77, .35); }
ol.buoc { counter-reset: b; list-style: none; padding: 0; margin: 10px 0; }
ol.buoc > li { counter-increment: b; position: relative; padding: 6px 0 6px 40px; }
ol.buoc > li::before { content: counter(b); position: absolute; left: 0; top: 5px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--meo); color: var(--evn); font-weight: 700; display: grid; place-items: center; font-size: 13.5px; border: 1px solid var(--meo-l); }
ul.ds-so { list-style: none; padding: 0; margin: 10px 0; }
ul.ds-so > li { padding: 4px 0; }
.quy-trinh { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 6px; }
.quy-trinh span { position: relative; background: var(--meo); border: 1px solid var(--meo-l); color: var(--evn-deep); font-weight: 600;
  font-size: 13.5px; padding: 7px 16px 7px 14px; border-radius: 8px; }
.quy-trinh span small { display: block; font-weight: 500; font-size: 11.5px; color: var(--ink-soft); }
.quy-trinh span:not(:last-child)::after { content: "→"; position: absolute; right: -13px; top: 50%; transform: translateY(-50%); color: var(--evn-2); font-weight: 700; }
.quy-trinh span:not(:last-child) { margin-right: 10px; }

/* ---- ba cách bắt đầu ---- */
.ba-cach { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0 18px; }
.cach { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink);
  background: linear-gradient(180deg, #fbfdff, #f3f7fd); }
.cach:hover { border-color: var(--meo-l); text-decoration: none; box-shadow: 0 4px 14px rgba(16, 32, 64, .07); }
.cach b { color: var(--evn-deep); font-size: 15px; }
.cach span { font-size: 13px; color: var(--ink-soft); }
.cach i { font-style: normal; font-weight: 600; font-size: 13px; color: var(--evn-2); margin-top: auto; }

/* ---- hình ---- */
.hinh { margin: 14px 0 18px; }
.hinh img { display: block; max-width: 100%; height: auto; margin: 0 auto; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 6px 22px rgba(16, 32, 64, .10); }
.hinh figcaption { text-align: center; font-size: 13px; color: var(--ink-soft); margin-top: 8px; }
.hinh-trong { display: grid; place-items: center; height: 160px; border: 1px dashed var(--line); border-radius: 10px; color: var(--ink-mute); background: #fafcff; }

/* ---- hộp chú ý ---- */
.meo, .luu-y { border-radius: 10px; padding: 10px 14px; font-size: 14px; margin: 12px 0; }
.meo { background: var(--meo); border: 1px solid var(--meo-l); }
.luu-y { background: var(--luu-y); border: 1px solid var(--luu-y-l); }

/* ---- bảng ---- */
table.bang { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 12px 0; }
.bang th, .bang td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.bang th { background: #f2f6fc; color: var(--evn-deep); font-weight: 700; }
.bang td.thieu { background: #fff7ec; }
dl.hoi-dap dt { font-weight: 700; margin-top: 12px; color: var(--evn-deep); }
dl.hoi-dap dd { margin: 3px 0 0; color: var(--ink-soft); }
.cuoi { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--line); }
.len-dau { position: fixed; right: 18px; bottom: 18px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--evn); color: #fff; font-size: 18px; box-shadow: 0 4px 14px rgba(16, 32, 64, .25); }
.len-dau:hover { text-decoration: none; background: var(--evn-2); }

@media (max-width: 960px) {
  .khung { grid-template-columns: 1fr; }
  .muc-luc { position: static; max-height: none; }
  .ba-cach { grid-template-columns: 1fr; }
  .dau-tt small { display: none; }
}

/* ===================================================== bố cục in / PDF ===================================================== */
@page { size: A4; margin: 15mm 14mm 16mm; }
body.in { background: #fff; font-size: 10.5pt; line-height: 1.55; }
body.in .khung { display: block; max-width: none; padding: 0; }
body.in .chuong { border: 0; box-shadow: none; padding: 0; margin: 0; border-radius: 0; break-before: page; }
body.in h2 { font-size: 18pt; }
body.in h3 { font-size: 13.5pt; break-after: avoid; }
body.in h4 { break-after: avoid; }
body.in .hinh { break-inside: avoid; margin: 10px 0 14px; }
body.in .hinh img { max-height: 158mm; width: auto; box-shadow: none; }
body.in .bang, body.in .meo, body.in .luu-y, body.in .quy-trinh, body.in .ba-cach { break-inside: avoid; }
body.in ol.buoc > li { break-inside: avoid; }
body.in a { color: inherit; }
body.in .cach i { display: none; }
body.in .ba-cach { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bia { height: 262mm; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  background: linear-gradient(160deg, #0f2a5c 0%, #2451a3 70%, #2f6fce 100%); color: #fff; border-radius: 6px; padding: 30mm 20mm;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.bia-logo { width: 34mm; height: 34mm; background: #fff; border-radius: 8mm; padding: 3mm; margin-bottom: 10mm; }
.bia-cty { font-size: 12pt; letter-spacing: 1.5px; font-weight: 600; opacity: .9; line-height: 1.6; }
.bia-loai { margin-top: 22mm; font-size: 13pt; font-weight: 700; letter-spacing: 4px; color: #ffd8a8; }
.bia-ten { font-size: 25pt; line-height: 1.3; margin: 5mm 0 0; }
.bia-ten span { display: inline-block; margin-top: 3mm; font-size: 17pt; letter-spacing: 2px; padding: 2mm 6mm; border: 1px solid rgba(255, 255, 255, .5); border-radius: 3mm; }
.bia-mo-ta { margin-top: 12mm; max-width: 140mm; font-size: 11.5pt; opacity: .9; }
.bia-pb { margin-top: auto; font-size: 10.5pt; opacity: .85; }
.muc-luc-in { break-before: page; }
.muc-luc-in h2 { margin-bottom: 8mm; }
.muc-luc-in ol.ml { list-style: none; padding: 0; font-size: 12.5pt; }
.muc-luc-in ol.ml li { padding: 3mm 0; border-bottom: 1px dotted #c6d0de; }
body.in .chuong.dau-tien { break-before: page; }
