/*
 * GYEOL REPORT TYPOGRAPHY CONTRACT
 * PDF와 웹 열람판이 공유하는 의미 기반 활자·간격 토큰.
 * 콘텐츠 길이와 관계없이 같은 역할은 같은 크기를 사용한다.
 */

:root {
  --report-type-cover-title: 30px;
  --report-type-page-title: 22px;
  --report-type-section-title: 15px;
  --report-type-body: 10.5px;
  --report-type-small: 9px;
  --report-type-caption: 8px;

  --report-leading-title: 1.35;
  --report-leading-body: 1.75;
  --report-leading-small: 1.6;

  --report-space-1: 4px;
  --report-space-2: 8px;
  --report-space-3: 12px;
  --report-space-4: 16px;
  --report-space-5: 24px;
  --report-space-6: 32px;
  --report-space-7: 48px;
  --report-space-8: 64px;

  --report-page-inline: 56px;
  --report-page-block-start: 54px;
  --report-page-block-end: 58px;

  --report-ink: #12161a;
  --report-copy: #3f474d;
  --report-muted: #737b80;
  --report-rule: #e1e5e7;
  --report-paper: #ffffff;
}

.type-cover-title,
.type-page-title,
.type-section-title {
  font-family: 'Noto Serif KR', 'AppleMyungjo', 'Batang', serif !important;
  font-weight: 650 !important;
  line-height: var(--report-leading-title) !important;
  letter-spacing: -.025em !important;
  word-break: keep-all !important;
  overflow-wrap: break-word !important;
}

.type-cover-title { font-size: var(--report-type-cover-title) !important; }
.type-page-title { font-size: var(--report-type-page-title) !important; }
.type-section-title { font-size: var(--report-type-section-title) !important; }

.type-body,
.type-small,
.type-caption {
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif !important;
  letter-spacing: 0 !important;
  word-break: keep-all !important;
  overflow-wrap: break-word !important;
}

.type-body {
  font-size: var(--report-type-body) !important;
  line-height: var(--report-leading-body) !important;
}
.type-small {
  font-size: var(--report-type-small) !important;
  line-height: var(--report-leading-small) !important;
}
.type-caption {
  font-size: var(--report-type-caption) !important;
  line-height: var(--report-leading-small) !important;
}

/* PDF 조판에서는 모든 직접 텍스트가 여섯 역할 중 하나를 상속한다. */
body.html2pdf-active.pdf-a4-edition .pdf-composer .pdf-sheet {
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif !important;
  font-size: var(--report-type-body) !important;
  line-height: var(--report-leading-body) !important;
  color: var(--report-copy) !important;
  word-break: keep-all !important;
}
body.html2pdf-active.pdf-a4-edition .pdf-composer .pdf-sheet * {
  font-size: inherit !important;
  word-break: inherit !important;
}
body.html2pdf-active.pdf-a4-edition .pdf-composer .pdf-sheet .type-cover-title { font-size: var(--report-type-cover-title) !important; }
body.html2pdf-active.pdf-a4-edition .pdf-composer .pdf-sheet .type-page-title { font-size: var(--report-type-page-title) !important; }
body.html2pdf-active.pdf-a4-edition .pdf-composer .pdf-sheet .type-section-title { font-size: var(--report-type-section-title) !important; }
body.html2pdf-active.pdf-a4-edition .pdf-composer .pdf-sheet .type-body { font-size: var(--report-type-body) !important; }
body.html2pdf-active.pdf-a4-edition .pdf-composer .pdf-sheet .type-small { font-size: var(--report-type-small) !important; }
body.html2pdf-active.pdf-a4-edition .pdf-composer .pdf-sheet .type-caption { font-size: var(--report-type-caption) !important; }

/* 누적된 이전 시안의 높은 선택자 우선순위를 단일 조판 계약으로 끝낸다.
   :is()의 ID 항목은 실제 요소를 요구하지 않으면서 이 계약을 최종 권한으로 만든다. */
body.html2pdf-active.pdf-a4-edition :is(#report-type-contract, .pdf-composer):is(#report-type-role, .pdf-composer) .pdf-sheet .type-cover-title {
  font-size: var(--report-type-cover-title) !important;
  line-height: var(--report-leading-title) !important;
}
body.html2pdf-active.pdf-a4-edition :is(#report-type-contract, .pdf-composer):is(#report-type-role, .pdf-composer) .pdf-sheet .type-page-title {
  font-size: var(--report-type-page-title) !important;
  line-height: var(--report-leading-title) !important;
}
body.html2pdf-active.pdf-a4-edition :is(#report-type-contract, .pdf-composer):is(#report-type-role, .pdf-composer) .pdf-sheet .type-section-title {
  font-size: var(--report-type-section-title) !important;
  line-height: var(--report-leading-title) !important;
}
body.html2pdf-active.pdf-a4-edition :is(#report-type-contract, .pdf-composer):is(#report-type-role, .pdf-composer) .pdf-sheet .type-body {
  font-size: var(--report-type-body) !important;
  line-height: var(--report-leading-body) !important;
}
body.html2pdf-active.pdf-a4-edition :is(#report-type-contract, .pdf-composer):is(#report-type-role, .pdf-composer) .pdf-sheet .type-small {
  font-size: var(--report-type-small) !important;
  line-height: var(--report-leading-small) !important;
}
body.html2pdf-active.pdf-a4-edition :is(#report-type-contract, .pdf-composer):is(#report-type-role, .pdf-composer) .pdf-sheet .type-caption {
  font-size: var(--report-type-caption) !important;
  line-height: var(--report-leading-small) !important;
}

body.html2pdf-active.pdf-a4-edition .pdf-composer .pdf-sheet:not(.pdf-cover):not(.pdf-colophon) {
  padding: var(--report-page-block-start) 74px var(--report-page-block-end) var(--report-page-inline) !important;
}
body.html2pdf-active.pdf-a4-edition .pdf-composer .pdf-sheet:not(.pdf-cover):not(.pdf-colophon) :is(p, li, dd, dt, th, td) {
  color: var(--report-copy) !important;
}
body.html2pdf-active.pdf-a4-edition .pdf-composer .pdf-sheet:not(.pdf-cover):not(.pdf-colophon) :is(.page-header, .pdf-frontmatter-head) {
  margin-bottom: var(--report-space-5) !important;
}
body.html2pdf-active.pdf-a4-edition .pdf-composer .pdf-sheet:not(.pdf-cover):not(.pdf-colophon) :is(.page-header, .pdf-frontmatter-head) h2 {
  margin: 0 0 var(--report-space-2) !important;
}
body.html2pdf-active.pdf-a4-edition .pdf-composer .pdf-sheet:not(.pdf-cover):not(.pdf-colophon) :is(.page-text, .type-body) + :is(.page-text, .type-body) {
  margin-top: var(--report-space-3) !important;
}

/* 긴 블록은 잘라 숨기지 않고 다음 면으로 보낸다. */
body.html2pdf-active.pdf-a4-edition .pdf-composer :is(
  .summary-card, .summary-match-card, .insight-block, .compare-item-card,
  .advice-card, .checklist-item, .fortune-item, .pillar-card, figure, table
) {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  break-inside: avoid !important;
  page-break-inside: avoid !important;
}

@page {
  size: A4 portrait;
  margin: 0;
}

@media print {
  .type-cover-title { font-size: 30px !important; }
  .type-page-title { font-size: 22px !important; }
  .type-section-title { font-size: 15px !important; }
  .type-body { font-size: 10.5px !important; }
  .type-small { font-size: 9px !important; }
  .type-caption { font-size: 8px !important; }
}

/* 흑칠 이미지 면은 일반 백지 본문 색 계약보다 우선한다. */
body.html2pdf-active.pdf-a4-edition .pdf-composer .pdf-sheet.pdf-frontmatter.pdf-frontmatter-guide:not(.pdf-cover):not(.pdf-colophon) .pdf-first-verdict p {
  color: #f7f8f8 !important;
}
body.html2pdf-active.pdf-a4-edition .pdf-composer .pdf-sheet.pdf-frontmatter.pdf-contents-sheet:not(.pdf-cover):not(.pdf-colophon) .pdf-contents-hero :is(small, h2) {
  color: #f7f8f8 !important;
}
body.html2pdf-active.pdf-a4-edition .pdf-composer .pdf-sheet.pdf-frontmatter.pdf-contents-sheet:not(.pdf-cover):not(.pdf-colophon) .pdf-contents-hero p {
  color: rgba(238, 242, 243, .76) !important;
}
