/*
 * Nolleo 법적 문서 공용 스타일 (개인정보 처리방침·이용약관 페이지).
 * 구조와 규칙은 Picks legal 의 style.css 를 따르고, 색은 Nolleo 설정 창 팔레트(웰시코기 주황, 따뜻한 회색)를 쓴다.
 * 본문은 미리 그린 HTML 이라 자바스크립트가 없어도 보인다. JS 는 하단 버전 고르기만 만든다.
 */
/* biome-ignore-all lint/style/noDescendingSpecificity: 문서 본문·목차·표·버전 고르기를 구역별로 모아 둔다 */

:root {
  --accent: #b5500e; /* 웰시코기 주황 (흰 바탕 대비 5.1:1) */
  --accent-2: #e0893c; /* 그라디언트 끝 */
  --accent-weak: #fdf1e7; /* 강조색의 옅은 배경 */
  --accent-border: #f2d2b6; /* 강조색 계열 보더 */
  --text: #3a3530; /* 본문 텍스트 */
  --heading: #1f1d1a; /* 제목 텍스트 */
  --muted: #625c55; /* 보조 텍스트 */
  --border: #e6e1d9; /* 기본 보더 */
  --border-strong: #d4ccc0; /* 강한 보더 */
  --surface: #ffffff; /* 표면(카드) 배경 */
  --bg: #f8f6f2; /* 페이지 배경 */
  --radius: 12px;
  --shadow: 0 10px 30px rgba(31, 29, 26, 0.1);
  --maxw: 760px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    "Pretendard", "Pretendard Variable", -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Segoe UI", "Noto Sans KR", "Hiragino Sans", "Yu Gothic",
    Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
}
a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(181, 80, 14, 0.35);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── 상단 바 ─────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
/* 도트 로고는 정수 배율일 때 가장 또렷하다 (원본 140×32) */
.brand-logo {
  display: block;
  height: 32px;
  width: auto;
  image-rendering: pixelated;
  flex-shrink: 0;
}
/* 언어 바꾸기. 지금 언어(aria-current)는 링크가 아니다 */
.lang-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2px;
  font-size: 13px;
  line-height: 1.4;
}
.lang-switch > * {
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.lang-switch a {
  color: var(--muted);
  text-decoration: none;
}
.lang-switch a:hover {
  background: var(--accent-weak);
  color: var(--accent);
}
.lang-switch [aria-current] {
  background: var(--accent-weak);
  color: var(--accent);
  font-weight: 600;
}

/* ── 본문 ─────────────────────────────────────────────────── */
.doc {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 20px 24px;
}
.doc-title {
  font-size: 26px;
  line-height: 1.3;
  font-weight: 800;
  color: var(--heading);
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.doc-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-weak);
  color: var(--accent);
  font-weight: 600;
  border: 1px solid var(--accent-border);
}

/* 한국어는 어절 단위로 줄을 바꾼다. 일본어·영어는 기본 규칙(일본어에 keep-all을 쓰면 구두점에서만 끊긴다) */
.doc-body p,
.doc-body li,
.doc-body th,
.doc-body td {
  overflow-wrap: anywhere;
  line-break: strict;
}
:lang(ko) .doc-body p,
:lang(ko) .doc-body li,
:lang(ko) .doc-body th,
:lang(ko) .doc-body td {
  word-break: keep-all;
}
.doc-body p {
  margin: 0 0 12px;
}
.doc-body ul {
  margin: 0 0 14px;
  padding-left: 1.3em;
}
.doc-body li {
  margin: 0 0 6px;
}
.doc-body h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.01em;
  margin: 34px 0 12px;
}
.doc-body h3,
.doc-body h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--heading);
  margin: 20px 0 8px;
}

/* 머리말(첫 조 앞) 카드 */
.intro {
  background: #f1ede6;
  border-radius: var(--radius);
  padding: 16px 18px 6px;
  margin-bottom: 24px;
  color: #4a443d;
}
.intro h3:first-child {
  margin-top: 4px;
}

/* 목차 */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px 8px;
  margin: 0 0 8px;
}
.toc-title {
  margin: 0 0 6px;
  font-weight: 700;
  color: var(--heading);
  font-size: 14px;
}
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 24px;
}
.toc li {
  margin: 0 0 6px;
  break-inside: avoid;
  font-size: 14px;
}
.toc a {
  text-decoration: none;
}
.toc a:hover {
  text-decoration: underline;
}

/* 표 */
.table-wrap {
  overflow-x: auto;
  margin: 0 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.doc-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.doc-body th,
.doc-body td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.doc-body thead th {
  background: var(--accent-weak);
  color: var(--heading);
  font-weight: 700;
}
.doc-body tbody th {
  color: var(--heading);
  font-weight: 600;
  min-width: 7em;
}
.doc-body tbody tr:last-child th,
.doc-body tbody tr:last-child td {
  border-bottom: 0;
}

/* ── 하단 바 (시행일 버전 고르기) ──────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.ver-label {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  color: var(--muted);
}
.ver-label strong {
  font-size: 14px;
  color: var(--heading);
  font-weight: 600;
}
.footer-note {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px 36px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

/* ── 버전 고르기 (Picks 와 같은 사용자 지정 목록 상자, legal.js 가 만든다) ── */
.version-select {
  position: relative;
}
.no-js .version-select {
  display: none;
}

.vs-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--heading);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}
.vs-button:hover {
  background: #fffaf5;
  border-color: var(--accent-border);
}
.vs-button .vs-current {
  flex: 1;
  text-align: left;
  white-space: nowrap;
}
.vs-button .vs-chevron {
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.version-select.open .vs-button {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(181, 80, 14, 0.18);
}
.version-select.open .vs-chevron {
  transform: rotate(180deg);
}

/* 페이지 아래쪽이라 위로 펼친다 */
.vs-list {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  max-height: 320px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}
.version-select.open .vs-list {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.vs-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
  font-size: 14px;
}
.vs-option:hover,
.vs-option.focused {
  background: var(--accent-weak);
}
.vs-option .vs-check {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
  visibility: hidden;
}
.vs-option[aria-selected="true"] {
  color: var(--accent);
  font-weight: 600;
}
.vs-option[aria-selected="true"] .vs-check {
  visibility: visible;
}
.vs-option .vs-date {
  flex: 1;
  white-space: nowrap;
}
.vs-option .vs-badge {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-weak);
  border: 1px solid var(--accent-border);
  padding: 1px 7px;
  border-radius: 999px;
}

/* ── 반응형 ───────────────────────────────────────────────── */
@media (max-width: 600px) {
  .doc {
    padding: 28px 18px 20px;
  }
  .doc-title {
    font-size: 22px;
  }
  .toc ol {
    columns: 1;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .version-select,
  .vs-button {
    width: 100%;
  }
  .vs-list {
    left: 0;
    right: 0;
    min-width: 0;
  }
  .topbar-inner {
    padding: 12px 16px;
  }
  .lang-switch {
    font-size: 12px;
  }
  .lang-switch > * {
    padding: 4px 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    /* biome-ignore lint/complexity/noImportantStyles: 동작 줄이기 설정은 모든 전환을 끈다 */
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}

@media print {
  .topbar,
  .footer,
  .toc {
    display: none;
  }
  body {
    background: #fff;
  }
}
