/* AlibabaPuHuiTi @font-face declarations served from cdn1.see2ai.com.

   Strategy: declare only weight 400 (Regular) + weight 700 (Bold). The
   CSS Fonts Module L4 nearest-weight matching algorithm covers the rest
   inside the same family without falling back to PingFang:
     - font-weight: 300  -> nearest is 400  (renders with 55-regular)
     - font-weight: 500  -> spec mandates 500 checks 400 first, then below
                            then above -> renders with 55-regular
     - font-weight: 600  -> >=600 checks above first -> renders with 85-bold
     - font-weight: 800  -> 900 absent -> renders with 85-bold
     - font-weight: 900  -> only caller is base.html SVG with
                            font-family: Arial inline, unaffected
   Browsers do NOT synthesize fake bold in any of these cases because
   the family has a matching face at a different weight; only the
   missing-from-family case triggers font-synthesis.

   Mitigation for tests/known_issues.md B-WEB-FONT-CDN-PAYLOAD-BLOAT-NO-
   SUBSETTING: the upstream npm packages ship the full unsubsetted CJK
   woff2 (~5 MB per weight). Even with lazy @font-face fetching the
   first paint of a typical SEE2AI page hits 4 weights (400 / 500 / 600
   / 700) ~21 MB total -- enough to truncate downloads under slow / CN
   regional CDN throughput. Declaring only 400 + 700 cuts that to
   ~10 MB and removes 65-medium / 75-semibold / 45-light from the
   request graph entirely.

   Every @font-face uses font-display: optional so a slow or truncated
   fetch shows the system fallback for that page load instead of
   FOUT-flashing; warm HTTP cache on subsequent visits uses PuHuiTi
   immediately.

   When the subsetting pipeline lands (each weight ~200-400 KB) we can
   safely re-add weights 500 / 600 and switch back to font-display:
   swap. Until then, do not re-add weights without grepping
   tests/known_issues.md B-WEB-FONT-CDN-PAYLOAD-BLOAT-NO-SUBSETTING and
   updating the regression guards in
   tests/regression/test_tuve_canvas_thumbnail_and_font_cors.py. */

@font-face {
    font-family: 'AlibabaPuHuiTi';
    src: url('https://cdn1.see2ai.com/web-static/fonts/alibaba-puhuiti-3/v1/alibaba-puhuiti-3-55-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: optional;
}

@font-face {
    font-family: 'AlibabaPuHuiTi';
    src: url('https://cdn1.see2ai.com/web-static/fonts/alibaba-puhuiti-3/v1/alibaba-puhuiti-3-85-bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: optional;
}

:root {
    --see2ai-font-sans: 'AlibabaPuHuiTi', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    --el-font-family: var(--see2ai-font-sans);
}

body,
.font-sans,
.tuve-approval__body,
.el-popper,
.el-message,
.el-dialog {
    font-family: var(--see2ai-font-sans) !important;
}

button,
input,
select,
textarea {
    font-family: inherit;
}
