@font-face {
  font-family: "NomNaTong";
  src: url("/assets/NomNaTong-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  /* Archival Rice Paper & Ink Palette (benchmarked to Chữ Nôm Research Report) */
  --paper: #f7f3ea;
  --paper2: #efe8d8;
  --card: #fffdf8;
  --ink: #1e1915;
  --ink2: #4a4035;
  --muted: #7a6f62;
  --line: #e0d6c2;

  /* Grammatology & Philological Semantic Accents */
  --seal: #b3261e;
  --seal-soft: #fbe6e2;
  --m: #2563a8;
  --m2: #6b9bd1;
  --m-soft: #e5eef8;
  --s: #c0442e;
  --k: #8a5cb8;
  --k-soft: #f1eaf8;
  --yy: #2e8a5f;
  --yy-soft: #e6f3ec;
  --gh: #1f7f8c;
  --gh-soft: #e2f2f4;
  --jy: #b8741a;
  --jy-soft: #fbf0dc;
  --sx: #8a5cb8;
  --gold: #a8792a;

  /* Typography */
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, "NomNaTong", sans-serif;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", "NomNaTong", serif;
  --nom: "NomNaTong", "PingFang SC", "Hiragino Sans GB", "Heiti SC", "Songti SC", "Noto Serif SC", serif;
  --mono: ui-monospace, Menlo, Monaco, "SFMono-Regular", Consolas, monospace;

  /* Geometry & Elevation */
  --r: 14px;
  --r-sm: 10px;
  --sh: 0 1px 2px rgba(60, 40, 10, .06), 0 6px 24px rgba(60, 40, 10, .07);
  --sh-lg: 0 4px 12px rgba(60, 40, 10, .08), 0 16px 40px rgba(60, 40, 10, .10);
}

/* ---------- 3-Mode Bilingual Display Rules (中 / EN / 中EN) ---------- */
body[data-lang="zh"] .en { display: none !important; }
body[data-lang="en"] .zh { display: none !important; }
body[data-lang="both"] span.zh + span.en::before { content: " · "; color: var(--muted); font-weight: 400; }
body[data-lang="both"] .en { color: var(--muted); }
body[data-lang="both"] h1 > .en,
body[data-lang="both"] h2 > .en,
body[data-lang="both"] h3 > .en,
body[data-lang="both"] .bl > .en {
  display: block;
  font-size: .64em;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.35;
  margin-top: .16em;
}
body[data-lang="both"] h1 > span.en::before,
body[data-lang="both"] h2 > span.en::before,
body[data-lang="both"] h3 > span.en::before,
body[data-lang="both"] .bl > span.en::before,
body[data-lang="both"] .stat .l span.en::before,
body[data-lang="both"] .gcell span.en::before,
body[data-lang="both"] .kch .ty span.en::before { content: none !important; }
body[data-lang="both"] .stat .l .en { display: block; }
body[data-lang="both"] .navlinks .en,
body[data-lang="both"] .brand .en,
body[data-lang="both"] .kicker > .en,
body[data-lang="both"] .gcell .z .en,
body[data-lang="both"] .kch .ty .en { display: none !important; }
body[data-lang="both"] p.en,
body[data-lang="both"] div.en,
body[data-lang="both"] li.en { font-size: .9em; margin-top: -.15em; }
