/* ============================================================================
   Wealthy Creation — Design System: TYPOGRAPHY (ขนาดตัวอักษรมาตรฐานทุกโต๊ะ)
   ----------------------------------------------------------------------------
   มติเจ้าของ 17 ต.ค. 2569 ("ขนาดฟอนต์แต่ละโต๊ะแต่ละหน้าไม่ไปในทิศทางเดียวกัน") — ต้นฉบับที่นี่ที่เดียว
   ห้ามแก้สำเนา app/static/design/typography.css ของแต่ละ service · แก้ที่นี่แล้วรัน sync_design.py

   ติดตั้ง (base.html ของทุก service — หลัง tokens.css/base-controls.css ก่อน style.css ของ service):
     <link rel="stylesheet" href="/static/design/typography.css?v={{ cache_bust }}">

   ทุก selector ห่อ :where(...) โดยตั้งใจ (specificity 0,0,0 แบบ base-controls.css) — เป็นค่าเริ่มต้นกลางเท่านั้น
   rule ของ service ที่มี class ชนะเสมอ · ห้องปรับ style.css ของตัวเองให้เรียก var(--fs-*) แทนตัวเลข (DESIGN_GUIDE §9)
   ค่า token อยู่ใน tokens.css (--fs-*) · ห้าม !important ที่นี่
   ============================================================================ */

/* ฐานสเกลตามจอ — เดิมมีแค่ portal/pm/procurement/hr (qhse/cm/sale/ims คงที่ 16px) */
:where(html){ font-size: 16px; }
@media (min-width: 1440px){ :where(html){ font-size: 17px; } }
@media (min-width: 1920px){ :where(html){ font-size: 18.5px; } }

:where(body){
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

/* หัวข้อ — กัน h1/h2/h3 เปล่าตกไปใช้ค่าเบราว์เซอร์ (2em/1.5em — เดิม hr/field หัวหน้าโตถึง 32–36px) */
:where(h1, h2, h3){ font-family: var(--font-display); line-height: 1.3; }
:where(h1){ font-size: var(--fs-h1); }
:where(h2){ font-size: var(--fs-h2); }
:where(h3){ font-size: var(--fs-h3); }

/* ตาราง */
:where(td){ font-size: var(--fs-table); }
:where(th){ font-size: var(--fs-table-head); }

/* ปุ่ม — <button> ไม่ inherit ฟอนต์จาก body โดย default (เดิม .wz-btn ของ procurement ตกไปใช้ค่าเบราว์เซอร์ ~13.3px) */
:where(button){ font-family: inherit; font-size: var(--fs-button); }

/* ข้อความรอง */
:where(small){ font-size: var(--fs-small); }
