/* Kho biểu mẫu — trang công khai (/bieu-mau). Thẻ nhúng trong blog (.fm-embed) nằm ở theme.css. */
.fm-hero { padding-bottom: 2.6rem; }
.fm-wrap { padding-top: 2rem; padding-bottom: 3rem; }
.fm-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .84rem; color: var(--muted); margin-bottom: 1rem; }
.fm-crumb a { color: var(--muted); text-decoration: none; } .fm-crumb a:hover { color: var(--brand); } .fm-crumb i { font-size: .7rem; }

/* ô tìm kiếm + gợi ý tức thì */
.fm-search { position: relative; display: flex; align-items: center; gap: .5rem; max-width: 760px; margin: 0 auto; background: #fff;
  border: 1px solid var(--line); border-radius: 16px; padding: .35rem .35rem .35rem 1rem; box-shadow: 0 18px 40px -28px rgba(15, 23, 42, .45); }
.fm-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-50), 0 18px 40px -28px rgba(15, 23, 42, .45); }
.fm-search > i { color: var(--muted); font-size: 1.1rem; }
.fm-search input { flex: 1; min-width: 0; border: 0; outline: 0; font-size: 1rem; padding: .55rem 0; background: transparent; }
.fm-search .btn { border-radius: 12px; padding: .55rem 1.3rem; font-weight: 700; }
.fm-search.is-big input { font-size: 1.08rem; padding: .75rem 0; } .fm-search.is-big .btn { padding: .75rem 1.6rem; }
.fm-drop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 14px; z-index: 30;
  box-shadow: 0 24px 50px -24px rgba(15, 23, 42, .45); overflow: hidden; text-align: left; }
.fm-drop a { display: flex; align-items: center; gap: .7rem; padding: .6rem .9rem; color: var(--ink); text-decoration: none; border-bottom: 1px solid #f1f5f9; }
.fm-drop a:last-child { border-bottom: 0; } .fm-drop a:hover, .fm-drop a.on { background: var(--brand-50); }
.fm-drop a > i { font-size: 1.2rem; color: var(--brand); } .fm-drop b { display: block; font-size: .92rem; line-height: 1.3; }
.fm-drop small { color: var(--muted); font-size: .76rem; } .fm-drop .fm-drop-all { justify-content: center; font-size: .85rem; color: var(--brand-600); font-weight: 600; }
.fm-drop .fm-drop-none { padding: .8rem 1rem; font-size: .88rem; color: var(--muted); }
.fm-quick { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin: 1rem auto 0; max-width: 820px; }
.fm-quick a { font-size: .82rem; padding: .3rem .8rem; border-radius: 999px; background: rgba(255, 255, 255, .8); border: 1px solid var(--line); color: #334155; text-decoration: none; }
.fm-quick a:hover { border-color: var(--brand); color: var(--brand); }
.fm-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.4rem; margin-top: 1.4rem; font-size: .88rem; color: #475569; }
.fm-stats b { color: var(--ink); font-size: 1rem; } .fm-stats i { color: var(--brand); }

/* hỏi AI */
.fm-ask { max-width: 760px; margin: 1rem auto 0; }
.fm-ask-open { display: flex; align-items: center; gap: .8rem; width: 100%; text-align: left; padding: .7rem .9rem; border-radius: 14px; border: 1px dashed #c4b5fd;
  background: linear-gradient(90deg, #f5f3ff, #fff); color: var(--ink); }
.fm-ask-open small { display: block; color: var(--muted); font-size: .8rem; } .fm-ask-open b { font-size: .93rem; }
.fm-ai-ic { flex: 0 0 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #7c3aed, var(--brand)); color: #fff; display: grid; place-items: center; }
.fm-ask-box { margin-top: .6rem; padding: .8rem; border-radius: 14px; background: #fff; border: 1px solid var(--line); text-align: left; }
.fm-ai-res { margin-top: .8rem; } .fm-ai-ans { font-size: .93rem; line-height: 1.6; padding: .7rem .9rem; border-radius: 12px; background: #f5f3ff; }
.fm-ai-picks { display: grid; gap: .35rem; margin-top: .6rem; }
.fm-ai-picks a { display: flex; gap: .6rem; align-items: center; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; font-size: .9rem; }
.fm-ai-picks a:hover { border-color: var(--brand); } .fm-ai-picks small { color: var(--muted); display: block; font-size: .78rem; }
.fm-ai-miss { margin-top: .6rem; font-size: .84rem; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: .5rem .7rem; }

/* khối trang */
.fm-sec { margin-top: 2.4rem; }
.fm-sec-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: .4rem 1rem; margin-bottom: 1rem; }
.fm-sec-h h2 { font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; margin: 0; } .fm-sec-h a { margin-left: auto; font-size: .88rem; }

/* lĩnh vực */
.fm-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; }
.fm-catc { border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.fm-catc:hover { border-color: color-mix(in srgb, var(--c) 35%, #fff); box-shadow: 0 16px 34px -26px var(--c); }
.fm-catc-h { display: flex; align-items: center; gap: .75rem; padding: .9rem 1rem; color: var(--ink); text-decoration: none; }
.fm-catc-h b { display: block; font-size: 1rem; } .fm-catc-h small { color: var(--muted); font-size: .8rem; } .fm-catc-h > i { color: var(--muted); }
.fm-catc-ic { flex: 0 0 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem; color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, #fff); }
.fm-catc-ic.is-lg { flex-basis: 64px; height: 64px; border-radius: 18px; font-size: 1.8rem; }
.fm-catc-s { display: flex; flex-wrap: wrap; gap: .3rem; padding: 0 1rem .9rem; }
.fm-catc-s a { font-size: .76rem; padding: .15rem .55rem; border-radius: 999px; background: #f8fafc; border: 1px solid #eef2f7; color: #475569; text-decoration: none; }
.fm-catc-s a:hover { color: var(--c); border-color: var(--c); } .fm-catc-s em { font-style: normal; color: var(--muted); }

/* thẻ mẫu */
.fm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.fm-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s; }
.fm-card:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -30px rgba(15, 23, 42, .6); border-color: color-mix(in srgb, var(--c) 30%, #fff); }
.fm-card.is-exp { opacity: .75; }
.fm-paper { display: block; aspect-ratio: 4 / 3; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 10%, #fff), #f8fafc); padding: 1rem 1.2rem 0;
  overflow: hidden; position: relative; text-decoration: none; }
.fm-paper img { width: 100%; height: auto; border-radius: 6px 6px 0 0; box-shadow: 0 10px 24px -14px rgba(15, 23, 42, .5); display: block; }
.fm-sheet { display: flex; flex-direction: column; gap: .32rem; height: 100%; background: #fff; border-radius: 6px 6px 0 0; padding: .9rem .9rem 0;
  box-shadow: 0 10px 24px -14px rgba(15, 23, 42, .45); position: relative; }
.fm-sheet-bar { display: block; height: 4px; width: 38%; border-radius: 4px; background: var(--c); margin-bottom: .2rem; }
.fm-sheet-code { font-size: .72rem; font-weight: 800; color: var(--c); letter-spacing: .02em; }
.fm-sheet-t { font-size: .74rem; font-weight: 700; color: #1e293b; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  text-transform: uppercase; margin-bottom: .25rem; }
.fm-l { display: block; height: 5px; border-radius: 3px; background: #e9eef5; width: 100%; } .fm-l.s { width: 62%; } .fm-l.m { width: 82%; }
.fm-sheet > * { flex-shrink: 0; }   /* tờ giấy thấp: phần thừa bị khung che, chữ tiêu đề không bị ép đè lên dòng kẻ */
.fm-sheet-ic { position: absolute; right: .7rem; bottom: .5rem; font-size: 1.7rem; color: color-mix(in srgb, var(--c) 35%, #fff); }
.fm-card-b { padding: .8rem .95rem .9rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.fm-card-top { display: flex; align-items: center; gap: .4rem; min-height: 1.4rem; }
.fm-cat { font-size: .72rem; font-weight: 700; color: var(--c); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-save { margin-left: auto; border: 0; background: none; color: #94a3b8; padding: 0 .1rem; font-size: 1rem; } .fm-save.on, .fm-save:hover { color: var(--brand); }
.fm-card-t { font-size: .95rem; font-weight: 700; line-height: 1.35; margin: 0; }
.fm-card-t a { color: var(--ink); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fm-card-t a:hover { color: var(--brand-600); }
.fm-code { font-weight: 800; color: var(--c, var(--brand)); }
.fm-card-s { font-size: .82rem; color: #64748b; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fm-card-m { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-top: auto; padding-top: .3rem; }
.fm-dl { margin-left: auto; font-size: .74rem; color: var(--muted); }
.fm-k { font-size: .68rem; font-weight: 700; padding: .1rem .42rem; border-radius: 6px; letter-spacing: .01em; }
.fm-k-doc { background: #dbeafe; color: #1d4ed8; } .fm-k-xls { background: #dcfce7; color: #15803d; } .fm-k-pdf { background: #fee2e2; color: #b91c1c; }
.fm-k-fill { background: #ede9fe; color: #6d28d9; }
.fm-legal { font-size: .72rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px; display: inline-flex; gap: .25rem; align-items: center; }
.fm-legal.is-ok { background: #dcfce7; color: #166534; } .fm-legal.is-exp { background: #fee2e2; color: #b91c1c; } .fm-legal.is-up { background: #fef3c7; color: #92400e; }

/* bộ hồ sơ */
.fm-bundles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .8rem; }
.fm-bundle { display: flex; gap: .9rem; padding: 1rem; border-radius: 16px; text-decoration: none; color: var(--ink); border: 1px solid var(--line);
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 9%, #fff), #fff 70%); transition: border-color .2s, transform .2s; }
.fm-bundle:hover { border-color: var(--c); transform: translateY(-2px); }
.fm-bundle-ic { position: relative; flex: 0 0 48px; height: 48px; border-radius: 14px; background: var(--c); color: #fff; display: grid; place-items: center; font-size: 1.3rem; }
.fm-bundle-ic em { position: absolute; right: -6px; top: -6px; min-width: 1.4rem; height: 1.4rem; border-radius: 999px; background: #fff; color: var(--c); font-style: normal;
  font-size: .72rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--c); }
.fm-bundle-ic.is-lg { flex-basis: 68px; height: 68px; font-size: 1.8rem; border-radius: 18px; }
.fm-bundle-b { display: flex; flex-direction: column; min-width: 0; } .fm-bundle-b b { font-size: .98rem; line-height: 1.3; }
.fm-bundle-b small { color: #64748b; font-size: .8rem; margin-top: .15rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fm-bundle-go { margin-top: .45rem; font-size: .8rem; font-weight: 700; color: var(--c); }

/* trống / đề nghị */
.fm-empty { display: flex; flex-direction: column; align-items: center; gap: .4rem; text-align: center; padding: 2.4rem 1rem; border: 1px dashed var(--line);
  border-radius: 18px; background: #fff; color: #475569; }
.fm-empty > i { font-size: 2rem; color: var(--brand); } .fm-empty b { font-size: 1.05rem; color: var(--ink); }
.fm-req { display: flex; gap: .5rem; width: 100%; max-width: 520px; margin-top: .6rem; } .fm-req .btn { white-space: nowrap; }
.fm-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 2.6rem; padding: 1.3rem 1.4rem; border-radius: 18px;
  background: linear-gradient(135deg, var(--brand-50), #fff); border: 1px solid var(--brand-100); }
.fm-cta > div { flex: 1 1 260px; } .fm-cta b { display: block; font-size: 1.05rem; } .fm-cta span { font-size: .88rem; color: #475569; }
.fm-cta .fm-req { flex: 1 1 360px; margin: 0; }

/* trang lĩnh vực */
.fm-cat-head { display: flex; align-items: center; gap: 1rem; padding: 1.2rem 1.3rem; border-radius: 20px; margin-bottom: 1rem;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 10%, #fff), #fff 75%); border: 1px solid color-mix(in srgb, var(--c) 18%, #fff); }
.fm-cat-head h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; margin: 0 0 .25rem; letter-spacing: -.02em; }
.fm-cat-head p { margin: 0; color: #475569; font-size: .95rem; } .fm-cat-n { margin-left: auto; text-align: center; color: var(--muted); font-size: .8rem; white-space: nowrap; }
.fm-cat-n b { display: block; font-size: 1.6rem; color: var(--c); line-height: 1; }
.fm-subs { position: relative; display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .3rem; margin-bottom: .9rem; scrollbar-width: none; }
.fm-subs a { white-space: nowrap; font-size: .84rem; padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: #334155; text-decoration: none; }
.fm-subs a.on { background: var(--ink); color: #fff; border-color: var(--ink); } .fm-subs em { font-style: normal; opacity: .6; }
.fm-filter { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1.2rem; }
.fm-filter-q { flex: 1 1 260px; display: flex; align-items: center; gap: .5rem; padding: 0 .8rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.fm-filter-q input { flex: 1; border: 0; outline: 0; padding: .55rem 0; background: transparent; } .fm-filter-q i { color: var(--muted); }
.fm-filter .form-select { width: auto; border-radius: 12px; }
.fm-chk { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; color: #475569; cursor: pointer; }

/* trang một mẫu */
.fm-detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; align-items: start; }
.fm-main { min-width: 0; }
.fm-head { padding-bottom: 1rem; border-bottom: 1px solid var(--line); margin-bottom: 1.2rem; }
.fm-head-tags { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-bottom: .6rem; }
.fm-codepill { font-weight: 800; font-size: .85rem; padding: .2rem .65rem; border-radius: 8px; background: var(--c); color: #fff; letter-spacing: .02em; }
.fm-head h1 { font-size: clamp(1.5rem, 3.2vw, 2.15rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.2; margin: 0 0 .5rem; }
.fm-lead { font-size: 1.05rem; color: #475569; margin-bottom: .8rem; }
.fm-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin: 0; font-size: .86rem; }
.fm-meta div { display: flex; gap: .35rem; } .fm-meta dt { color: var(--muted); font-weight: 500; } .fm-meta dd { margin: 0; color: var(--ink); font-weight: 600; }
.fm-replaced { margin-top: .8rem; padding: .6rem .8rem; border-radius: 12px; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; font-size: .9rem; }
.fm-prev { border: 1px solid var(--line); border-radius: 18px; background: #f1f5f9; overflow: hidden; margin-bottom: 1.6rem; }
.fm-prev-h { display: flex; align-items: center; gap: .6rem; padding: .6rem .9rem; background: #fff; border-bottom: 1px solid var(--line); font-size: .9rem; }
.fm-tabs { display: flex; gap: .25rem; margin-left: auto; background: #f1f5f9; padding: .2rem; border-radius: 10px; }
.fm-tabs button { border: 0; background: none; font-size: .8rem; font-weight: 600; padding: .25rem .7rem; border-radius: 8px; color: #475569; }
.fm-tabs button.on { background: #fff; color: var(--brand-600); box-shadow: var(--shadow-sm); }
.fm-prev-b { max-height: 760px; overflow: auto; padding: 1.2rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.fm-page { width: 100%; height: auto; max-width: 760px; background: #fff; box-shadow: 0 14px 34px -22px rgba(15, 23, 42, .55); border-radius: 4px; }
.fm-more { font-size: .85rem; color: var(--muted); }
.fm-a4 { width: 100%; max-width: 760px; background: #fff; padding: 2.4rem 2.6rem; box-shadow: 0 14px 34px -22px rgba(15, 23, 42, .55); border-radius: 4px;
  font-family: "Times New Roman", Times, serif; font-size: 15px; line-height: 1.45; color: #111; }
.fp-doc p { margin: 0 0 .35rem; min-height: 1em; } .fp-doc p.c { text-align: center; } .fp-doc p.r { text-align: right; } .fp-doc p.j { text-align: justify; }
.fp-doc p.h { font-weight: 700; } .fp-t { width: 100%; border-collapse: collapse; margin: .5rem 0; font-size: 13px; }
.fp-t td { border: 1px solid #94a3b8; padding: .25rem .4rem; vertical-align: top; }
.fp-xls { font-family: Arial, sans-serif; font-size: 12px; } .fp-sheets { display: flex; gap: .2rem; margin-bottom: .5rem; flex-wrap: wrap; }
.fp-sheets span { padding: .15rem .5rem; border: 1px solid #cbd5e1; border-radius: 4px; color: #475569; } .fp-sheets span.on { background: #dcfce7; border-color: #86efac; color: #166534; }
.fp-xls-in { overflow: auto; } .fp-xls .fp-t td { white-space: nowrap; border-color: #cbd5e1; }
.fm-guide { margin-bottom: 1.6rem; }
.fm-info { border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.2rem; background: #fff; margin-bottom: 1rem; }
.fm-info h2 { font-size: 1.1rem; font-weight: 800; margin-bottom: .6rem; }
.fm-info table { width: 100%; font-size: .9rem; } .fm-info th { width: 34%; color: var(--muted); font-weight: 500; padding: .4rem .6rem .4rem 0; vertical-align: top; }
.fm-info td { padding: .4rem 0; border-bottom: 1px dashed #eef2f7; } .fm-info tr:last-child td { border-bottom: 0; }
.fm-posts { list-style: none; padding: 0; display: grid; gap: .4rem; } .fm-posts a { text-decoration: none; }

/* cột phải: tải */
.fm-side { position: sticky; top: 84px; display: grid; gap: 1rem; }
.fm-dlcard { border: 1px solid var(--line); border-radius: 18px; background: #fff; padding: 1rem; box-shadow: 0 20px 44px -34px rgba(15, 23, 42, .55); }
.fm-dlcard-h { font-weight: 800; margin-bottom: .7rem; }
.fm-dl-btn { display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem; border-radius: 12px; border: 1px solid var(--line); margin-bottom: .5rem;
  color: var(--ink); text-decoration: none; transition: border-color .2s, background .2s; }
.fm-dl-btn > i:first-child { font-size: 1.5rem; } .fm-dl-btn b { display: block; font-size: .92rem; } .fm-dl-btn small { color: var(--muted); font-size: .76rem; }
.fm-dl-btn.k-doc > i:first-child { color: #2563eb; } .fm-dl-btn.k-xls > i:first-child { color: #16a34a; } .fm-dl-btn.k-pdf > i:first-child { color: #dc2626; }
.fm-dl-btn.k-zip > i:first-child { color: var(--brand); } .fm-dl-btn:hover { border-color: var(--brand); background: var(--brand-50); }
.fm-dl-btn.k-fill { background: linear-gradient(90deg, #f5f3ff, #fff); border-color: #ddd6fe; } .fm-dl-btn.k-fill > i:first-child { color: #7c3aed; }
.fm-dlcard-act { display: flex; gap: .4rem; margin-top: .3rem; } .fm-save-b.on { color: var(--brand); border-color: var(--brand) !important; }
.fm-dlcard-n { margin-top: .7rem; font-size: .8rem; color: #475569; background: #f8fafc; border-radius: 10px; padding: .5rem .6rem; }
.fm-dlcard-s { display: flex; justify-content: space-between; margin-top: .7rem; font-size: .76rem; color: var(--muted); }
.fm-toc { border-left: 2px solid var(--line); padding-left: 1rem; font-size: .84rem; } .fm-toc b { font-size: .74rem; text-transform: uppercase; color: var(--muted); letter-spacing: .06em; }
.fm-toc ol { list-style: none; padding: 0; margin: .4rem 0 0; } .fm-toc li { margin-bottom: .35rem; } .fm-toc li.l3 { padding-left: .7rem; }
.fm-toc a { color: #475569; text-decoration: none; } .fm-toc a:hover { color: var(--brand); }

/* điền trực tiếp */
.fm-fill { border: 1px solid #ddd6fe; border-radius: 18px; padding: 1.1rem 1.2rem; margin-bottom: 1.6rem; background: linear-gradient(180deg, #faf5ff, #fff 160px); scroll-margin-top: 90px; }
.fm-fill-h { display: flex; gap: .8rem; align-items: center; margin-bottom: .9rem; } .fm-fill-h h2 { font-size: 1.2rem; font-weight: 800; margin: 0; }
.fm-fill-h small { color: #6b21a8; font-size: .8rem; }
.fm-fill-ic { flex: 0 0 42px; height: 42px; border-radius: 12px; background: #7c3aed; color: #fff; display: grid; place-items: center; font-size: 1.2rem; }
.fm-cccd { display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem; border: 1px dashed #a78bfa; border-radius: 14px; background: #fff; cursor: pointer; margin-bottom: 1rem; }
.fm-cccd:hover { background: #f5f3ff; } .fm-cccd > i { font-size: 1.6rem; color: #7c3aed; } .fm-cccd b { display: block; font-size: .93rem; }
.fm-cccd small { color: var(--muted); font-size: .78rem; } .fm-cccd em { margin-left: auto; font-style: normal; font-size: .82rem; white-space: nowrap; }
.fm-fill fieldset { margin-bottom: .9rem; } .fm-fill legend { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #6b21a8; margin-bottom: .4rem; }
.fm-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem .8rem; }
.fm-fields label { display: flex; flex-direction: column; gap: .2rem; font-size: .82rem; color: #334155; font-weight: 600; } .fm-fields label.is-wide { grid-column: 1 / -1; }
.fm-fields .form-control.is-auto { background: #f5f3ff; border-color: #c4b5fd; }
.fm-fill-act { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .4rem; }
.fm-msg { margin-top: .7rem; padding: .55rem .8rem; border-radius: 10px; font-size: .88rem; background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.fm-msg.is-err { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

/* trang bộ hồ sơ */
.fm-bhead { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding: 1.3rem 1.4rem; border-radius: 20px; margin-bottom: 1.4rem;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 10%, #fff), #fff 75%); border: 1px solid color-mix(in srgb, var(--c) 18%, #fff); }
.fm-bhead > div { flex: 1 1 320px; } .fm-bhead h1 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.02em; margin: .1rem 0 .3rem; }
.fm-bhead p { margin: 0; color: #475569; } .fm-eyebrow { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--c); }
.fm-checklist { border: 1px solid var(--line); border-radius: 18px; background: #fff; padding: 1rem 1.2rem; margin-bottom: 1.6rem; }
.fm-checklist h2 { font-size: 1.15rem; font-weight: 800; } .fm-checklist ol { list-style: none; padding: 0; margin: 0; }
.fm-checklist li { display: flex; gap: .8rem; align-items: flex-start; padding: .8rem 0; border-bottom: 1px solid #f1f5f9; } .fm-checklist li:last-child { border-bottom: 0; }
.fm-checklist li.is-opt { opacity: .85; }
.fm-ck-n { flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--brand-50); color: var(--brand-600); font-weight: 800; display: grid; place-items: center; font-size: .85rem; }
.fm-ck-b { flex: 1; min-width: 0; } .fm-ck-b a { color: var(--ink); text-decoration: none; } .fm-ck-b small { display: block; color: var(--muted); font-size: .8rem; }
.fm-ck-dl { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: flex-end; } .fm-ck-dl .btn { font-size: .78rem; }

.fm-qdl { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .9rem; }
@media (max-width: 991.98px) { .fm-detail { grid-template-columns: minmax(0, 1fr); } .fm-side { position: static; } .fm-toc { display: none; } }
@media (max-width: 575.98px) {
  .fm-search { padding-left: .8rem; } .fm-search .btn { padding: .55rem .9rem; } .fm-search.is-big input { font-size: 1rem; }
  .fm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; } .fm-card-b { padding: .6rem .7rem .7rem; } .fm-card-t { font-size: .86rem; }
  .fm-paper { padding: .7rem .8rem 0; } .fm-fields { grid-template-columns: 1fr; } .fm-a4 { padding: 1.2rem; font-size: 13px; }
  .fm-cat-head { flex-wrap: wrap; } .fm-cat-n { margin-left: 0; } .fm-req { flex-direction: column; } .fm-ck-dl { width: 100%; justify-content: flex-start; padding-left: 2.6rem; }
  .fm-checklist li { flex-wrap: wrap; }
}

/* trạng thái tải bản xem trước (tab sau) */
.fm-loading { display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 220px; color: var(--muted); font-size: .9rem; }

/* phân trang lĩnh vực */
.fm-found { font-size: .88rem; color: var(--muted); margin: -.4rem 0 .8rem; }
.fm-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .35rem; margin: 1.8rem 0 .5rem; }
.fm-pager > a, .fm-pager > span { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: .2rem; padding: 0 .75rem;
  border-radius: 12px; border: 1px solid var(--line); background: #fff; font-size: .9rem; font-weight: 500; text-decoration: none; }
.fm-pager > a { color: var(--ink); } .fm-pager > a:hover { border-color: color-mix(in srgb, var(--brand) 35%, #fff); color: var(--brand-600); }
.fm-pager > span.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.fm-pager > span.gap { border: 0; background: none; min-width: 20px; padding: 0; color: var(--muted); }
.fm-pager small { flex-basis: 100%; text-align: center; color: var(--muted); font-size: .8rem; margin-top: .3rem; }
@media (max-width: 575.98px) { .fm-pager a span { display: none; } }
.fp-doc .fp-note { font-size: .78rem; color: #64748b; font-style: italic; text-align: center; border-bottom: 1px dashed #e2e8f0; padding-bottom: .6rem; margin-bottom: 1rem; }

/* điện thoại: đầu trang lĩnh vực gọn, bộ lọc chia đều */
@media (max-width: 575.98px) {
  .fm-cat-head { flex-wrap: nowrap; align-items: flex-start; gap: .8rem; padding: 1rem; border-radius: 16px; }
  .fm-cat-head .fm-catc-ic.is-lg { flex-basis: 44px; height: 44px; border-radius: 12px; font-size: 1.25rem; }
  .fm-cat-head p { font-size: .85rem; } .fm-cat-head .fm-cat-n { display: none; }
  .fm-filter-q, .fm-filter .fm-chk { flex-basis: 100%; } .fm-filter .form-select { flex: 1 1 0; min-width: 0; }
  .fm-sheet { padding: .7rem .7rem 0; } .fm-sheet-t { font-size: .64rem; } .fm-sheet-code { font-size: .64rem; }
}

/* tính năng AI đang khoá (trả phí, sắp mở) */
.fm-ask.is-locked .fm-ask-open { cursor: default; opacity: .85; } .fm-ask.is-locked .fm-ai-ic { filter: grayscale(.4); }
.fm-lock { flex: 0 0 auto; font-size: .75rem; font-weight: 700; color: #92400e; background: #fef3c7; border: 1px solid #fde68a; border-radius: 999px; padding: .2rem .6rem; white-space: nowrap; }
.fp-t-wrap { overflow-x: auto; margin: .5rem 0; } .fp-t-wrap .fp-t { margin: 0; }

/* thẻ: ảnh bìa trang 1 lấp khung, không lặp tên mẫu */
.fm-paper img { object-fit: cover; object-position: top; }
.fm-sheet .fm-l.w { width: 46%; height: 7px; margin: .2rem auto .5rem; background: #dfe5ee; }
/* bản chữ dưới ảnh trang (gấp lại) */
.fm-textv { width: 100%; max-width: 760px; margin-top: .8rem; } .fm-textv summary { cursor: pointer; font-size: .86rem; color: var(--muted); padding: .4rem 0; }
.fm-textv[open] summary { margin-bottom: .5rem; }
