/* 문서 서가형 — 노션식 회색 선, Pretendard, 분류마다 옅은 색 딱지 */
@font-face { font-family: 'Pretendard Variable'; src: url('/fonts/PretendardVariable.woff2') format('woff2-variations'); font-weight: 45 920; font-display: swap; }
:root {
  --bg: #FFFFFF; --side: #F7F7F5; --ink: #37352F; --ink2: #5F5E5B; --muted: #9B9A97; --line: #E9E9E7; --hover: rgba(55,53,47,.08);
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.6 var(--font); word-break: keep-all; overflow-wrap: anywhere; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
.ic { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.dc-ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; flex: none; color: var(--muted); }
.dc-ic--big { width: 44px; height: 44px; stroke-width: 1.1; color: var(--ink2); }
.dc-muted { color: var(--muted); }

/* 색 딱지 */
.dc-pill { display: inline-flex; align-items: center; padding: 0 7px; border-radius: 4px; font-size: 13px; line-height: 22px; white-space: nowrap; text-decoration: none; color: var(--ink); }
.dc-pill--o { background: #FADEC9; } .dc-pill--g { background: #DBEDDB; } .dc-pill--b { background: #D3E5EF; }
.dc-pill--y { background: #FDECC8; } .dc-pill--p { background: #E8DEEE; } .dc-pill--n { background: #E3E2E0; }
a.dc-pill:hover, a .dc-pill:hover { filter: brightness(.95); }

/* 머리글 */
.dc-top { position: sticky; top: 0; z-index: 30; height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 14px; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.dc-burger { display: none; width: 32px; height: 32px; padding: 8px 7px; border: 0; border-radius: 4px; background: none; cursor: pointer; flex-direction: column; justify-content: space-between; }
.dc-burger span { display: block; height: 1.6px; background: var(--ink2); }
.dc-burger:hover { background: var(--hover); }
.dc-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.dc-brand .brand__mark { width: 20px; height: 20px; color: var(--ink); }
.dc-brand small { font-size: 13px; color: var(--muted); font-weight: 400; }
.dc-nav { margin-left: auto; display: flex; gap: 2px; }
.dc-nav a { padding: 4px 9px; border-radius: 4px; font-size: 14px; text-decoration: none; color: var(--ink2); white-space: nowrap; }
.dc-nav a:hover { background: var(--hover); }
.dc-nav a.is-on { font-weight: 600; color: var(--ink); }

.dc-btn { display: inline-flex; align-items: center; justify-content: center; padding: 7px 14px; border: 1px solid var(--line); border-radius: 4px; background: #fff; font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap; box-shadow: 0 1px 2px rgba(15,15,15,.06); }
.dc-btn:hover { background: var(--side); }
.dc-btn--ink { background: #2F2E2B; color: #fff; border-color: #2F2E2B; }
.dc-btn--ink:hover { background: #000; }

/* 틀: 문서 나무 | 본문 | 목차 */
.dc-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: calc(100vh - 46px); }
.dc-shell--toc { grid-template-columns: 250px minmax(0, 1fr) 220px; }
.dc-scrim { display: none; }
.dc-tree { position: sticky; top: 46px; align-self: start; max-height: calc(100vh - 46px); overflow-y: auto; padding: 14px 8px 24px; background: var(--side); border-right: 1px solid var(--line); font-size: 14px; color: var(--ink2); }
.dc-shell .dc-tree { min-height: calc(100vh - 46px); }
.dc-tree__h { margin: 18px 10px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.dc-tree__home { display: flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 4px; text-decoration: none; font-weight: 500; }
.dc-tree__home:hover, .dc-node summary:hover, .dc-node a:hover { background: var(--hover); }
.dc-tree__home.is-on { background: var(--hover); color: var(--ink); font-weight: 600; }
.dc-node summary { display: flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 4px; cursor: pointer; list-style: none; font-weight: 500; }
.dc-node summary::-webkit-details-marker { display: none; }
.dc-node summary::before { content: ''; width: 0; height: 0; border-left: 5px solid var(--muted); border-top: 4px solid transparent; border-bottom: 4px solid transparent; transition: transform .15s; flex: none; }
.dc-node[open] summary::before { transform: rotate(90deg); }
.dc-node summary small { margin-left: auto; font-size: 12px; color: var(--muted); }
.dc-node__dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.dc-node ul { list-style: none; margin: 0; padding: 0 0 4px 18px; }
.dc-node a { display: flex; align-items: flex-start; gap: 7px; padding: 3px 8px; border-radius: 4px; text-decoration: none; font-size: 13.5px; line-height: 1.45; }
.dc-node a .dc-ic { margin-top: 1px; }
.dc-node a.is-on { background: var(--hover); color: var(--ink); font-weight: 600; }

.dc-content { width: 100%; max-width: 860px; margin: 0 auto; padding: 22px 48px 80px; min-width: 0; }
.dc-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13.5px; color: var(--ink2); }
.dc-crumbs a { padding: 1px 4px; border-radius: 3px; text-decoration: none; }
.dc-crumbs a:hover { background: var(--hover); }
.dc-crumbs span:last-child:not(.dc-crumbs__sep) { color: var(--ink); padding: 1px 4px; }
.dc-crumbs__sep { color: #C7C6C4; }
.dc-pageicon { width: 64px; height: 64px; margin-top: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--side); border: 1px solid var(--line); }
.dc-title { margin-top: 14px; font-size: 38px; font-weight: 700; line-height: 1.25; letter-spacing: -0.02em; }
.dc-desc { margin-top: 10px; color: var(--ink2); font-size: 16px; }

/* 목록 — 데이터베이스 */
.dc-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 30px; border-bottom: 1px solid var(--line); }
.dc-views { display: flex; gap: 4px; }
.dc-views a { padding: 6px 4px; margin-right: 8px; font-size: 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.dc-views a.is-on { color: var(--ink); font-weight: 600; border-color: var(--ink); }
.dc-find { display: flex; align-items: center; gap: 6px; padding: 4px 8px; color: var(--muted); }
.dc-find input { width: 150px; border: 0; outline: 0; background: transparent; font-size: 14px; color: var(--ink); }
.dc-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.dc-filters__k { width: 34px; font-size: 12.5px; color: var(--muted); }
.dc-chip { padding: 2px 9px; border: 1px solid var(--line); border-radius: 99px; font-size: 13px; text-decoration: none; color: var(--ink2); white-space: nowrap; }
.dc-chip:hover { background: var(--hover); }
.dc-chip.is-on { background: #2F2E2B; border-color: #2F2E2B; color: #fff; }
.dc-chip--tag.is-on { background: #D3E5EF; border-color: #B7D3E4; color: var(--ink); }
.dc-count { margin-top: 16px; font-size: 12.5px; color: var(--muted); }
.dc-empty { padding: 30px 0; color: var(--muted); }
.dc-table { margin-top: 6px; border-top: 1px solid var(--line); }
.dc-tr { display: grid; grid-template-columns: minmax(0, 1fr) 120px 220px 100px; border-bottom: 1px solid var(--line); }
.dc-tr > * { padding: 8px 10px; min-width: 0; border-right: 1px solid var(--line); }
.dc-tr > *:last-child { border-right: 0; }
.dc-tr--head { font-size: 13px; color: var(--muted); }
.dc-td { font-size: 14px; }
.dc-td--name { display: flex; align-items: flex-start; gap: 8px; text-decoration: none; font-weight: 600; line-height: 1.45; }
.dc-td--name .dc-ic { margin-top: 2px; }
.dc-td--name:hover span { text-decoration: underline; text-decoration-color: #C7C6C4; text-underline-offset: 3px; }
.dc-td--tags { display: flex; flex-wrap: wrap; gap: 4px; }
.dc-td--date { color: var(--ink2); font-size: 13.5px; }
.dc-gal { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 10px; }
.dc-gcard { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; text-decoration: none; box-shadow: 0 1px 2px rgba(15,15,15,.04); }
.dc-gcard:hover { background: var(--side); }
.dc-gcard img, .dc-gcard__blank { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.dc-gcard__blank { display: grid; place-items: center; background: var(--side); }
.dc-gcard__t { display: flex; gap: 6px; padding: 10px 12px 4px; font-size: 14.5px; font-weight: 600; line-height: 1.45; }
.dc-gcard__t .dc-ic { margin-top: 2px; }
.dc-gcard__p { display: flex; align-items: center; gap: 8px; padding: 0 12px 12px; }
.dc-gcard__p small { font-size: 12.5px; color: var(--muted); }

/* 글 보기 */
.dc-coverband { height: 200px; margin: 14px -48px 0; overflow: hidden; background: var(--side); }
.dc-coverband img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dc-coverband--plain { height: 90px; background: #F1F1EF; }
.dc-pageicon--on { margin-top: -50px; position: relative; border: 4px solid #fff; }
.dc-doc { padding-top: 14px; }
.dc-doc .dc-pageicon--on { margin-top: -36px; }
.dc-props { margin-top: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); display: grid; gap: 2px; font-size: 14px; }
.dc-props > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; min-height: 32px; }
.dc-props dt { color: var(--muted); }
.dc-props dd { display: flex; flex-wrap: wrap; gap: 4px; }
.dc-props dd a { text-decoration: none; }
.dc-callout { display: grid; gap: 2px; margin-top: 22px; padding: 14px 16px 14px 44px; position: relative; border-radius: 6px; background: #F1F1EF; font-size: 15px; }
.dc-callout::before { content: 'i'; position: absolute; left: 16px; top: 16px; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: var(--ink2); color: #fff; font: 700 12px/1 Georgia, serif; }
.dc-callout b { font-weight: 600; }
.dc-callout--cta { margin-top: 36px; background: #FBF3DB; }
.dc-callout--cta .dc-btn { justify-self: start; margin-top: 10px; }
.dc-prose { margin-top: 22px; font-size: 16px; line-height: 1.75; }
.dc-prose p, .dc-prose ul, .dc-prose ol { margin: 0 0 .9em; }
.dc-prose h2 { margin: 1.6em 0 .4em; font-size: 24px; font-weight: 700; letter-spacing: -0.01em; scroll-margin-top: 60px; }
.dc-prose h3 { margin: 1.3em 0 .3em; font-size: 19px; font-weight: 700; scroll-margin-top: 60px; }
.dc-prose ul, .dc-prose ol { padding-left: 1.5em; }
.dc-prose strong { font-weight: 700; }
.dc-prose a { color: inherit; text-decoration-color: #C7C6C4; }
.dc-prose--check ul { list-style: none; padding-left: 0; }
.dc-prose--check ul li { position: relative; padding-left: 28px; margin: 4px 0; }
.dc-prose--check ul li::before { content: ''; position: absolute; left: 2px; top: 5px; width: 14px; height: 14px; border: 1.5px solid var(--ink2); border-radius: 2px; }
.dc-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 30px; }
.dc-pn a { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }
.dc-pn a:hover { background: var(--side); }
.dc-pn small { display: block; font-size: 12px; color: var(--muted); }
.dc-pn span { display: block; font-weight: 600; font-size: 14.5px; line-height: 1.45; }
.dc-pn__next { text-align: right; }
.dc-toc { position: sticky; top: 46px; align-self: start; padding: 40px 18px 20px 6px; font-size: 13px; }
.dc-toc__h { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.dc-toc__list { list-style: none; margin: 0; padding: 0 0 0 10px; border-left: 1px solid var(--line); }
.dc-toc__list li.is-sub { padding-left: 12px; }
.dc-toc__list a { display: block; padding: 4px 0; color: var(--muted); text-decoration: none; line-height: 1.45; }
.dc-toc__list a:hover, .dc-toc__list a.is-on { color: var(--ink); }
.dc-toc__list a.is-on { font-weight: 600; }
.dc-toc-m { display: none; }

/* 상담 */
.dc-form { margin-top: 26px; border-top: 1px solid var(--line); }
.dc-frow { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.dc-frow label { padding-top: 7px; font-size: 14px; color: var(--muted); }
.dc-frow input, .dc-frow select, .dc-frow textarea { width: 100%; padding: 6px 8px; border: 1px solid transparent; border-radius: 4px; background: transparent; font-size: 15px; outline: 0; }
.dc-frow input:hover, .dc-frow select:hover, .dc-frow textarea:hover { background: var(--side); }
.dc-frow input:focus, .dc-frow select:focus, .dc-frow textarea:focus { border-color: #9CC3DE; background: #fff; box-shadow: 0 0 0 3px rgba(35,131,226,.12); }
.dc-frow textarea { resize: vertical; }
.dc-form .dc-btn { margin-top: 18px; }
.dc-err { margin-top: 12px; color: #C4554D; font-size: 14px; }
.dc-err:empty { display: none; }
.dc-hint { margin-top: 10px; font-size: 13px; }
.dc-thanks { margin-top: 24px; display: flex; gap: 8px; flex-wrap: wrap; }

/* 바닥글 */
.dc-foot { display: flex; align-items: center; gap: 20px; padding: 18px 24px; border-top: 1px solid var(--line); background: var(--side); font-size: 13px; color: var(--ink2); }
.dc-foot p { flex: 1; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); padding: 9px 16px; border-radius: 6px; background: #2F2E2B; color: #fff; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; z-index: 60; white-space: nowrap; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1180px) {
  .dc-shell--toc { grid-template-columns: 250px minmax(0, 1fr); }
  .dc-toc { display: none; }
  .dc-toc-m { display: block; margin-top: 16px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; }
  .dc-toc-m summary { padding: 8px 12px; cursor: pointer; font-weight: 600; color: var(--ink2); }
  .dc-toc-m .dc-toc__list { margin: 0 12px 10px; }
}
@media (max-width: 820px) {
  .dc-burger { display: flex; }
  .dc-brand small { display: none; }
  .dc-nav a { padding: 4px 6px; font-size: 13.5px; }
  .dc-shell, .dc-shell--toc { grid-template-columns: minmax(0, 1fr); }
  .dc-tree { position: fixed; top: 0; left: 0; bottom: 0; z-index: 70; width: 280px; max-height: none; transform: translateX(-100%); transition: transform .2s; visibility: hidden; padding-top: 20px; }
  .dc-shell .dc-tree { min-height: 0; }
  body.dc-open .dc-tree { transform: none; visibility: visible; box-shadow: 4px 0 24px rgba(0,0,0,.12); }
  body.dc-open .dc-scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(15,15,15,.3); }
  .dc-content { padding: 18px 16px 60px; }
  .dc-coverband { margin: 12px -16px 0; height: 150px; }
  .dc-doc .dc-pageicon--on { margin-top: -30px; }
  .dc-pageicon { margin-top: 24px; width: 54px; height: 54px; }
  .dc-title { font-size: 28px; }
  .dc-bar { flex-direction: column; align-items: stretch; gap: 4px; }
  .dc-find input { width: 100%; }
  .dc-filters__k { width: 100%; }
  .dc-tr--head { display: none; }
  .dc-tr { grid-template-columns: minmax(0, 1fr) auto; padding: 8px 0; }
  .dc-tr > * { border-right: 0; padding: 2px 4px; }
  .dc-td--name { grid-column: 1 / -1; }
  .dc-td--tags { grid-column: 1 / -1; order: 3; }
  .dc-td--date { text-align: right; }
  .dc-gal { grid-template-columns: minmax(0, 1fr); }
  .dc-props > div { grid-template-columns: 84px minmax(0, 1fr); }
  .dc-pn { grid-template-columns: 1fr; }
  .dc-pn__next { text-align: left; }
  .dc-frow { grid-template-columns: 1fr; gap: 2px; }
  .dc-foot { flex-direction: column; align-items: flex-start; padding: 18px 16px; }
}
