/*
 * ฟอนต์โฮสต์เอง (DEVELOPMENT-RULES.md ข้อ 4) ใช้ร่วมกันทั้งหน้าบ้าน (import ใน resources/css/app.css) และหลังบ้าน Filament
 * - IBM Plex Sans Thai 400/500/600/700 subset thai + latin — SIL OFL 1.1 (OFL-IBMPlexSansThai.txt)
 * - Public Sans (variable 400-700) subset latin + latin-ext — SIL OFL 1.1 (OFL-PublicSans.txt)
 * ที่มา: Google Fonts (ดาวน์โหลด 29 ก.ย. 2569) เบราว์เซอร์โหลดเฉพาะ subset ที่หน้านั้นใช้ตาม unicode-range
 *
 * ฟอนต์สำรองปรับขนาดให้ใกล้ฟอนต์จริงเพื่อลด CLS ระหว่างรอโหลด
 * คำนวณจากความกว้างเฉลี่ยของข้อความตัวอย่างและ ascender/descender ของไฟล์จริง (docs/DESIGN.md)
 */

@font-face {
    font-family: 'IBM Plex Sans Thai';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/ibm-plex-sans-thai-400-thai.woff2') format('woff2');
    unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
    font-family: 'IBM Plex Sans Thai';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/ibm-plex-sans-thai-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'IBM Plex Sans Thai';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/assets/fonts/ibm-plex-sans-thai-500-thai.woff2') format('woff2');
    unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
    font-family: 'IBM Plex Sans Thai';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/assets/fonts/ibm-plex-sans-thai-500-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'IBM Plex Sans Thai';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/assets/fonts/ibm-plex-sans-thai-600-thai.woff2') format('woff2');
    unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
    font-family: 'IBM Plex Sans Thai';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/assets/fonts/ibm-plex-sans-thai-600-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'IBM Plex Sans Thai';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/assets/fonts/ibm-plex-sans-thai-700-thai.woff2') format('woff2');
    unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
    font-family: 'IBM Plex Sans Thai';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/assets/fonts/ibm-plex-sans-thai-700-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Public Sans';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/assets/fonts/public-sans-variable-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Public Sans';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/assets/fonts/public-sans-variable-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* เทียบกับ Leelawadee UI (Windows): กว้าง 0.4512 / 0.4130 em, ascender 1.116 descender 0.534 */
@font-face {
    font-family: 'IBM Plex Sans Thai Fallback';
    src: local('Leelawadee UI'), local('LeelawadeeUI');
    size-adjust: 109.25%;
    ascent-override: 102.15%;
    descent-override: 48.88%;
    line-gap-override: 0%;
}
/* เทียบกับ Arial: กว้าง 0.4631 / 0.4491 em, ascender 0.95 descender 0.225 */
@font-face {
    font-family: 'Public Sans Fallback';
    src: local('Arial'), local('ArialMT');
    size-adjust: 103.1%;
    ascent-override: 92.14%;
    descent-override: 21.82%;
    line-gap-override: 0%;
}
