/* XiANGYANG V815 unified typography authority. */
:root {
  --xy-font-ui:
    "Microsoft YaHei UI",
    "Microsoft YaHei",
    "PingFang SC",
    "Hiragino Sans GB",
    "Noto Sans CJK SC",
    "Noto Sans SC",
    "Segoe UI",
    Arial,
    sans-serif;
  --xy-font-mono:
    "Cascadia Mono",
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
}

/*
 * V815 contains accumulated high-specificity legacy rules. The chained :is()
 * selectors add authority without coupling typography to any business module.
 */
html body.xy-v815:is(#xy-font-authority-a, *):is(#xy-font-authority-b, *):is(#xy-font-authority-c, *):is(#xy-font-authority-d, *),
html body.xy-v815 :is(#xy-font-authority-a, *):is(#xy-font-authority-b, *):is(#xy-font-authority-c, *):is(#xy-font-authority-d, *),
html body.xy-v613-login:is(#xy-font-authority-a, *):is(#xy-font-authority-b, *):is(#xy-font-authority-c, *):is(#xy-font-authority-d, *),
html body.xy-v613-login :is(#xy-font-authority-a, *):is(#xy-font-authority-b, *):is(#xy-font-authority-c, *):is(#xy-font-authority-d, *),
html body.xy-v613-logistics:is(#xy-font-authority-a, *):is(#xy-font-authority-b, *):is(#xy-font-authority-c, *):is(#xy-font-authority-d, *),
html body.xy-v613-logistics :is(#xy-font-authority-a, *):is(#xy-font-authority-b, *):is(#xy-font-authority-c, *):is(#xy-font-authority-d, *) {
  font-family: var(--xy-font-ui) !important;
  font-synthesis: none;
}

html body.xy-v815,
html body.xy-v613-login,
html body.xy-v613-logistics {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html body.xy-v815 :is(button, input, select, option, optgroup, textarea),
html body.xy-v613-login :is(button, input, select, option, optgroup, textarea),
html body.xy-v613-logistics :is(button, input, select, option, optgroup, textarea) {
  font-family: var(--xy-font-ui) !important;
}

html body.xy-v815 :is(#xy-font-authority-a, *):is(#xy-font-authority-b, *):is(#xy-font-authority-c, *):is(#xy-font-authority-d, *):is(
  table,
  input[type="number"],
  .metric .value,
  .flat-money,
  .flat-profit,
  .order-profit-lines,
  .order-id-cell,
  .lf-company-value,
  .v365-lf-topbar-summary
),
html body.xy-v613-logistics :is(#xy-font-authority-a, *):is(#xy-font-authority-b, *):is(#xy-font-authority-c, *):is(#xy-font-authority-d, *):is(
  table,
  input[type="number"],
  .carrier-price-row,
  .carrier-metrics,
  .kpi
) {
  font-variant-numeric: tabular-nums lining-nums;
}

/* Security secrets remain monospaced so visually similar characters stay distinct. */
html body.xy-v613-login :is(#xy-font-authority-a, *):is(#xy-font-authority-b, *):is(#xy-font-authority-c, *):is(#xy-font-authority-d, *):is(
  .secret-box code,
  .mfa-code-field input,
  .recovery-codes,
  .recovery-codes code
) {
  font-family: var(--xy-font-mono) !important;
  font-synthesis: none;
}
