/* ============================================================
   生成AI利活用ガイドライン v2.0 — 共通スタイル
   画面プレビュー / 印刷(PDF) / Webアプリ出力で共用
   ============================================================ */
@page { size: A4; margin: 18mm 16mm 22mm 16mm; }
* { margin: 0; padding: 0; box-sizing: border-box; }

.guideline {
  font-family: "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
  color: #262626;
  background: #fff;
  line-height: 1.75;
  font-size: 10.5pt;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* ブランドカラーはCSS変数で差し替え可能（既定はネイビー） */
.guideline {
  --brand: #1a3c6e;
  --brand-soft: #f0f3f8;
  --brand-line: #d0d8e8;
  --warn: #b84c3a;
  --warn-soft: #fdf5f4;
}

.guideline p { margin-bottom: 10px; text-align: justify; word-break: normal; line-break: strict; overflow-wrap: break-word; }
.guideline ul, .guideline ol { margin: 8px 0 14px 22px; }
.guideline li { margin-bottom: 4px; }
.guideline small { font-size: 8.5pt; color: #666; }

/* ===== 表紙 ===== */
.gl-cover {
  page-break-after: always;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  min-height: 252mm; text-align: center; padding: 40px;
}
.gl-cover .badge {
  display: inline-block; border: 2px solid var(--brand); color: var(--brand);
  font-size: 11pt; font-weight: 600; padding: 6px 28px; letter-spacing: 2px; margin-bottom: 40px;
}
.gl-cover h1 { font-size: 27pt; font-weight: 700; color: var(--brand); line-height: 1.4; margin-bottom: 12px; }
.gl-cover .subtitle { font-size: 13pt; color: #555; margin-bottom: 48px; }
.gl-cover .meta-table { border-collapse: collapse; font-size: 10pt; text-align: left; min-width: 360px; }
.gl-cover .meta-table th { color: var(--brand); font-weight: 600; padding: 6px 16px 6px 0; white-space: nowrap; border-bottom: 1px solid #ddd; }
.gl-cover .meta-table td { padding: 6px 0; border-bottom: 1px solid #ddd; }
.gl-cover .note { margin-top: 40px; font-size: 9pt; color: #888; max-width: 480px; }

/* ===== 目次 ===== */
.gl-toc { page-break-after: always; padding: 30px 0; }
.gl-toc h2 { font-size: 18pt; color: var(--brand); border-bottom: 3px solid var(--brand); padding-bottom: 8px; margin-bottom: 24px; }
.gl-toc ol { list-style: none; counter-reset: toc; column-count: 2; column-gap: 32px; }
.gl-toc > ol > li { counter-increment: toc; margin-bottom: 4px; font-size: 10.5pt; font-weight: 600; color: var(--brand); border-bottom: 1px dotted #ccc; padding: 5px 0; break-inside: avoid; }
.gl-toc > ol > li::before { content: counter(toc) ". "; }

/* ===== セクション ===== */
.gl-section { page-break-before: always; padding-top: 10px; }
.gl-section:first-of-type { page-break-before: auto; }
.gl-section h2.sec-title { font-size: 16pt; font-weight: 700; color: var(--brand); border-left: 5px solid var(--brand); padding-left: 14px; margin-bottom: 22px; line-height: 1.3; }
.gl-section h3 { font-size: 12pt; font-weight: 700; color: var(--brand); margin: 22px 0 10px; padding-bottom: 4px; border-bottom: 1px solid var(--brand-line); }
.gl-section h4 { font-size: 11pt; font-weight: 700; color: #333; margin: 16px 0 8px; }

/* ===== 表 ===== */
table.data { width: 100%; border-collapse: collapse; margin: 14px 0 18px; font-size: 9.5pt; table-layout: auto; }
table.data th { background: var(--brand); color: #fff; font-weight: 600; padding: 8px 10px; text-align: left; border: 1px solid var(--brand); }
table.data td { padding: 7px 10px; border: 1px solid #ccc; vertical-align: top; word-break: normal; line-break: strict; overflow-wrap: break-word; }
table.data tr:nth-child(even) td { background: #f7f8fb; }
.ok { color: #2a5e3a; font-weight: 600; }
.cond { color: #7a5c10; font-weight: 600; }
.ng { color: #8b2e1f; font-weight: 600; }

/* ===== コールアウト ===== */
.callout { border-left: 4px solid var(--brand); background: var(--brand-soft); padding: 13px 18px; margin: 16px 0; font-size: 10pt; }
.callout-warn { border-left-color: var(--warn); background: var(--warn-soft); }
.callout-title { font-weight: 700; color: var(--brand); margin-bottom: 4px; }
.callout-warn .callout-title { color: var(--warn); }

/* ===== タグ ===== */
.tag { display: inline-block; font-size: 8.5pt; font-weight: 600; padding: 2px 10px; border-radius: 2px; margin-right: 4px; white-space: nowrap; }
.tag-red { background: #f8e0dc; color: #8b2e1f; border: 1px solid #e0b0a8; }
.tag-yellow { background: #fef6e0; color: #7a5c10; border: 1px solid #e8d8a0; }
.tag-green { background: #e4f0e8; color: #2a5e3a; border: 1px solid #b0d0b8; }
.tag-blue { background: #e0eaf4; color: #1a3c6e; border: 1px solid #a8c0d8; }
.tag-gray { background: #eee; color: #555; border: 1px solid #ccc; }

/* ===== リスクレベルバー ===== */
.level-bar { display: flex; margin: 6px 0; }
.level-bar span { flex: 1; text-align: center; padding: 6px 4px; font-size: 9pt; font-weight: 600; border: 1px solid #fff; }
.lv-1 { background: var(--brand); color: #fff; }
.lv-2 { background: #3a6090; color: #fff; }
.lv-3 { background: #7a9ab8; color: #fff; }
.lv-4 { background: #c0d0e0; color: var(--brand); }

/* ===== チェックリスト ===== */
.check-grid { display: grid; grid-template-columns: 22px 1fr; gap: 4px 8px; margin: 10px 0; font-size: 10pt; }
.check-grid .box { width: 15px; height: 15px; border: 1.5px solid var(--brand); margin-top: 3px; }

/* ===== フロー図 ===== */
.flow-row { display: flex; align-items: stretch; margin: 16px 0; gap: 0; }
.flow-step { flex: 1; padding: 11px 8px; text-align: center; font-size: 9pt; position: relative; background: var(--brand-soft); border: 1px solid var(--brand-line); }
.flow-step:not(:last-child) { margin-right: 14px; }
.flow-step:not(:last-child)::after {
  content: ""; position: absolute; right: -14px; top: 50%; transform: translateY(-50%);
  width: 0; height: 0; border-top: 13px solid transparent; border-bottom: 13px solid transparent; border-left: 14px solid var(--brand-line); z-index: 1;
}
.flow-step .step-num { display: block; font-weight: 700; color: var(--brand); font-size: 11pt; margin-bottom: 2px; }

/* 記入欄(空白) */
.fillin td.blank { height: 28px; }

/* ===== プレースホルダ（自社で記入する箇所） ===== */
.ph { background: #fff3cd; border-bottom: 1px dashed #c9a227; padding: 0 3px; font-weight: 600; color: #6b5310; border-radius: 2px; }

/* ===== 編集者向けの注記（画面のみ・印刷では消える） ===== */
.editor-note {
  background: #eef4ff; border: 1px dashed #9bb6e0; color: #2a4a78;
  font-size: 9pt; padding: 8px 12px; margin: 10px 0; border-radius: 4px;
}
.editor-note::before { content: "編集メモ："; font-weight: 700; }

/* ===== このテンプレートの使い方（サンプル冒頭のみ） ===== */
.usage-guide {
  page-break-after: always;
  border: 1.5px solid var(--brand-line); background: var(--brand-soft);
  border-radius: 6px; padding: 26px 30px; margin: 24px 0;
}
.usage-guide h2 { font-size: 16pt; color: var(--brand); margin-bottom: 12px; }
.usage-guide ol { margin: 14px 0 14px 22px; }
.usage-guide li { margin-bottom: 9px; }
.usage-guide b { color: var(--brand); }
.usage-guide .callout { margin-bottom: 0; }

/* ===== フッター ===== */
.gl-footer { text-align: center; font-size: 8pt; color: #999; margin-top: 50px; padding-top: 12px; border-top: 1px solid #ddd; }
.gl-logo-foot { text-align: right; margin-top: 30px; font-size: 8pt; color: #aaa; }

/* 改ページ抑制 */
.no-break, .callout, .check-grid, table.data tr, .flow-row, .gl-section h3 { page-break-inside: avoid; }
/* 見出しだけがページ末尾に取り残されないようにする */
.gl-section h3, .gl-section h4, .sec-title { page-break-after: avoid; break-after: avoid; }
.editor-note { page-break-before: avoid; break-before: avoid; }

@media print {
  .guideline { font-size: 9.5pt; }
}

/* 会社名を入れた実運用版では編集メモ(足場)を隠す。黄色プレースホルダは残す */
.guideline.final .editor-note { display: none; }
