/* ── legal.css ── 약관/방침 정적 HTML 공통 스타일시트 ── */

:root {
  --brand: #1A335F;
  --text: #1a1a1a;
  --text-sub: #606060;
  --bg: #F8F9FB;
  --bg-card: #FFFFFF;
  --border: #E2E2E2;
  --accent: #DE2066;
  --th-bg: #F6F7F9;
}

/* ── Reset / Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    system-ui, Roboto, "Helvetica Neue", "Segoe UI",
    "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ── */
.legal-header {
  background-color: var(--brand);
  padding: 16px 24px;
  text-align: center;
}

.legal-header img {
  height: 28px;
  vertical-align: middle;
}

/* ── Layout ── */
.legal-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.legal-wrap > h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--brand);
  text-align: center;
  margin-bottom: 8px;
}

.legal-wrap > .effective-date {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-sub);
  margin-bottom: 40px;
}

/* ── TOC (목차) ── */
.toc {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 28px;
  margin-bottom: 40px;
}

.toc p.toc-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 12px;
}

.toc ol {
  list-style: none;
  counter-reset: toc-counter;
}

.toc ol li {
  counter-increment: toc-counter;
  margin-bottom: 6px;
}

.toc ol li::before {
  content: counter(toc-counter) ". ";
  font-weight: 600;
  color: var(--brand);
}

.toc a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.15s;
}

.toc a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.toc .toc-sub {
  padding-left: 20px;
  margin-top: 4px;
}

.toc .toc-sub li::before {
  content: "– ";
  color: var(--text-sub);
}

/* ── Highlight Box ── */
.highlight-box {
  background-color: var(--bg-card);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 24px 28px;
  margin-bottom: 36px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.highlight-box .box-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
}

.highlight-box table {
  width: 100%;
}

.highlight-box td {
  padding: 6px 0;
  vertical-align: top;
  font-size: 0.9375rem;
}

.highlight-box td:first-child {
  font-weight: 600;
  color: var(--brand);
  white-space: nowrap;
  padding-right: 16px;
  width: 140px;
}

/* ── Section Headings ── */
h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand);
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--brand);
}

h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--brand);
  margin-top: 32px;
  margin-bottom: 12px;
}

h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 20px;
  margin-bottom: 8px;
}

/* ── Body Text ── */
p {
  font-size: 0.9375rem;
  line-height: 1.75;
  margin-bottom: 12px;
}

ul,
ol {
  padding-left: 24px;
  margin-bottom: 12px;
}

li {
  font-size: 0.9375rem;
  line-height: 1.75;
  margin-bottom: 4px;
}

ol {
  list-style-type: decimal;
}

ul {
  list-style-type: disc;
}

ol ol {
  list-style-type: lower-alpha;
}

ul ul {
  list-style-type: circle;
}

strong {
  font-weight: 600;
}

/* ── Table ── */
.table-wrap {
  overflow-x: auto;
  margin: 16px 0 24px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  line-height: 1.6;
}

thead th {
  background-color: var(--th-bg);
  color: var(--brand);
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background-color: var(--th-bg);
}

/* ── Divider ── */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 36px 0;
}

/* ── Footer (부칙 / 저작권) ── */
.legal-footer-note {
  background-color: var(--th-bg);
  border-radius: 6px;
  padding: 20px 24px;
  margin-top: 48px;
  font-size: 0.875rem;
  color: var(--text-sub);
  line-height: 1.7;
}

.legal-footer {
  text-align: center;
  padding: 24px;
  font-size: 0.8125rem;
  color: var(--text-sub);
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

/* ── Responsive (≤ 768px) ── */
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  .legal-wrap {
    padding: 32px 16px 60px;
  }

  .legal-wrap > h1 {
    font-size: 1.5rem;
  }

  .toc {
    padding: 18px 20px;
  }

  .highlight-box {
    padding: 18px 20px;
  }

  .highlight-box td:first-child {
    width: auto;
    display: block;
    padding-right: 0;
    padding-bottom: 2px;
  }

  .highlight-box td {
    display: block;
    padding: 4px 0;
  }

  .highlight-box tr {
    display: block;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
  }

  .highlight-box tr:last-child {
    border-bottom: none;
  }

  h2 {
    font-size: 1.125rem;
    margin-top: 36px;
  }

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

  .table-wrap {
    margin: 12px -16px 20px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  thead th,
  tbody td {
    padding: 8px 12px;
    font-size: 0.8125rem;
  }
}
