/* 디자인 토큰 — knoulibref 팔레트 계승 + 저시력 사용자 기준 상향
   (기본 글자 18px, 명도대비 강화, 포커스 3px) */
:root {
  --bg: #FAFAF6;
  --surface: #ffffff;
  --surface-alt: #EFF2F6;
  --text: #14202e;            /* 대비 강화 (본문 12.6:1) */
  --text-muted: #46525f;      /* 보조 텍스트도 7:1 이상 */
  --border: #c9d1da;
  --primary: #0B2E5C;         /* 네이비 */
  --primary-hover: #08213f;
  --primary-text: #ffffff;
  --accent: #086972;          /* 시안 계열 — 흰 배경 대비 4.5:1 이상으로 짙게 */
  --success: #1e6b46;
  --warn: #9a4112;
  --danger: #b02a2a;
  --focus: #b45309;           /* 포커스 = 주황 계열, 배경과 뚜렷이 구분 */
  --badge-alt-bg: #e5f4ec;    /* 대체자료 있음 배지 */
  --badge-alt-text: #135c3c;
  --badge-none-bg: #f4e9e9;
  --badge-none-text: #8a2f2f;
  --shadow: 0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.05);
  --radius: 10px;
  --radius-sm: 6px;
  --gap: 16px;
  --font-base: 18px;          /* 저시력 기준 기본 글자 상향 */
  --font-sm: 15px;
  --font-lg: 22px;
  --line: 1.7;
  --max-w: 1080px;
  --touch: 48px;              /* 최소 터치·클릭 영역 */
  font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont,
               'Segoe UI', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-size: var(--font-base);
  line-height: var(--line);
}

/* 고대비(다크) — 사용자 토글 */
[data-theme="dark"] {
  --bg: #0d1117;
  --surface: #161d27;
  --surface-alt: #1e2733;
  --text: #f2f6fa;
  --text-muted: #b7c2cd;
  --border: #3b4757;
  --primary: #7db4ee;
  --primary-hover: #9cc6f3;
  --primary-text: #0d1117;
  --accent: #4fd1dd;
  --success: #6fd3a0;
  --warn: #f0a36c;
  --danger: #f28b8b;
  --focus: #ffc861;
  --badge-alt-bg: #143526;
  --badge-alt-text: #8fe6b8;
  --badge-none-bg: #3a2020;
  --badge-none-text: #f2b3b3;
  --shadow: 0 1px 3px rgba(0,0,0,.5);
}

/* 글자 크기 3단 토글 (html[data-fontsize]) — KWCAG 확대 대응 */
html[data-fontsize="150"] { font-size: 150%; }
html[data-fontsize="200"] { font-size: 200%; }

body {
  background: var(--bg);
  color: var(--text);
  /* 한글 어절 중간에서 줄이 갈라지지 않게 (긴 영문·주소는 넘칠 때만 분리) */
  word-break: keep-all;
  overflow-wrap: break-word;
}
