@charset "UTF-8";
/**
 * article.css — 記事詳細
 *
 * プロトタイプ（Artifact 750b6f6e）のスタイルを正として実装する。
 * 旧テーマ（bundle.css / article-design.css）の値は引き継がない。
 *
 * プロトタイプ側の変数を、テーマの既存変数に対応させたうえで
 * 記事本文スコープのローカル変数として定義する。
 */

.post_content,
.post_article {
	/* プロトタイプ由来のトークン */
	--ink:          #333333;
	--ink-soft:     #5c6470;
	--ink-faint:    #9199a3;
	--paper:        #ffffff;
	--paper-tint:   #f5f7fa;
	--accent:       #007AFF;
	--accent-deep:  #0060d6;
	--accent-quiet: #eaf3ff;
	--accent-line:  #cfe4ff;
	--amber:        #b5761b;
	--amber-quiet:  #fbf3e3;
	--rule:         #e6e9ee;
	--rule-soft:    #eef1f5;
	--shadow-sm:    0 1px 2px rgba(51, 51, 51, .05);
	--shadow-lg:    0 2px 4px rgba(51, 51, 51, .05), 0 12px 34px rgba(51, 51, 51, .07);
}

/* ※ パンくず（.bread_wrap / .bread_list）は一覧・検索でも使うため
     components.css に定義済み。 */

/* ============================================================
   記事ヘッダ
   ============================================================ */
.post_article { margin-bottom: 48px; }

.post_head { padding: 18px 0 8px; }

.post_head_meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	font-size: 13px;
	color: var(--ink-faint);
}

/* カテゴリはチップ状（プロトタイプ準拠：淡い青地＋枠線＋角丸20px） */
.post_category {
	display: inline-block;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .03em;
	color: var(--accent-deep);
	background: var(--accent-quiet);
	border: 1px solid var(--accent-line);
	padding: 4px 12px;
	border-radius: 20px;
	text-decoration: none;
	line-height: 1.6;
}

.post_category:hover {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
	text-decoration: none;
}

.post_date {
	font-size: 13px;
	color: var(--ink-faint);
	font-variant-numeric: tabular-nums;
}

.post_title {
	font-size: clamp(24px, 4.2vw, 33px);
	line-height: 1.42;
	margin: 16px 0 14px;
	font-weight: 800;
	letter-spacing: -.01em;
	text-wrap: balance;
}

.post_eyecatch {
	margin: 22px 0 4px;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: var(--shadow-lg);
	border: 1px solid var(--rule);
	aspect-ratio: 16 / 9;
	background: linear-gradient(135deg, var(--accent-quiet), var(--paper-tint));
	line-height: 0;
}

.post_eyecatch img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ============================================================
   本文の基本
   ============================================================ */
.post_content {
	font-size: 16px;
	line-height: 1.95;
	color: var(--ink);
	margin-top: 34px;
}

.post_content p {
	margin: 0 0 20px;
	line-height: 2.05;
	color: var(--ink);
	font-size: 16px;
}

.post_content strong { font-weight: 700; }

/* リンク（下線は border-bottom で表現） */
.post_content a {
	color: var(--accent-deep);
	text-decoration: none;
	font-weight: 600;
	border-bottom: 1.5px solid var(--accent-line);
	padding-bottom: 1px;
}

.post_content a:hover {
	color: var(--accent);
	border-bottom-color: var(--accent);
}

/* ============================================================
   ① 3行まとめ
   ============================================================ */
.am-summary {
	background: var(--accent-quiet);
	border: 1px solid var(--accent-line);
	border-radius: 16px;
	padding: 22px 24px;
	margin: 8px 0 34px;
}

.am-summary_label {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: .04em;
	color: var(--accent-deep);
	margin-bottom: 15px;
}

.am-summary_list {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: s;
	display: flex;
	flex-direction: column;
	gap: 13px;
}

.am-summary_list li {
	counter-increment: s;
	display: flex;
	gap: 13px;
	align-items: flex-start;
	font-size: 15.5px;
	font-weight: 500;
	line-height: 1.7;
	margin: 0;
	padding: 0;
}

.am-summary_list li::before {
	content: counter(s);
	flex: none;
	width: 27px;
	height: 27px;
	border-radius: 50%;
	background: var(--accent);
	color: #fff;
	font-weight: 800;
	font-size: 13px;
	display: grid;
	place-items: center;
	margin-top: 1px;
	position: static;
}

/* ============================================================
   ② 目次
   ============================================================ */
.post_toc {
	background: var(--paper);
	border: 1px solid var(--rule);
	border-radius: 14px;
	padding: 22px 24px;
	margin: 0 0 40px;
	box-shadow: var(--shadow-sm);
}

.toc_label {
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: .08em;
	color: var(--ink-faint);
	text-transform: uppercase;
	margin-bottom: 14px;
	padding: 0;
	border: 0;
}

.toc_list {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: t;
}

/* 親項目：01 / 02 のゼロ埋め連番 */
.toc_parent {
	counter-increment: t;
	padding: 10px 0;
	border-bottom: 1px solid var(--rule-soft);
	display: flex;
	gap: 13px;
	align-items: baseline;
	margin: 0;
}

.toc_parent::before {
	content: counter(t, decimal-leading-zero);
	font-variant-numeric: tabular-nums;
	color: var(--accent);
	font-weight: 800;
	font-size: 13.5px;
	flex: none;
	min-width: 22px;
	position: static;
	width: auto;
	height: auto;
	background: none;
	border-radius: 0;
}

/* 子項目：親の下にぶら下げる */
.toc_child {
	padding: 8px 0 8px 35px;
	border-bottom: 1px solid var(--rule-soft);
	display: flex;
	gap: 10px;
	align-items: baseline;
	margin: 0;
}

.toc_child::before {
	content: "";
	flex: none;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--accent-line);
	position: static;
	top: auto;
	left: auto;
}

.toc_list li:last-child { border-bottom: none; }

.toc_list a {
	color: var(--ink);
	text-decoration: none;
	font-size: 15px;
	border-bottom: 0;
	font-weight: 400;
	padding-bottom: 0;
}

.toc_list a:hover { color: var(--accent); border-bottom: 0; }
.toc_child a { font-size: 14px; color: var(--ink-soft); }

/* ============================================================
   ③ 見出し
   ============================================================ */
.post_content h2,
.post_content .post_heading._level1 {
	font-size: 23px;
	font-weight: 800;
	color: var(--ink);
	margin: 48px 0 20px;
	padding: 4px 0 4px 20px;
	position: relative;
	line-height: 1.5;
	letter-spacing: -.01em;
	scroll-margin-top: 80px;
	border: 0;
}

/* 左のアクセントバーはグラデーション */
.post_content h2::before,
.post_content .post_heading._level1::before {
	content: "";
	position: absolute;
	left: 0;
	top: 2px;
	bottom: 2px;
	width: 5px;
	border-radius: 3px;
	background: linear-gradient(var(--accent), var(--accent-deep));
}

/* h3 は「//」を前置 */
.post_content h3,
.post_content .post_heading._level2 {
	font-size: 18px;
	font-weight: 700;
	margin: 36px 0 14px;
	color: var(--ink);
	display: flex;
	align-items: baseline;
	gap: 10px;
	scroll-margin-top: 80px;
	padding: 0;
	border: 0;
}

.post_content h3::before,
.post_content .post_heading._level2::before {
	content: "//";
	color: var(--accent-line);
	font-weight: 800;
	flex: none;
}

/* ============================================================
   ④ 表
   ============================================================ */
.post_content .wp-block-table,
.post_content figure.wp-block-table {
	overflow-x: auto;
	border-radius: 12px;
	border: 1px solid var(--rule);
	box-shadow: var(--shadow-sm);
	margin: 0 0 24px;
}

.post_content table {
	border-collapse: collapse;
	width: 100%;
	font-size: 14px;
	min-width: 460px;
	border: 0;
}

.post_content thead th,
.post_content thead td {
	background: var(--accent);
	color: #fff;
	font-weight: 700;
	padding: 12px 15px;
	text-align: left;
	letter-spacing: .02em;
	white-space: nowrap;
	border: 0;
}

/* thead が無い表は1行目を見出し扱いに（実データに119件存在） */
.post_content table:not(:has(thead)) tr:first-child td {
	background: var(--accent);
	color: #fff;
	font-weight: 700;
	white-space: nowrap;
}

.post_content td {
	padding: 12px 15px;
	border: 0;
	border-bottom: 1px solid var(--rule-soft);
}

.post_content tbody tr:nth-child(even) { background: var(--paper-tint); }
.post_content tbody tr:last-child td { border-bottom: none; }
.post_content td:first-child { font-weight: 600; }

/* ============================================================
   ⑤ FAQ（カード状・Q=青 / A=アンバー）

   2つの形式を同じ見た目にする:
     .wp-block-aioseo-faq … 移行元の記事（AIOSEOプラグインが吐いた形式）
     .cm-faq              … 入稿画面から「見出し+段落」で書いたもの
                            （inc/content.php の cloudmag_wrap_faq が変換）
   ============================================================ */
.post_content .cm-faq,
.post_content .wp-block-aioseo-faq {
	border: 1px solid var(--rule);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	margin: 0 0 12px;
}

/*
 * 質問行。回答側と同じ理由で display:flex にしない。
 * 質問文に <strong> が入ると、それが独立したflexアイテムになり
 * 縦に潰れて折り返されてしまう。
 */
.post_content .cm-faq .cm-faq_q,
.post_content .wp-block-aioseo-faq .aioseo-faq-block-question,
.post_content .wp-block-aioseo-faq .post_heading._level2 {
	position: relative;
	padding: 15px 17px 15px 46px;
	font-weight: 700;
	font-size: 15px;
	background: var(--paper);
	margin: 0;
	border: 0;
	scroll-margin-top: 80px;
}

.post_content .cm-faq .cm-faq_q::before,
.post_content .wp-block-aioseo-faq .aioseo-faq-block-question::before,
.post_content .wp-block-aioseo-faq .post_heading._level2::before {
	content: "Q";
	position: absolute;
	left: 17px;
	top: 15px;
	width: 25px;
	height: 25px;
	border-radius: 7px;
	background: var(--accent);
	color: #fff;
	font-weight: 800;
	display: grid;
	place-items: center;
	font-size: 13px;
	line-height: 1;
}

/*
 * 回答エリア。
 *
 * ⚠️ display:flex にしてはいけない。
 *    旧形式（aioseo）は回答が <p> で包まれていたので1アイテムで済んだが、
 *    FAQブロック（cloudmag/faq）の回答は <div> 直下にテキストと <strong> が
 *    並ぶため、flex にすると <strong> が独立したアイテムになり
 *    「9〜/10/月頃」のように縦に潰れて折り返される。
 *
 *    Aバッジは ::before を absolute で置き、本文側に padding を取って避ける。
 */
.post_content .cm-faq_a,
.post_content .aioseo-faq-block-answer {
	position: relative;
	padding: 14px 17px 16px 46px;
	font-size: 14.5px;
	color: var(--ink-soft);
	background: var(--paper-tint);
	border-top: 1px solid var(--rule-soft);
	line-height: 1.85;
}

.post_content .cm-faq_a::before,
.post_content .aioseo-faq-block-answer::before {
	content: "A";
	position: absolute;
	left: 17px;
	top: 16px;
	width: 25px;
	height: 25px;
	border-radius: 7px;
	background: var(--amber-quiet);
	color: var(--amber);
	font-weight: 800;
	display: grid;
	place-items: center;
	font-size: 13px;
	line-height: 1;
}

.post_content .cm-faq_a p,
.post_content .aioseo-faq-block-answer p { margin: 0; font-size: inherit; line-height: inherit; }

/* 回答が複数段落の場合だけ間隔を空ける（1段落目は上に詰める） */
.post_content .cm-faq_a p + p { margin-top: 10px; }

/*
 * FAQ の h3 は通常の見出しスタイル（"//" 前置・上マージン）を打ち消す。
 * ::before は上で "Q" バッジに差し替え済みなので content は指定しない。
 */
.post_content .cm-faq .cm-faq_q {
	font-size: 15px;
	letter-spacing: normal;
}

/* ============================================================
   ⑥ 画像
   ============================================================ */
.post_content .post_picture,
.post_content .wp-block-image {
	margin: 0 0 24px;
	line-height: 0;
}

.post_content .post_picture img,
.post_content .wp-block-image img {
	width: 100%;
	height: auto;
	border-radius: 14px;
	box-shadow: var(--shadow-lg);
	border: 1px solid var(--rule);
	display: block;
}

.post_content figcaption {
	display: flex;
	gap: 9px;
	align-items: flex-start;
	margin-top: 11px;
	font-size: 13px;
	color: var(--ink-soft);
	line-height: 1.7;
	text-align: left;
}

.post_content figcaption::before {
	content: "";
	flex: none;
	width: 3px;
	align-self: stretch;
	border-radius: 2px;
	background: var(--accent-line);
	margin: 2px 0;
}

/* ============================================================
   ⑦ 引用
   ============================================================ */
.post_content blockquote {
	border-radius: 12px;
	padding: 16px 18px 16px 20px;
	margin: 0 0 24px;
	background: var(--paper-tint);
	border: 1px solid var(--rule);
	color: var(--ink-soft);
	font-size: 14.5px;
	line-height: 1.85;
}

.post_content blockquote p { font-size: inherit; margin-bottom: 0; }

.post_content blockquote cite {
	display: block;
	margin-top: 8px;
	font-size: 12.5px;
	font-style: normal;
	color: var(--ink-faint);
}

/* ============================================================
   ⑨ リスト（菱形マーカー）
   ============================================================ */
.post_content ul.wp-block-list,
.post_content > ul {
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 11px;
}

.post_content ul.wp-block-list li,
.post_content > ul > li {
	position: relative;
	padding-left: 26px;
	font-size: 15.5px;
	line-height: 1.85;
	margin: 0;
}

.post_content ul.wp-block-list li::before,
.post_content > ul > li::before {
	content: "";
	position: absolute;
	left: 5px;
	top: 12px;
	width: 7px;
	height: 7px;
	border-radius: 2px;
	background: var(--accent);
	transform: rotate(45deg);
}

/* 番号付きリスト */
.post_content ol.wp-block-list,
.post_content > ol {
	margin: 0 0 24px;
	padding-left: 1.4em;
	list-style: decimal;
	display: block;
}

.post_content ol li {
	margin-top: 9px;
	font-size: 15.5px;
	line-height: 1.85;
}

/* 目次には本文リストの装飾を効かせない */
.post_content .toc_list li:not(.toc_parent):not(.toc_child)::before { content: none; }

/* ============================================================
   ⑩ ポイント（囲みボックス）
   ============================================================ */
.post_content .cm-point,
.post_content .is-style-info {
	border-radius: 12px;
	padding: 16px 18px 16px 20px;
	margin: 0 0 24px;
	display: flex;
	gap: 13px;
	align-items: flex-start;
	font-size: 14.5px;
	line-height: 1.85;
	border: 1px solid var(--accent-line);
	background: var(--accent-quiet);
}

.post_content .cm-point::before,
.post_content .is-style-info::before {
	content: "!";
	flex: none;
	width: 26px;
	height: 26px;
	border-radius: 8px;
	display: grid;
	place-items: center;
	font-size: 15px;
	font-weight: 800;
	margin-top: 1px;
	background: var(--accent);
	color: #fff;
}

.post_content .cm-point p:last-child,
.post_content .is-style-info p:last-child { margin-bottom: 0; }

/* 区切り線 */
.post_content hr {
	border: 0;
	border-top: 1px solid var(--rule);
	margin: 40px 0;
}

/* ============================================================
   著者
   ============================================================ */
.post_writer {
	display: flex;
	gap: 14px;
	align-items: center;
	margin: 40px 0 0;
	padding: 20px;
	background: var(--paper);
	border: 1px solid var(--rule);
	border-radius: 14px;
}

.writer_avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	flex: none;
	background: linear-gradient(135deg, var(--accent-quiet), var(--accent-line));
	display: grid;
	place-items: center;
	color: var(--accent-deep);
	font-weight: 800;
}

.writer_job {
	font-size: 11.5px;
	color: var(--ink-faint);
	font-weight: 700;
	letter-spacing: .04em;
}

.writer_name {
	font-weight: 700;
	font-size: 15px;
	margin-top: 2px;
}

/* ============================================================
   関連記事
   ※ .related_grid / .related_card は 404 でも使うため
     components.css に定義済み。ここでは余白のみ。
   ============================================================ */
/*
 * 記事下のセクション（関連記事／最近読んだ記事）。
 *
 * .post_related は margin-bottom を持たず、
 * .js_recent_block（.top_block）は margin-top を持たないため、
 * 2つが連続すると間隔が 0 になり、
 * 「最近読んだ記事」の見出しが前のカードに接していた。
 */
.post_related { margin-top: 48px; }

/* 記事下のセクションが連続するときの間隔 */
.post_related + .top_block,
.post_related + .js_recent_block {
	margin-top: 56px;
}

/*
 * 上に境界線を引いて区切りを明示する。
 * カードが並ぶセクション同士は余白だけだと切れ目が分かりにくい。
 *
 * ⚠️ --rule は .post_content スコープの変数なので使えない。
 *    このセクションは .post_content の外にあるため、
 *    :root で定義されている --c-border を使う。
 */
.post_related + .js_recent_block {
	padding-top: 40px;
	border-top: 1px solid var(--c-border);
}

/* ============================================================
   レスポンシブ
   ============================================================ */
@media (max-width: 768px) {
	.post_content h2, .post_content .post_heading._level1 { font-size: 20px; margin-top: 40px; }
	.post_content h3, .post_content .post_heading._level2 { font-size: 16.5px; margin-top: 30px; }
	.am-summary { padding: 18px 18px; }
	.post_toc   { padding: 18px 18px; }
}
