:root {
  --paper: #FBF7EC;
  --surface: #FFFDF7;
  --ink: #3B2416;
  --text: #2B2219;
  --muted: #6E6355;
  --line: #E6DCC6;
  --seed: #D48F43;
  --seed-deep: #A3622C;
  --leaf: #2E8B57;
  --night: #16211C;
  --font-body: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --font-pixel: "Silkscreen", ui-monospace, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; color: var(--text); font-family: var(--font-body); font-size: 17px; line-height: 1.7; word-break: keep-all; overflow-wrap: break-word; -webkit-text-size-adjust: 100%; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--leaf); outline-offset: 3px; border-radius: 2px; }
p { margin: 0; }
.wrap { max-width: 960px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }

/* 머리말 */
.bar { padding-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.bar img { width: 128px; }
.bar nav { display: flex; gap: 20px; font-size: 15px; color: var(--muted); }
.bar nav a { text-decoration: none; }
.bar nav a { white-space: nowrap; }
@media (max-width: 480px) { .bar nav { gap: 14px; font-size: 14px; } .bar > a img { width: 104px; height: auto; } }
.bar nav a:hover { color: var(--ink); text-decoration: underline; }

/* 첫 화면 */
.hero { padding-top: 72px; padding-bottom: 88px; display: grid; justify-items: center; text-align: center; gap: 30px; }
.hero .logo { width: 512px; }
.hero h1 { margin: 0; font-size: clamp(28px, 5.4vw, 44px); line-height: 1.3; color: var(--ink); letter-spacing: -0.01em; }
.hero .lead { max-width: 34em; color: var(--muted); font-size: 18px; }
.hero .en { font-family: var(--font-pixel); font-size: 13px; letter-spacing: .05em; color: var(--seed-deep); }

/* 구역 */
section { padding: 64px 0; border-top: 1px solid var(--line); }
.label { font-family: var(--font-pixel); font-size: 13px; letter-spacing: .06em; color: var(--leaf); margin-bottom: 10px; }
h2 { margin: 0 0 28px; font-size: clamp(24px, 3.6vw, 30px); line-height: 1.35; color: var(--ink); }

.story { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .story { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 24px 22px; display: grid; gap: 10px; align-content: start; }
.card .big { font-size: 24px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.card .big em { font-style: normal; color: var(--seed-deep); }
.card p { color: var(--muted); font-size: 16px; }
.card .quote { font-style: italic; }

.now { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
@media (max-width: 600px) { .now { grid-template-columns: 1fr; justify-items: start; } }
.now img { width: 75px; }
.now p + p { margin-top: 8px; }
.now .muted { color: var(--muted); font-size: 16px; }

.projects { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) { .projects { grid-template-columns: 1fr; } }
.project { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; display: flex; gap: 16px; align-items: center; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
a.project:hover { border-color: var(--seed); transform: translateY(-2px); }
a.project:hover .name { color: var(--seed-deep); }
.project .name { font-size: 20px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.project p { color: var(--muted); font-size: 16px; }
.badge { flex: none; font-family: var(--font-pixel); font-size: 12px; letter-spacing: .08em; line-height: 1; color: #fff; background: var(--leaf); border-radius: 4px; padding: 6px 8px 5px; }

footer { border-top: 1px solid var(--line); padding: 32px 0 40px; font-size: 14px; color: var(--muted); display: grid; gap: 24px; }
footer .contact { margin: 0; display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 6px 40px; }
@media (max-width: 760px) { footer .contact { grid-template-columns: 1fr; } }
footer .contact div { display: grid; gap: 2px; }
footer .contact dt { font-family: var(--font-pixel); font-size: 12px; letter-spacing: .05em; color: var(--leaf); }
footer .contact dd { margin: 0; }
footer .contact a { color: var(--ink); text-decoration: none; }
footer .contact a:hover { text-decoration: underline; }
footer .sub { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
footer .copy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
footer .copy img { width: 96px; flex: none; }
/* 로고 이미지는 위쪽에 새싹이 있어 글자(Dotree)의 세로 중심이 이미지 중앙보다 아래라서, 텍스트도 그만큼 내려 맞춘다 */
footer .copy > span { position: relative; top: 5px; }
footer .sub > .px { position: relative; top: 4px; }
footer .px { font-family: var(--font-pixel); font-size: 12px; letter-spacing: .05em; }

/* 프로젝트(앱) 개별 페이지 */
.app { padding-top: 56px; padding-bottom: 96px; display: grid; gap: 28px; justify-items: start; }
.app .back { font-size: 15px; color: var(--muted); text-decoration: none; }
.app .back:hover { color: var(--ink); text-decoration: underline; }
.app .head { display: flex; align-items: center; gap: 16px; }
.app h1 { margin: 0; font-size: clamp(30px, 6vw, 44px); line-height: 1.25; color: var(--ink); }
.app .soon { display: flex; align-items: center; gap: 28px; padding: 32px 28px; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.app .soon img { width: 75px; flex: none; }
.app .soon p { color: var(--muted); }
.app .soon p:first-child { color: var(--ink); font-size: 20px; font-weight: 700; }
@media (max-width: 600px) { .app .soon { flex-direction: column; align-items: flex-start; } }

/* 프로젝트 페이지의 보조 링크 */
.app .doc-link { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--muted); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; background: var(--surface); transition: border-color .15s, color .15s; }
.app .doc-link:hover { border-color: var(--seed); color: var(--seed-deep); }

/* 정책 문서 페이지 (개인정보처리방침 등)
   단계: 쪽 제목(h1) > 조항(h2, 번호와 위쪽 선) > 항목(h3) > 세부(이름표+내용, 표, 목록)
   상자는 핵심 내용, 참고 두 가지만 쓴다. */
.doc { padding-top: 40px; padding-bottom: 96px; }
.doc .back { display: inline-block; font-size: 15px; color: var(--muted); text-decoration: none; }
.doc .back:hover { color: var(--ink); text-decoration: underline; }

/* 언어: 고른 언어의 문서만 보인다. 스크립트가 꺼져 있으면(data-doc-lang 없음) 둘 다 보인다. */
html[data-doc-lang="ko"] .doc [data-l="en"], html[data-doc-lang="en"] .doc [data-l="ko"] { display: none; }
html:not([data-doc-lang]) .policy + .policy { margin-top: 96px; padding-top: 56px; border-top: 1px solid var(--line); }

/* 배치: 데스크톱은 왼쪽 목차 + 오른쪽 본문(제목도 본문과 같은 선에서 시작), 모바일은 제목 > 핵심 내용 > 목차 > 본문 */
.policy { margin-top: 28px; display: grid; grid-template-columns: 216px minmax(0, 1fr); column-gap: 52px; align-items: start;
  grid-template-areas: "toc head" "toc intro" "toc body"; }
.doc-head { grid-area: head; }
.doc-intro { grid-area: intro; }
.toc { grid-area: toc; }
.doc-body { grid-area: body; }
@media (max-width: 899px) {
  .policy { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "intro" "toc" "body"; margin-top: 20px; }
}

/* 쪽 제목 */
.doc-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px 24px; }
.doc-head .eyebrow { margin: 0 0 6px; font-size: 17px; font-weight: 700; line-height: 1.4; color: var(--seed-deep); }
.doc-head h1 { margin: 0; font-size: clamp(32px, 5vw, 42px); line-height: 1.2; letter-spacing: -0.02em; color: var(--ink); }
.doc-head .meta { margin: 14px 0 0; font-size: 15px; line-height: 1.6; color: var(--muted); }
.doc-head .meta .sep { margin: 0 10px; }
.lang-switch { flex: none; display: inline-flex; margin-top: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.lang-switch a { padding: 5px 14px; border-radius: 999px; font-size: 14px; line-height: 1.5; color: var(--muted); text-decoration: none; }
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current] { background: var(--ink); color: #fff; }

/* 머리말 + 핵심 내용 */
.doc-intro { margin-top: 32px; }
.doc-intro > p { margin: 0 0 8px; font-size: 17px; line-height: 1.75; color: var(--text); }
.doc-intro > p.muted { font-size: 15px; color: var(--muted); }
.key { margin-top: 24px; padding: 22px 26px; background: #EEF4E8; border-radius: 12px; }
.doc .key-title { margin: 0 0 12px; font-size: 15px; line-height: 1.4; letter-spacing: 0; color: var(--leaf); }
.key ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.key li { position: relative; padding-left: 26px; font-size: 16px; line-height: 1.7; color: var(--text); }
.key li::before { content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.4l3.1 3.1L13 4.6' fill='none' stroke='%232E8B57' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.key b { color: var(--ink); }

/* 목차 */
.toc { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; }
.toc summary { list-style: none; margin: 0 0 10px; font-size: 14px; font-weight: 700; line-height: 1.5; color: var(--ink); }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { margin: 0; padding: 0; list-style: none; border-left: 2px solid var(--line); }
.policy .toc a { display: flex; gap: 8px; margin-left: -2px; padding: 5px 0 5px 14px; border-left: 2px solid transparent; font-size: 15px; line-height: 1.5; color: var(--muted); text-decoration: none; }
.policy .toc a:hover { color: var(--ink); }
.policy .toc a[aria-current] { color: var(--ink); font-weight: 700; border-left-color: var(--leaf); }
.toc .n { flex: none; min-width: 1.2em; color: var(--leaf); font-variant-numeric: tabular-nums; }
@media (min-width: 900px) { .toc summary { pointer-events: none; } }
@media (max-width: 899px) {
  .toc { position: static; max-height: none; margin-top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
  .toc summary { display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 14px 18px; font-size: 16px; cursor: pointer; }
  .toc summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
  .toc[open] summary::after { transform: translateY(2px) rotate(-135deg); }
  .toc ol { border-left: 0; border-top: 1px solid var(--line); padding: 6px 8px 8px; }
  .policy .toc a { margin: 0; padding: 8px 10px; border-left: 0; font-size: 16px; color: var(--text); }
  .policy .toc a[aria-current] { font-weight: 400; }
}

/* 조항(대) · 항목(중) · 본문 */
.policy .clause { margin: 72px 0 0; padding: 40px 0 0; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.doc .clause h2 { display: flex; gap: 12px; margin: 0 0 16px; font-size: 28px; line-height: 1.35; letter-spacing: -0.015em; color: var(--ink); }
.clause h2 .no { flex: none; color: var(--leaf); font-variant-numeric: tabular-nums; }
.clause h3 { margin: 36px 0 12px; font-size: 20px; line-height: 1.45; letter-spacing: -0.01em; color: var(--ink); }
.clause h2 + h3 { margin-top: 24px; }
.doc-body p { margin: 0 0 12px; font-size: 17px; line-height: 1.75; color: var(--text); }
.doc-body p.after { margin-top: 28px; }
.policy a { color: var(--seed-deep); text-underline-offset: 3px; }
.path { font-weight: 500; color: var(--ink); }
.doc-head h1, .clause h2, .clause h3 { text-wrap: balance; }

/* 세부(소): 짧은 이름표 + 내용 */
.kv { margin: 0 0 12px; display: grid; grid-template-columns: 3.4em minmax(0, 1fr); gap: 8px 16px; align-items: baseline; font-size: 14px; }
.kv:lang(en) { grid-template-columns: 7.4em minmax(0, 1fr); }
.kv.kv-wide { grid-template-columns: 9em minmax(0, 1fr); }
.kv dt { font-size: 14px; font-weight: 700; line-height: 1.5; color: var(--muted); }
.kv dd { margin: 0; font-size: 17px; line-height: 1.7; color: var(--text); }

/* 표: 첫 칸은 이름, 둘째 칸은 설명. 좁은 화면에서는 위아래로 쌓는다. */
.list { width: 100%; margin: 8px 0 16px; border-collapse: collapse; }
.list th, .list td { padding: 13px 0; text-align: left; vertical-align: top; font-size: 16px; line-height: 1.65; border-bottom: 1px solid var(--line); }
.list thead th { padding: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--muted); border-bottom: 1px solid #D2C5A8; }
.list tbody th { width: 34%; padding-right: 24px; font-weight: 700; color: var(--ink); }
.list tbody td { color: var(--text); }
.list .sub { display: block; margin-top: 2px; font-size: 14px; font-weight: 400; line-height: 1.6; color: var(--muted); }
.list.list-date tbody th { width: 8em; font-weight: 500; white-space: nowrap; }

/* 목록 */
.doc-body .bullets { margin: 0 0 12px; padding-left: 1.2em; }
.bullets li { font-size: 17px; line-height: 1.75; color: var(--text); }
.bullets li + li { margin-top: 10px; }
.bullets li::marker { color: var(--leaf); }

/* 참고 상자 */
.callout { margin: 20px 0; padding: 16px 20px; background: #F5EEDD; border-left: 3px solid var(--seed); border-radius: 0 10px 10px 0; }
.callout-label { display: block; margin-bottom: 4px; font-size: 14px; font-weight: 700; line-height: 1.5; color: var(--seed-deep); }
.doc-body .callout p { margin: 0; font-size: 16px; line-height: 1.7; }
.doc-body .callout p + p { margin-top: 6px; }
.doc-body .callout p.en { font-size: 15px; color: var(--muted); }

/* 끝 */
.doc-end { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 72px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 15px; }
.policy .doc-end a { color: var(--muted); text-decoration: none; }
.policy .doc-end a:hover { color: var(--ink); text-decoration: underline; }

/* 모바일 */
@media (max-width: 640px) {
  .doc { padding-top: 28px; }
  .doc-head .eyebrow { font-size: 16px; }
  .doc-head .meta { margin-top: 10px; font-size: 14px; }
  .key { padding: 18px 18px 18px 16px; }
  .policy .clause { margin-top: 56px; padding-top: 32px; }
  .doc .clause h2 { gap: 10px; font-size: 23px; }
  .clause h3 { margin-top: 30px; font-size: 18px; }
  .doc-body p, .bullets li, .kv dd { font-size: 16px; }
  .kv:lang(en) { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .kv:lang(en) dd + dt { margin-top: 10px; }
  .kv.kv-wide { grid-template-columns: 6.5em minmax(0, 1fr); }
  .list, .list tbody, .list tr, .list th, .list td { display: block; width: auto; }
  .list thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .list tbody tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .list tbody tr:first-child { border-top: 1px solid #D2C5A8; }
  .list tbody th, .list tbody td, .list.list-date tbody th { width: auto; padding: 0; border: 0; }
  .list tbody td { margin-top: 2px; font-size: 15.5px; }
}
