/* stonedesk 인쇄용(A4) 문서 — /print 전용 레이아웃(print 레이아웃의 pd-* 클래스만 사용)
   화면에서는 A4 미리보기, 인쇄 시 툴바 숨김 + @page A4 */

.pd-body {
  margin: 0;
  background: #E8E8E2;
  color: #171714;
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── 화면용 툴바 (인쇄 시 숨김) ─────────── */

.pd-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: #171714;
  padding: 10px 16px;
}

.pd-tool-link {
  color: #fff;
  font-size: 13px;
  text-decoration: none;
}

.pd-tool-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #171714;
  background: #fff;
  border: 0;
  border-radius: 3px;
  padding: 6px 14px;
  cursor: pointer;
}

.pd-tool-btn:hover { background: #ECECE6; }

.pd-tool-link:focus-visible,
.pd-tool-btn:focus-visible {
  outline: 2px solid #C2401F;
  outline-offset: 2px;
}

/* ── A4 시트 ───────────────────────────── */

.pd-sheet {
  background: #fff;
  width: 210mm;
  min-height: 297mm;
  margin: 8mm auto;
  padding: 22mm 24mm;
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.12);
}

/* ── 헤더 ──────────────────────────────── */

.pd-org {
  margin: 0;
  font-size: 8.5pt;
  letter-spacing: 0.22em;
  color: #73736B;
}

.pd-rule-double {
  border-top: 2.2pt solid #171714;
  border-bottom: 0.7pt solid #171714;
  height: 4px;
  margin: 6px 0 12px;
}

.pd-title {
  margin: 0 0 8px;
  font-family: "Noto Serif KR", "AppleMyungjo", serif;
  font-weight: 700;
  font-size: 17pt;
  letter-spacing: 0.04em;
}

.pd-meta {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pd-meta li {
  display: flex;
  gap: 10px;
  font-size: 9pt;
  padding: 1px 0;
}

.pd-meta span {
  color: #73736B;
  letter-spacing: 0.14em;
  flex: 0 0 52px;
}

/* ── 섹션 ──────────────────────────────── */

.pd-sec { margin-top: 16px; }

.pd-sec-title {
  margin: 0 0 8px;
  padding-bottom: 4px;
  border-bottom: 1.4pt solid #171714;
  font-family: "Noto Serif KR", serif;
  font-weight: 700;
  font-size: 11.5pt;
}

/* ── 요약 ──────────────────────────────── */

.pd-brief {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pd-brief li {
  display: flex;
  gap: 6px;
  font-size: 9.5pt;
  color: #3E3E38;
  padding: 2px 0;
}

.pd-brief em {
  font-style: normal;
  font-family: "Noto Serif KR", serif;
  font-weight: 700;
  color: #171714;
  flex: 0 0 auto;
}

.pd-brief b { color: #171714; }
.pd-neg { color: #C2401F; }

/* ── 과업 목록 ─────────────────────────── */

.pd-tasks {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pd-task {
  padding: 7px 0 8px;
  border-bottom: 0.6pt solid #D7D7D0;
  break-inside: avoid;
}

.pd-task:last-child { border-bottom: 0; }

.pd-task-head {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.pd-task-no {
  font-family: "Noto Serif KR", serif;
  font-weight: 700;
  font-size: 9pt;
  color: #73736B;
  flex: 0 0 11px;
}

.pd-task-name {
  margin: 0;
  font-weight: 700;
  font-size: 10pt;
}

.pd-task-meta {
  font-size: 8pt;
  color: #73736B;
  flex: 1;
  text-align: right;
}

.pd-task-pct {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 10pt;
  flex: 0 0 34px;
  text-align: right;
}

.pd-chip {
  display: inline-block;
  font-size: 7.5pt;
  font-weight: 700;
  color: #C2401F;
  border: 1pt solid #C2401F;
  border-radius: 2px;
  padding: 0 4px;
  margin-left: 4px;
  letter-spacing: 0.1em;
  vertical-align: 1px;
}

.pd-gauge {
  position: relative;
  height: 2.4pt;
  background: #ECECE6;
  margin: 5px 0 0 18px;
}

.pd-gauge i {
  position: absolute;
  inset: 0 auto 0 0;
  background: #171714;
}

.pd-gauge b {
  position: absolute;
  top: -2.5pt;
  bottom: -2.5pt;
  width: 1.4pt;
  margin-left: -0.7pt;
  background: #A9A9A0;
}

.pd-st-done .pd-gauge i { background: #A9A9A0; }
.pd-st-delayed .pd-gauge i { background: #C2401F; }
.pd-st-delayed .pd-task-pct { color: #C2401F; }
.pd-st-planned .pd-task-pct { color: #73736B; font-weight: 500; font-size: 8.5pt; }

.pd-detail { margin: 4px 0 0 18px; }

.pd-d {
  margin: 1.5px 0;
  font-size: 8.5pt;
  color: #3E3E38;
}

.pd-d em {
  font-style: normal;
  font-weight: 700;
  font-size: 7.5pt;
  color: #73736B;
  letter-spacing: 0.1em;
  border: 0.6pt solid #D7D7D0;
  border-radius: 2px;
  padding: 0 3px;
  margin-right: 5px;
}

.pd-d-issue,
.pd-d-issue em { color: #C2401F; border-color: #C2401F; }

/* ── 마일스톤 ──────────────────────────── */

.pd-ms-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pd-ms {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 3.5px 0;
  border-bottom: 0.5pt dashed #D7D7D0;
  break-inside: avoid;
}

.pd-ms:last-child { border-bottom: 0; }

.pd-ms-d {
  flex: 0 0 40px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 8pt;
  border: 1pt solid #171714;
  border-radius: 2px;
  padding: 1px 0;
}

.pd-ms-title {
  font-weight: 600;
  font-size: 9.5pt;
  flex: 1;
}

.pd-ms-meta {
  font-size: 8pt;
  color: #73736B;
}

.pd-st-imminent .pd-ms-d { border-color: #C2401F; color: #C2401F; }
.pd-st-delayed .pd-ms-d { background: #C2401F; border-color: #C2401F; color: #fff; }
.pd-st-done .pd-ms-d { background: #ECECE6; border-color: #ECECE6; color: #73736B; }
.pd-st-done .pd-ms-title { font-weight: 500; color: #3E3E38; }

/* ── 푸터 ──────────────────────────────── */

.pd-foot { margin-top: 18px; }

.pd-foot p {
  margin: 0 0 8px;
  font-size: 8.5pt;
  color: #3E3E38;
}

.pd-rule { border-top: 0.7pt solid #171714; }

.pd-foot-meta {
  margin-top: 6px !important;
  font-size: 7.5pt !important;
  color: #73736B !important;
}

/* ── 인쇄 규칙 ─────────────────────────── */

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

@media print {
  .pd-body { background: #fff; }
  .pd-toolbar { display: none; }

  .pd-sheet {
    width: auto;
    min-height: auto;
    margin: 0;
    padding: 22mm 24mm;
    box-shadow: none;
  }

  .pd-neg,
  .pd-chip,
  .pd-d-issue,
  .pd-d-issue em,
  .pd-st-delayed .pd-task-pct,
  .pd-st-imminent .pd-ms-d {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .pd-gauge i,
  .pd-gauge b,
  .pd-st-delayed .pd-ms-d,
  .pd-st-done .pd-ms-d,
  .pd-gauge {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
