/* ============================================================
   article.css — 가이드/정책 등 콘텐츠 페이지 스타일
   ============================================================ */
:root {
  --bg: #f4f5fa;
  --panel-bg: #ffffff;
  --border: #e4e7ef;
  --text: #1c1f26;
  --text-muted: #6b7280;
  --primary: #4f46e5;
  --primary-grad: linear-gradient(135deg, #6366f1, #8b5cf6);
  --accent-bg: #eef0ff;
  --warn-bg: #fffbeb;
  --warn-border: #fcd34d;
  --shadow-soft: 0 2px 10px rgba(23, 25, 35, 0.06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1117;
    --panel-bg: #171a22;
    --border: #2a2f3c;
    --text: #e8eaf0;
    --text-muted: #98a0ae;
    --primary: #818cf8;
    --accent-bg: #242a49;
    --warn-bg: #362b14;
    --warn-border: #92721c;
    --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Pretendard Variable", Pretendard, "Segoe UI", "Malgun Gothic", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.8;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- 상단 헤더 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  background: var(--panel-bg);
  border-bottom: 1px solid var(--border);
}
.site-header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--primary-grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  flex: 0 0 auto;
}
.brand-name { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name b { font-size: 15px; }
.brand-name small { font-size: 11px; color: var(--text-muted); }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
}
.site-nav a:hover { background: var(--accent-bg); text-decoration: none; }
.site-nav a.cta {
  background: var(--primary-grad);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(99, 102, 241, 0.3);
}
.site-nav a.cta:hover { filter: brightness(1.08); }

/* ---------- 본문 ---------- */
main.article {
  max-width: 780px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}
.breadcrumb { font-size: 12.5px; color: var(--text-muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--text-muted); }

article h1 {
  font-size: 27px;
  line-height: 1.4;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.article-meta { font-size: 12.5px; color: var(--text-muted); margin-bottom: 26px; }

article h2 {
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 40px 0 12px;
  padding-top: 8px;
}
article h3 { font-size: 16.5px; margin: 26px 0 8px; }
article p { margin: 12px 0; }
article ul, article ol { margin: 12px 0; padding-left: 24px; }
article li { margin-bottom: 6px; }
article b, article strong { font-weight: 700; }

/* 표 */
article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin: 16px 0;
  background: var(--panel-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
article th, article td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}
article thead th { background: var(--accent-bg); font-weight: 700; }
.table-scroll { overflow-x: auto; }

/* 콜아웃 */
.tip, .warn {
  border-radius: 12px;
  padding: 14px 18px;
  margin: 18px 0;
  font-size: 14px;
}
.tip { background: var(--accent-bg); }
.warn { background: var(--warn-bg); border: 1px solid var(--warn-border); }

/* 단계 목록 */
.steps { counter-reset: step; list-style: none; padding-left: 0; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 42px;
  margin-bottom: 14px;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 2px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--primary-grad);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

kbd {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 12.5px;
  font-family: inherit;
}

/* 앱으로 이동 CTA */
.cta-box {
  margin: 40px 0 0;
  padding: 24px;
  border-radius: 16px;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  text-align: center;
}
.cta-box p { margin: 0 0 14px; font-weight: 600; font-size: 15.5px; }
.cta-box a.btn-cta {
  display: inline-block;
  background: var(--primary-grad);
  color: #fff;
  font-weight: 700;
  padding: 11px 26px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}
.cta-box a.btn-cta:hover { filter: brightness(1.08); text-decoration: none; }
.cta-box small { display: block; margin-top: 10px; color: var(--text-muted); }

/* ---------- 가이드 목록 (index) ---------- */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  margin-top: 22px;
}
.guide-card {
  display: block;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  color: var(--text);
  box-shadow: var(--shadow-soft);
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}
.guide-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 8px 22px rgba(99, 102, 241, 0.14);
  text-decoration: none;
}
.guide-card .g-icon { font-size: 22px; }
.guide-card h3 { margin: 8px 0 6px; font-size: 15.5px; line-height: 1.45; }
.guide-card p { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.65; }

/* 관련 글 */
.related { margin-top: 40px; }
.related h2 { margin-top: 0; }
.related ul { padding-left: 20px; }

/* ---------- 푸터 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--panel-bg);
  padding: 22px 20px 28px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.8;
}
.site-footer nav { margin-bottom: 8px; }
.site-footer nav a { color: var(--text-muted); margin: 0 8px; }
.site-footer nav a:hover { color: var(--primary); }

@media (max-width: 560px) {
  .brand-name small { display: none; }
  article h1 { font-size: 22px; }
  .site-nav a { padding: 6px 8px; font-size: 12.5px; }
}
