/* 만기 페이지 전용: 위키백과/나무위키 스타일 문서형 */

.doc_style {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  font-size: 16px;
  line-height: 1.85;
  color: #222;
  font-family: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}

/* 목차 (위키 스타일) */
.doc_toc {
  background: #f8f9fa;
  border: 1px solid #a2a9b1;
  border-radius: 4px;
  padding: 1em 1.5em 1em 1.2em;
  margin: 0 0 2em;
  font-size: 0.9em;
  line-height: 1.5;
}
.doc_toc_title {
  font-weight: 700;
  font-size: 1em;
  margin: 0 0 0.5em;
  color: #202122;
}
.doc_toc_list {
  margin: 0;
  padding-left: 1.8em;
  list-style: decimal;
}
.doc_toc_list li {
  margin-bottom: 0.35em;
  line-height: 1.5;
}
.doc_toc_list a {
  color: #0066cc;
  text-decoration: none;
}
.doc_toc_list a:hover {
  text-decoration: underline;
}
.doc_toc_list a:visited {
  color: #795cb2;
}

/* 문서 안의 header는 고정 해제 (사이트 상단 header 스타일이 적용되지 않도록) */
.doc_style header {
  position: static;
  width: auto;
  height: auto;
  top: auto;
  z-index: auto;
}

.doc_style .content_headline {
  font-size: 1.75rem;
  font-weight: 700;
  color: #202122;
  background: none;
  padding: 0;
  margin: 0 0 0.4em;
  border: none;
  border-bottom: 1px solid #a2a9b1;
  padding-bottom: 0.25em;
  line-height: 1.3;
}

.doc_style .summary_title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #54595d;
  margin: 1em 0 0.4em;
}

.doc_style .summary_list {
  list-style: disc;
  padding-left: 1.6em;
  margin: 0 0 1.5em;
  background: #f8f9fa;
  border: 1px solid #eaecf0;
  border-radius: 4px;
  padding: 1em 1em 1em 2em;
}

.doc_style .summary_list li {
  margin-bottom: 0.4em;
  font-size: 0.95em;
  line-height: 1.65;
}

.doc_style section {
  margin-bottom: 1.8em;
}

/* 문단이 한 맥락으로 이어지도록 여백 축소 */
.doc_style h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #202122;
  margin: 1.4em 0 0.35em;
  padding-bottom: 0.2em;
  border-bottom: 1px solid #a2a9b1;
  line-height: 1.3;
}

.doc_style h2:first-of-type {
  margin-top: 0;
}

/* 3단계: 소제목 */
.doc_style h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111;
  margin: 1em 0 0.3em;
}

/* 4단계: 하위 항목 제목 */
.doc_style h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #222;
  margin: 0.85em 0 0.25em;
}

.doc_style p {
  margin: 0 0 0.5em;
  font-size: 1em;
  line-height: 1.8;
  font-weight: 400;
}

.doc_style strong {
  display: inline;
  font-weight: 700;
  font-size: inherit;
  padding: 0;
  line-height: inherit;
}

.doc_style ul,
.doc_style ol {
  margin: 0.4em 0 0.7em;
  padding-left: 1.5em;
}

.doc_style ul {
  list-style: disc;
}

/* 체크 리스트 (ul/li 대신 div + 체크 아이콘) */
.doc_check_list {
  margin: 0.6em 0 1em;
  padding: 0;
  list-style: none;
}
.doc_check_item {
  position: relative;
  padding-left: 2em;
  margin-bottom: 0.6em;
  line-height: 1.75;
  font-size: 1em;
}
.doc_check_item::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 1.35em;
  height: 1.35em;
  line-height: 1.35em;
  text-align: center;
  font-size: 0.85em;
  font-weight: 700;
  color: #fff;
  background: var(--brandColor, #3568b2);
  border-radius: 50%;
  box-sizing: border-box;
}

.doc_style ol {
  list-style: decimal;
}

.doc_style li {
  margin-bottom: 0.3em;
  line-height: 1.65;
  font-size: 1em;
}

/* 검색·키워드 형광펜 (메인 색 활용) */
.doc_style mark,
.doc_style .doc_highlight {
  background: linear-gradient(transparent 60%, rgba(53, 104, 178, 0.25) 60%);
  padding: 0 0.08em;
  font-weight: 600;
  color: inherit;
}

/* 표: 얇은 검은 테두리, 헤더·본문 동일 굵기 */
.doc_style table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0 1.2em;
  font-size: 0.95em;
  line-height: 1.65;
}

.doc_style table th,
.doc_style table td {
  border: 1px solid #a2a9b1;
  padding: 0.5em 0.65em;
  text-align: left;
  vertical-align: top;
  font-weight: 400;
  word-break: keep-all;
}

.doc_style table th {
  font-weight: 600;
  color: #111;
  background: #e6eef7;
}

.doc_style table td {
  font-weight: 400;
}

/* 표 캡션 */
.doc_style .doc_table_wrap {
  margin: 0.8em 0 1em;
  clear: both;
}
.doc_style .doc_table_caption {
  font-size: 0.9em;
  color: #54595d;
  margin-bottom: 0.35em;
  font-weight: 600;
}

.doc_style a[href] {
  color: #0066cc;
  text-decoration: none;
}

.doc_style a[href]:hover {
  text-decoration: underline;
  color: #004499;
}

/* 문서 내 figure·이미지 (위키 스타일) */
.doc_fig {
  margin: 1.2em 0;
  clear: both;
}
.doc_fig img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}
.doc_fig figcaption {
  font-size: 0.9em;
  color: #54595d;
  margin-top: 0.4em;
  line-height: 1.4;
}
.doc_fig--center {
  text-align: center;
}
.doc_fig--center img {
  display: inline-block;
}
.doc_fig--right {
  float: right;
  margin-left: 1.5em;
  margin-bottom: 0.8em;
  max-width: 280px;
}
.doc_fig--photo img {
  border-radius: 2px;
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  margin-left: auto;
  margin-right: auto;
}
.doc_fig--intro {
  margin: 1.8em 0;
}
.doc_fig--intro img {
  max-width: 100%;
  width: 560px;
  height: auto;
}
@media (max-width: 586px) {
  .doc_fig--right {
    float: none;
    margin-left: 0;
    max-width: 100%;
  }
  .doc_fig--intro img {
    width: 100%;
  }
}

/* 본문 링크 방문 후 (위키 스타일) */
.doc_style .content_box a[href]:visited {
  color: #795cb2;
}

/* 관련 글 (내부링크 SEO) */
.doc_related {
  margin: 2em 0 1.5em;
  padding: 1em 1.5em;
  background: #f8f9fa;
  border: 1px solid #a2a9b1;
  border-radius: 4px;
}
.doc_related_title {
  font-size: 0.95em;
  font-weight: 700;
  color: #202122;
  margin: 0 0 0.6em;
}
.doc_related_list {
  margin: 0;
  padding-left: 1.4em;
  list-style: disc;
}
.doc_related_list li {
  margin-bottom: 0.35em;
  line-height: 1.6;
}
.doc_related_list a {
  color: #0066cc;
  text-decoration: none;
}
.doc_related_list a:hover {
  text-decoration: underline;
}

/* 만기 페이지: 상단 메뉴바(메인과 동일한 GNB) 제거 */
body.mangi_page > header .menu_box,
body.mangi_page > header .gnb_mo,
body.mangi_page > header .menu_wrap {
  display: none !important;
}

/* 만기 페이지: 상단 헤더(로고·타이틀 바)만 제거, 문서 안 header(H1 등)는 유지 */
body.mangi_page > header {
  display: none !important;
}
body.mangi_page main {
  padding-top: 24px;
}

/* 만기 페이지: 본문 가운데 정렬(좌측 여백 제거) */
body.mangi_page .sub_cont .inner {
  justify-content: center;
  max-width: 100%;
}
body.mangi_page .sub_cont .text_page {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

@media (max-width: 586px) {
  .doc_style {
    padding: 16px 12px 32px;
    font-size: 15px;
  }
  .doc_toc {
    padding: 0.8em 1em 0.8em 1.2em;
    font-size: 0.85em;
  }
  .doc_style .content_headline {
    font-size: 1.4rem;
  }
  .doc_style h2 {
    font-size: 1.15rem;
  }
  .doc_style h3 {
    font-size: 1.05rem;
  }
  .doc_style h4 {
    font-size: 0.98rem;
  }
  .doc_style table {
    font-size: 0.9em;
  }
  .doc_style table th,
  .doc_style table td {
    padding: 0.4em 0.5em;
  }
}
