/* fomvu：名片与公函 */
:root {
  --fm-bg: #b9c8d6;
  --fm-ink: #14212e;
  --fm-blue: #1b3f8b;
  --fm-gold: #b08d3c;
  --fm-line: #9fb1c2;
  --fm-paper: #f4f7fa;
  --fm-muted: #3a4c5e;
  --fm-wash: #e4ebf2;
  --fm-cjk: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  --fm-latin: "Calisto MT", "Book Antiqua", serif;
  --fm-lift: 0 1px 0 rgba(20, 33, 46, .10), 0 16px 30px -18px rgba(20, 33, 46, .60);
  --fm-lift-hi: 0 1px 0 rgba(20, 33, 46, .14), 0 22px 36px -16px rgba(20, 33, 46, .70);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body.fm-body {
  margin: 0;
  background: var(--fm-bg);
  color: var(--fm-ink);
  font-family: var(--fm-cjk);
  font-size: 16px;
  line-height: 1.75;
}
img { max-width: 100%; height: auto; }
a { color: var(--fm-blue); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--fm-blue); outline-offset: 2px; }
.fm-latin { font-family: var(--fm-latin); }
.fm-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.fm-skip {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  background: var(--fm-ink); color: var(--fm-paper);
  padding: 10px 16px; min-height: 44px; display: inline-flex; align-items: center;
}
.fm-skip:focus { top: 8px; }

/* 页头 */
.fm-mast { border-bottom: 1px solid var(--fm-line); }
.fm-mast-in {
  max-width: 1120px; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 64px;
}
.fm-brand { color: var(--fm-ink); display: inline-flex; align-items: center; min-height: 44px; }
.fm-wordmark { display: block; }
.fm-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.fm-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--fm-ink); text-decoration: none; font-size: 15px;
  border-bottom: 2px solid transparent;
}
.fm-nav a:hover { border-bottom-color: var(--fm-line); }
.fm-nav a[aria-current="page"] { border-bottom-color: var(--fm-gold); font-weight: 700; }

.fm-main { max-width: 1120px; margin: 0 auto; padding: 28px 16px 56px; }
.fm-main:focus { outline: none; }

/* 纸 */
.fm-sheet {
  background: var(--fm-paper);
  box-shadow: var(--fm-lift);
  padding: 36px 44px 40px;
  margin: 0 0 32px;
}

.fm-h1 {
  font-size: 35px; line-height: 1.32; margin: 0 0 16px; font-weight: 700;
  line-break: strict; text-wrap: balance; letter-spacing: .01em;
}

/* 首页首屏 */
.fm-desk {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: 48px; align-items: start; padding: 8px 0 44px;
}
.fm-lede { font-size: 17px; color: var(--fm-ink); margin: 0 0 24px; max-width: 30em; }
.fm-pick {
  background: var(--fm-paper);
  border-top: 3px double var(--fm-gold);
  box-shadow: var(--fm-lift);
  padding: 16px 20px 18px;
  max-width: 32em;
}
.fm-pick-tag { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--fm-blue); }
.fm-pick-title {
  display: inline-block; font-size: 19px; font-weight: 700; line-height: 1.5;
  line-break: strict; padding: 4px 0;
}
.fm-pick-why { margin: 6px 0 0; font-size: 15px; color: var(--fm-muted); }

.fm-desk-papers { position: relative; min-height: 548px; }
.fm-letter {
  position: absolute; top: 0; right: 0; width: 84%;
  background: var(--fm-paper); box-shadow: var(--fm-lift);
  padding: 26px 30px 168px;
  transform: rotate(.9deg);
}
.fm-letter-head {
  margin: 0 0 14px; padding-bottom: 10px; font-size: 19px; font-weight: 700;
  border-bottom: 4px double var(--fm-gold);
}
.fm-letter-rows { margin: 0; }
.fm-letter-rows div {
  display: grid; grid-template-columns: 6.5em 1fr; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--fm-line);
}
.fm-letter-rows dt { font-size: 14px; color: var(--fm-muted); }
.fm-letter-rows dd { margin: 0; font-size: 15px; }
.fm-letter-foot { margin: 12px 0 0; font-size: 13.5px; color: var(--fm-muted); }

/* 名片（码卡） */
.fm-card {
  background: var(--fm-paper);
  border-left: 8px solid var(--fm-blue);
  box-shadow: var(--fm-lift-hi);
  padding: 18px 22px 18px 22px;
}
.fm-card--home { position: absolute; left: 0; bottom: 0; width: 70%; z-index: 2; }
.fm-card-top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.fm-card-kind { font-size: 20px; font-weight: 700; }
.fm-card-sub { font-size: 13.5px; color: var(--fm-muted); }
.fm-code-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px;
  padding: 8px 0 10px; border-bottom: 1px solid var(--fm-gold);
}
.fm-code-cap { font-size: 13.5px; color: var(--fm-muted); }
.fm-code { font-size: 30px; letter-spacing: .06em; color: var(--fm-ink); line-height: 1.2; user-select: all; }
.fm-copy {
  min-height: 44px; min-width: 76px; padding: 0 18px; border: 0; cursor: pointer;
  background: var(--fm-blue); color: #fff; font: inherit; font-size: 15px;
}
.fm-copy:hover { background: #163371; }
.fm-copy.is-done { background: var(--fm-ink); }
.fm-copy:focus-visible { outline-color: var(--fm-gold); }
.fm-code-note { margin: 10px 0 0; font-size: 13.5px; line-height: 1.65; color: var(--fm-muted); }
.fm-go {
  display: flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 14px;
  background: var(--fm-blue); color: #fff; text-decoration: none; font-weight: 700; padding: 10px 16px;
  text-align: center;
}
.fm-go:hover { background: #163371; color: #fff; }
.fm-card-disc { margin: 8px 0 0; font-size: 13.5px; line-height: 1.65; color: var(--fm-muted); }
.fm-card--doc { margin: 28px 0; }
.fm-card--doc .fm-code { font-size: 28px; }

/* 首页正文 */
.fm-home-text { max-width: none; }
.fm-home-text h2, .fm-shelf-h {
  font-size: 22px; margin: 0 0 12px; padding-top: 14px; line-break: strict;
  background: linear-gradient(var(--fm-gold), var(--fm-gold)) left top / 56px 2px no-repeat;
}
.fm-home-text h2:not(:first-child) { margin-top: 36px; }
.fm-home-text p, .fm-home-text li { max-width: 38em; }
.fm-home-text ul, .fm-home-text ol { padding-left: 1.4em; }
.fm-shelf-note { margin: 0 0 8px; color: var(--fm-muted); font-size: 15px; }

.fm-post-list { list-style: none; margin: 0; padding: 0; }
.fm-post-item { border-top: 1px solid var(--fm-line); padding: 16px 0 14px; }
.fm-post-item:last-child { border-bottom: 1px solid var(--fm-line); }
.fm-post-link {
  font-size: 19px; font-weight: 700; line-height: 1.5; display: inline-block; padding: 4px 0;
  line-break: strict;
}
.fm-post-desc { margin: 4px 0 4px; max-width: 38em; }
.fm-post-meta { font-size: 13.5px; color: var(--fm-muted); }

/* 面包屑 */
.fm-crumb ol { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--fm-muted); }
.fm-crumb li { display: inline-flex; align-items: center; min-height: 44px; }
.fm-crumb li + li::before { content: "›"; margin: 0 8px; color: var(--fm-line); }
.fm-crumb a { display: inline-flex; align-items: center; min-height: 44px; }
.fm-crumb li[aria-current] { display: block; flex: 1 1 0; min-width: 8em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 44px; }

/* 文章 */
.fm-doc-head { border-bottom: 4px double var(--fm-gold); padding-bottom: 14px; margin-bottom: 24px; }
.fm-byline { font-size: 14px; color: var(--fm-muted); }
.fm-byline a { display: inline-flex; align-items: center; min-height: 44px; }
.fm-byline-gap { display: inline-block; width: 1.4em; }
.fm-cover { margin: 0 0 28px; max-width: 760px; }
.fm-cover img { display: block; width: 100%; }
.fm-cover figcaption { font-size: 14px; color: var(--fm-muted); margin-top: 8px; }

.fm-doc-grid { display: grid; grid-template-columns: minmax(0, 38em) minmax(0, 15rem); gap: 20px 56px; align-items: start; }
.fm-doc-grid > .fm-prose { grid-column: 1; grid-row: 1; }
.fm-toc {
  grid-column: 2; grid-row: 1; position: sticky; top: 16px;
  border-top: 3px double var(--fm-gold); padding-top: 8px; font-size: 14px;
}
.fm-toc summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.fm-toc ol { margin: 0; padding: 0 0 0 1.3em; }
.fm-toc li { margin: 0; }
.fm-toc a { display: inline-flex; align-items: center; min-height: 44px; line-height: 1.45; padding: 4px 0; color: var(--fm-ink); text-decoration: none; }
.fm-toc a:hover { color: var(--fm-blue); text-decoration: underline; }

.fm-prose { font-size: 16.5px; line-height: 1.88; max-width: 38em; }
.fm-prose > :first-child { margin-top: 0; }
.fm-prose p { margin: .9em 0; }
.fm-prose h2 {
  font-size: 23px; line-height: 1.45; margin: 2.2em 0 .7em; padding-top: 16px;
  line-break: strict; text-wrap: balance; scroll-margin-top: 16px;
  background: linear-gradient(var(--fm-gold), var(--fm-gold)) left top / 56px 2px no-repeat;
}
.fm-prose h3 { font-size: 18px; line-height: 1.5; margin: 1.6em 0 .5em; line-break: strict; scroll-margin-top: 16px; }
.fm-prose ul, .fm-prose ol { padding-left: 1.4em; }
.fm-prose li { margin: .35em 0; }
.fm-prose strong { font-weight: 700; }
.fm-prose code { font-family: var(--fm-latin); font-size: 1.02em; }

/* 批注框 */
.fm-memo {
  margin: 1.6em 0; padding: 14px 18px 14px 18px; background: var(--fm-wash);
  border-left: 4px solid var(--fm-gold);
}
.fm-memo-t { margin: 0 0 4px; font-weight: 700; font-size: 15.5px; }
.fm-memo > :last-child { margin-bottom: 0; }
.fm-memo p { margin: .5em 0; }

/* 截图 */
.fm-shot { margin: 1.8em 0; }
.fm-shot-frame { background: #fff; border: 1px solid var(--fm-line); padding: 10px; box-shadow: var(--fm-lift); display: inline-block; max-width: 100%; }
.fm-shot img { display: block; }
.fm-shot figcaption { font-size: 14px; line-height: 1.65; color: var(--fm-muted); margin-top: 10px; }

/* 表格 */
.fm-tablewrap { overflow-x: auto; margin: 1.6em 0; -webkit-overflow-scrolling: touch; }
.fm-table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.65; background: #fff; }
.fm-table th, .fm-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--fm-line); }
.fm-table thead th { background: var(--fm-wash); font-size: 14.5px; border-bottom: 2px solid var(--fm-ink); white-space: nowrap; }
.fm-table tbody th { font-weight: 700; }

/* 公函式双栏对照表 */
.fm-gonghan { background: var(--fm-paper); }
.fm-gonghan thead th { background: transparent; border-bottom: 4px double var(--fm-gold); font-size: 16px; }
.fm-gonghan tbody th { width: 7em; color: var(--fm-muted); font-weight: 400; font-size: 14px; }
.fm-gonghan td:nth-child(2) { border-left: 4px solid var(--fm-blue); background: #fff; }
.fm-gonghan td:nth-child(3) { border-left: 1px solid var(--fm-gold); }

/* 排错表 */
.fm-paicha tbody th { min-width: 9em; }
.fm-paicha td { min-width: 12em; }

/* FAQ */
.fm-faq { margin-top: 44px; border-top: 4px double var(--fm-gold); padding-top: 12px; max-width: 38em; }
.fm-faq-h { font-size: 22px; margin: 8px 0 8px; }
.fm-qa { padding: 10px 0; border-bottom: 1px solid var(--fm-line); }
.fm-qa-q { font-size: 17px; margin: 6px 0 4px; line-break: strict; }
.fm-qa-a { margin: 0 0 6px; }

/* 文末去处 */
.fm-after { margin-top: 36px; padding-top: 14px; border-top: 1px solid var(--fm-line); }
.fm-after-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.fm-after-cap { color: var(--fm-muted); }
.fm-tag { display: inline-flex; align-items: center; min-height: 32px; padding: 2px 10px; border: 1px solid var(--fm-line); background: #fff; }
a.fm-tag { min-height: 44px; }
.fm-after-go { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 0 22px; }
.fm-after-go a { display: inline-flex; align-items: center; min-height: 44px; }

/* 列表页、站务页 */
.fm-index-intro p, .fm-file-body p, .fm-file-body li { max-width: 38em; }
.fm-index-count { font-size: 14px; color: var(--fm-muted); margin: 18px 0 6px; }
.fm-index-syn { font-size: 14px; color: var(--fm-muted); }
.fm-file-head { border-bottom: 4px double var(--fm-gold); margin-bottom: 18px; padding-bottom: 8px; }
.fm-file-no { margin: 0 0 4px; font-size: 13.5px; color: var(--fm-muted); }
.fm-file-body { font-size: 16px; line-height: 1.85; }
.fm-file-body h2 {
  font-size: 19px; margin: 1.8em 0 .5em; padding-top: 12px;
  background: linear-gradient(var(--fm-gold), var(--fm-gold)) left top / 44px 2px no-repeat;
}
.fm-file-body ul, .fm-file-body ol { padding-left: 1.4em; }
.fm-pages { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
.fm-pages a { display: inline-flex; align-items: center; min-height: 44px; }
.fm-term-list a, .fm-lost-go a { display: inline-flex; align-items: center; min-height: 44px; }

/* 查阅 */
.fm-lookup-form { margin: 18px 0 8px; max-width: 38em; }
.fm-lookup-label { display: block; font-weight: 700; margin-bottom: 6px; }
.fm-lookup-row { display: flex; gap: 8px; }
.fm-lookup-row input {
  flex: 1; min-width: 0; min-height: 48px; padding: 8px 12px; font: inherit; font-size: 16px;
  border: 1px solid var(--fm-ink); background: #fff; color: var(--fm-ink); border-radius: 0;
}
.fm-lookup-btn { min-height: 48px; padding: 0 20px; border: 0; background: var(--fm-blue); color: #fff; font: inherit; cursor: pointer; }
.fm-lookup-state { color: var(--fm-muted); font-size: 15px; }
.fm-lookup-hits { list-style: none; margin: 0; padding: 0; max-width: 38em; }
.fm-lookup-hit { border-top: 1px solid var(--fm-line); padding: 10px 0; }
.fm-lookup-hit a { font-weight: 700; display: inline-flex; min-height: 44px; align-items: center; }
.fm-lookup-hit p { margin: 0; font-size: 15px; }

/* 页脚 */
.fm-foot { background: var(--fm-ink); color: var(--fm-paper); margin-top: 24px; }
.fm-foot a { color: var(--fm-paper); }
.fm-foot :focus-visible { outline-color: var(--fm-gold); }
.fm-foot-in {
  max-width: 1120px; margin: 0 auto; padding: 36px 16px 12px;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px;
}
.fm-brand--foot { color: var(--fm-paper); }
.fm-foot-stmt, .fm-foot-promo { font-size: 14.5px; line-height: 1.75; margin: 10px 0 0; max-width: 34em; }
.fm-foot-h { display: block; font-size: 15px; margin: 0 0 4px; color: #d9c9a0; font-weight: 700; }
.fm-foot-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 18px; }
.fm-foot-list a, .fm-foot-rss a, .fm-foot-promo a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14.5px; }
.fm-foot-rss { margin: 4px 0 0; }
.fm-foot-year { max-width: 1120px; margin: 0 auto; padding: 8px 16px 28px; font-size: 13.5px; color: #c4cfda; }

/* 窄屏 */
@media (max-width: 860px) {
  .fm-desk { grid-template-columns: 1fr; gap: 20px; padding-bottom: 28px; }
  .fm-desk-papers { min-height: 0; display: flex; flex-direction: column; gap: 22px; }
  .fm-card--home { position: static; width: auto; order: 1; }
  .fm-letter { position: static; width: auto; transform: none; padding: 20px 20px 18px; order: 2; }
  .fm-doc-grid { grid-template-columns: minmax(0, 1fr); }
  .fm-toc { grid-column: 1; grid-row: 1; position: static; }
  .fm-doc-grid > .fm-prose { grid-row: 2; }
  .fm-foot-in { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 640px) {
  .fm-mast-in { min-height: 56px; padding: 0 10px 0 16px; gap: 4px; }
  .fm-wordmark { width: 92px; height: 27px; }
  .fm-nav a { padding: 0 7px; font-size: 15px; }
  .fm-main { padding: 14px 16px 40px; }
  .fm-sheet { padding: 20px 16px 24px; margin-bottom: 22px; }
  .fm-h1 { font-size: 22px; margin-bottom: 8px; }
  .fm-desk { gap: 14px; padding-top: 0; }
  .fm-lede { font-size: 15px; margin-bottom: 12px; line-height: 1.65; }
  .fm-pick { padding: 10px 14px 12px; }
  .fm-pick-title { font-size: 16.5px; padding: 2px 0; }
  .fm-pick-why { font-size: 14px; margin-top: 2px; }
  .fm-card { padding: 12px 14px 14px; border-left-width: 6px; }
  .fm-card-kind { font-size: 17px; }
  .fm-code { font-size: 25px; }
  .fm-code-row { padding: 4px 0 8px; }
  .fm-code-note { margin-top: 8px; }
  .fm-prose { font-size: 16px; line-height: 1.85; }
  .fm-prose h2 { font-size: 20px; }
  .fm-prose h3 { font-size: 17px; }
  .fm-shot-frame { padding: 6px; }
  /* 排错表与对照表：窄屏改成一行一张卡 */
  .fm-paicha-wrap, .fm-gonghan-wrap { overflow-x: visible; }
  .fm-paicha, .fm-gonghan { background: transparent; }
  .fm-paicha thead, .fm-gonghan thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .fm-paicha tr, .fm-gonghan tr { display: block; background: #fff; border: 1px solid var(--fm-line); margin: 0 0 12px; }
  .fm-paicha th, .fm-paicha td, .fm-gonghan th, .fm-gonghan td { display: block; width: auto; min-width: 0; border: 0; border-bottom: 1px solid var(--fm-wash); }
  .fm-paicha tbody th, .fm-gonghan tbody th { width: auto; background: var(--fm-wash); color: var(--fm-ink); font-weight: 700; font-size: 15px; }
  .fm-paicha td::before, .fm-gonghan td::before {
    content: attr(data-label); display: block; font-size: 13px; font-weight: 700; color: var(--fm-blue); margin-bottom: 2px;
  }
  .fm-gonghan td:nth-child(2), .fm-gonghan td:nth-child(3) { border-left: 0; }
  .fm-gonghan td:nth-child(3)::before { color: #7a5f22; }
  .fm-foot-in { padding-top: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
