﻿/* ============================================================
   홈 허브 — 관리 가이드 (같은 장부, 읽는 면)
   ============================================================ */
:root {
  --paper: #F0F2ED; --paper-2: #E7EAE3; --paper-rise: #FAFAF6;
  --ink: #16242A; --ink-2: #44565B; --ink-3: #5F6E68;
  --rule: #D3D8D1; --rule-2: #B6C0B7;
  --teal: #1F6F63; --teal-ink: #17564C; --teal-soft: #E2EEE9;
  --seal: #C33D2E; --hl: #F2E14C; --hl-soft: #FBF7D6;
  --r: 2px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", "맑은 고딕", sans-serif;
  --on-ink: #E9EEEA; --on-ink-3: #82948F;
  --mono: "Azeret Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%; scroll-behavior: smooth;
  scrollbar-width: thin; scrollbar-color: var(--rule-2) transparent;
}
::selection { background: var(--hl); color: var(--ink); }
body {
  font-family: var(--font); background: var(--paper); color: var(--ink);
  font-size: 16px; line-height: 1.78; letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.3; letter-spacing: -0.03em; }
:focus-visible { outline: 2.5px solid var(--teal); outline-offset: 2px; }

/* ---------- 상단바 ---------- */
.g-top {
  position: sticky; top: 0; z-index: 40;
  background: var(--paper-rise);
  border-bottom: 1px solid var(--ink);
}
.g-top-inner {
  max-width: 1120px; margin: 0 auto; padding: 11px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.g-brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.g-brand b { display: block; font-size: 15px; letter-spacing: -0.02em; line-height: 1.15; }
.g-brand small { display: block; font-size: 12px; color: var(--ink-3); line-height: 1.2; margin-top: 1px; }
.g-mark {
  width: 30px; height: 30px; flex: none; border: 1.5px solid var(--ink); border-radius: var(--r);
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink);
}
.g-mark svg { width: 16px; height: 16px; }
.g-app-btn {
  flex: none; padding: 8px 14px; border-radius: var(--r);
  background: var(--ink); color: var(--paper);
  font-weight: 700; font-size: 13px; text-decoration: none;
}
.g-app-btn:hover { background: var(--teal-ink); }

/* ---------- 본문 ---------- */
.g-main { max-width: 1120px; margin: 0 auto; padding: 22px 18px 44px; }
.crumb {
  font-size: 12px; letter-spacing: 0.04em; color: var(--ink-3);
  display: flex; gap: 7px; flex-wrap: wrap; align-items: center; margin-bottom: 18px;
}
.crumb a { text-decoration: none; border-bottom: 1px solid var(--rule); }
.crumb a:hover { color: var(--ink); border-color: var(--ink-3); }

h1 { font-size: 27px; letter-spacing: -0.045em; line-height: 1.16; margin-bottom: 10px; }
h1 small {
  display: block; font-size: 12.5px; font-weight: 600; color: var(--teal-ink);
  letter-spacing: 0.02em; margin-top: 10px;
}
.mo-br { display: none; }
.lead {
  color: var(--ink-2); font-size: 15px; max-width: 62ch; margin-bottom: 26px;
  word-break: keep-all; padding-bottom: 20px; border-bottom: 2px solid var(--ink);
}

.g-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.g-toc { display: none; }

article section {
  padding: 22px 0 26px; border-bottom: 1px solid var(--rule);
  scroll-margin-top: 74px;
}
article section:last-child { border-bottom: 0; }
article h2 { font-size: 19px; margin-bottom: 14px; letter-spacing: -0.03em; }
article p { color: var(--ink-2); word-break: keep-all; margin-bottom: 11px; max-width: 68ch; }
article p:last-child { margin-bottom: 0; }
article li { max-width: 66ch; }
article p b, article li b { color: var(--ink); font-weight: 700; }
article a { border-bottom: 1px solid var(--rule-2); }
article a:hover { border-color: var(--ink); }

.g-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 4px; }
.g-table th, .g-table td {
  border-top: 1px solid var(--rule); padding: 12px 10px; text-align: left;
  vertical-align: top; word-break: keep-all;
}
.g-table thead th {
  border-top: 1px solid var(--rule-2); border-bottom: 1px solid var(--rule-2);
  font-family: var(--font); font-size: 12px; letter-spacing: 0.01em;
  color: var(--ink-3); font-weight: 700; padding: 9px 10px;
}
.g-table tbody th { font-weight: 700; width: 31%; color: var(--ink); }
.g-table td { color: var(--ink-2); }

/* 모바일: 3열 표를 카드형 행으로 편다 */
@media (max-width: 719px) {
  .g-table, .g-table tbody, .g-table tr, .g-table th, .g-table td { display: block; width: 100%; }
  .g-table thead { display: none; }
  .g-table tr { border-top: 1px solid var(--rule); padding: 13px 0 14px; }
  .g-table tbody th { border: 0; padding: 0 0 6px; font-size: 15.5px; }
  .g-table td { border: 0; padding: 0 0 3px; }
  .g-table td:last-child { margin-top: 6px; }
  .facts { grid-template-columns: 1fr; }
  .facts > div { border-left: 0; border-top: 1px solid var(--rule); }
  .facts > div:first-child { border-top: 0; }
}
.cyc {
  display: inline-block; padding: 2px 8px; border: 1px solid #BCD8CC; border-radius: var(--r);
  background: var(--teal-soft); color: var(--teal-ink);
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.note { margin-top: 12px; font-size: 12.5px; color: var(--ink-3); }

.g-list { list-style: none; }
.g-list li {
  position: relative; padding: 10px 0 10px 22px; color: var(--ink-2);
  word-break: keep-all; border-top: 1px solid var(--rule); font-size: 15px;
}
.g-list li:first-child { border-top: 0; }
.g-list li::before {
  content: ""; position: absolute; left: 3px; top: 20px;
  width: 7px; height: 1.6px; background: var(--teal);
}

.facts {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--rule-2); margin: 6px 0 18px;
}
.facts > div { padding: 13px 10px; border-left: 1px solid var(--rule); }
.facts > div:first-child { border-left: 0; }
.facts b { display: block; font-size: 14px; letter-spacing: -0.02em; word-break: keep-all; line-height: 1.35; }
.facts span { display: block; font-size: 12.5px; font-weight: 600; letter-spacing: 0.01em; color: var(--ink-3); margin-top: 6px; }

.cta-card {
  margin-top: 20px; padding: 22px 20px; background: var(--ink); color: var(--paper);
}
.cta-card b { display: block; font-size: 16px; margin-bottom: 7px; word-break: keep-all; letter-spacing: -0.02em; }
.cta-card b em { font-style: normal; color: var(--hl); }
.cta-card p { font-size: 13px; color: var(--on-ink-2, #A9B8B3); margin-bottom: 16px; }
.cta-btn {
  display: inline-block; padding: 11px 18px; border-radius: var(--r);
  background: var(--paper); color: var(--ink); font-weight: 700; font-size: 14px;
  border-bottom: 0;
}
.cta-btn:hover { background: var(--hl); color: var(--ink); }

.g-faq div { border-top: 1px solid var(--rule); padding: 13px 0; }
.g-faq div:first-child { border-top: 0; padding-top: 0; }
.g-faq dt { font-weight: 700; font-size: 15px; margin-bottom: 5px; word-break: keep-all; color: var(--ink); }
.g-faq dd { color: var(--ink-2); font-size: 14px; word-break: keep-all; }

.g-related { margin-top: 30px; border-top: 2px solid var(--ink); padding-top: 14px; }
.g-related h2 { font-size: 12.5px; letter-spacing: 0.01em; font-weight: 700; color: var(--ink-3); margin-bottom: 10px; }
.rel-row { display: grid; grid-template-columns: 1fr; gap: 0; }
.rel-row a {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 13px 2px; border-bottom: 1px solid var(--rule);
  font-weight: 600; font-size: 14px; color: var(--ink);
}
.rel-row a::after { content: "→"; color: var(--ink-3); font-weight: 400; }
.rel-row a:hover { color: var(--teal-ink); }

.g-foot {
  background: var(--ink); color: var(--paper);
  padding: 24px 18px calc(26px + env(safe-area-inset-bottom, 0px)); text-align: center;
}
.g-foot p { font-size: 12.5px; color: #A9B8B3; margin-bottom: 10px; letter-spacing: 0.01em; }
.g-foot nav { font-size: 12px; color: var(--on-ink); display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 0; }
.g-foot nav a { padding: 2px 8px; }
.g-foot nav a:hover { color: var(--hl); text-decoration: underline; }
.g-foot nav span { color: var(--on-ink-3); }

/* ---------- 데스크톱 ---------- */
@media (min-width: 1024px) {
  .g-top-inner { padding: 11px 24px; }
  .g-main { padding: 34px 24px 60px; }
  .mo-br { display: inline; }
  h1 { font-size: 36px; }
  .lead { font-size: 16px; margin-bottom: 30px; padding-bottom: 24px; }
  .g-layout { grid-template-columns: 196px minmax(0, 1fr); gap: 44px; align-items: start; }
  .g-toc {
    display: flex; flex-direction: column; gap: 0;
    position: sticky; top: 84px; border-top: 2px solid var(--ink); padding-top: 10px;
  }
  .g-toc b {
    font-size: 12px; letter-spacing: 0.01em;
    color: var(--ink-3); font-weight: 700; padding-bottom: 8px;
  }
  .g-toc a {
    font-size: 13px; color: var(--ink-2); padding: 7px 0;
    border-bottom: 1px solid var(--rule); text-decoration: none;
  }
  .g-toc a::before { content: "— "; color: var(--rule-2); }
  .g-toc a:hover { color: var(--ink); }
  .g-toc a:hover::before { color: var(--teal); }
  .g-table { font-size: 15px; }
  .rel-row { grid-template-columns: repeat(3, 1fr); gap: 0 22px; }
  .rel-row a { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media (max-width: 719px) { .facts { grid-template-columns: 1fr; } .facts > div { border-left: 0; border-top: 1px solid var(--rule); padding: 11px 12px; } .facts > div:first-child { border-top: 0; } }
