:root {
  --color-bg: #ffffff;
  --color-text: #1f2329;
  --color-text-strong: #0d1117;
  --color-text-muted: #525c69;
  --color-text-sub: #6b7684;
  --color-border: #e4e7eb;
  --color-border-soft: #eef0f3;
  --color-surface: #f8f9fb;
  --color-accent: #1f6bff;
  --max-content: 1280px;
  --max-text: 880px;
  --font-sans:
    Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Malgun Gothic", "맑은 고딕", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}

/* ── Layout: version nav + document ────────────────────── */
.layout {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 60px;
  display: flex;
  align-items: flex-start;
  gap: 56px;
}

.doc {
  flex: 1;
  min-width: 0;
  max-width: var(--max-text);
}

/* ── Version nav (LNB) ──────────────────────────────────── */
.version-nav {
  flex: none;
  width: 200px;
  padding-top: 88px;
}

.version-nav summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-strong);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

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

.version-nav summary::after {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  margin-left: 8px;
  border-right: 1.5px solid var(--color-text-sub);
  border-bottom: 1.5px solid var(--color-text-sub);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.15s ease;
}

.version-nav details[open] summary::after {
  transform: translateY(2px) rotate(-135deg);
}

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

.version-nav li + li {
  margin-top: 2px;
}

.version-nav a {
  display: block;
  padding: 4px 0;
  font-size: 13px;
  color: var(--color-text-sub);
  text-decoration: none;
}

.version-nav a:hover {
  color: var(--color-text);
}

.version-nav a.is-current {
  color: var(--color-text-strong);
  font-weight: 600;
}

/* ── Header ─────────────────────────────────────────────── */
header.doc-header {
  padding: 80px 0 18px;
  border-bottom: 1px solid var(--color-border);
}

header.doc-header h1 {
  font-size: 48px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--color-text-strong);
  margin: 0;
  letter-spacing: -0.02em;
  max-width: 720px;
}

.doc-date {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--color-text-sub);
}

/* ── Main term body ─────────────────────────────────────── */
section.term {
  margin-top: 18px;
  padding: 0 0 18px;
}

.term-intro {
  padding-bottom: 18px;
}

.term-intro p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--color-text);
  margin: 0 0 12px;
}

.toc {
  margin: 0 0 18px;
  font-size: 12px;
  line-height: 1.5;
}

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

.toc br + a {
  display: inline;
}

.privacy-section {
  padding: 18px 0 0;
  scroll-margin-top: 24px;
}

.xref {
  color: var(--color-accent);
  text-decoration: underline;
}

.privacy-section h2 {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--color-text-strong);
  margin: 0;
  letter-spacing: -0.01em;
}

.depth-2 {
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-text);
  margin: 0 0 8px;
}

.depth-3 {
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-text);
  margin: 0 0 8px;
  padding-left: 16px;
}

.sub-title-1 {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-strong);
  margin: 12px 0 8px;
}

.sub-title-2 {
  font-size: 12px;
  margin: 1px 0;
  line-height: 1.45;
}

.privacy-section p {
  margin: 0 0 12px;
}

.table-wrap {
  margin: 12px 0 16px;
  border: 1px solid var(--color-border);
  overflow-x: auto;
}

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

thead {
  background: var(--color-surface);
}

th,
td {
  text-align: left;
  padding: 2px 5px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
  color: var(--color-text);
}

th + th,
td + td {
  border-left: 1px solid var(--color-border);
  vertical-align: middle;
}

tbody tr:last-child td,
tbody td[rowspan] {
  border-bottom: 0;
}

th {
  font-weight: 600;
  color: var(--color-text-strong);
  white-space: nowrap;
}

.info-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 10px 14px;
  margin: 12px 0 16px;
}

.info-box ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.info-box li {
  font-size: 12px;
  line-height: 1.7;
  color: var(--color-text);
}

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

.info-box a:hover {
  text-decoration: underline;
}

.external-list {
  margin: 0;
  padding-left: 16px;
  font-size: 12px;
  line-height: 1.45;
  list-style: none;
}

.external-list li::before {
  content: "- ";
}

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

.external-list a:hover {
  text-decoration: underline;
}

.doc-footer {
  margin-top: 18px;
  padding-top: 18px;
  padding-bottom: 60px;
  border-top: 1px solid var(--color-border);
  font-size: 12px;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.doc-footer strong {
  color: var(--color-text-strong);
  font-weight: 600;
}

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .layout {
    display: block;
    padding: 0 20px;
  }

  .version-nav {
    width: auto;
    padding: 24px 0 0;
  }

  .version-nav details {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
  }

  .doc {
    max-width: none;
  }

  header.doc-header {
    padding: 32px 0 18px;
  }

  header.doc-header h1 {
    font-size: 24px;
  }
}
