/* ==========================================================================
   약관·정책 문서 공통 스타일
   --------------------------------------------------------------------------
   앱 안의 웹뷰에서 열리는 문서이므로 다음을 중요하게 다룬다.
     - 모바일 화면에서 읽기 편한 글자 크기와 줄 간격
     - 기기의 다크 모드를 따라가는 배색 (밝은 화면이 갑자기 뜨면 눈이 부시다)
     - 외부 폰트를 쓰지 않아 로딩이 빠름
   ========================================================================== */

:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --text: #1a1c1e;
  --text-muted: #5b5f66;
  --border: #e2e5e9;
  --accent: #3d5afe;
  --max-width: 720px;
}

/* 기기가 다크 모드일 때 자동으로 색을 바꾼다. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131417;
    --surface: #1c1e22;
    --text: #e6e8eb;
    --text-muted: #9ba1a9;
    --border: #2c2f34;
    --accent: #8c9eff;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 24px 20px 80px;
  background: var(--bg);
  color: var(--text);

  /* 시스템 기본 폰트를 사용해 로딩 지연을 없앤다. */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR",
    "Malgun Gothic", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.75;

  /* 긴 URL이 화면을 밀어내지 않도록 한다. */
  word-break: break-word;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ── 제목 ────────────────────────────────────────────────────────────── */
h1 {
  font-size: 1.6rem;
  line-height: 1.4;
  margin: 0 0 8px;
}

h2 {
  font-size: 1.15rem;
  margin: 40px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

h3 {
  font-size: 1rem;
  margin: 24px 0 8px;
}

/* 문서 시행일 등 부가 정보 */
.meta {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0 0 32px;
}

/* ── 본문 ────────────────────────────────────────────────────────────── */
p {
  margin: 0 0 16px;
}

ul,
ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

li {
  margin-bottom: 8px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

strong {
  font-weight: 600;
}

/* ── 강조 상자 ───────────────────────────────────────────────────────── */
.notice {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 0.9375rem;
}

.notice strong {
  display: block;
  margin-bottom: 6px;
}

/* ── 표 ──────────────────────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  margin: 0 0 24px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th,
td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface);
  font-weight: 600;
  white-space: nowrap;
}

/* ── 하단 ────────────────────────────────────────────────────────────── */
footer {
  max-width: var(--max-width);
  margin: 56px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ── 목차 ────────────────────────────────────────────────────────────── */
.toc {
  background: var(--surface);
  border-radius: 12px;
  padding: 16px 20px 16px 40px;
  margin-bottom: 32px;
  font-size: 0.9375rem;
}

.toc li {
  margin-bottom: 4px;
}
