/*
 * The apex site's one stylesheet (/site.css): the versioned 이용약관·개인정보처리방침 pages and the
 * 404 page. System fonts only and no external resource, so a page shows the same in every browser
 * without a third-party request; light and dark follow the viewer's setting, and printing is light.
 * A legal page needs only semantic HTML inside <main>: a <header> with the <h1> and a <p> for the
 * version and effective date, then h2–h4, p, ol/ul, dl and table. Wrap a wide table in
 * <div class="table-scroll"> so it scrolls on a phone instead of widening the page.
 */
:root {
  color-scheme: light dark;
  --text: #1f2328;
  --muted: #59636e;
  --background: #ffffff;
  --surface: #f6f8fa;
  --border: #d1d9e0;
  --link: #0b57d0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e6edf3;
    --muted: #9198a1;
    --background: #0d1117;
    --surface: #161b22;
    --border: #3d444d;
    --link: #8ab4f8;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Apple SD Gothic Neo',
    'Malgun Gothic',
    'Noto Sans KR',
    'Segoe UI',
    sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  /* Korean lines break between words, not inside one; a long URL still wraps. */
  word-break: keep-all;
  overflow-wrap: break-word;
}

main {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

header {
  margin-bottom: 2rem;
}

header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

h1,
h2,
h3,
h4 {
  line-height: 1.4;
  font-weight: 700;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
}

h2 {
  margin: 2.5rem 0 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 1.25rem;
}

h3 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.0625rem;
}

h4 {
  margin: 1.25rem 0 0.25rem;
  font-size: 1rem;
}

p,
ol,
ul,
dl,
table {
  margin: 0 0 1rem;
}

ol,
ul {
  padding-left: 1.5rem;
}

li {
  margin: 0.25rem 0;
}

li > ol,
li > ul {
  margin: 0.25rem 0 0;
}

dt {
  font-weight: 600;
}

dd {
  margin: 0 0 0.75rem 1.5rem;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  border-radius: 2px;
}

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

caption {
  padding-bottom: 0.5rem;
  color: var(--muted);
  text-align: left;
}

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

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

.table-scroll {
  margin: 0 0 1rem;
  overflow-x: auto;
}

.table-scroll > table {
  min-width: 36rem;
  margin: 0;
}

hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid var(--border);
}

@media print {
  :root {
    color-scheme: light;
    --text: #000000;
    --muted: #333333;
    --background: #ffffff;
    --surface: #f2f2f2;
    --border: #999999;
    --link: #000000;
  }

  body {
    font-size: 10.5pt;
  }

  main {
    max-width: none;
    padding: 0;
  }

  h2,
  h3,
  h4 {
    break-after: avoid;
  }

  tr,
  li {
    break-inside: avoid;
  }
}
