/* NTB 정책 문서(개인정보처리방침·이용약관·계정 삭제 안내) — 홈페이지와 같은 세계의 읽기 표면. styles.css 다음에 불러온다. */

/* 머리글 — 영상이 없으니 네이비 띠로 고정 */
.lhead { display: flex; align-items: center; gap: 14px; height: 64px; padding: 0 var(--gut); background: var(--ink); color: #fff; }
.lhead .brand { font-size: 22px; }
.lhead .badge { background: #22324A; }
.lhead-home { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; font-size: 15px; color: var(--on-dark); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 5px; text-decoration-thickness: 2px; transition: color .2s, text-decoration-color .2s; }
.lhead-home:hover { color: #fff; text-decoration-color: var(--lime); }
.lhead-home svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lhead :focus-visible { outline-color: var(--lime); }

/* 판짜기 — 왼쪽 목차(따라 내려옴), 오른쪽 본문(한 줄 약 44자) */
.lgrid { display: grid; grid-template-columns: 248px minmax(0, 46rem); column-gap: clamp(40px, 5vw, 80px); justify-content: center; padding: 56px 0 96px; }
.ltitle { grid-column: 2; padding-bottom: 28px; }
.lside { grid-column: 1; grid-row: 1 / span 2; align-self: start; position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 4px 4px 4px 0; }
.prose { grid-column: 2; min-width: 0; }

/* 문서 사이 이동 */
.policy-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.policy-tabs a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-strong); font-size: 14.5px; font-weight: 700; color: var(--ink-2); transition: border-color .2s, color .2s, background-color .2s; }
.policy-tabs a:hover { border-color: var(--ink); color: var(--ink); }
.policy-tabs a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.ltitle h1 { font-size: 2.25rem; line-height: 1.25; letter-spacing: -.025em; }

/* 목차 */
.toc > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 18px; font-weight: 700; }
.toc > summary::-webkit-details-marker { display: none; }
.toc > summary::after { content: ''; width: 10px; height: 10px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg) translateY(-3px); transition: transform .25s var(--ease); flex: none; }
.toc[open] > summary::after { transform: rotate(-135deg) translateY(-3px); }
.toc-label { margin: 0 0 10px 10px; font-size: 13px; font-weight: 700; color: var(--ink-3); }
.toc ol, .toc ul { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 6px; padding: 6px 10px; border-radius: 8px; font-size: 14px; line-height: 1.45; color: var(--ink-2); transition: background-color .15s, color .15s; }
.toc ol a::before { content: counter(toc) '.'; flex: none; min-width: 1.7em; font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-3); }
.toc a:hover { background: var(--line-soft); color: var(--ink); }
.toc a[aria-current="location"] { background: #E5E9DD; color: var(--ink); font-weight: 700; }

/* 본문 */
.prose { font-size: 1rem; line-height: 1.8; color: var(--ink); }
.prose > :first-child { margin-top: 0; }
.prose :where(p, ul, ol, .note, .tbl) { margin: 1rem 0 0; }
.prose h2 { margin: 3.5rem 0 0; padding-top: 2rem; border-top: 1px solid var(--line); font-size: 1.5rem; line-height: 1.35; letter-spacing: -.02em; }
.prose h3 { margin: 2rem 0 0; font-size: 1.1875rem; line-height: 1.45; }
.prose :where(h2, h3) + * { margin-top: .875rem; }
.prose section > h2:first-child { margin-top: 3.5rem; }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose li + li { margin-top: .5rem; }
.prose li > :where(ul, ol) { margin-top: .5rem; }
.prose ol > li::marker { font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-3); }
.prose ul > li::marker { color: var(--ink-3); }
.prose strong { font-weight: 700; }
.prose a { text-decoration: underline; text-decoration-color: rgba(21, 32, 46, .35); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: text-decoration-color .15s; }
.prose a:hover { text-decoration-color: var(--ink); text-decoration-thickness: 2px; }
.prose [id] { scroll-margin-top: 20px; }

/* 먼저 알아 두실 내용·쉽게 말하면 */
.prose .note { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; }
.prose div.note { padding: 22px 26px 24px; }
.prose .note > :first-child { margin-top: 0; }
.prose p.note { color: var(--ink-2); }

/* 표 — 좁은 화면에서는 표 안에서만 옆으로 밀림 */
.prose .tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); scrollbar-width: thin; }
.prose table { width: 100%; border-collapse: collapse; font-size: .90625rem; line-height: 1.6; }
.prose caption { caption-side: top; padding: 14px 16px 2px; text-align: left; font-weight: 700; color: var(--ink); }
.prose th, .prose td { padding: 12px 16px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.prose thead th { background: var(--line-soft); font-weight: 700; color: var(--ink); }
.prose caption + thead th, .prose table > thead:first-child th { border-top: 0; }
.prose caption + thead th { border-top: 1px solid var(--line); }
.prose tbody th { font-weight: 700; }
.prose td :where(p, ul, ol) { margin-top: .4rem; }
.prose td > :first-child { margin-top: 0; }

.to-top { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.to-top a { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.foot-links a[aria-current="page"] { text-decoration-color: var(--lime); }

/* 넓은 화면: 목차는 늘 펼침(접기 줄 숨김) */
@media (min-width: 981px) {
  .toc > summary { display: none; }
}
/* 좁은 화면: 한 줄로 쌓고, 목차는 접힌 상자 */
@media (max-width: 980px) {
  .lgrid { grid-template-columns: minmax(0, 1fr); padding: 36px 0 72px; }
  .ltitle, .lside, .prose { grid-column: 1; grid-row: auto; }
  .ltitle { padding-bottom: 20px; }
  .lside { position: static; max-height: none; overflow: visible; margin: 0 0 32px; padding: 0; }
  .toc { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
  .toc[open] { padding-bottom: 10px; }
  .toc-label { display: none; }
  .toc nav { padding: 0 8px; }
  .toc a { padding: 9px 10px; font-size: 15px; }
  .prose table { min-width: 34rem; }
}
@media (max-width: 640px) {
  .ltitle h1 { font-size: 1.75rem; }
  .prose h2 { font-size: 1.3125rem; margin-top: 2.75rem; padding-top: 1.5rem; }
  .prose section > h2:first-child { margin-top: 2.75rem; }
  .prose div.note { padding: 18px 18px 20px; }
  .prose ul, .prose ol { padding-left: 1.25em; }
  /* 표: 한 줄 = 카드 한 장(칸 이름을 위에 작게) — 옆으로 밀지 않고 읽게 */
  .prose table { min-width: 0; }
  .prose :is(table, tbody, tr, th, td) { display: block; }
  .prose thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .prose caption { display: block; padding: 14px 16px 12px; }
  .prose tbody tr { padding: 14px 16px 16px; border-top: 1px solid var(--line); }
  .prose table:not(:has(caption)) tbody tr:first-child { border-top: 0; }
  .prose th, .prose td { padding: 0; border: 0; }
  .prose tbody th { font-size: 1rem; }
  .prose :is(th, td) + td { margin-top: 10px; }
  .prose td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: .8125rem; font-weight: 700; color: var(--ink-3); }
}
@media print {
  .lhead, .lside, .policy-tabs, .to-top, .skip, .foot-links { display: none !important; }
  body { background: #fff; }
  .lgrid { display: block; padding: 0; }
  .prose .tbl { overflow: visible; border-color: #999; }
  .prose a { text-decoration: none; }
  .foot { background: #fff; color: #000; padding: 24px 0 0; }
  .biz { border-color: #999; }
  .foot-brand .app-name, .biz a { color: #000; }
}
