/* ============================================================
   正本宣言: 文章主体ページ（プライバシーポリシー・ブログ記事・送信完了/エラー）の
   本文スタイル。v27（2026-08-10 さき指示「古いデザインへのリンクを新しいデザインに作り変え・旧は削除」）で
   旧デザイン（style.css の .article / .crumbs / .post-card）を廃止したため新設。

   mono.css は `* { margin:0; padding:0 }` のリセットのうえ p/ul/li/h2 の素の指定を持たないため、
   長文ページは必ずこのシートを読み込んで .doc でくるむ（Mono.astro の pageCss="/styles/p-doc.css"）。
   色・余白トークンは mono.css の --kg-* を使う（パレット外の色を作らない）。
   ============================================================ */

/* ---- 本文コンテナ ---- */
.doc {
  max-width: 46em;
  color: var(--kg-body);
  font-size: 15.5px;
  line-height: 2.0;
  letter-spacing: .02em;
}
.doc--wide { max-width: 56em; }
.doc--center { margin-left: auto; margin-right: auto; }

/* ---- 見出し ---- */
.doc h2 {
  margin: 56px 0 18px;
  padding-left: 16px;
  position: relative;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.7;
  color: var(--kg-ink);
  letter-spacing: .04em;
}
.doc h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: .34em;
  width: 4px;
  height: 1.05em;
  border-radius: 2px;
  background: var(--grad-btn);
}
.doc > h2:first-child { margin-top: 0; }
.doc h3 {
  margin: 36px 0 12px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.8;
  color: var(--kg-ink);
}
.doc h4 {
  margin: 28px 0 10px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--kg-ink);
}

/* ---- 段落・リスト ---- */
.doc p { margin: 0 0 18px; }
.doc p:last-child { margin-bottom: 0; }
.doc strong { font-weight: 700; color: var(--kg-ink); }
.doc em { font-style: normal; font-weight: 700; color: var(--kg-blue); }

.doc ul,
.doc ol { margin: 0 0 20px; padding-left: 0; list-style: none; }
.doc ul li,
.doc ol li { position: relative; padding-left: 22px; margin-bottom: 10px; }
.doc ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: .82em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--kg-blue2);
}
.doc ol { counter-reset: doc-ol; }
.doc ol li { counter-increment: doc-ol; padding-left: 28px; }
.doc ol li::before {
  content: counter(doc-ol) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-num);
  font-weight: 700;
  color: var(--kg-blue);
}
.doc li > ul,
.doc li > ol { margin: 10px 0 0; }

/* ---- リンク・引用・コード・区切り ---- */
.doc a {
  color: var(--kg-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: opacity .2s ease;
}
.doc a:hover { opacity: .72; }

.doc blockquote {
  margin: 24px 0;
  padding: 18px 22px;
  background: var(--kg-t2);
  border-left: 3px solid var(--kg-blue2);
  border-radius: 0 10px 10px 0;
  font-size: 15px;
}
.doc blockquote p:last-child { margin-bottom: 0; }

.doc code {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--kg-t1);
  color: var(--kg-deep);
  font-size: .92em;
}
.doc pre {
  margin: 24px 0;
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--kg-t2);
  border: 1px solid var(--kg-line);
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.85;
}
/* Shiki(astro-code)は pre のインラインstyleで背景と文字色を指定する。
   .doc code の色指定がブロック内まで効くと暗背景に暗文字になるため、pre内はpre側の色を継承させる */
.doc pre code { padding: 0; background: none; color: inherit; }

.doc hr {
  margin: 40px 0;
  border: 0;
  border-top: 1px solid var(--kg-line);
}

.doc img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 24px 0;
}

.doc table {
  width: 100%;
  margin: 24px 0;
  border-collapse: collapse;
  font-size: 14.5px;
}
.doc th,
.doc td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--kg-line);
  text-align: left;
  vertical-align: top;
}
.doc th { background: var(--kg-t2); color: var(--kg-ink); font-weight: 700; white-space: nowrap; }

/* ---- 末尾の注記（制定日など） ---- */
.doc-meta {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--kg-line);
  font-size: 13px;
  line-height: 1.9;
  color: var(--kg-quiet);
}

/* ---- パンくず（記事詳細） ---- */
.doc-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 18px;
  font-size: 12.5px;
  color: var(--kg-quiet);
}
.doc-crumbs a { color: var(--kg-quiet); text-decoration: none; }
.doc-crumbs a:hover { color: var(--kg-blue); }
.doc-crumbs span::before { content: "/"; margin-right: 10px; color: var(--kg-line); }

/* ---- 記事メタ（カテゴリ・日付） ---- */
.doc-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}
.doc-cat {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--kg-t1);
  color: var(--kg-blue);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .04em;
}
.doc-date {
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 600;
  color: var(--kg-quiet);
  letter-spacing: .06em;
}

/* ---- 送信完了・エラーページ（中央寄せの短い1枚） ---- */
/* 1画面で完結する短さなので、ヒーロー(.ph)直下の96pxは空きすぎる。上下とも詰める */
.sec.doc-center { padding-top: 56px; padding-bottom: 88px; }
.doc-center { text-align: center; }
.doc-center .doc { margin-left: auto; margin-right: auto; text-align: left; }
.doc-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
}

@media (max-width: 749px) {
  .doc { font-size: 15px; line-height: 1.95; }
  .doc h2 { margin: 44px 0 14px; font-size: 18px; padding-left: 13px; }
  .doc h3 { margin: 30px 0 10px; font-size: 16px; }
  .doc p { margin-bottom: 16px; }
  .doc-meta { margin-top: 36px; }
  .doc-actions { flex-direction: column; }
  .doc-actions .btn-p,
  .doc-actions .btn-s { width: 100%; }
  .doc table { font-size: 13.5px; }
  .doc th, .doc td { padding: 10px 12px; }
}
