/*
 * 記事本文の基本の見た目。旧テーマの「追加CSS」（2026-10-26 時点の本番）から移した。
 * 記事の部品（枠・よくある質問・手順・リンク・マーカー）は css/parts.css に作り直した（2026-10-28）。
 * セレクタの .entry-content を SWELL の本文 .post_content に置き換えただけで、値は変えていない。
 * 旧テーマ専用のもの（ナビ・フッター・PressApps FAQ・段落の余白）は外した。
 */
/* =========================================
   本文の基本の見た目：旧テーマ（2026-10-26 の本番を実測）に合わせる
   記事は飾りの無い見出しの前提で書かれている（「■」を付けた見出しなど）ので、SWELL の見出しの飾りを外す。
   独自のクラスを持つ見出し（case-heading など）は、下のそれぞれの指定に任せる。
========================================= */
.post_content p {
    margin-bottom: 1.3em;
    line-height: 1.6;
}
.post_content :where(h2, h3, h4, h5):not(.case-heading, .step-heading, .faq-q) {
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    font-weight: normal;
    line-height: 1.1;
}
.post_content :where(h2, h3, h4):not(.case-heading, .step-heading, .faq-q)::before,
.post_content :where(h2, h3, h4):not(.case-heading, .step-heading, .faq-q)::after {
    content: none;
}
.post_content h2:not(.case-heading, .step-heading, .faq-q, .m-page *) { font-size: 28px; margin: 20px 0 10px; }
.post_content h3:not(.case-heading, .step-heading, .faq-q, .m-page *) { font-size: 24px; margin: 20px 0 10px; }
.post_content h4:not(.case-heading, .step-heading, .faq-q, .m-page *) { font-size: 20px; margin: 10px 0; }
.post_content h5:not(.case-heading, .step-heading, .faq-q, .m-page *) { font-size: 17px; line-height: 1.1; margin: 10px 0; }
/* 箇条書き：部品として作ったもの（目次・記事の一覧・手順・参考リンク）以外は、旧テーマと同じ形にする。
   AI の回答画面から貼ったクラス名（"list-disc flex …"）が残った箇条書きも、旧サイトでは普通の箇条書きとして出ていた */
.post_content :where(ul, ol):not(.p-toc__list, .p-toc__childList, .display-posts-listing, .sub-step-list, .step-list, .reference-list) {
    margin: 0 0 10px;
    padding-left: 40px;
}
.post_content :where(ul, ol):not(.p-toc__list, .p-toc__childList, .display-posts-listing, .sub-step-list, .step-list, .reference-list) > li {
    margin: 0;
    line-height: 1.875;
}
/* 入れ子のリストの下は空けない（旧テーマ＝Bootstrap と同じ） */
.post_content :is(ul, ol) :where(ul, ol):not(.p-toc__list, .p-toc__childList, .display-posts-listing, .sub-step-list, .step-list, .reference-list) { margin-bottom: 0; }
.post_content hr { margin: 20px 0; }
/* 表の見出しのセル：SWELL は白い文字にするが（thead の中はさらに強い指定）、記事は薄い灰色の背景を付けているので読めなくなる */
.post_content th,
.post_content thead th { color: #333; }
/* 見出しの行の高さは旧テーマと同じ 1.1（クラスの付いた見出し .case-heading なども同じ） */
.post_content :is(h1, h2, h3, h4, h5, h6) { line-height: 1.1; }
/* 本文の直下に1件ずつ置かれた記事の一覧の項目。SWELL は1件ごとに下に 2em の間を付けるが、旧テーマは付けない */
.post_content > .listing-item { margin-bottom: 0; }
/* 本文の行の高さは旧テーマと同じ 30px（段落 p は下の指定で 1.6）。SWELL は 1.8 */
.post_content { line-height: 1.875; }
/* 記事の本文の直下の囲み（Google ドキュメントなどから貼った行・他のサイトから貼った枠）。SWELL は下に 2em の間を付けるが、旧テーマは付けない。
   目次と、自分で間を決めている部品（枠・よくある質問など。.box-info などの指定が勝つよう、ここは詳細度を上げない）は除く */
:where(.single) .post_content > :where(div:not(.p-toc, .swell-toc-placeholder)) { margin-bottom: 0; }
.post_content > div:not([class]) { margin-bottom: 0; } /* 固定ページも、飾りの無い囲みは同じ */
/* その囲みの中の最後の段落：SWELL は囲みの中の最後の部品の下を 0 にするが（!important）、旧テーマは段落の下の間（1.3em）を残していた */
.single .post_content :is(div:not([class]), div.entry-content) > p:last-child { margin-bottom: 1.3em !important; } /* div.entry-content は旧の画面から本文ごと貼った囲み（/archives/15100） */
/* 本文の文字はスマホでも 16px（SWELL は #main_content .post_content でスマホの文字を画面幅に合わせて小さくするが、旧テーマは 16px のまま） */
#main_content .post_content { font-size: 16px; }
/* 記事の一覧（Display Posts。最新記事一覧・ステータスの障害履歴・よくある質問など）は旧テーマと同じ、字下げ 40px・行の高さ 30px・行の間なし */
/* 箇条書きの形（ul）の一覧だけ字下げする。div で出す一覧（ステータスの障害履歴）と、目的別ページのカードの一覧（.custom-post-list）は字下げしない */
.post_content ul.display-posts-listing:not(.custom-post-list, .custom-post-list *) { margin: 0 0 10px; padding-left: 40px; }
.post_content .display-posts-listing > li { margin: 0; line-height: 1.875; }
/* 文中のコード：旧テーマと同じ、薄い桃色の地に赤い文字（SWELL の .post_content :not(pre)>code より強く） */
.post_content :not(pre) > code {
	display: inline;
	font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
	color: #c7254e;
	background: #f9f2f4;
	border: 0;
	border-radius: 0;
	padding: 2px 4px;
	margin: 0;
	font-size: 90%;
	line-height: inherit;
}
/* 文中の mark：旧テーマ（Bootstrap）と同じく四方に 0.2em */
.post_content mark { padding: .2em; }
/* 表のセルの行の高さは旧テーマと同じ（本文と同じ 30px） */
.post_content :is(th, td) { line-height: 1.875; }

.page .custom-video {
position: relative;
width: 100%;
padding-top: 56.25%;
}
.page .custom-video iframe{
position: absolute;
top: 0;
right: 0;
width: 100% !important;
height: 100% !important;
}
.post_content img:not(.no-border) {
border: #03A9F3 solid 3px;
}

.wpcf7 [data-class="wpcf7cf_group"] {
	    overflow: inherit !important;
}

/* =========================================
   SWELL との調整（ここから下は移行時に足したもの）
========================================= */

/* 引用：旧テーマ（Bootstrap）の引用と同じ形にし、SWELL の引用の飾りを外す。
   見出しを囲んでいた引用（3,128か所）は 10/28 に外した（tools/unwrap_headings.py）。残りは太字の段落を囲んだ34か所など */
.post_content blockquote {
    background: none;
    border: 0;
    border-left: 5px solid #eeeeee;
    padding: 10px 20px;
    margin: 0 0 20px;
    font-size: 17.5px; /* 旧テーマは引用の文字を一回り大きくしていた。行の高さは 30px（中の段落は 1.6） */
    line-height: 30px;
}
.post_content blockquote :is(p, ul, ol):last-child { margin-bottom: 0; } /* 旧テーマ（Bootstrap）と同じ。枠の中の最後の段落・リストの下は空けない（見出しの下は空ける） */
.post_content blockquote::before,
.post_content blockquote::after {
    content: none;
    display: none;
}

/* UTAGE の動画の埋め込み（inc/display.php）。旧サイトと同じ横幅いっぱい・16:9 */
.post_content .m-video { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 0; } /* 旧テーマも下は空けない（下の空の段落が間になる） */
/* 動画だけの段落（Vimeo などの埋め込み）：旧テーマは動画を囲みに入れ直していて、下に間が無かった */
.post_content p:has(> iframe:only-child) { margin-bottom: 0; }
.post_content .m-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* 本文の動画（Vimeo・YouTube などの iframe）：旧テーマは横幅いっぱい・縦横比を保って出していた（fitvids）。同じにする */
.post_content iframe[src*="vimeo.com"],
.post_content iframe[data-src*="vimeo.com"],
.post_content iframe[src*="youtube.com"],
.post_content iframe[data-src*="youtube.com"] {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

/* 固定ページの段落は旧テーマと同じ、下 10px で行の高さは囲みから受け継ぐ（本文の直下は 30px。行の高さを指定した枠の中ではその値。
   例 /contact の案内の枠は 1.6 → 22.4px）。記事の本文は 1.6・1.3em のまま */
.page .post_content p { margin: 0 0 10px; line-height: inherit; }
/* 飾りの無い囲みの中の最後の段落も下 10px（SWELL は !important で 0 にする。旧テーマは残していた） */
.page .post_content div:not([class]) > p:last-child { margin-bottom: 10px !important; }
/* 本文の画像は旧テーマと同じく行の中央にそろえる（下に文字の下がりの分の隙間が出ないように） */
.post_content img { vertical-align: middle; }
/* 表：旧テーマは表とセルに飾りを付けない（枠線・余白は記事の中で style に書いている）。SWELL の枠線・見出しのセルの青い地・余白・下の間を外す */
.post_content table { margin-bottom: 0; line-height: 1.875; }
.post_content :is(th, td),
.post_content thead :is(th, td) { border: 0; padding: 0; background: none; }
/* 見出し6：旧テーマと同じ 13px・太字なし・上下 10px */
.post_content h6:not(.m-page *) { font-size: 13px; font-weight: normal; line-height: 1.1; margin: 10px 0; }

/* C-10：記事に明示した表の幅を維持する。width 属性は inc/display.php が表示時に inline CSS へ移す。 */
.post_content table[width],
.post_content table[style*="width"] { max-width: none; }
