/* =========================================================
   print.css  ?  印刷・PDF出力専用
   - ダークUIを白ベースに最適化
   - 企業ロゴのみ上部に残す
   - 余白・改ページ・URL併記 等を調整
   ========================================================= */

/* ページ余白（PDF出力時の基本余白） */
@page {
  margin: 18mm 16mm 18mm 16mm;
}

/* 基本体裁：白背景・黒文字 */
html, body {
  background: #fff !important;
  color: #000 !important;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  font-size: 12pt;
  line-height: 1.6;
}

/* 画面専用UI・不要要素は非表示 */
.site-footer,
.sidebar,
nav.breadcrumb,
nav.toc,
.utility-nav,
.btn,
.cta,
.article-footer,
.banner,
.form-card,
.lead-form {
  display: none !important;
}

/* ---------------------------------------------------------
   ヘッダー：ロゴのみ残す
   - 背景や枠線・ユーティリティは消し、ブランドロゴだけ表示
---------------------------------------------------------- */
.site-header {
  display: block !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 0 10mm 0 !important;
}
.header-inner {
  display: block !important;
  padding: 0 !important;
}
.brand {
  display: block !important;
  margin: 0 !important;
}
.brand img {
  display: block !important;
  height: 18mm !important;   /* ロゴの印刷サイズ */
  width: auto !important;
}
.utility-nav { display: none !important; }

/* ---------------------------------------------------------
   記事本体
---------------------------------------------------------- */
.article {
  background: #fff !important;
  color: #000 !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.article-header,
.article section {
  padding: 0 !important;
  margin: 0 0 6mm 0 !important; /* セクション間の余白 */
}

/* リード文は少しだけ濃く */
.lead p {
  color: #000 !important;
  font-weight: 500;
}

/* 見出し：改ページ制御・色補正 */
h1, h2, h3 {
  color: #000 !important;
  page-break-after: avoid;
  page-break-inside: avoid;
  break-after: avoid-page;
  break-inside: avoid;
  margin: 0 0 3mm 0;
}
h1.article-title { font-size: 22pt; }
h2 { font-size: 16pt; }
h3 { font-size: 13pt; }

/* 段落・リスト */
p { margin: 0 0 4mm 0; }
ul, ol { margin: 0 0 4mm 5mm; }

/* 図版・表・コードは途中改ページを避ける */
figure, table, pre, blockquote {
  page-break-inside: avoid;
  break-inside: avoid;
}

/* 画像はページ幅にフィット、余白を少し */
img {
  max-width: 100% !important;
  height: auto !important;
  page-break-inside: avoid;
  break-inside: avoid;
  margin: 1mm 0 2mm 0;
}
.kv { margin: 0 0 6mm 0 !important; }
.kv figcaption {
  color: #333 !important;
  font-size: 9.5pt !important;
}

/* 表：境界線をシンプルに出す */
table {
  width: 100% !important;
  border-collapse: collapse !important;
  border: 1px solid #ccc !important;
}
th, td {
  border: 1px solid #ccc !important;
  padding: 6px 8px !important;
  color: #000 !important;
}
th { background: #f5f5f5 !important; }

/* コード／引用 */
pre {
  background: #f8f8f8 !important;
  color: #000 !important;
  border: 1px solid #ddd !important;
  padding: 8px 10px !important;
}
blockquote {
  border-left: 3px solid #999 !important;
  background: #fafafa !important;
  color: #000 !important;
  padding: 8px 12px !important;
}

/* リンクはURLを括弧で追記（社内配布PDFで便利） */
a[href]::after {
  content: " (" attr(href) ")";
  font-size: 0.9em;
  color: #555;
  word-break: break-all;
}

/* フォーカス・ホバー等の視覚効果は無効化 */
* { text-shadow: none !important; }

/* ---------------------------------------------------------
   ページ分割の最適化
---------------------------------------------------------- */
section { break-inside: avoid; page-break-inside: avoid; }
figure { break-inside: avoid; }
thead { display: table-header-group; }  /* 表の見出しを各ページ先頭に */
tr, img { page-break-inside: avoid; }

/* 余白調整（最後の余白を少し軽く） */
.article section:last-child { margin-bottom: 0 !important; }

/* ---------------------------------------------------------
   目次を出す場合（簡易表示）
   ※ 既定では非表示にしています。印刷に載せたい時は下を有効化
---------------------------------------------------------- */
/*
nav.toc {
  display: block !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 0 6mm 0 !important;
}
nav.toc strong,
nav.toc a { color: #000 !important; }
nav.toc a::after { content: ""; } 
*/
