@import url('https://fonts.googleapis.com/css2?family=Do+Hyeon&family=Noto+Sans+KR:wght@400;500;700&display=swap');

:root { --font-do-hyeon: 'Do Hyeon'; --font-noto: 'Noto Sans KR'; }

:root {
  --arbor: #3f5e3a;
  --arbor-deep: #2d4528;
  --arbor-soft: #5f7a58;
  --bark: #6b4f3a;
  --bark-soft: #8a6e57;
  --cream: #f4efe4;
  --cream-panel: #fbf8f1;
  --cream-deep: #ece3d2;
  --ink: #2a2620;
  --ink-soft: #5d564a;
  --line: #cbb89b;
  --line-soft: #ddd0ba;
  --shadow: 0 14px 34px rgba(58, 46, 30, 0.12);
  --radius: 16px;
  --font-display: var(--font-do-hyeon), "Do Hyeon", system-ui, sans-serif;
  --font-body: var(--font-noto), "Noto Sans KR", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at 88% -8%, rgba(95, 122, 88, 0.16), transparent 42%),
    var(--cream);
  line-height: 1.72;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--arbor);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--arbor);
  color: var(--cream);
  padding: 10px 18px;
  border-radius: 0 0 12px 0;
  z-index: 60;
}
.skip-link:focus {
  left: 0;
}

/* ============================================================
   HEADER · 나무/가지 워드마크
   ============================================================ */
.tree-header {
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 40px 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line-soft);
}

.tree-brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
}

.tree-glyph {
  position: relative;
  width: 46px;
  height: 52px;
  flex: 0 0 auto;
}
.glyph-trunk {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 5px;
  height: 30px;
  border-radius: 3px;
  background: var(--bark);
}
.glyph-branch {
  position: absolute;
  width: 4px;
  height: 18px;
  background: var(--bark-soft);
  border-radius: 3px;
  bottom: 20px;
  left: 50%;
}
.glyph-branch-l {
  transform: translateX(-50%) rotate(38deg);
  transform-origin: bottom center;
}
.glyph-branch-r {
  transform: translateX(-50%) rotate(-38deg);
  transform-origin: bottom center;
}
.glyph-bud {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 60% 60% 60% 0;
  background: var(--arbor);
}
.glyph-bud-l {
  left: 2px;
  top: 6px;
  transform: rotate(-30deg);
}
.glyph-bud-r {
  right: 2px;
  top: 6px;
  transform: rotate(40deg);
}
.glyph-bud-top {
  left: 50%;
  top: 0;
  transform: translateX(-50%) rotate(8deg);
  background: var(--arbor-soft);
}

.tree-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.wordmark-name {
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: 0.01em;
  color: var(--arbor-deep);
}
.wordmark-ko {
  font-size: 12.5px;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  margin-top: 2px;
}
.tree-tagline {
  margin: 0;
  font-size: 13.5px;
  color: var(--bark);
  max-width: 320px;
  text-align: right;
}

/* ============================================================
   HOME · 분기 트리 아웃라인
   ============================================================ */
.yard-home {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 40px 60px;
}

/* 뿌리 · 리드 커버 (이미지가 없으면 브랜드 그라데이션이 보인다) */
.yard-lead {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  padding: 52px 48px;
  color: var(--cream);
  background-image:
    linear-gradient(115deg, rgba(28, 42, 24, 0.86), rgba(60, 79, 54, 0.62)),
    url("/images/arboryard-lead.jpg"),
    linear-gradient(125deg, var(--arbor-deep), var(--bark));
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}
.yard-lead-inner {
  max-width: 720px;
}
.root-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.32em;
  padding: 5px 14px;
  border: 1px solid rgba(244, 239, 228, 0.55);
  border-radius: 999px;
  margin-bottom: 18px;
}
.yard-lead h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 38px;
  line-height: 1.32;
  margin: 0 0 16px;
  letter-spacing: 0.005em;
}
.yard-lead-note {
  margin: 0 0 22px;
  font-size: 16px;
  color: rgba(244, 239, 228, 0.92);
  max-width: 640px;
}
.yard-lead-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 14px;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}
.root-node {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cream);
  box-shadow: 0 0 0 4px rgba(244, 239, 228, 0.28);
}

.tree-wrap {
  margin-top: 40px;
  position: relative;
}
.tree-howto {
  font-size: 14px;
  color: var(--bark);
  margin: 0 0 22px;
  padding-left: 22px;
  position: relative;
}
.tree-howto::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 12px;
  height: 12px;
  border-radius: 60% 60% 60% 0;
  background: var(--arbor-soft);
  transform: rotate(-20deg);
}

/* 트리: 연결선으로 잇는 가지/잎 (카드 그리드 아님) */
.tree {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.branch {
  position: relative;
  border-left: 2px solid var(--line);
  margin-left: 22px;
}
.branch:first-child {
  border-top-left-radius: 6px;
}

.branch-summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 16px 44px 16px 30px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "label meta"
    "desc desc";
  gap: 2px 14px;
  align-items: baseline;
}
.branch-summary::-webkit-details-marker {
  display: none;
}
/* 가지 노드 점 + 트렁크 연결 가지 */
.branch-node {
  position: absolute;
  left: -9px;
  top: 19px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--arbor);
  border: 3px solid var(--cream);
  box-shadow: 0 0 0 1px var(--line);
}
.branch-summary::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 26px;
  width: 22px;
  height: 2px;
  background: var(--line);
}
/* 펼침 표시 (CSS로 그린 잎, 문자 마커 아님) */
.branch-summary::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 22px;
  width: 11px;
  height: 11px;
  border-radius: 60% 60% 60% 0;
  background: var(--cream-deep);
  border: 1.5px solid var(--bark-soft);
  transform: rotate(45deg);
  transition: transform 0.2s ease, background 0.2s ease;
}
details[open] > .branch-summary::after {
  background: var(--arbor-soft);
  transform: rotate(-135deg);
}
.branch-label {
  grid-area: label;
  font-family: var(--font-display);
  font-size: 23px;
  color: var(--arbor-deep);
  letter-spacing: 0.01em;
}
.branch-meta {
  grid-area: meta;
  justify-self: start;
  align-self: center;
  font-size: 12px;
  color: var(--bark);
  background: var(--cream-deep);
  padding: 3px 11px;
  border-radius: 999px;
}
.branch-summary-text {
  grid-area: desc;
  color: var(--ink-soft);
  font-size: 14.5px;
  margin-top: 2px;
}
.branch-summary:hover .branch-label {
  color: var(--arbor);
}

/* 잎: 가지에서 갈라지는 점선 하위 트렁크 */
.leaf-list {
  list-style: none;
  margin: 0 0 12px 14px;
  padding: 4px 0 8px;
  position: relative;
  border-left: 2px dashed var(--line-soft);
}
.leaf {
  position: relative;
  padding: 7px 14px 7px 26px;
}
.leaf-tick {
  position: absolute;
  left: 0;
  top: 1.05em;
  width: 16px;
  height: 2px;
  background: var(--line);
}
.leaf-tick::after {
  content: "";
  position: absolute;
  right: -4px;
  top: -4px;
  width: 9px;
  height: 9px;
  border-radius: 60% 60% 60% 0;
  background: var(--arbor-soft);
  transform: rotate(-25deg);
}
.leaf-text {
  color: var(--ink-soft);
  font-size: 15px;
}
.leaf-anchor {
  text-decoration: none;
  color: var(--arbor-deep);
  font-weight: 500;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-size: 15.5px;
}
.leaf-anchor:hover {
  color: var(--arbor);
}
.leaf-link .leaf-tick::after {
  background: var(--arbor);
}
.leaf-go {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--bark);
  background: var(--cream-panel);
  border: 1px solid var(--line-soft);
  padding: 2px 8px;
  border-radius: 999px;
}

/* 야드 원칙 */
.yard-principles {
  margin-top: 52px;
  background: var(--cream-panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 30px 34px;
}
.yard-principles h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  color: var(--bark);
  margin: 0 0 18px;
}
.yard-principles ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.yard-principles li {
  position: relative;
  padding-left: 28px;
  color: var(--ink-soft);
  font-size: 15px;
}
.principle-bud {
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 14px;
  height: 14px;
  border-radius: 60% 60% 60% 0;
  background: var(--arbor);
  transform: rotate(-20deg);
}
.yard-sign {
  margin: 20px 0 0;
  font-family: var(--font-display);
  color: var(--arbor-deep);
  font-size: 14px;
  letter-spacing: 0.02em;
}

/* ============================================================
   ARTICLE · 가지 상세 (branch detail)
   ============================================================ */
.branch-shell {
  max-width: 820px;
  margin: 0 auto;
  padding: 34px 40px 64px;
}

/* 가지 경로: 뿌리 > 가지 > 잎 (작은 가지 경로, 표준 브레드크럼 아님) */
.branch-path {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  background: var(--cream-panel);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 9px 18px;
  width: fit-content;
  margin-bottom: 26px;
}
.path-node {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  color: var(--ink-soft);
  text-decoration: none;
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}
.path-root {
  color: var(--bark);
}
.path-branch {
  color: var(--arbor);
}
.path-leaf {
  color: var(--arbor-deep);
}
.path-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bark-soft);
}
.path-branch .path-dot {
  background: var(--arbor-soft);
}
.path-dot-leaf {
  border-radius: 60% 60% 60% 0;
  background: var(--arbor);
  transform: rotate(-20deg);
}
/* 노드 사이를 잇는 짧은 가지 줄기 (사선) */
.path-stem {
  width: 18px;
  height: 12px;
  position: relative;
}
.path-stem::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 2px;
  background: var(--line);
  transform: rotate(-8deg);
  transform-origin: left center;
}

.branch-detail {
  position: relative;
}
.branch-head {
  border-bottom: 2px solid var(--line-soft);
  padding-bottom: 24px;
  margin-bottom: 8px;
}
.branch-head h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.34;
  color: var(--arbor-deep);
  margin: 0 0 16px;
  letter-spacing: 0.005em;
}
.branch-byline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--ink-soft);
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}
.byline-bud {
  width: 13px;
  height: 13px;
  border-radius: 60% 60% 60% 0;
  background: var(--arbor);
  transform: rotate(-20deg);
}
.byline-dates {
  color: var(--bark);
}
.branch-intro {
  font-size: 18px;
  line-height: 1.78;
  color: var(--ink);
  background: var(--cream-panel);
  border-left: 4px solid var(--arbor);
  border-radius: 0 12px 12px 0;
  padding: 18px 22px;
  margin: 0 0 18px;
}
.branch-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}
.branch-tags li {
  font-size: 12.5px;
  color: var(--bark);
  background: var(--cream-deep);
  border-radius: 999px;
  padding: 4px 12px;
}

/* 본문: 소제목을 가지의 마디로 둔 아웃라인 */
.article-content {
  position: relative;
  margin-top: 30px;
  font-size: 17px;
  color: var(--ink);
}
.article-content > * {
  margin-left: 8px;
}
.article-content p {
  margin: 0 0 20px;
  line-height: 1.82;
}
.article-content h2 {
  position: relative;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  color: var(--arbor-deep);
  margin: 40px 0 16px -8px;
  padding-left: 28px;
  letter-spacing: 0.005em;
}
.article-content h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  width: 17px;
  height: 17px;
  border-radius: 60% 60% 60% 0;
  background: var(--arbor);
  transform: rotate(-22deg);
}
.article-content h2::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 1.5em;
  width: 2px;
  height: 14px;
  background: var(--line);
}
.article-content h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 19px;
  color: var(--bark);
  margin: 26px 0 12px;
}
.article-content a {
  color: var(--arbor);
  text-decoration: underline;
  text-decoration-color: var(--arbor-soft);
  text-underline-offset: 3px;
}
.article-content a:hover {
  color: var(--arbor-deep);
}
.article-content ul,
.article-content ol {
  margin: 0 0 22px;
  padding-left: 4px;
  list-style: none;
}
.article-content ul li,
.article-content ol li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
  line-height: 1.74;
}
.article-content ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 11px;
  height: 11px;
  border-radius: 60% 60% 60% 0;
  background: var(--arbor-soft);
  transform: rotate(-22deg);
}
.article-content ol {
  counter-reset: outline;
}
.article-content ol li::before {
  counter-increment: outline;
  content: counter(outline);
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 18px;
  height: 18px;
  font-size: 11px;
  font-family: var(--font-display);
  color: var(--cream);
  background: var(--bark);
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.article-content blockquote {
  margin: 26px 0;
  padding: 20px 24px 20px 28px;
  position: relative;
  background: linear-gradient(180deg, var(--cream-panel), var(--cream-deep));
  border-radius: 0 14px 14px 0;
  border-left: 5px solid var(--arbor);
  color: var(--arbor-deep);
  font-size: 18px;
  line-height: 1.7;
}
.article-content blockquote::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 18px;
  width: 18px;
  height: 18px;
  border-radius: 60% 60% 60% 0;
  background: var(--arbor);
  transform: rotate(-25deg);
  box-shadow: 0 0 0 3px var(--cream);
}
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
}
.article-content thead th {
  background: var(--arbor);
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 400;
  text-align: left;
  padding: 12px 14px;
  letter-spacing: 0.01em;
}
.article-content tbody td {
  padding: 12px 14px;
  border-top: 1px solid var(--line-soft);
  vertical-align: top;
}
.article-content tbody tr:nth-child(even) {
  background: var(--cream-panel);
}
.article-content tbody td:first-child {
  font-weight: 500;
  color: var(--arbor-deep);
}

/* FAQ */
.branch-faq {
  margin-top: 44px;
  border-top: 2px solid var(--line-soft);
  padding-top: 28px;
}
.branch-faq h2,
.branch-note h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  color: var(--arbor-deep);
  margin: 0 0 16px;
}
.branch-faq details {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--cream-panel);
  margin-bottom: 12px;
  padding: 4px 18px;
}
.branch-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 28px 14px 22px;
  position: relative;
  font-weight: 500;
  color: var(--ink);
}
.branch-faq summary::-webkit-details-marker {
  display: none;
}
.branch-faq summary::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.15em;
  width: 12px;
  height: 12px;
  border-radius: 60% 60% 60% 0;
  background: var(--arbor-soft);
  transform: rotate(-20deg);
}
.branch-faq summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 1.25em;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--bark-soft);
  border-bottom: 2px solid var(--bark-soft);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.branch-faq details[open] summary::after {
  transform: rotate(-135deg);
}
.branch-faq details p {
  margin: 0 0 14px 22px;
  color: var(--ink-soft);
  font-size: 15px;
}

.branch-note {
  margin-top: 36px;
  background: var(--cream-panel);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 22px 26px;
}
.branch-note p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

/* 같은 가지의 다른 글 */
.sibling-branch {
  max-width: 820px;
  margin: 40px auto 0;
  padding: 0 40px;
}
.sibling-branch h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 21px;
  color: var(--bark);
  margin: 0 0 18px;
}
.sibling-node {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bark);
  box-shadow: 0 0 0 4px var(--cream-deep);
}
.sibling-count {
  font-size: 12px;
  color: var(--arbor-deep);
  background: var(--cream-deep);
  padding: 3px 11px;
  border-radius: 999px;
}
.sibling-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0 0 0 8px;
  border-left: 2px dashed var(--line-soft);
}
.sibling-leaf {
  position: relative;
  padding: 10px 0 10px 26px;
}
.sibling-leaf a {
  text-decoration: none;
  color: var(--arbor-deep);
  font-weight: 500;
  font-size: 16px;
}
.sibling-leaf a:hover {
  color: var(--arbor);
}
.sibling-empty {
  color: var(--ink-soft);
  padding-left: 8px;
}
.back-to-root {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding-left: 26px;
  text-decoration: none;
  color: var(--bark);
  font-family: var(--font-display);
  font-size: 14px;
}
.back-to-root .leaf-tick {
  background: var(--bark-soft);
}
.back-to-root:hover {
  color: var(--arbor-deep);
}

/* ============================================================
   FOOTER
   ============================================================ */
.yard-footer {
  max-width: 1180px;
  margin: 60px auto 0;
  padding: 26px 40px 46px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.footer-mark {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 60% 60% 60% 0;
  background: var(--arbor);
  transform: rotate(-20deg);
  margin-top: 3px;
}
.yard-footer p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-soft);
  max-width: 760px;
}

/* ============================================================
   RESPONSIVE · 좁은 화면 우아하게 접기
   ============================================================ */
@media (max-width: 720px) {
  body {
    font-size: 16px;
  }
  .tree-header {
    padding: 22px 20px 14px;
  }
  .tree-tagline {
    text-align: left;
    max-width: none;
  }
  .yard-home,
  .branch-shell,
  .sibling-branch {
    padding-left: 20px;
    padding-right: 20px;
  }
  .yard-lead {
    padding: 36px 24px;
  }
  .yard-lead h1 {
    font-size: 28px;
  }
  .branch-head h1 {
    font-size: 27px;
  }
  .branch-summary {
    grid-template-columns: 1fr;
    grid-template-areas:
      "label"
      "meta"
      "desc";
    padding-right: 40px;
  }
  .branch-meta {
    margin: 4px 0;
  }
  .article-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
