/* ============================================================
   記事内チェックリスト（components/checklist.js とセット）
   ============================================================ */

/* 箇条書きデザインa（ul.lista）の枠はそのまま使い、先頭のアイコンだけ外す
   style.css がこのファイルより後に読み込まれるため、.entry-content を付けて優先させる */
.entry-content ul.qc-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.6em;
}

.entry-content ul.qc-checklist li:before {
  content: none;
}

.entry-content ul.qc-checklist {
  padding-left: 1em;
}

.qc-checklist__box {
  flex-shrink: 0;
  width: 1.2em;
  height: 1.2em;
  margin: 0.15em 0 0;
  accent-color: #3a8fc4;
  cursor: pointer;
}

.qc-checklist__label {
  cursor: pointer;
}

.qc-checklist__box:checked + .qc-checklist__label {
  color: #3a8fc4;
}

.qc-checklist-actions {
  margin: 0 0 1.5em;
  text-align: center;
}

.qc-checklist-actions__btn {
  padding: 0.9em 2.4em;
  border: none;
  border-radius: 6px;
  background: #0b2050;
  color: #fff;
  font-size: 1.15rem;
  font-weight: bold;
  cursor: pointer;
}

@media (max-width: 600px) {
  .qc-checklist-actions__btn {
    width: 100%;
  }
}

.qc-checklist-actions__btn:hover,
.qc-checklist-actions__btn:focus-visible {
  background: #1d3a7a;
}

.qc-checklist-actions__note {
  margin: 0.5em 0 0;
  font-size: 0.85em;
  color: #666;
}

/* 印刷用のまとめ（画面には出さない） */
.qc-checklist-sheet {
  display: none;
}

@media print {
  /* Google の自動広告（#google-anno-sa 等）は body の外の html 直下に置かれるため、そちらも隠す */
  html.qc-checklist-printing > *:not(body),
  html.qc-checklist-printing body > *:not(.qc-checklist-sheet) {
    display: none !important;
  }

  /* 印刷画面の余白設定（「なし」など）に左右されないよう、シート自体に余白を持たせる */
  html.qc-checklist-printing .qc-checklist-sheet {
    display: block;
    padding: 12mm 18mm 0;
    color: #000;
    font-size: 11pt;
    line-height: 1.5;
  }

  .qc-checklist-sheet__logo {
    display: block;
    width: 160px;
    height: auto;
    margin: 0 0 1em;
  }

  .qc-checklist-sheet__title {
    margin: 0 0 0.3em;
    padding-bottom: 0.3em;
    border-bottom: 2px solid #0b2050;
    font-size: 16pt;
  }

  .qc-checklist-sheet__meta {
    margin: 0 0 1em;
    text-align: right;
  }

  .qc-checklist-sheet__section {
    margin: 0.8em 0 0.1em;
    font-size: 12pt;
    break-after: avoid;
  }

  .qc-checklist-sheet__list {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .qc-checklist-sheet__list li {
    display: flex;
    gap: 0.6em;
    padding: 0.35em 0;
    border-bottom: 1px solid #ccc;
    break-inside: avoid;
  }

  .qc-checklist-sheet__mark {
    flex-shrink: 0;
    font-size: 13pt;
    line-height: 1.3;
  }

  /* 項目が多いときも、まとめと出典だけが次のページに送られないよう詰めて一緒に置く */
  .qc-checklist-sheet__summary {
    margin: 1em 0;
    font-weight: bold;
    break-after: avoid;
  }

  .qc-checklist-sheet__source {
    margin: 1em 0 0;
    font-size: 9pt;
    color: #444;
  }
}
