/* =========================================================
   fonts.css
   사이트 전체가 공유하는 글꼴 단일 소스 (Single Source of Truth)

   - 본문(sans) : Pretendard Variable (dynamic subset)
   - 데이터/영문(mono) : IBM Plex Mono

   ※ 새 페이지를 만들 때는 <head> 안에 아래 두 줄만 넣으면
     사이트 전체와 동일한 글꼴이 적용됩니다.

       <link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin>
       <link rel="stylesheet" href="fonts.css">

   ※ 글꼴을 바꿀 일이 생기면 이 파일 하나만 수정하면 됩니다.
========================================================= */

/* ---------- 웹폰트 로딩 ---------- */
/* Pretendard Variable: 45~920 가변 굵기 지원.
   dynamic-subset은 unicode-range 기반으로 실제 사용된 글자만 내려받습니다. */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');

/* IBM Plex Mono: 라벨·수치·영문 캡션용 */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* ---------- 글꼴 변수 ---------- */
:root {
  --sans: "Pretendard Variable", Pretendard,
          -apple-system, BlinkMacSystemFont, system-ui,
          "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;

  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular,
          Menlo, Consolas, monospace;

  /* 기존 페이지 호환용 별칭 (--font-sans / --font-mono 로 쓰던 경우) */
  --font-sans: var(--sans);
  --font-mono: var(--mono);
}

/* ---------- 기본 적용 ---------- */
body {
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  word-break: keep-all;      /* 한글 단어 단위 줄바꿈 */
  overflow-wrap: break-word;
}

/* 폼 요소는 기본 글꼴을 상속하지 않으므로 명시 */
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

code, kbd, pre, samp {
  font-family: var(--mono);
}
