/* Hướng dẫn TTHC — Công an xã Bảo Thuận */
:root {
  --red: #B0122B;
  --red-d: #7E0A1B;
  --red-l: #FDECEE;
  --gold: #F2C230;
  --gold-d: #B88A00;
  --gold-l: #FFF8DF;
  --blue: #1C5596;
  --blue-d: #123B6B;
  --blue-l: #EAF2FB;
  --green: #17803D;
  --green-l: #E6F4EA;
  --amber: #A15C00;
  --amber-l: #FFF1DC;
  --ink: #1B1F24;
  --ink-2: #4A525C;
  --line: #E3E6EA;
  --bg: #F4F5F7;
  --card: #FFFFFF;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 14px rgba(16, 24, 40, .06);
  --shadow-lg: 0 10px 30px rgba(16, 24, 40, .14);
  --fs: 17px;
}
html.fs-1 { --fs: 19px; }
html.fs-2 { --fs: 21px; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--fs)/1.6 "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
a { color: var(--blue); text-underline-offset: 2px; }
a.tel { font-weight: 700; white-space: nowrap; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
p { margin: 0 0 .8em; }
strong { font-weight: 700; color: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.ic { width: 1.25em; height: 1.25em; flex: none; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; z-index: 99; background: #fff; padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Đầu trang ---------- */
.site-head { background: #fff; position: relative; z-index: 20; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.stripe { height: 5px; background: linear-gradient(90deg, var(--red) 0 70%, var(--gold) 70% 100%); }
.head-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; min-width: 0; }
.emblem { width: 64px; height: auto; flex: none; filter: drop-shadow(0 1px 1px rgba(0,0,0,.15)); }
.emblem.sm { width: 52px; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-txt small { font-size: 12.5px; letter-spacing: .05em; color: var(--ink-2); font-weight: 600; }
.brand-txt b { font-size: 20px; letter-spacing: .02em; color: var(--red); white-space: nowrap; font-weight: 800; }
.brand-txt em { font-style: normal; font-size: 13px; color: var(--gold-d); font-weight: 600; }
.fontbtn { background: var(--red-l); border: 1px solid #F3C6CC; color: var(--red); border-radius: 12px; height: 44px; min-width: 56px; cursor: pointer; font: inherit; font-weight: 800; display: flex; align-items: baseline; justify-content: center; gap: 1px; }
.fontbtn span:first-child { font-size: 14px; }
.fontbtn span:last-child { font-size: 21px; }
.mainnav { background: linear-gradient(180deg, var(--red) 0%, var(--red-d) 100%); }
.mainnav .wrap { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.mainnav a { display: flex; align-items: center; gap: 7px; color: #fff; text-decoration: none; padding: 11px 14px; font-size: 15.5px; font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; }
.mainnav a:hover { border-bottom-color: var(--gold); background: rgba(255,255,255,.06); }
.mainnav .ic { width: 19px; height: 19px; color: var(--gold); }

/* ---------- Trang chủ ---------- */
.hero { color: #fff; padding: 34px 0 90px; position: relative; overflow: hidden;
  background: radial-gradient(900px 380px at 85% -10%, rgba(242,194,48,.28), transparent 60%),
              radial-gradient(700px 300px at -10% 120%, rgba(242,194,48,.18), transparent 60%),
              linear-gradient(160deg, #BD1530 0%, #7E0A1B 100%); }
.hero::after { content: ""; position: absolute; inset: 0; opacity: .06; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, #fff 1px, transparent 0); background-size: 18px 18px; }
.hero-in { display: flex; align-items: center; gap: 32px; position: relative; z-index: 1; }
.hero-emblem { width: 190px; flex: none; filter: drop-shadow(0 6px 16px rgba(0,0,0,.35)); }
.hero-txt { flex: 1; min-width: 0; }
.hero-kicker { color: var(--gold); font-weight: 700; text-transform: uppercase; letter-spacing: .07em; font-size: 14px; margin-bottom: 6px; }
.hero h1 { font-size: clamp(28px, 5.5vw, 44px); font-weight: 800; margin-bottom: 10px; }
.hero-sub { max-width: 640px; opacity: .95; margin-bottom: 18px; }
.searchbox { display: flex; align-items: center; gap: 10px; background: #fff; color: var(--ink-2); border-radius: 999px; padding: 6px 8px 6px 18px; max-width: 620px; box-shadow: 0 8px 26px rgba(0,0,0,.25); }
.searchbox input { border: 0; outline: 0; font: inherit; flex: 1; min-width: 0; padding: 11px 4px; color: var(--ink); background: transparent; }
.search-empty { margin-top: 12px; background: rgba(255,255,255,.15); padding: 10px 14px; border-radius: 10px; max-width: 620px; }
.search-count { margin-top: 10px; font-weight: 700; color: #fff; }
.search-suggest { position: fixed; z-index: 50; background: #fff; border-radius: 16px; box-shadow: 0 14px 34px rgba(0,0,0,.28); padding: 8px; max-height: 360px; overflow-y: auto; }
.search-suggest a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 700; }
.search-suggest a:hover, .search-suggest a:focus { background: var(--bg); }
.search-suggest .ss-ic { width: 34px; height: 34px; flex: none; color: var(--red); background: var(--red-l); border-radius: 10px; display: grid; place-items: center; }
.search-suggest .ss-ic svg { width: 20px; height: 20px; }
.search-suggest .ss-name { line-height: 1.3; }
.search-suggest .ss-label { padding: 10px 12px 4px; font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); border-top: 1px solid var(--line); margin-top: 4px; }
.search-suggest a.ss-faq { font-weight: 600; font-size: 14.5px; }
.search-suggest .ss-ic-faq { color: var(--blue); background: var(--blue-l); }

.portals { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: -62px 0 22px; position: relative; z-index: 2; }
.portal { position: relative; overflow: hidden; display: flex; gap: 18px; align-items: flex-start; color: #fff; text-decoration: none; border-radius: 22px; padding: 26px 24px; min-height: 210px; box-shadow: var(--shadow-lg); transition: transform .15s ease, box-shadow .15s ease; border: 3px solid rgba(255,255,255,.25); }
.portal:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(16,24,40,.22); }
.pt-cu-tru { background: linear-gradient(135deg, #D0213C 0%, #8E0C20 100%); }
.pt-can-cuoc { background: linear-gradient(135deg, #2869B3 0%, #123B6B 100%); }
.portal-ic { width: 72px; height: 72px; border-radius: 20px; background: rgba(255,255,255,.16); display: grid; place-items: center; flex: none; border: 1px solid rgba(255,255,255,.3); }
.portal-ic .ic { width: 40px; height: 40px; color: var(--gold); }
.portal-txt { display: flex; flex-direction: column; gap: 6px; position: relative; z-index: 1; }
.portal-txt small { display: inline-block; align-self: flex-start; background: var(--gold); color: #3B2B00; font-weight: 800; font-size: 13px; padding: 2px 10px; border-radius: 999px; }
.portal-txt b { font-size: clamp(22px, 3.2vw, 30px); font-weight: 800; line-height: 1.15; letter-spacing: .01em; }
.portal-txt > span { opacity: .93; font-size: 15.5px; }
.portal-txt em { font-style: normal; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; background: rgba(255,255,255,.18); align-self: flex-start; padding: 7px 14px; border-radius: 999px; }
.portal-bg { position: absolute; right: -24px; bottom: -34px; opacity: .1; }
.portal-bg .ic { width: 190px; height: 190px; }

.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 0 0 30px; }
.quick a { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: var(--radius); padding: 14px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); border: 1px solid var(--line); }
.quick a:hover { border-color: var(--gold); }
.quick a .ic { width: 28px; height: 28px; color: var(--red); background: var(--red-l); padding: 7px; border-radius: 12px; box-sizing: content-box; }
.quick a.danger .ic { color: #fff; background: var(--red); }
.quick b { display: block; font-size: 16px; }
.quick small { color: var(--ink-2); font-size: 13.5px; line-height: 1.35; display: block; }

.group { margin: 0 0 34px; scroll-margin-top: 12px; }
.group-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; padding: 14px 16px; border-radius: var(--radius); color: #fff; }
.g-cu-tru .group-head { background: linear-gradient(135deg, #C51A35, #8E0C20); }
.g-can-cuoc .group-head { background: linear-gradient(135deg, #2465AE, #123B6B); }
.group-head h2 { font-size: 24px; margin: 0; }
.group-head p { margin: 0; opacity: .9; font-size: 15px; }
.group-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; flex: none; background: rgba(255,255,255,.16); }
.group-ic .ic { width: 30px; height: 30px; color: var(--gold); }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tile { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease, border-color .12s; min-height: 98px; border-left: 5px solid transparent; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.g-cu-tru.tile { border-left-color: var(--red); }
.g-can-cuoc.tile { border-left-color: var(--blue); }
.tile-ic { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.tile-ic .ic { width: 28px; height: 28px; }
.g-cu-tru .tile-ic { background: var(--red-l); color: var(--red); }
.g-can-cuoc .tile-ic { background: var(--blue-l); color: var(--blue); }
.tile-body { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.tile-no { font-size: 12.5px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.tile-name { font-weight: 700; font-size: 17.5px; line-height: 1.3; }
.tile-go { color: var(--ink-2); }
.tile[hidden], .group[hidden], .portals[hidden], .quick[hidden], .share[hidden] { display: none; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; padding: 3px 10px 3px 7px; border-radius: 999px; align-self: flex-start; line-height: 1.4; margin-top: 4px; }
.badge .ic { width: 16px; height: 16px; }
.v-online { background: var(--green-l); color: var(--green); }
.v-mixed { background: var(--amber-l); color: var(--amber); }
.v-visit { background: var(--blue-l); color: var(--blue); }
.badge.big { font-size: 15px; padding: 6px 14px 6px 10px; margin-top: 14px; }

.channels { margin: 8px 0 36px; }
.channels h2 { font-size: 22px; }
.ch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ch { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.ch .ic { width: 32px; height: 32px; color: var(--blue); }
.ch.rec { border: 2px solid var(--green); }
.ch.rec .ic { color: var(--green); }
.ch h3 { font-size: 18px; margin: 10px 0 6px; }
.ch h3 em { font-style: normal; font-size: 12px; background: var(--green); color: #fff; padding: 2px 8px; border-radius: 999px; vertical-align: middle; margin-left: 4px; }
.ch p { margin: 0; color: var(--ink-2); font-size: 15.5px; }

/* ---------- Trang thủ tục ---------- */
.hero-proc { color: #fff; padding: 18px 0 60px; }
.hero-proc.g-cu-tru { background: linear-gradient(160deg, #C51A35, #7E0A1B); }
.hero-proc.g-can-cuoc { background: linear-gradient(160deg, #2869B3, #123B6B); }
.hero-proc.g-chung { background: linear-gradient(160deg, #3B4350, #1F252D); }
.p-sub .hero-proc { padding-bottom: 28px; }
.crumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14.5px; margin-bottom: 14px; opacity: .95; }
.crumb a { color: #fff; }
.hero-row { display: flex; gap: 14px; align-items: center; }
.hero-ic { width: 62px; height: 62px; border-radius: 18px; background: rgba(255,255,255,.16); display: grid; place-items: center; flex: none; border: 1px solid rgba(255,255,255,.25); }
.hero-ic .ic { width: 34px; height: 34px; color: var(--gold); }
.hero-no { font-size: 13.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--gold); font-weight: 700; }
.hero-proc h1 { font-size: clamp(24px, 5vw, 34px); font-weight: 800; margin: 2px 0 0; }

.proc { padding-top: 18px; padding-bottom: 40px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: -44px; position: relative; }
.fact { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.fact > .ic { width: 26px; height: 26px; color: var(--red); margin-top: 2px; }
.n-can-cuoc .fact > .ic, .n-can-cuoc .kv dt .ic, .n-can-cuoc .related-list .ic { color: var(--blue); }
.fact small { display: block; color: var(--ink-2); font-size: 13.5px; }
.fact b { display: block; font-size: 16.5px; line-height: 1.35; }

.remember { display: flex; gap: 12px; background: var(--gold-l); border: 1px solid #F1D98A; border-left: 6px solid var(--gold); border-radius: var(--radius); padding: 14px 16px; margin: 16px 0; }
.remember > .ic { width: 28px; height: 28px; color: var(--gold-d); margin-top: 2px; }
.remember p { margin: 2px 0 0; }

.lead p { font-size: 1.02em; }

.tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 15.5px; font-weight: 600; border-radius: 12px; border: 1px solid var(--red); background: var(--red); color: #fff; padding: 9px 14px; cursor: pointer; min-height: 44px; text-decoration: none; }
.btn:hover { background: var(--red-d); }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--red); }
.btn.ghost .ic { color: var(--red); }
.btn[aria-pressed="true"] { background: var(--red-d); }
.btn .ic { width: 20px; height: 20px; }

.toc { position: sticky; top: 0; z-index: 10; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; background: rgba(244,245,247,.95); backdrop-filter: blur(6px); padding: 10px 16px; margin: 0 -16px 8px; box-shadow: 0 2px 6px rgba(16,24,40,.06); }
.toc a { white-space: nowrap; text-decoration: none; color: var(--ink); background: #fff; border: 1.5px solid var(--line); padding: 9px 16px; min-height: 40px; border-radius: 999px; font-size: 14.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 7px; box-shadow: 0 1px 2px rgba(16,24,40,.06); transition: transform .1s ease; }
.toc a .ic { width: 17px; height: 17px; flex: none; color: var(--red); }
.toc a:active { transform: scale(.96); }
.toc a.on { background: var(--red); color: #fff; border-color: var(--red); box-shadow: 0 3px 10px rgba(165,14,36,.35); }
.toc a.on .ic { color: #fff; }

.sec { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0 0 16px; box-shadow: var(--shadow); }
.sec > h2 { display: flex; align-items: center; gap: 10px; font-size: 21px; }
.secno { width: 34px; height: 34px; border-radius: 10px; background: var(--red); color: #fff; display: grid; place-items: center; font-size: 16px; flex: none; }
.n-can-cuoc .secno, .n-can-cuoc .stepno, .n-can-cuoc .shot-no { background: var(--blue); }
h3.sub { display: flex; align-items: center; gap: 8px; font-size: 17px; margin: 18px 0 10px; color: var(--ink); }
h3.sub .ic { color: var(--red); }
.hint { color: var(--ink-2); font-size: 15px; }

ul.dots { margin: 0 0 .5em; padding: 0; list-style: none; }
ul.dots li { position: relative; padding-left: 22px; margin-bottom: 10px; }
ul.dots li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px #F6E3A1; }

.checkgroups { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.checkgroup { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #FBFBFC; }
.checkgroup h3 { font-size: 16px; color: var(--red-d); margin-bottom: 10px; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { margin-bottom: 8px; }
.checklist label { display: flex; gap: 12px; cursor: pointer; align-items: flex-start; }
.checklist input { width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--green); flex: none; }
.checklist input:checked + span { color: var(--ink-2); text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }

/* Nút tải mẫu ngay trong câu */
.dl-chips { display: inline-flex; gap: 4px; vertical-align: middle; margin: 2px 2px; white-space: nowrap; }
.dl-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 700; line-height: 1; text-decoration: none;
  background: var(--red); color: #fff; padding: 6px 10px; border-radius: 999px; box-shadow: 0 2px 6px rgba(176,18,43,.35);
  animation: chip-glow 2.4s ease-in-out 1s 2; }
.dl-chip .ic { width: 15px; height: 15px; }
.dl-chip:hover { background: var(--red-d); }
.dl-chip.pdf { background: #fff; color: var(--red); border: 1.5px solid var(--red); box-shadow: none; animation: none; padding: 5px 9px; }
.dl-chip.pdf:hover { background: var(--red-l); }
@keyframes chip-glow { 50% { box-shadow: 0 0 0 5px rgba(242,194,48,.55); } }
@media (prefers-reduced-motion: reduce) { .dl-chip { animation: none; } }

/* Liên hệ Công an xã */
.lienhe, .contact { list-style: none; margin: 0; padding: 0; }
.lienhe li, .contact li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.lienhe .ic, .contact .ic { margin-top: 3px; color: var(--red); }
.contact .ic { color: var(--gold); }
.ts-tag { font-style: normal; font-size: 12.5px; font-weight: 700; background: var(--gold-l); color: var(--gold-d); border: 1px solid #F1D98A; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.contact .ts-tag { background: rgba(242,194,48,.15); border-color: rgba(242,194,48,.4); color: var(--gold); }
.lienhe-box { margin-top: 16px; background: var(--gold-l); border: 1px solid #F1D98A; border-radius: 14px; padding: 4px 16px 8px; }
.home-contact { background: #fff; border: 2px solid var(--red); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 30px; box-shadow: var(--shadow); }
.hc-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.hc-head h2 { font-size: 21px; margin: 0 0 2px; color: var(--red); }
.hc-head p { margin: 0; color: var(--ink-2); font-size: 15px; }
.btn.call { margin-top: 6px; font-size: 17px; padding: 11px 20px; }

/* Biểu mẫu */
.forms { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 8px 0 6px; }
.formcard { display: flex; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); }
.form-thumb { flex: none; width: 96px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; align-self: flex-start; }
.form-thumb img { width: 100%; }
.form-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.form-body b { font-size: 16px; line-height: 1.3; }
.form-body small { color: var(--ink-2); font-size: 13px; }
.form-body p { font-size: 14.5px; margin: 2px 0 6px; color: var(--ink-2); }
.form-body p span { font-weight: 700; color: var(--ink); }
.form-tag { align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--amber); background: var(--amber-l); padding: 1px 8px; border-radius: 999px; }
.form-dl { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.form-dl .btn { font-size: 14px; padding: 7px 11px; min-height: 40px; }
.src-note { font-size: 14px; color: var(--ink-2); margin-top: 16px; }

/* Thẻ cách làm */
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: #EEF0F3; padding: 5px; border-radius: 14px; margin-bottom: 14px; }
.tabs button { font: inherit; font-size: 15px; font-weight: 700; border: 0; background: transparent; padding: 10px 8px; border-radius: 10px; cursor: pointer; color: var(--ink-2); display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; line-height: 1.25; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--red); box-shadow: var(--shadow); }
.n-can-cuoc .tabs button[aria-selected="true"] { color: var(--blue); }
.tabs .ic { width: 21px; height: 21px; }

ol.steps { list-style: none; margin: 0 0 14px; padding: 0; }
ol.steps li { display: flex; gap: 14px; position: relative; padding-bottom: 14px; }
ol.steps li:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 38px; bottom: 2px; width: 2px; background: var(--line); }
.stepno { width: 36px; height: 36px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 700; display: grid; place-items: center; flex: none; font-size: 16px; }
ol.steps li > div { padding-top: 5px; }
.note { display: flex; gap: 10px; background: var(--blue-l); border-radius: 12px; padding: 12px 14px; font-size: 15.5px; }
.note .ic { color: var(--blue); margin-top: 3px; }

/* Thư viện ảnh thực tế */
.gal-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 18px 0 10px; }
.gal-head .ic { color: var(--red); width: 22px; height: 22px; }
.gal-head b { font-size: 17px; }
.gal-head span { color: var(--ink-2); font-size: 14px; }
.gallery { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 14px; margin: 0 -4px; scrollbar-width: thin; }
.shot { flex: none; width: 250px; margin: 0; scroll-snap-align: start; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.shot.wide { width: 440px; }
.shot-img { display: block; border: 0; padding: 0; margin: 0; background: #F7F7F8; cursor: zoom-in; height: 420px; width: 100%; }
.shot.wide .shot-img { height: 300px; }
.shot-img img { width: 100%; height: 100%; object-fit: contain; }
.shot figcaption { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; line-height: 1.45; flex: 1; border-top: 1px solid var(--line); }
.shot-no { width: 26px; height: 26px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.shot-src { margin-top: auto; font-size: 12px; color: var(--ink-2); text-decoration: none; }
.shot-src:hover { text-decoration: underline; }
.ct01mau { margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 14px; }

/* Các bước thao tác thật — ảnh lớn xếp dọc, dễ nhìn */
.steps2 { display: flex; flex-direction: column; gap: 16px; margin: 4px 0; }
.step2 { position: relative; margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.step2-img { display: block; border: 0; padding: 0; margin: 0; width: 100%; background: #fff; cursor: zoom-in; }
.step2-img img { width: 100%; height: auto; display: block; }
.step2-no { position: absolute; top: 10px; left: 10px; z-index: 1; width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; font-size: 15px; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.n-can-cuoc .step2-no { background: var(--blue); }

/* Lightbox */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(10,12,16,.97); display: flex; flex-direction: column; color: #fff; }
.lb[hidden] { display: none; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; gap: 10px; }
.lb-count { font-weight: 700; }
.lb-stage { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 56px; position: relative; overflow: auto; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; background: #fff; }
.lb-cap { padding: 12px 16px 18px; text-align: center; font-size: 16px; max-width: 900px; margin: 0 auto; }
.lb-cap small { display: block; opacity: .7; font-size: 13px; margin-top: 4px; }
.lb button { font: inherit; color: #fff; background: rgba(255,255,255,.14); border: 0; border-radius: 999px; cursor: pointer; }
.lb-close { width: 46px; height: 46px; font-size: 26px; line-height: 1; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; display: grid; place-items: center; }
.lb-nav .ic { width: 24px; height: 24px; }
.lb-prev { left: 6px; } .lb-next { right: 6px; }

.kv { margin: 0; display: grid; }
.kv-row { display: grid; grid-template-columns: 220px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.kv-row:first-child { border-top: 0; padding-top: 0; }
.kv dt { font-weight: 700; display: flex; gap: 8px; align-items: flex-start; }
.kv dt .ic { color: var(--red); margin-top: 3px; }
.kv dd { margin: 0; }

details.acc { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; background: #fff; overflow: hidden; }
details.acc summary { list-style: none; cursor: pointer; display: flex; gap: 12px; align-items: flex-start; padding: 14px; font-weight: 600; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary::after { content: "+"; margin-left: auto; font-size: 24px; line-height: 1; color: var(--ink-2); flex: none; }
details.acc[open] summary::after { content: "−"; }
details.acc[open] summary { background: #FAFAFB; }
.accno { width: 28px; height: 28px; border-radius: 8px; background: var(--amber-l); color: var(--amber); display: grid; place-items: center; font-size: 14px; flex: none; }
.acc-body { padding: 4px 14px 16px 54px; }

.cases { display: grid; gap: 12px; }
.case { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.case-q { display: flex; gap: 10px; background: var(--blue-l); padding: 14px; font-weight: 600; }
.case-q .ic { color: var(--blue); margin-top: 3px; }
.case-q p { margin: 0; }
.case-a { padding: 14px; }

.callout { border-radius: var(--radius); padding: 16px 18px; margin: 14px 0; }
.callout h3 { display: flex; gap: 8px; align-items: center; font-size: 17px; text-transform: uppercase; letter-spacing: .02em; }
.callout ul { margin: 0; padding-left: 20px; }
.callout li { margin-bottom: 6px; }
.callout.warn { background: var(--amber-l); border: 1px solid #F3D19E; }
.callout.warn h3 { color: var(--amber); }
.callout.danger { background: var(--red-l); border: 2px solid var(--red); }
.callout.danger h3 { color: var(--red); }
.callout.note { background: var(--blue-l); border: 1px solid #C9DAF0; }
.callout.note h3 { color: var(--blue); }

details.legal { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 18px; margin-bottom: 16px; }
details.legal summary { cursor: pointer; padding: 14px 0; font-weight: 700; display: flex; gap: 10px; align-items: center; }
details.legal[open] { padding-bottom: 8px; }

.share { display: flex; gap: 20px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.share h2 { font-size: 19px; }
.share-qr { width: 140px; height: 140px; flex: none; background: #fff; }
.share-qr svg { width: 100%; height: 100%; }
.share-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; position: relative; }

.sharemenu { position: absolute; z-index: 20; top: 100%; left: 0; margin-top: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; min-width: 220px; }
.sharemenu button, .sharemenu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; text-align: left; }
.sharemenu button:hover, .sharemenu a:hover { background: var(--bg); }
.sharemenu .ic { width: 20px; height: 20px; flex: none; color: var(--red); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 20px; }
.pager a { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-decoration: none; color: var(--ink); font-weight: 600; line-height: 1.3; }
.pager a.next { justify-content: flex-end; text-align: right; }
.pager small { display: block; color: var(--ink-2); font-weight: 400; font-size: 13px; }

.related h2 { font-size: 19px; }
.related-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.related-list a { display: flex; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-decoration: none; color: var(--ink); font-size: 15px; font-weight: 500; line-height: 1.3; }
.related-list .ic { color: var(--red); }

/* ---------- Trang phụ ---------- */
.prose { padding-top: 24px; }
.prose > h2 { font-size: 22px; margin-top: 28px; padding-top: 4px; }
.prose > p, .prose > ul { max-width: 860px; }
.lead-p { font-size: 1.05em; }
.srclist a { word-break: break-all; font-size: 14.5px; }
.tbl-wrap { overflow-x: auto; margin: 10px 0 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.tbl { border-collapse: collapse; width: 100%; font-size: 15.5px; }
.tbl th { background: #2F3640; color: #fff; text-align: left; padding: 10px 12px; font-weight: 600; }
.tbl td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.tbl tr:nth-child(even) td { background: #FAFAFB; }

/* ---------- Chân trang ---------- */
.foot { background: #1F252D; color: #D7DCE2; padding: 28px 0 22px; margin-top: 20px; border-top: 5px solid var(--gold); }
.foot a { color: #fff; }
.foot-grid { display: grid; grid-template-columns: auto 1fr; gap: 14px 28px; align-items: start; }
.foot-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.foot-brand b { color: var(--gold); font-size: 17px; }
.foot h3 { color: #fff; font-size: 16px; }
.foot-links { font-size: 14.5px; margin: 14px 0 0; }

.disclaimer { font-size: 13.5px; color: #A9B1BB; border-top: 1px solid #39414B; margin: 18px 0 0; padding-top: 14px; }
.upd { color: #D7DCE2; }
.totop { position: fixed; right: 16px; bottom: 18px; z-index: 30; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--red); color: #fff; box-shadow: var(--shadow-lg); cursor: pointer; display: grid; place-items: center; }
.totop[hidden] { display: none; }

/* ---------- Trang in QR ---------- */
.qrpage { padding-top: 24px; padding-bottom: 32px; }
.qr-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.qr-controls label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 15px; flex: 1 1 260px; }
.qr-controls input, .qr-controls select { font: inherit; font-weight: 400; padding: 9px 12px; border: 1px solid #C9CED5; border-radius: 10px; min-height: 44px; }
.qr-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.qr-warn { display: flex; gap: 8px; align-items: center; background: var(--amber-l); color: var(--amber); padding: 10px 14px; border-radius: 10px; font-weight: 600; }
.qr-warn[hidden] { display: none; }
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.qrcard { background: #fff; border: 2px solid var(--red); border-radius: 16px; padding: 14px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; break-inside: avoid; }
.qrcard.off { opacity: .45; }
.qrcard .qc-top { display: flex; align-items: center; gap: 8px; }
.qrcard .qc-top img { width: 42px; }
.qrcard .qc-head { font-size: 12px; font-weight: 800; color: var(--red); letter-spacing: .03em; text-transform: uppercase; line-height: 1.3; text-align: left; }
.qrcard .qc-scan { font-size: 11.5px; color: var(--ink-2); }
.qrcard .qc-qr { width: 100%; max-width: 220px; aspect-ratio: 1; }
.qrcard .qc-qr svg { width: 100%; height: 100%; }
.qrcard .qc-no { font-size: 12px; font-weight: 700; color: #fff; background: var(--red); padding: 2px 10px; border-radius: 999px; }
.qrcard .qc-name { font-weight: 800; font-size: 17px; line-height: 1.25; }
.qrcard .qc-url { font-size: 10.5px; color: var(--ink-2); word-break: break-all; }
.qrcard .qc-tools { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 4px; font-size: 14px; }
.qrcard .qc-tools button { font: inherit; font-size: 13.5px; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 5px 10px; cursor: pointer; }

/* ---------- Thích ứng màn hình ---------- */
@media (max-width: 900px) {
  .quick { grid-template-columns: repeat(2, 1fr); }
  .related-list { grid-template-columns: repeat(2, 1fr); }
  .forms { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .hero { padding: 24px 0 70px; }
  .hero-in { flex-direction: column; text-align: center; gap: 12px; }
  .hero-emblem { width: 120px; }
  .searchbox { margin: 0 auto; }
  .portals { grid-template-columns: 1fr; gap: 12px; margin-top: -48px; }
  .portal { min-height: 0; padding: 20px 18px; }
  .portal-ic { width: 60px; height: 60px; }
  .portal-ic .ic { width: 32px; height: 32px; }
  .tiles, .ch-grid, .facts, .checkgroups, .foot-grid { grid-template-columns: 1fr; }
  .facts { margin-top: -34px; gap: 8px; }
  .fact { padding: 12px 14px; }
  .kv-row { grid-template-columns: 1fr; gap: 4px; }
  .tabs { grid-template-columns: 1fr; }
  .tabs button { justify-content: flex-start; padding-left: 14px; }
  .sec { padding: 16px; }
  .share { flex-direction: column; text-align: center; }
  .pager { grid-template-columns: 1fr; }
  .shot { width: 78vw; max-width: 300px; }
  .shot.wide { width: 86vw; max-width: 460px; }
  .shot-img { height: 400px; }
  .shot.wide .shot-img { height: 230px; }
  .lb-stage { padding: 0 6px; }
  .lb-nav { top: auto; bottom: 8px; transform: none; }
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { border-top: 1px solid var(--line); padding: 8px 0; }
  .tbl td { border: 0; padding: 4px 12px; background: transparent !important; }
  .tbl td::before { content: attr(data-label); display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .03em; }
  .acc-body { padding-left: 14px; }
}
@media (max-width: 560px) {
  .hero { padding: 18px 0 64px; }
  .hero-emblem { width: 84px; }
  .hero h1 { margin-bottom: 12px; }
  .hero-sub { display: none; }
  .hero-kicker { font-size: 12.5px; }
  .emblem { width: 50px; }
  .brand-txt b { font-size: 16.5px; }
  .brand-txt small { font-size: 11px; }
  .brand-txt em { font-size: 12px; }
  .mainnav .wrap { display: flex; gap: 0; padding: 0 2px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .mainnav a { flex: none; flex-direction: column; gap: 2px; font-size: 12px; padding: 7px 10px 6px; justify-content: center; text-align: center; white-space: nowrap; }
  .mainnav .ic { width: 21px; height: 21px; }
  .quick { grid-template-columns: 1fr 1fr; }
  .quick a { flex-direction: column; align-items: flex-start; gap: 8px; }
  .formcard { flex-direction: column; }
  .form-thumb { width: 100%; max-height: 180px; }
  .form-thumb img { object-fit: cover; object-position: top; height: 180px; }
}
@media (max-width: 400px) {
  .related-list { grid-template-columns: 1fr; }
  .tile { padding: 14px; gap: 12px; }
  .tile-ic { width: 48px; height: 48px; }
}

/* ---------- In ấn ---------- */
@media print {
  :root { --fs: 12pt; }
  body { background: #fff; }
  .mainnav, .stripe, .fontbtn, .tools, .toc, .pager, .related, .share, .foot, .noprint, .hint, .totop, .lb, .gal-head span { display: none !important; }
  .site-head { box-shadow: none; border-bottom: 2px solid #000; }
  .hero-proc { color: #000; background: none !important; padding: 0; }
  .hero-proc .crumb, .hero-ic { display: none; }
  .hero-no { color: #000; }
  .facts { margin-top: 10px; }
  .sec, .fact { box-shadow: none; break-inside: avoid-page; }
  .tabpanel[hidden] { display: block !important; }
  .tabs { display: none; }
  .gallery { flex-wrap: wrap; overflow: visible; }
  .shot { width: 30%; break-inside: avoid; box-shadow: none; }
  .shot-img { height: 260px; }
  a { color: #000; text-decoration: none; }
  .p-qr .site-head { display: none; }
  .p-qr .wrap { padding: 0; max-width: none; }
  .p-qr .qr-grid { gap: 6mm; }
  .p-qr .qrcard.off { display: none; }
  .p-qr .qc-tools { display: none; }
  .p-qr.per-4 .qr-grid { grid-template-columns: repeat(2, 1fr); }
  .p-qr.per-4 .qrcard { height: 128mm; justify-content: center; }
  .p-qr.per-4 .qc-qr { max-width: 80mm; }
  .p-qr.per-4 .qc-name { font-size: 18pt; }
  .p-qr.per-6 .qr-grid { grid-template-columns: repeat(2, 1fr); }
  .p-qr.per-6 .qrcard { height: 84mm; justify-content: center; }
  .p-qr.per-6 .qc-qr { max-width: 44mm; }
  .p-qr.per-12 .qr-grid { grid-template-columns: repeat(3, 1fr); gap: 4mm; }
  .p-qr.per-12 .qrcard { height: 64mm; justify-content: center; padding: 6px; }
  .p-qr.per-12 .qc-qr { max-width: 32mm; }
  .p-qr.per-12 .qc-top img { width: 28px; }
  .p-qr.per-12 .qc-name { font-size: 10pt; }
  .p-qr .qrcard { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { size: A4; margin: 10mm; }
}
