/* 방침·약관 공통 스타일. privacy-policy / terms-of-service 와 각 -prev 페이지가 함께 쓴다. */
:root {
  --text: #1a2533;
  --muted: #66768a;
  --line: #eef1f5;
  --dot: #b8c2ce;
  --brand: #034faa;
  --bg: #ffffff;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 24px;
}

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

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 16px 20px 72px;
}

/* ── 맨 위: 로고 + 언어 바꾸기 ───────────────────────── */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  margin-bottom: 44px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.logo svg { width: 24px; height: 24px; display: block; }

.lang-switch {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: none;
  margin: 0;
  padding: 10px 0 10px 16px;
  font: inherit;
  font-size: 15px;
  color: var(--muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.lang-switch:hover { color: var(--text); }
.lang-switch:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── 언어 패널 ─────────────────────────────────────── */
.panel { display: none; }
html[data-lang="en"] #panel-en,
html[data-lang="ko"] #panel-ko { display: block; }
html[data-lang="en"] .only-ko,
html[data-lang="ko"] .only-en { display: none; }

/* ── 제목 ─────────────────────────────────────────── */
h1 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.meta {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.note {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--muted);
}

/* ── 목차 ─────────────────────────────────────────── */
.toc { margin-top: 24px; }

.toc summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--brand);
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.toc summary::-webkit-details-marker { display: none; }

.toc summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg);
}

.toc[open] summary::after { margin-top: 4px; transform: rotate(225deg); }

.toc ol {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}

.toc li { padding: 0; margin: 0; }
.toc li::before { content: none; }

.toc a {
  display: block;
  padding: 7px 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  text-decoration: none;
}

.toc a:hover { color: var(--brand); text-decoration: none; }

@media (min-width: 640px) {
  .toc ol { columns: 2; column-gap: 40px; }
  .toc li { break-inside: avoid; }
}

/* ── 본문 ─────────────────────────────────────────── */
section { margin-top: 48px; }

h2 {
  margin: 0 0 14px;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h3 {
  margin: 28px 0 10px;
  font-size: 17px;
  line-height: 1.45;
  font-weight: 700;
}

h4 {
  margin: 22px 0 6px;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 700;
}

p { margin: 0 0 12px; }
section > :last-child { margin-bottom: 0; }

ul { list-style: none; margin: 0 0 12px; padding: 0; }

li { position: relative; margin-bottom: 8px; padding-left: 16px; }
li:last-child { margin-bottom: 0; }

li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.8em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--dot);
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.contact { font-weight: 600; color: var(--brand); word-break: break-all; }

/* ── 표 ───────────────────────────────────────────── */
.table-scroll { margin: 4px 0 12px; overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.55;
}

th {
  padding: 0 16px 10px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

td {
  padding: 12px 16px 12px 0;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

td:first-child { font-weight: 600; }
th:last-child, td:last-child { padding-right: 0; }

/* 좁은 화면에서는 표를 옆으로 밀지 않고, 한 줄을 한 묶음으로 세로로 쌓는다 */
@media (max-width: 600px) {
  .table-scroll { overflow: visible; }
  table, tbody, tr, td { display: block; }
  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  tbody tr:first-child { padding-top: 4px; }
  td {
    display: grid;
    grid-template-columns: 92px 1fr;
    column-gap: 12px;
    padding: 3px 0;
    border: 0;
  }
  td::before { content: attr(data-label); font-size: 13px; color: var(--muted); }
  td:first-child { display: block; margin-bottom: 4px; font-size: 15px; }
  td:first-child::before { content: none; }
}

/* ── 맨 아래 ──────────────────────────────────────── */
.bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 64px;
  font-size: 14px;
}

.bottom a { color: var(--muted); }
.bottom a:hover { color: var(--text); text-decoration: none; }
