/**
 * 유콘 이용가이드 — Design_sample/payment-gateway-comparison 과 동일 레이아웃·타이포 스펙
 * (Tailwind 유틸 클래스 수치 기준: gray-*, blue-600, spacing 등)
 */

:root {
  --doc-header-h: 56px; /* h-14 */
  --doc-sidebar-w: 220px;
  --doc-toc-w: 200px;
  /* 본문·상단 메뉴(가이드 등) 가로 정렬 공통값 */
  --doc-main-padding-x: 2rem;
  /* 사이드바와 헤더 로고 여백 통일 */
  --doc-sidebar-padding-x: 1rem;
  --doc-side-btn-padding-x: 0.5rem;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-100: #dbeafe;
  --red-100: #fee2e2;
  --red-600: #dc2626;
  --brand-blue: #0064ff;
}

@media (min-width: 1024px) {
  :root {
    --doc-main-padding-x: 3rem;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.doc-body {
  margin: 0;
  min-height: 100vh;
  background: #fff;
  color: var(--gray-900);
  font-family: "Noto Sans KR", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.doc-min-h-screen {
  min-height: 100vh;
}
.doc-bg-white {
  background: #fff;
}
.doc-flex {
  display: flex;
}
.doc-min-w-0 {
  min-width: 0;
}
.doc-flex-1 {
  flex: 1 1 0%;
}
.doc-shrink-0 {
  flex-shrink: 0;
}

/* ----- Header: lg+ 에서 사이드바 열 너비 후 네비 시작선 = 본문 패딩 ----- */
.doc-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  height: var(--doc-header-h);
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gray-200);
  background: #fff;
  /* 사이드바와 동일한 가로 여백 (모바일·태블릿) */
  padding: 0 var(--doc-sidebar-padding-x);
}

.doc-header__lead {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex: 1;
  min-width: 0;
}

.doc-header__brand-col {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  min-width: 0;
}

.doc-header__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem; /* gap-2 */
}

.doc-header__brand-logo {
  height: 1.125rem; /* ~18px (기존 24px 대비 축소) */
  width: auto;
  display: block;
  flex-shrink: 0;
}

.doc-header__brand-name {
  font-size: 15px; /* text-[15px] */
  font-weight: 600;
  color: var(--gray-900);
}

.doc-header__brand-sub {
  font-size: 15px;
  color: var(--gray-500);
}

.doc-header__nav {
  display: none;
  align-items: center;
  gap: 1.5rem; /* gap-6 */
}

@media (min-width: 768px) {
  .doc-header__nav {
    display: flex;
  }
}

@media (min-width: 1024px) {
  .doc-header {
    display: grid;
    grid-template-columns: var(--doc-sidebar-w) minmax(0, 1fr) auto;
    align-items: center;
    gap: 0;
    padding: 0;
    justify-content: initial;
  }

  .doc-header__lead {
    display: contents;
  }

  .doc-header__brand-col {
    /* 사이드바 패딩 + 메뉴 버튼 좌측 패딩 = '가이드 홈' 등 텍스트 시작선과 정렬 */
    padding-left: calc(var(--doc-sidebar-padding-x) + var(--doc-side-btn-padding-x));
    padding-right: var(--doc-sidebar-padding-x);
    align-self: stretch;
  }

  .doc-header__nav {
    flex-wrap: wrap;
    row-gap: 0.25rem;
    padding-left: var(--doc-main-padding-x);
    padding-right: 1rem;
  }

  .doc-header__right {
    padding-right: 1.5rem;
    padding-left: 0.5rem;
  }
}

.doc-header__nav a {
  font-size: 0.875rem; /* text-sm */
  font-weight: 500;
  color: var(--gray-600);
  text-decoration: none;
}

.doc-header__nav a:hover {
  color: var(--gray-900);
}

.doc-header__nav a.doc-nav-active {
  font-weight: 500;
  color: var(--blue-600);
}

.doc-header__right {
  display: flex;
  align-items: center;
  gap: 1rem; /* gap-4 */
  flex-shrink: 0;
}

.doc-search-pill {
  display: none;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.5rem; /* rounded-lg */
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
  padding: 0.375rem 0.75rem; /* py-1.5 px-3 */
}

@media (min-width: 640px) {
  .doc-search-pill {
    display: flex;
  }
}

.doc-search-pill span {
  font-size: 0.875rem;
  color: var(--gray-400);
}

.icon-16 {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.icon-14 {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ----- Shell ----- */
.doc-shell {
  display: flex;
}

/* Sidebar: sticky top-14 w-[220px] border-r py-4 ----- */
.doc-sidebar {
  position: sticky;
  top: var(--doc-header-h);
  align-self: flex-start;
  width: var(--doc-sidebar-w);
  flex-shrink: 0;
  height: calc(100vh - var(--doc-header-h));
  overflow-y: auto;
  border-right: 1px solid var(--gray-200);
  background: #fff;
  /* 좌우 동일 여백 + 기존보다 약간 더 안쪽 */
  padding: var(--doc-sidebar-padding-x);
}

.doc-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem; /* space-y-1 */
  padding: 0;
}

.doc-side-btn {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.375rem; /* gap-1.5 */
  border-radius: 0.375rem; /* rounded-md */
  border: none;
  background: transparent;
  /* 행 내부 좌우 동일 (텍스트·치브론과 사이드 가장자리 간격 균형) */
  padding: 0.375rem var(--doc-side-btn-padding-x);
  text-align: left;
  font-size: 0.875rem; /* text-sm */
  color: var(--gray-600);
  cursor: pointer;
  font-family: inherit;
}

a.doc-side-btn {
  text-decoration: none;
}

.doc-side-btn:hover {
  color: var(--gray-900);
}

.doc-side-btn--active {
  font-weight: 500;
  color: var(--gray-900);
}

.doc-side-btn .doc-side-indent {
  /* padding-left via inline style indent * 12 + 8 */
}

.doc-side-btn--accordion {
  justify-content: flex-start;
}

.doc-acc-label {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.doc-acc-chevron-wrap {
  margin-left: auto;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}

.doc-chevron {
  color: var(--gray-400);
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.doc-sidebar__nest {
  margin-top: 0.25rem; /* mt-1 */
  margin-inline-start: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 2px; /* space-y-0.5 */
}

.doc-sidebar__nest[hidden] {
  display: none !important;
}

.doc-sidebar__block {
  padding: 0.25rem 0; /* py-1 */
}

.doc-sidebar__section-label {
  padding: 0.5rem 0.5rem 0.25rem;
  font-size: 0.75rem; /* text-xs */
  font-weight: 500;
  color: var(--gray-400);
}

.doc-sidebar__section-label--spaced {
  padding-top: 0.75rem; /* pt-3 */
}

.doc-side-badge {
  margin-left: 0.375rem;
  border-radius: 9999px;
  background: var(--blue-100);
  padding: 0.125rem 0.375rem;
  font-size: 10px;
  font-weight: 500;
  color: var(--blue-600);
}

.doc-sidebar__footer {
  margin-top: 1rem;
  border-top: 1px solid var(--gray-200);
  padding-top: 1rem;
}

.doc-sidebar__footer a {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding-inline: 0.5rem;
  font-size: 0.875rem;
  color: var(--gray-600);
  text-decoration: none;
}

.doc-sidebar__footer a:hover {
  color: var(--gray-900);
}

/* Main: flex-1 px-8 py-6 lg:px-12 ----- */
.doc-main {
  min-width: 0;
  flex: 1 1 0%;
  padding: 1.5rem var(--doc-main-padding-x);
}

.doc-main__inner {
  max-width: 48rem; /* max-w-3xl */
}

.doc-breadcrumb {
  margin-bottom: 1.5rem; /* mb-6 */
  display: flex;
  align-items: center;
  gap: 0.5rem; /* gap-2 */
  font-size: 0.875rem;
  color: var(--gray-500);
}

.doc-breadcrumb a {
  color: var(--gray-500);
  text-decoration: none;
}

.doc-breadcrumb a:hover {
  color: var(--gray-700);
}

.doc-breadcrumb__current {
  font-weight: 500;
  color: var(--gray-900);
}

.doc-version-row {
  margin-bottom: 1rem; /* mb-4 */
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.doc-version-row > span:first-child {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.doc-badge-red {
  border-radius: 9999px;
  background: var(--red-100);
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--red-600);
}

.doc-title-row {
  margin-bottom: 1.5rem; /* mb-6 */
}

.doc-title-row__flex {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.doc-page-title {
  margin: 0;
  font-size: 1.5rem; /* text-2xl */
  line-height: 2rem;
  font-weight: 700;
  color: var(--gray-900);
}

.doc-title-actions {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .doc-title-actions {
    display: flex;
  }
}

.doc-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 0.5rem;
  border: 1px solid var(--gray-200);
  background: #fff;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  color: var(--gray-600);
  cursor: pointer;
  font-family: inherit;
}

.doc-btn-ghost:hover {
  background: var(--gray-50);
}

.doc-prose {
  max-width: none;
}

.doc-prose p {
  margin: 0;
  color: var(--gray-700);
  line-height: 1.625; /* leading-relaxed */
  font-size: 15px;
}

.doc-prose p + p {
  margin-top: 1rem; /* mt-4 */
}

.doc-prose .doc-em-blue {
  font-weight: 600;
  color: var(--blue-600);
}

.doc-prose .doc-em-dark {
  font-weight: 600;
}

.doc-cta-row {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem; /* gap-3 */
}

.doc-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 0.5rem;
  background: var(--blue-600);
  padding: 0.625rem 1rem; /* py-2.5 px-4 */
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
}

.doc-btn-primary:hover {
  background: var(--blue-700);
}

.doc-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 0.5rem;
  border: 1px solid var(--gray-300);
  background: #fff;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  text-decoration: none;
}

.doc-btn-secondary:hover {
  background: var(--gray-50);
}

.doc-section {
  margin-top: 3rem; /* mt-12 */
  scroll-margin-top: calc(var(--doc-header-h) + 8px);
}

.doc-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.doc-section h2 {
  margin: 0;
  font-size: 1.25rem; /* text-xl */
  line-height: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
}

.doc-icon-btn {
  border: none;
  background: transparent;
  padding: 0;
  color: var(--gray-400);
  cursor: pointer;
}

.doc-icon-btn:hover {
  color: var(--gray-600);
}

/* 섹션 첫 본문 블록 여백 (본문은 .doc-prose 안에 있음) */
.doc-prose .doc-section > .doc-section__head + p {
  margin-top: 1rem;
}

.doc-table-wrap {
  margin-top: 1.5rem;
  overflow: hidden;
  border-radius: 0.5rem;
  border: 1px solid var(--gray-200);
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.doc-table thead tr {
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.doc-table th {
  padding: 0.75rem 1rem; /* px-4 py-3 */
  text-align: left;
  font-weight: 500;
  color: var(--gray-700);
}

.doc-table td {
  padding: 0.75rem 1rem;
  color: var(--gray-600);
  vertical-align: top;
}

.doc-table tbody tr {
  border-bottom: 1px solid var(--gray-200);
}

.doc-table tbody tr:last-child {
  border-bottom: none;
}

.doc-table .doc-td-strong {
  font-weight: 500;
  color: var(--gray-900);
}

.doc-table .doc-td-blue {
  color: var(--blue-600);
}

.doc-table .doc-td-underline {
  color: var(--blue-600);
  text-decoration: underline;
}

/* TOC: sticky top-14 hidden xl:block w-[200px] py-6 ----- */
.doc-toc {
  display: none;
  position: sticky;
  top: var(--doc-header-h);
  align-self: flex-start;
  width: var(--doc-toc-w);
  flex-shrink: 0;
  height: calc(100vh - var(--doc-header-h));
  overflow-y: auto;
  padding: 1.5rem 1rem;
}

@media (min-width: 1280px) {
  .doc-toc {
    display: block;
  }
}

.doc-toc__inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.doc-toc h4 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-900);
}

.doc-toc nav {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.doc-toc nav a {
  display: block;
  font-size: 0.875rem;
  color: var(--gray-500);
  text-decoration: none;
}

.doc-toc nav a:hover {
  color: var(--gray-900);
}

/* Mobile sidebar stack */
@media (max-width: 1023px) {
  .doc-shell {
    flex-direction: column;
  }

  .doc-sidebar {
    position: relative;
    top: auto;
    width: 100%;
    height: auto;
    max-height: 70vh;
    border-right: none;
    border-bottom: 1px solid var(--gray-200);
  }
}

.doc-skip {
  position: absolute;
  left: -9999px;
}
.doc-skip:focus {
  left: 12px;
  top: 12px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--gray-900);
  color: #fff;
  border-radius: 6px;
}

/* =====================================================================
 * 진행 대시보드 / 체크리스트 (index.php)
 * ===================================================================== */

/* 상태 칩 (완료/작성중/예정) */
.doc-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}
.doc-status-pill .doc-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: currentColor;
  flex-shrink: 0;
}
.doc-status-pill--green  { background: #dcfce7; color: #15803d; }
.doc-status-pill--blue   { background: #dbeafe; color: #1d4ed8; }
.doc-status-pill--gray   { background: #f3f4f6; color: #6b7280; }
.doc-status-pill--orange { background: #ffedd5; color: #c2410c; }
.doc-status-pill--red    { background: #fee2e2; color: #b91c1c; }

/* 우선순위(P0~P3) 배지 — 큰 사이즈(섹션 헤더용) */
.doc-phase-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.doc-phase-badge--red    { background: #fee2e2; color: #b91c1c; }
.doc-phase-badge--orange { background: #ffedd5; color: #c2410c; }
.doc-phase-badge--blue   { background: #dbeafe; color: #1d4ed8; }
.doc-phase-badge--gray   { background: #f3f4f6; color: #4b5563; }
.doc-phase-badge--green  { background: #dcfce7; color: #15803d; }

/* 작은 P0~P3 핀 (체크리스트 라인 안) */
.doc-phase-pill {
  display: inline-flex;
  margin-left: 0.25rem;
  padding: 0 0.375rem;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.02em;
}
.doc-phase-pill--red    { background: #fef2f2; color: #b91c1c; }
.doc-phase-pill--orange { background: #fff7ed; color: #c2410c; }
.doc-phase-pill--blue   { background: #eff6ff; color: #1d4ed8; }
.doc-phase-pill--gray   { background: #f9fafb; color: #6b7280; }
.doc-phase-pill--green  { background: #f0fdf4; color: #15803d; }

/* 전체 진행 카드 */
.doc-overview-card {
  margin-top: 1.75rem;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 1.25rem 1.25rem 1rem;
  background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
}
.doc-overview-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
}
.doc-overview-card__title {
  display: flex;
  align-items: baseline;
  gap: 0.625rem;
}
.doc-overview-card__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
}
.doc-overview-card__percent {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--blue-600);
  letter-spacing: -0.02em;
}
.doc-overview-card__legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--gray-600);
}
.doc-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}
.doc-legend > span {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  display: inline-block;
}
.doc-legend--green > span { background: #22c55e; }
.doc-legend--blue  > span { background: #3b82f6; }
.doc-legend--gray  > span { background: #d1d5db; }
.doc-legend--total { color: var(--gray-500); }
.doc-legend--total::before {
  content: "·";
  margin-right: 0.25rem;
  color: var(--gray-400);
}

/* 누적 진행 바 (완료 + 진행 중) */
.doc-progress-bar {
  display: flex;
  width: 100%;
  height: 8px;
  border-radius: 9999px;
  background: var(--gray-100);
  overflow: hidden;
}
.doc-progress-bar__done       { background: #22c55e; }
.doc-progress-bar__inprogress { background: #60a5fa; }

/* 그룹별 미니 통계 그리드 */
.doc-overview-card__stats {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.625rem;
}
.doc-overview-stat {
  display: block;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.doc-overview-stat:hover {
  border-color: var(--blue-600);
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.08);
}
.doc-overview-stat__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.8125rem;
  margin-bottom: 0.375rem;
}
.doc-overview-stat__head strong { color: var(--gray-900); font-weight: 600; }
.doc-overview-stat__head span   { color: var(--blue-600); font-weight: 700; }
.doc-overview-stat__bar {
  width: 100%;
  height: 4px;
  border-radius: 9999px;
  background: var(--gray-100);
  overflow: hidden;
}
.doc-overview-stat__bar > span {
  display: block;
  height: 100%;
  background: var(--blue-600);
  transition: width 0.4s ease;
}
.doc-overview-stat__meta {
  margin-top: 0.375rem;
  font-size: 0.75rem;
  color: var(--gray-500);
}

/* 그룹 카드 (체크리스트 컨테이너) */
.doc-group-section { margin-top: 2.5rem; }
.doc-group-card {
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 1.25rem 1.25rem 1rem;
  background: #fff;
}
.doc-group-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.doc-group-card__lead {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
}
.doc-group-card__lead h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gray-900);
}
.doc-group-card__progress {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  font-variant-numeric: tabular-nums;
}
.doc-group-card__percent {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--blue-600);
}
.doc-group-card__count {
  font-size: 0.8125rem;
  color: var(--gray-500);
}
.doc-group-card__summary {
  margin: 0.5rem 0 1rem;
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* 체크리스트 */
.doc-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.doc-checklist__item {
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.doc-checklist__item:hover {
  border-color: #93c5fd;
  background: #f8fafc;
}
.doc-checklist__item--green  { border-left: 3px solid #22c55e; }
.doc-checklist__item--blue   { border-left: 3px solid #3b82f6; }
.doc-checklist__item--gray   { border-left: 3px solid #d1d5db; }
.doc-checklist__link {
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  align-items: center;
  gap: 0.875rem;
  padding: 0.625rem 0.875rem;
  text-decoration: none;
  color: inherit;
}
.doc-checklist__step {
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-400);
  width: 22px;
  text-align: right;
}
.doc-checklist__check {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
}
.doc-checklist__check svg { width: 16px; height: 16px; }
.doc-checklist__item--green  .doc-checklist__check { background: #dcfce7; color: #16a34a; }
.doc-checklist__item--blue   .doc-checklist__check { background: #dbeafe; color: #2563eb; }
.doc-checklist__item--gray   .doc-checklist__check { background: #f3f4f6; color: #9ca3af; }

.doc-checklist__body { min-width: 0; }
.doc-checklist__title {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--gray-900);
}
.doc-checklist__path {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--gray-400);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.doc-checklist__chevron {
  color: var(--gray-300);
  display: inline-flex;
  align-items: center;
}
.doc-checklist__chevron svg { width: 16px; height: 16px; }
.doc-checklist__link:hover .doc-checklist__chevron { color: var(--blue-600); }

/* 모바일에서는 grid 압축 */
@media (max-width: 640px) {
  .doc-checklist__link {
    grid-template-columns: auto auto 1fr;
    grid-template-rows: auto auto;
    row-gap: 0.25rem;
  }
  .doc-checklist__link > .doc-status-pill {
    grid-column: 2 / 4;
    grid-row: 2;
    justify-self: start;
  }
  .doc-checklist__chevron { display: none; }
}

/* =====================================================================
 * 사이드바: 그룹/페이지 상태 점, 진행률 푸터
 * ===================================================================== */
.doc-side-btn {
  position: relative;
}
.doc-side-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  flex-shrink: 0;
  display: inline-block;
  margin-right: 0.125rem;
}
.doc-side-dot--green { background: #22c55e; }
.doc-side-dot--blue  { background: #3b82f6; }
.doc-side-dot--gray  { background: #d1d5db; }
.doc-side-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-side-progress { padding: 0 0.5rem; }
.doc-side-progress__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-bottom: 0.375rem;
}
.doc-side-progress__head strong {
  font-size: 0.875rem;
  color: var(--blue-600);
}
.doc-side-progress__bar {
  width: 100%;
  height: 6px;
  border-radius: 9999px;
  background: var(--gray-100);
  overflow: hidden;
}
.doc-side-progress__bar > span {
  display: block;
  height: 100%;
  background: var(--blue-600);
  transition: width 0.4s ease;
}
.doc-side-progress__legend {
  margin-top: 0.375rem;
  font-size: 0.6875rem;
  color: var(--gray-400);
}

/* =====================================================================
 * 본문 인트로 박스 / 관련 메뉴 리스트 (서브 페이지)
 * ===================================================================== */
.doc-intro {
  margin-bottom: 1rem;
  padding: 0.875rem 1rem;
  background: #f8fafc;
  border-left: 3px solid var(--blue-600);
  border-radius: 6px;
  font-size: 0.9375rem;
  color: var(--gray-700);
  line-height: 1.65;
}

.doc-related-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.5rem;
}
.doc-related-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--gray-700);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.doc-related-list a:hover {
  border-color: var(--blue-600);
  color: var(--blue-700);
}
.doc-related-list svg { color: var(--gray-400); }
.doc-related-list a:hover svg { color: var(--blue-600); }

/* 본문 내 단계 카드 (서브 페이지에서 사용) */
.doc-steps {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  counter-reset: doc-step;
  list-style: none;
  padding: 0;
}
.doc-steps > li {
  position: relative;
  padding: 0.875rem 1rem 0.875rem 3rem;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: #fff;
  counter-increment: doc-step;
}
.doc-steps > li::before {
  content: counter(doc-step);
  position: absolute;
  left: 0.875rem;
  top: 0.875rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  background: var(--blue-600);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}
.doc-steps > li strong { display: block; margin-bottom: 0.25rem; color: var(--gray-900); }
.doc-steps > li p { margin: 0; font-size: 0.875rem; color: var(--gray-600); }

/* 본문 콜아웃 */
.doc-callout {
  margin-top: 1.25rem;
  padding: 0.75rem 0.875rem 0.75rem 2.5rem;
  position: relative;
  border-radius: 8px;
  font-size: 0.875rem;
  line-height: 1.6;
}
.doc-callout::before {
  position: absolute;
  left: 0.875rem;
  top: 0.75rem;
  width: 1rem;
  height: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border-radius: 9999px;
}
.doc-callout--info    { background: #eff6ff; color: #1e40af; }
.doc-callout--info::before    { content: "i"; background: var(--blue-600); color: #fff; }
.doc-callout--warn    { background: #fffbeb; color: #92400e; }
.doc-callout--warn::before    { content: "!"; background: #f59e0b; color: #fff; }
.doc-callout--success { background: #f0fdf4; color: #166534; }
.doc-callout--success::before { content: "✓"; background: #22c55e; color: #fff; font-size: 0.625rem; }

/* =====================================================================
 * 사용자용 가이드 홈 / 그룹 인덱스 — 페이지 카드 그리드
 * ===================================================================== */

.doc-section__head {
  gap: 0.75rem;
}

.doc-section__more {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--blue-600);
  text-decoration: none;
  white-space: nowrap;
}

.doc-section__more:hover {
  color: var(--blue-700);
}

.doc-group-summary {
  margin: 0.5rem 0 1rem;
  font-size: 0.9375rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* 페이지 카드 그리드 (홈 / 그룹 인덱스 공용) */
.doc-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.625rem;
  margin-top: 1rem;
}

.doc-page-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: #fff;
  color: var(--gray-800);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s, background 0.15s;
}

.doc-page-card:hover {
  border-color: var(--blue-600);
  background: #f8fbff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.doc-page-card__title {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--gray-900);
}

.doc-page-card__arrow {
  display: inline-flex;
  align-items: center;
  color: var(--gray-300);
  transition: color 0.15s, transform 0.15s;
}

.doc-page-card__arrow svg {
  width: 18px;
  height: 18px;
}

.doc-page-card:hover .doc-page-card__arrow {
  color: var(--blue-600);
  transform: translateX(2px);
}

/* 자주 찾는 가이드 (홈 상단) */
.doc-quick-section {
  margin-top: 2rem;
}

.doc-quick-section__title {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gray-700);
}

.doc-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.doc-quick-card {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.875rem;
  row-gap: 0.125rem;
  align-items: center;
  padding: 0.875rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.doc-quick-card:hover {
  border-color: var(--blue-600);
  background: #f8fbff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.doc-quick-card__ico {
  grid-row: 1 / 3;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #eff6ff;
  color: var(--blue-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.doc-quick-card__ico svg {
  width: 20px;
  height: 20px;
}

.doc-quick-card strong {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gray-900);
}

.doc-quick-card span:not(.doc-quick-card__ico) {
  font-size: 0.8125rem;
  color: var(--gray-500);
}

/* 사이드바 푸터 (고객지원 링크) */
.doc-sidebar__footer a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--gray-600);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.doc-sidebar__footer a:hover {
  background: var(--gray-100);
  color: var(--blue-700);
}

.doc-sidebar__footer a svg {
  color: var(--gray-400);
}

.doc-sidebar__footer a:hover svg {
  color: var(--blue-600);
}

/* 일반 인라인 링크 */
.doc-link {
  color: var(--blue-600);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.doc-link:hover {
  color: var(--blue-700);
}

/* 본문 그룹 섹션 여백 (홈에서 그룹 섹션이 연속될 때) */
.doc-group-section {
  margin-top: 2.5rem;
}
