/* =============================================================================
   도움말 가족(/guide 이용 가이드 허브 · /guide/donor 시청자 가이드) — 2026-11-02 주인님 10:37Z
   "시청자 가이드도 자세히, 구색 갖춰서. 문의도 동일, 자주 묻는 질문 이런거."
   토큰은 brand-theme.css(--page/--surface/--surface-2/--ink/--ink-soft/--muted/--edge/--blue-deep/--focus)와
   web-tokens.css만 쓴다. 새 색 없음. 글자 크기 13/15/16/18/24/40, 굵기 400/600/700, 간격 4·8·12·16·24·32·40·48·64.
   상자 안 상자 없음: 묶음은 1px 윗선과 간격으로, 강조 한 덩어리(입금코드 예시 등)만 면(--surface) 한 장.
   로드 순서: site.css → web-tokens.css → web-help.css → brand-theme.css(마지막). 시청자 레일(web-rail.css)과 함께 쓴다.
   ============================================================================= */

.hp-main {
  width: var(--content);
  min-width: 0;
  margin: 0 auto;
  padding: 48px 0 64px;
  word-break: keep-all;
}
.hp-main :is(p, li, dd, td, summary) { text-wrap: pretty; }
.hp-main :is(h1, h2, h3) { text-wrap: balance; }

.hp-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* 머리: eyebrow 13/600 muted → H1 40/700 → 소개 18/400 ------------------------------ */
.hp-hero { max-width: 760px; }
.hp-hero h1 { margin: 0 0 12px; font-size: 40px; line-height: 1.2; }
.hp-lead { margin: 0; color: var(--ink-soft); font-size: 18px; line-height: 1.6; }
.hp-hero-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 16px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 15px; }

/* 본문 + 목차 ------------------------------------------------------------------------
   1200px 이상: 본문(최대 760) | 목차(220, sticky). 그 아래: 목차가 본문 위 한 덩어리.
   레일(232px)이 왼쪽에 있으니 목차는 오른쪽에 둔다. */
.hp-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; margin-top: 40px; }
.hp-article { min-width: 0; max-width: 760px; }
.hp-toc { min-width: 0; }
.hp-toc-title { margin: 0 0 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.hp-toc ol { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.hp-toc a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 10px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.hp-toc a::before {
  content: counter(hp-toc);
  counter-increment: hp-toc;
  flex: none;
  width: 24px;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.hp-toc ol { counter-reset: hp-toc; }
.hp-toc a:hover { color: var(--ink); }
.hp-toc a[aria-current="true"] { color: var(--ink); font-weight: 600; }
.hp-toc a[aria-current="true"]::before { color: var(--blue-deep); }
.hp-toc a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
@media (min-width: 760px) and (max-width: 1199px) {
  .hp-toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
}
@media (min-width: 1200px) {
  .hp-layout { grid-template-columns: minmax(0, 760px) 220px; column-gap: 64px; align-items: start; }
  .hp-toc { order: 2; position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow-y: auto; }
  .hp-article { order: 1; }
}

/* 절 --------------------------------------------------------------------------- */
.hp-section + .hp-section { margin-top: 56px; }
.hp-section > h2 { margin: 0 0 16px; font-size: 24px; line-height: 1.35; scroll-margin-top: 88px; }
.hp-section h3 { margin: 32px 0 12px; font-size: 18px; line-height: 1.4; font-weight: 600; scroll-margin-top: 88px; }
.hp-section > h2 + h3 { margin-top: 0; }
.hp-section p { margin: 0 0 12px; color: var(--ink-soft); font-size: 16px; line-height: 1.6; }
.hp-section p:last-child { margin-bottom: 0; }
.hp-section p strong, .hp-section li strong { color: var(--ink); font-weight: 600; }
/* 본문 안 글 링크만(알약·입구 행·갈래 칩은 제 모양) */
.hp-section a:not(.hp-pill):not(.hp-entry):not(.hp-chips a) { color: var(--blue-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
.hp-section a:not(.hp-pill):not(.hp-entry):not(.hp-chips a):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
/* 글머리표 본문 목록만. 구조 목록(단계·갈래 칩·문의 주제·입구 행·두 열 블록)은 제 규칙을 가진다 —
   여기 포함되면 padding-left 20px으로 왼쪽 축(436)에서 밀리고 li + li 여백으로 첫 항목만 6px 위로 뜨는 정렬 오류가 난다(리드 리뷰 2026-11-02). */
.hp-section :is(ul, ol):not(.hp-steps, .hp-chips, .hp-support, .hp-entries, .hp-grid) { margin: 0 0 12px; padding-left: 20px; color: var(--ink-soft); font-size: 16px; line-height: 1.6; }
.hp-section :is(ul, ol):not(.hp-steps, .hp-chips, .hp-support, .hp-entries, .hp-grid) > li + li { margin-top: 6px; }
.hp-section :is(.hp-steps, .hp-chips, .hp-support, .hp-entries, .hp-grid) > li { margin: 0; }
.hp-section code, .hp-section kbd {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95em;
  font-weight: 600;
}
.hp-section .hp-ui { color: var(--ink); font-weight: 600; } /* 화면의 실제 글자(버튼·칸 이름) 인용 */

/* 단계(번호 원 32 + 제목 + 설명) --------------------------------------------- */
.hp-steps { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; counter-reset: hp-step; }
.hp-steps > li { position: relative; min-width: 0; padding-left: 48px; counter-increment: hp-step; }
.hp-steps > li::before {
  content: counter(hp-step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}
.hp-steps > li > strong { display: block; margin: 5px 0 6px; color: var(--ink); font-size: 16px; font-weight: 600; line-height: 1.4; }
.hp-steps > li > p { font-size: 15px; }
.hp-steps > li > ul { margin: 8px 0 0; font-size: 15px; }

/* 강조 한 덩어리(면 한 장): 입금코드 예시 · 요약 ------------------------------------- */
.hp-note {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 4px 12px;
  margin: 20px 0 0;
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--surface);
}
.hp-note > svg { width: 20px; height: 20px; margin-top: 2px; fill: none; stroke: var(--blue-deep); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.hp-note > strong { grid-column: 2; color: var(--ink); font-size: 16px; font-weight: 600; line-height: 1.4; }
.hp-note > p { grid-column: 2; margin: 0; font-size: 15px; }
.hp-note > p + p { margin-top: 6px; }
.hp-note .hp-code { display: inline-block; padding: 2px 10px; border-radius: 8px; background: var(--surface-2); color: var(--ink); font-size: 18px; font-weight: 700; letter-spacing: 0.02em; }

/* 라벨 | 값 목록(규칙 표) --------------------------------------------------------- */
.hp-kv { display: grid; grid-template-columns: minmax(0, 1fr); margin: 0; }
.hp-kv > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 4px 16px; padding: 12px 0; border-top: 1px solid var(--edge); }
.hp-kv > div:last-child { border-bottom: 1px solid var(--edge); }
.hp-kv dt { margin: 0; color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.5; padding-top: 2px; }
.hp-kv dd { margin: 0; color: var(--ink); font-size: 15px; line-height: 1.5; }
.hp-kv dd small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; font-weight: 400; }
@media (max-width: 480px) { .hp-kv > div { grid-template-columns: minmax(0, 1fr); } }

/* 표(등급·랭크): 1px 행 선만, 머리 13 muted ------------------------------------------ */
.hp-table { width: 100%; border-collapse: collapse; margin: 0; font-size: 15px; }
.hp-table th { padding: 0 0 8px; border-bottom: 1px solid var(--edge); color: var(--muted); font-size: 13px; font-weight: 600; text-align: left; }
.hp-table td { padding: 10px 0; border-bottom: 1px solid var(--edge); color: var(--ink); vertical-align: middle; }
.hp-table th:last-child, .hp-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.hp-table td.hp-muted { color: var(--muted); }
.hp-tier { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.hp-tier img { width: 32px; height: 32px; flex: none; }
.hp-table .gd-rank-mark { margin-right: 0; font-size: 13px; min-width: 40px; height: 24px; }
.hp-table-note { margin: 8px 0 0; color: var(--muted); font-size: 13px; }

/* 둘로 나란한 짧은 블록(채널 찾기 세 길 등) ------------------------------------------- */
.hp-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0; padding: 0; list-style: none; }
.hp-grid > li { padding: 16px 0; border-top: 1px solid var(--edge); }
.hp-grid > li:last-child { border-bottom: 1px solid var(--edge); }
.hp-grid > li > strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 16px; font-weight: 600; }
.hp-grid > li > p { font-size: 15px; margin: 0; }
@media (min-width: 760px) {
  .hp-grid.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .hp-grid.is-2 > li:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid var(--edge); }
}

/* 알약 링크(44px 터치): 다음 할 일 · 외부 상담 채널 ------------------------------------- */
.hp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; }
.hp-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.hp-pill:hover { background: var(--surface-2); }
.hp-pill:active { transform: translateY(1px); }
.hp-pill:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.hp-pill.is-primary { border-color: var(--ink); background: var(--ink); color: var(--page); }
.hp-pill.is-primary:hover { opacity: .9; background: var(--ink); }
.hp-pill svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* 허브: 가이드 입구 목록 --------------------------------------------------------------- */
.hp-entries { display: grid; grid-template-columns: minmax(0, 1fr); margin: 0; padding: 0; list-style: none; }
.hp-entries > li { border-top: 1px solid var(--edge); }
.hp-entries > li:last-child { border-bottom: 1px solid var(--edge); }
.hp-entry {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 20px;
  grid-template-rows: auto auto;
  gap: 2px 14px;
  align-items: center;
  align-content: start; /* 열마다 높이가 달라도 제목 줄은 같은 높이에서 시작 */
  padding: 16px 0;
  color: inherit;
  font-weight: 400;
  text-decoration: none;
}
.hp-entry:hover .hp-entry-title { color: var(--blue-deep); }
.hp-entry:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 8px; }
.hp-entry > svg { grid-column: 1; grid-row: 1 / span 2; width: 24px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.hp-entry > svg.hp-entry-arrow { grid-column: 3; width: 20px; height: 20px; stroke: var(--muted); }
.hp-entry-title { grid-column: 2; grid-row: 1; align-self: end; color: var(--ink); font-size: 16px; font-weight: 600; line-height: 1.4; }
.hp-entry-sub { grid-column: 2; grid-row: 2; align-self: start; color: var(--muted); font-size: 15px; line-height: 1.5; }
@media (min-width: 760px) {
  .hp-entries.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .hp-entries.is-2 > li:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid var(--edge); }
}

/* FAQ: 검색 + 갈래 칩 + 접힘 ------------------------------------------------------------ */
.hp-search { position: relative; max-width: 560px; margin: 0 0 16px; }
.hp-search svg { position: absolute; top: 50%; left: 16px; width: 20px; height: 20px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
body:not(.admin-body) .hp-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 44px 0 46px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
body:not(.admin-body) .hp-search input:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
.hp-search-clear {
  position: absolute;
  top: 50%;
  right: 4px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  transform: translateY(-50%);
  cursor: pointer;
}
.hp-search-clear:hover { background: var(--surface-2); color: var(--ink); }
.hp-search-clear:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.hp-search-clear[hidden] { display: none; }
.hp-search-clear svg { position: static; width: 16px; height: 16px; transform: none; stroke: currentColor; }
.hp-search-status { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
.hp-search-status:empty { display: none; }
.hp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 32px; padding: 0; list-style: none; }
.hp-chips a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.hp-chips a:hover { background: var(--surface-3, var(--surface-2)); }
.hp-chips a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.hp-faq-group + .hp-faq-group { margin-top: 40px; }
.hp-faq-group[hidden] { display: none; }
.hp-faq-group > h3 { margin: 0 0 4px; }
.hp-faq-item { border-top: 1px solid var(--edge); }
.hp-faq-item:last-of-type { border-bottom: 1px solid var(--edge); }
.hp-faq-item[hidden] { display: none; }
.hp-faq-item > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}
.hp-faq-item > summary::-webkit-details-marker { display: none; }
.hp-faq-item > summary svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.hp-faq-item[open] > summary svg { transform: rotate(180deg); }
.hp-faq-item > summary:hover { color: var(--blue-deep); }
.hp-faq-item > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 6px; }
.hp-faq-body { padding: 0 0 20px; max-width: 680px; }
.hp-faq-body p, .hp-faq-body li { font-size: 15px; }
.hp-faq-body ul, .hp-faq-body ol { margin-bottom: 8px; }
.hp-faq-empty { margin: 0; padding: 24px 0; border-top: 1px solid var(--edge); border-bottom: 1px solid var(--edge); color: var(--ink-soft); font-size: 16px; }
.hp-faq-empty[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .hp-faq-item > summary svg { transition: none; } }

/* 문의: 주제 여섯(계약 support-catalog.json 순서) + 채널 안내 ---------------------------- */
.hp-support { display: grid; grid-template-columns: minmax(0, 1fr); margin: 0; padding: 0; list-style: none; }
.hp-support > li { display: grid; gap: 6px; align-content: start; padding: 20px 0; border-top: 1px solid var(--edge); } /* 같은 행의 짧은 항목이 늘어나도 안의 줄 간격은 그대로 */
.hp-support > li:last-child { border-bottom: 1px solid var(--edge); }
.hp-support h3 { margin: 0; font-size: 16px; line-height: 1.4; }
.hp-support p { margin: 0; font-size: 15px; }
.hp-support .hp-actions { margin-top: 6px; }
.hp-support .hp-pill { min-height: 40px; padding: 0 14px; font-size: 15px; }
@media (min-width: 760px) {
  .hp-support { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .hp-support > li:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid var(--edge); }
}
.hp-hours { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; margin: 24px 0 0; color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
.hp-hours svg { width: 20px; height: 20px; margin-top: 2px; fill: none; stroke: var(--muted); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.hp-hours p { margin: 0; }

/* 다음 할 일(절 끝 안내) ---------------------------------------------------------------- */
.hp-next { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--edge); }
.hp-next h2 { margin: 0 0 8px; font-size: 24px; line-height: 1.35; }
.hp-next p { margin: 0; color: var(--ink-soft); font-size: 16px; }

/* 푸터(me-footer와 같은 꼴) ------------------------------------------------------------- */
.hp-footer { width: var(--content); display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; margin: 0 auto; padding: 16px 0 32px; }
.hp-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 13px; text-decoration: none; }
.hp-footer a:hover { color: var(--ink); }

/* 폰 ------------------------------------------------------------------------------------ */
@media (max-width: 760px) {
  .hp-main { padding: 32px 0 48px; }
  .hp-hero h1 { font-size: 32px; }
  .hp-lead { font-size: 16px; }
  .hp-layout { gap: 32px; margin-top: 32px; }
  .hp-section + .hp-section { margin-top: 48px; }
  .hp-steps > li { padding-left: 44px; }
  .hp-note { padding: 16px; }
  .hp-table { font-size: 15px; }
  .hp-actions .hp-pill { flex: 1 1 auto; }
}

/* 모바일 QA 2026-11-22 L3: 바로가기 알약도 터치 44px */
@media (pointer: coarse), (max-width: 767px) {
  .hp-chips a, .hp-pill, .hp-support .hp-pill { min-height: 44px; }
}
