/* 정책 문서 공통 스타일.
 *
 * [다크모드 없음 — 의도된 것] 이 문서들의 주 소비처는 앱 웹뷰인데, 그 화면은
 * 흰색 크롬을 하드코딩한다(terms_page.dart 의 Scaffold/AppBar 가 흰 배경 +
 * 검은 글자). prefers-color-scheme 을 따르면 iOS 다크모드에서 흰 앱바 아래
 * 본문만 검게 나와 깨져 보이고, 앱은 릴리스 없이 그걸 못 고친다. 종전
 * PDF 변환본도 항상 흰색이었으므로 동작도 그대로 유지된다.
 *
 * 이 문서들은 앱 웹뷰에서 열린다. 이전 판(PDF 변환본)은 A4 고정폭이라
 * 휴대폰에서 확대해야 읽혔고, 약관은 "고객이 알아보기 쉽게" 명시할 의무가
 * 걸려 있어서 가독성 자체가 요건이다. 그래서 고정폭을 쓰지 않는다.
 *
 * 조문 계층(조 > 항 > 호 > 목)은 들여쓰기로만 표현한다. 번호(제1조, ①, 1., -)
 * 는 원문 텍스트에 들어 있으므로 CSS 로 생성하지 않는다 -- 생성 번호를 쓰면
 * 원문에 없는 글자가 화면에 생기고, 텍스트 동일성 검증이 무의미해진다.
 */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #5f6368;
  --line: #e0e0e0;
  --accent: #1a5fb4;
  --notice-bg: #fff8e1;
  --notice-line: #f0c36d;
  --table-head: #f5f5f5;
}


* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Malgun Gothic", "Noto Sans KR", "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-text-size-adjust: 100%;
}

article {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

h1 {
  font-size: 1.5rem;
  line-height: 1.4;
  margin: 0 0 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--fg);
}

h2 {
  font-size: 1.0625rem;
  margin: 2.25rem 0 0.75rem;
}

h2.chapter {
  font-size: 1.1875rem;
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

p { margin: 0 0 0.6rem; }

/* 조문 계층 — 번호는 텍스트 안에 있으므로 매달린 들여쓰기로만 정렬한다 */
p.clause  { padding-left: 1.35em; text-indent: -1.35em; }
p.item    { padding-left: 2.6em;  text-indent: -1.2em; }
p.subitem { padding-left: 3.6em;  text-indent: -1em; }
p.bullet  { padding-left: 1.5em;  text-indent: -0.9em; }
p.bullet::before { content: "\25AA"; margin-right: 0.5em; color: var(--muted); }


/* 문서 제목 위에 오는 작은 라벨. 상단 네비가 없으므로 페이지의 첫 요소다. */
p.effective {
  color: var(--muted);
  font-size: 0.875rem;
  margin: 0 0 1.25rem;
}

.notice {
  background: var(--notice-bg);
  border: 1px solid var(--notice-line);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  margin-bottom: 1.25rem;
}

a { color: var(--accent); }

/* 표는 좁은 화면에서 가로 스크롤되게 감싼다 — 페이지 자체는 절대 가로로
 * 넘치지 않아야 한다 */
.table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.25rem;
  -webkit-overflow-scrolling: touch;
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 20rem;
  font-size: 0.9375rem;
}
th, td {
  border: 1px solid var(--line);
  padding: 0.5rem 0.7rem;
  text-align: left;
  vertical-align: top;
}
th { background: var(--table-head); font-weight: 600; white-space: nowrap; }

footer {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8125rem;
}
footer p { margin: 0 0 0.35rem; }

@media print {
  footer { display: none; }
  body { font-size: 11pt; }
  article { max-width: none; }
}
