/* =======================================================================
   ブログ記事ページ・サービス詳細ページ デザイン改善（2026-11）

   読み込むページ：ブログの記事・一覧・カテゴリ一覧、サービス詳細ページ
   （inc/blog-renewal.php で wp_head から読み込むので、既存の CSS より後に効く）

   - 本文（リスト・リンク・表・見出しの余白・目次）… ブログ記事だけ（#contents.ats-blog-article）
   - パンくず・シェア・前後の記事・ライター・関連記事 … ブログ記事
   - サイドバー・シェア・お問い合わせ … サービス詳細ページでも共通
   ======================================================================= */

:root {
	--ats-fg: #333333;
	--ats-sub: #6b747b;
	--ats-accent: #a6b8c3;
	--ats-accent-deep: #56707f;
	--ats-accent-tint: #eef3f6;
	--ats-line: #e1e7eb;
	--ats-card: #ffffff;
	--ats-head-bg: #f4f7f9;
	--ats-head-bg-hover: #eaf0f3;
	--ats-label-font: 'Futura', 'Helvetica Neue', Arial, sans-serif;
}

/* 外枠が中身（1行のまま省略するパンくずや、横にスクロールする表）の幅に押し広げられないようにする */
#centerMain.blog-layout > .archive-wrap,
.archive-wrap > #contents.blog-layout,
.archive-wrap > #topcontents.blog-layout,
.archive-wrap > #sidebar {
	min-width: 0;
}

/* 英字ラベル（SHARE / WRITER / RELATED など） */
.ats-en {
	font-family: var(--ats-label-font);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: .2em;
	color: var(--ats-sub);
}

/* 丸い矢印 */
.ats-go {
	flex: none;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 1px solid var(--ats-accent);
	display: inline-grid;
	place-items: center;
	color: var(--ats-accent-deep);
	transition: background .2s, color .2s, border-color .2s, transform .2s;
}

.ats-go svg {
	width: 10px;
	height: 8px;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.4;
}

/* =======================================================================
   パンくずリスト
   ======================================================================= */
.ats-crumb {
	margin: 0 0 18px;
	min-width: 0;
}

.ats-crumb ol {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 0;
	display: flex;
	align-items: center;
	font-size: 12.5px;
	line-height: 1.6;
	color: var(--ats-sub);
	min-width: 0;
}

#contents .ats-crumb ol li,
.ats-crumb li {
	display: flex;
	align-items: center;
	flex: none;
	white-space: nowrap;
	padding: 0;
	margin: 0;
	background: none;
	border: 0;
	line-height: 1.6;
}

#contents .ats-crumb li::before,
.ats-crumb li::before {
	content: none;
}

#contents .ats-crumb li + li::before,
.ats-crumb li + li::before {
	content: "";
	position: static;
	display: block;
	width: 5px;
	height: 5px;
	margin: 0 10px 0 8px;
	border-top: 1.2px solid var(--ats-accent);
	border-right: 1.2px solid var(--ats-accent);
	border-radius: 0;
	background: none;
	transform: rotate(45deg);
	flex: none;
}

#contents .ats-crumb a,
.ats-crumb a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: var(--ats-accent-deep);
	text-decoration: none;
	position: static;
	max-width: none;
}

#contents .ats-crumb a:hover,
#contents .ats-crumb a:focus-visible,
.ats-crumb a:hover,
.ats-crumb a:focus-visible {
	color: var(--ats-accent-deep);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ats-crumb a svg {
	width: 13px;
	height: 13px;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.4;
}

#contents .ats-crumb li[aria-current],
.ats-crumb li[aria-current] {
	flex: 1 1 auto;
	min-width: 0;
}

.ats-crumb li[aria-current] span {
	overflow: hidden;
	text-overflow: ellipsis;
}

/* 記事ページ：今の「← ブログ一覧へ」と同じ位置に置く */
.ats-crumb--single {
	padding-top: 100px;
}

#contents article header .ats-crumb--single + h1 {
	margin-top: 20px;
}

/* 一覧ページ：見出しの上に置く */
.archive .ats-crumb--archive {
	margin-bottom: 0;
}

.archive .ats-crumb--archive + h1 {
	padding-top: 24px;
}

/* カテゴリ＋日付 */
.ats-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	margin: 14px 0 24px;
}

#contents article .ats-cat-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 3px 12px 3px 8px;
	border: 1px solid var(--ats-line);
	border-radius: 999px;
	background: var(--ats-card);
	font-size: 12.5px;
	line-height: 1.6;
	color: var(--ats-fg);
	text-decoration: none;
	position: static;
	transition: border-color .2s;
}

#contents article .ats-cat-chip:hover,
#contents article .ats-cat-chip:focus-visible {
	border-color: var(--ats-accent-deep);
	color: var(--ats-fg);
	text-decoration: none;
}

#contents article .ats-cat-chip img {
	width: 22px;
	height: 22px;
	object-fit: contain;
	display: block;
}

.ats-meta__date {
	font-family: var(--ats-label-font);
	font-size: 12.5px;
	letter-spacing: .06em;
	color: var(--ats-sub);
	font-variant-numeric: tabular-nums;
}

/* =======================================================================
   ブログ記事の本文
   ======================================================================= */
/* 文字の大きさは今のまま（base.css の指定）にし、字間だけ少し広げる */
#contents.ats-blog-article .contentMain {
	letter-spacing: .03em;
}

/* 段落 */
#contents.ats-blog-article .contentMain p {
	margin: 0 0 1.4em;
	line-height: 2;
}

/* 見出しまわりの余白 */
#contents.ats-blog-article .contentMain h2 {
	margin: 88px 0 28px;
	padding: 0 0 12px;
	line-height: 1.6;
	scroll-margin-top: 120px;
}

#contents.ats-blog-article .contentMain h3 {
	margin: 56px 0 20px;
	padding: 0 0 8px;
	background: none;
	border-bottom: 1px solid var(--ats-accent);
	line-height: 1.6;
}

#contents.ats-blog-article .contentMain h4 {
	margin: 36px 0 12px;
	padding-left: 12px;
	border-left: 3px solid var(--ats-accent);
	color: var(--ats-fg);
	line-height: 1.6;
}

#contents.ats-blog-article .contentMain h2 + h3,
#contents.ats-blog-article .contentMain h3 + h4,
#contents.ats-blog-article .contentMain > :first-child {
	margin-top: 0;
}

#contents.ats-blog-article .contentMain figure {
	margin: 0 0 1.6em;
}

/* リスト（箇条書き）：行頭の「●」を左に固定し、折り返した行も本文の位置でそろえる */
#contents.ats-blog-article .contentMain ul:not(.blocks-gallery-grid):not(.wp-block-gallery),
#contents.ats-blog-article .contentMain ol {
	margin: 0 0 1.8em;
	padding: 6px 24px;
	list-style: none;
	background: var(--ats-card);
	border: 1px solid var(--ats-line);
	border-radius: 6px;
	line-height: 1.9;
	counter-reset: ats-ol;
}

#contents.ats-blog-article .contentMain ul:not(.blocks-gallery-grid):not(.wp-block-gallery) > li,
#contents.ats-blog-article .contentMain ol > li {
	position: relative;
	margin: 0;
	padding: 14px 0 14px 1.4em;
	line-height: 1.9;
	background: none;
	border: 0;
}

#contents.ats-blog-article .contentMain ul:not(.blocks-gallery-grid):not(.wp-block-gallery) > li + li,
#contents.ats-blog-article .contentMain ol > li + li {
	border-top: 1px dashed var(--ats-line);
}

#contents.ats-blog-article .contentMain ul:not(.blocks-gallery-grid):not(.wp-block-gallery) > li::before {
	content: "";
	position: absolute;
	left: .1em;
	top: calc(14px + .95em - 4px);
	display: block;
	width: 8px;
	height: 8px;
	margin: 0;
	border-radius: 50%;
	background: var(--ats-accent);
	transform: none;
}

/* 番号付きリスト */
#contents.ats-blog-article .contentMain ol > li {
	counter-increment: ats-ol;
	padding-left: 2.1em;
}

#contents.ats-blog-article .contentMain ol > li::before {
	content: counter(ats-ol);
	position: absolute;
	left: 0;
	top: calc(14px + .15em);
	display: block;
	width: 1.6em;
	height: 1.6em;
	margin: 0;
	border-radius: 50%;
	background: var(--ats-accent);
	color: #fff;
	font-family: var(--ats-label-font);
	font-size: 12.5px;
	font-weight: 500;
	line-height: 1.6em;
	text-align: center;
	transform: none;
}

/* リストの中のリスト：枠は付けず、少し小さい印で */
#contents.ats-blog-article .contentMain li ul:not(.blocks-gallery-grid):not(.wp-block-gallery),
#contents.ats-blog-article .contentMain li ol {
	margin: 8px 0 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
}

#contents.ats-blog-article .contentMain li ul:not(.blocks-gallery-grid):not(.wp-block-gallery) > li,
#contents.ats-blog-article .contentMain li ol > li {
	padding-top: 6px;
	padding-bottom: 6px;
}

#contents.ats-blog-article .contentMain li li + li {
	border-top: 0;
}

#contents.ats-blog-article .contentMain li ul:not(.blocks-gallery-grid):not(.wp-block-gallery) > li::before {
	top: calc(6px + .95em - 3px);
	width: 6px;
	height: 6px;
	background: #cfd8de;
}

#contents.ats-blog-article .contentMain li ol > li::before {
	top: calc(6px + .15em);
}

#contents.ats-blog-article .contentMain li p:last-child {
	margin-bottom: 0;
}

/* 本文のリンク：同じブルーグレーの系統で濃さを上げ、下線を付ける */
#contents.ats-blog-article .contentMain a:not(.wp-block-button__link):not(.wp-block-file__button):not(.ats-toc__link) {
	display: inline;
	position: static;
	color: var(--ats-accent-deep);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
	text-decoration-color: var(--ats-accent);
	overflow-wrap: anywhere;
	transition: color .2s, text-decoration-color .2s;
}

#contents.ats-blog-article .contentMain a:not(.wp-block-button__link):not(.wp-block-file__button):not(.ats-toc__link):hover,
#contents.ats-blog-article .contentMain a:not(.wp-block-button__link):not(.wp-block-file__button):not(.ats-toc__link):focus-visible {
	color: var(--ats-fg);
	text-decoration-color: var(--ats-fg);
}

/* 画像を囲むリンク・内部リンクのカードは今までの見た目のまま */
#contents.ats-blog-article .contentMain a:has(img),
#contents.ats-blog-article .contentMain .internal a {
	text-decoration: none;
}

#contents.ats-blog-article .contentMain .internal a {
	display: flex;
	color: inherit;
}

#contents.ats-blog-article .contentMain a:has(img) {
	display: inline-block;
}

/* 外部サイトへのリンクに「↗」 */
#contents.ats-blog-article .contentMain a[href^="http"]:not([href*="atsdesign.jp"]):not(:has(img)):not(.wp-block-button__link):not(.wp-block-file__button):not(.ats-toc__link)::after {
	content: "";
	display: inline-block;
	width: 11px;
	height: 11px;
	margin-left: 3px;
	vertical-align: -1px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='1.4'%3E%3Cpath d='M7 1h4v4M11 1 5.5 6.5M9 7.5V11H1V3h3.5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='1.4'%3E%3Cpath d='M7 1h4v4M11 1 5.5 6.5M9 7.5V11H1V3h3.5'/%3E%3C/svg%3E") center / contain no-repeat;
	position: static;
	transform: none;
}

/* 本文のボタン（ブロックエディタの「ボタン」）
   top.css の「#contents article a { max-width: calc(100% - 20px) }」で、ボタンが文字より20px狭くなって2行に折り返し、
   本文の広い行間（約35px）もそのまま入って縦に大きく崩れていたのを直す。色・角丸は今のまま */
#contents article .wp-block-button a.wp-block-button__link {
	max-width: 100%;
	line-height: 1.6;
}

/* 表：見出しの行と項目名を区別し、スマホでは表だけ横にスクロール */
#contents.ats-blog-article .contentMain .wp-block-table,
#contents.ats-blog-article .contentMain > table {
	display: block;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 0 0 1.8em;
	border: 1px solid var(--ats-line);
	border-radius: 6px;
	background: var(--ats-card);
}

#contents.ats-blog-article .contentMain table {
	width: 100%;
	min-width: 560px;
	border-collapse: collapse;
	border: 0;
	font-size: 13.5px;
	line-height: 1.7;
	letter-spacing: .02em;
}

#contents.ats-blog-article .contentMain table tbody,
#contents.ats-blog-article .contentMain table tr {
	border: 0;
	padding: 0;
}

#contents.ats-blog-article .contentMain table th,
#contents.ats-blog-article .contentMain table td {
	padding: 12px 16px;
	text-align: left;
	vertical-align: top;
	border: 0;
	border-bottom: 1px solid var(--ats-line);
	word-break: normal;
}

/* 見出しの行（thead がある表は thead、ない表は1行目） */
#contents.ats-blog-article .contentMain table thead th,
#contents.ats-blog-article .contentMain table thead td,
#contents.ats-blog-article .contentMain table:not(:has(thead)) tbody tr:first-child > * {
	background: var(--ats-accent-tint);
	color: var(--ats-accent-deep);
	font-size: 12.5px;
	font-weight: 700;
	white-space: nowrap;
	border-bottom: 2px solid var(--ats-accent);
}

/* 左端の項目名 */
#contents.ats-blog-article .contentMain table tbody th,
#contents.ats-blog-article .contentMain table tbody td:first-child {
	font-weight: 700;
}

#contents.ats-blog-article .contentMain table tbody tr:last-child > * {
	border-bottom: 0;
}

#contents.ats-blog-article .contentMain table:has(thead) tbody tr:nth-child(even) > *,
#contents.ats-blog-article .contentMain table:not(:has(thead)) tbody tr:nth-child(odd):not(:first-child) > * {
	background: #fafbfc;
}

#contents.ats-blog-article .contentMain .wp-block-table figcaption {
	margin: 0;
	padding: 8px 16px;
	text-align: left;
	font-size: 12px;
	color: var(--ats-sub);
	border-top: 1px solid var(--ats-line);
}

/* 目次 */
#contents.ats-blog-article .ats-toc {
	margin: 0 0 2.4em;
	background: var(--ats-card);
	border: 1px solid var(--ats-line);
	border-radius: 6px;
}

#contents.ats-blog-article .ats-toc summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 20px;
	font-weight: 700;
	font-size: 15px;
}

#contents.ats-blog-article .ats-toc summary::-webkit-details-marker {
	display: none;
}

.ats-toc__title .ats-en {
	margin-left: 10px;
}

.ats-toc__toggle {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 400;
	color: var(--ats-accent-deep);
}

.ats-toc__toggle::after {
	content: "";
	width: 7px;
	height: 7px;
	border-right: 1.4px solid currentColor;
	border-bottom: 1.4px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform .2s;
}

.ats-toc[open] .ats-toc__toggle::after {
	transform: translateY(2px) rotate(-135deg);
}

#contents.ats-blog-article .ats-toc summary:focus-visible {
	outline: 2px solid var(--ats-accent-deep);
	outline-offset: -2px;
	border-radius: 6px;
}

#contents.ats-blog-article .contentMain .ats-toc ol {
	margin: 0;
	padding: 4px 20px 12px;
	border: 0;
	border-top: 1px solid var(--ats-line);
	border-radius: 0 0 6px 6px;
	background: none;
}

#contents.ats-blog-article .contentMain .ats-toc ol > li {
	padding: 0;
	counter-increment: none;
}

#contents.ats-blog-article .contentMain .ats-toc ol > li::before {
	content: none;
}

#contents.ats-blog-article .contentMain .ats-toc ol > li a {
	position: relative;
	display: block;
	padding: 8px 0 8px 1.2em;
	font-size: 14px;
	line-height: 1.7;
	color: var(--ats-fg);
	text-decoration: none;
}

#contents.ats-blog-article .contentMain .ats-toc ol > li a::before {
	content: "";
	position: absolute;
	left: 1px;
	top: calc(8px + .85em - 3px);
	width: 5px;
	height: 5px;
	border-top: 1.4px solid var(--ats-accent-deep);
	border-right: 1.4px solid var(--ats-accent-deep);
	transform: rotate(45deg);
}

#contents.ats-blog-article .contentMain .ats-toc ol > li a:hover,
#contents.ats-blog-article .contentMain .ats-toc ol > li a:focus-visible {
	color: var(--ats-accent-deep);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: var(--ats-accent);
}

html:has(.ats-toc) {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html:has(.ats-toc) {
		scroll-behavior: auto;
	}
}

/* =======================================================================
   記事の下（シェア・前後の記事・ライター）
   ======================================================================= */
.ats-article-foot {
	display: grid;
	gap: 36px;
	margin-top: 64px;
}

/* シェアボタン（ブログ記事・サービス詳細ページ共通） */
.ats-share {
	display: grid;
	justify-items: center;
	gap: 14px;
	/* 下は 8px + 20px。margin だとサービス詳細ページで下の関連記事の余白と重なって効かないため padding で足す */
	padding-block: 8px 28px;
	margin-top: 48px;
}

.ats-article-foot .ats-share {
	margin-top: 0;
}

#contents article .ats-share__label {
	display: flex;
	align-items: center;
	gap: 12px;
	width: auto;
	margin: 0;
	font-family: var(--ats-label-font);
	font-size: 12px;
	line-height: 1.5;
	letter-spacing: .24em;
	color: var(--ats-sub);
}

.ats-share__label::before,
.ats-share__label::after,
.ats-cta__label::before,
.ats-cta__label::after {
	content: "";
	width: 28px;
	height: 1px;
	background: var(--ats-accent);
}

.ats-share__row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}

#contents .ats-share .ats-sbtn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 44px;
	padding: 0 18px;
	position: static;
	max-width: none;
	border: 1px solid var(--ats-fg);
	border-radius: 999px;
	background: var(--ats-card);
	color: var(--ats-fg);
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: .04em;
	text-decoration: none;
	cursor: pointer;
	transition: background .2s, color .2s, border-color .2s;
}

#contents .ats-share .ats-sbtn svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
	flex: none;
}

#contents .ats-share .ats-sbtn:hover,
#contents .ats-share .ats-sbtn:focus-visible {
	background: var(--ats-fg);
	color: #fff;
	text-decoration: none;
	outline: none;
}

#contents .ats-share .ats-sbtn.is-copied {
	background: var(--ats-accent-deep);
	border-color: var(--ats-accent-deep);
	color: #fff;
}

/* 前後の記事 */
.ats-pager {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

#contents .ats-pager .ats-pcard {
	display: grid;
	gap: 8px;
	align-content: start;
	min-width: 0;
	max-width: none;
	position: static;
	padding: 18px 20px 20px;
	background: var(--ats-card);
	border: 1px solid var(--ats-line);
	border-radius: 6px;
	color: var(--ats-fg);
	text-decoration: none;
	transition: border-color .2s;
}

#contents .ats-pager .ats-pcard:hover,
#contents .ats-pager .ats-pcard:focus-visible {
	border-color: var(--ats-accent-deep);
	color: var(--ats-fg);
	text-decoration: none;
	outline: none;
}

.ats-pcard__dir {
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: var(--ats-label-font);
	font-size: 12px;
	letter-spacing: .18em;
	color: var(--ats-accent-deep);
}

.ats-pcard__dir svg {
	width: 16px;
	height: 10px;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.4;
	transition: transform .2s;
}

.ats-pcard__ttl {
	font-size: 14.5px;
	line-height: 1.75;
	color: var(--ats-fg);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

#contents .ats-pager .ats-pcard--prev {
	grid-column: 1;
}

#contents .ats-pager .ats-pcard--next {
	grid-column: 2;
	text-align: right;
}

.ats-pcard--next .ats-pcard__dir {
	justify-content: flex-end;
}

.ats-pcard--prev:hover .ats-pcard__dir svg {
	transform: translateX(-3px);
}

.ats-pcard--next:hover .ats-pcard__dir svg {
	transform: translateX(3px);
}

#contents .ats-pager .ats-pager__back {
	grid-column: 1 / -1;
	justify-self: center;
	display: inline-block;
	position: static;
	margin-top: 6px;
	padding-bottom: 2px;
	font-size: 13px;
	color: var(--ats-sub);
	text-decoration: none;
	border-bottom: 1px solid var(--ats-accent);
}

#contents .ats-pager .ats-pager__back:hover,
#contents .ats-pager .ats-pager__back:focus-visible {
	color: var(--ats-fg);
	text-decoration: none;
	border-bottom-color: var(--ats-fg);
}

/* ライター */
.ats-writer {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 20px;
	background: var(--ats-card);
	border: 1px solid var(--ats-line);
	border-radius: 6px;
}

.ats-writer img {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	background: #e9eef1;
	flex: none;
}

.ats-writer .ats-en {
	display: block;
	color: var(--ats-accent-deep);
	line-height: 1.6;
}

.ats-writer b {
	font-size: 14.5px;
	font-weight: 500;
}

/* 関連記事 */
/* 関連記事の上の余白（今は25px。画面幅によっては既存の指定で0になる）を、本文と記事の下の部品の間と同じ64pxに */
#contents .related-post.ats-related {
	margin-top: 64px;
}

/* サービス詳細ページだけ：「関連記事」の見出しの下の余白（今は40px）を10pxに */
#contents.single-contents .related-post > h4 {
	margin-bottom: 10px;
}

#contents .ats-related h4 {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin: 0 0 14px;
	font-size: 15px;
	font-weight: 700;
}

#contents .ats-related ul {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
	height: auto;
	line-height: normal;
	list-style: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}

#contents .ats-related li {
	display: block;
	width: auto;
	padding: 0;
	line-height: normal;
}

#contents .ats-related li a {
	display: grid;
	gap: 8px;
	color: var(--ats-fg);
	text-decoration: none;
}

#contents .ats-related li img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 4px;
	display: block;
}

#contents .ats-related .text {
	font-size: 13px;
	line-height: 1.7;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

#contents .ats-related li a:hover .text,
#contents .ats-related li a:focus-visible .text {
	color: var(--ats-accent-deep);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: var(--ats-accent);
}

#contents .ats-related time {
	font-family: var(--ats-label-font);
	font-size: 11.5px;
	letter-spacing: .06em;
	color: var(--ats-sub);
}

/* =======================================================================
   サービス詳細ページのお問い合わせ
   ======================================================================= */
.ats-cta {
	display: grid;
	justify-items: center;
	gap: 10px;
	margin-top: 56px;
	padding: 28px 24px;
	background: var(--ats-card);
	border: 1px solid var(--ats-line);
	border-radius: 6px;
	text-align: center;
}

#contents article .ats-cta p {
	width: auto;
	margin: 0;
}

#contents article .ats-cta__label {
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: var(--ats-label-font);
	font-size: 12px;
	line-height: 1.5;
	letter-spacing: .24em;
	color: var(--ats-sub);
}

#contents article .ats-cta__lead {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.7;
	text-wrap: balance;
}

#contents article .ats-cta .ats-cta__sub {
	margin-bottom: 8px;
	font-size: 13px;
	line-height: 1.8;
	color: var(--ats-sub);
}

#contents article .ats-cta__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	width: 100%;
	max-width: 420px;
	min-height: 58px;
	padding: 0 24px;
	position: static;
	border: 1px solid #d8e2e7;
	border-radius: 999px;
	background: #d8e2e7;
	color: var(--ats-fg);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .04em;
	text-decoration: none;
	transition: background .2s, color .2s, border-color .2s;
}

#contents article .ats-cta__btn .ats-go {
	width: 26px;
	height: 26px;
	border: 0;
	background: #fff;
}

#contents article .ats-cta__btn .ats-go svg {
	width: 11px;
	height: 9px;
	stroke-width: 1.5;
}

#contents article .ats-cta__btn:hover,
#contents article .ats-cta__btn:focus-visible {
	background: var(--ats-accent-deep);
	border-color: var(--ats-accent-deep);
	color: #fff;
	text-decoration: none;
	outline: none;
}

#contents article .ats-cta__btn:hover .ats-go,
#contents article .ats-cta__btn:focus-visible .ats-go {
	transform: translateX(3px);
}

/* =======================================================================
   サイドバー（ブログ・サービス詳細ページ共通）
   ======================================================================= */
#sidebar {
	container-type: inline-size;
}

#sidebar .ats-sb {
	display: grid;
	gap: 36px;
	padding: 100px 48px 48px 32px;
	color: var(--ats-fg);
}

#sidebar .ats-sb-block {
	min-width: 0;
}

#sidebar .ats-sb-head {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin: 0 0 12px;
	padding: 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.5;
}

#sidebar .ats-sb-head::before {
	content: none;
}

#sidebar .ats-sb ul,
#sidebar .ats-sb ol {
	list-style: none;
	margin: 0;
	padding: 0;
}

#sidebar .ats-sb a {
	color: inherit;
	text-decoration: none;
}

/* サービスの一覧 */
#sidebar .ats-svc__group {
	break-inside: avoid;
	margin: 0 0 14px;
	background: var(--ats-card);
	border: 1px solid var(--ats-line);
	border-radius: 6px;
	overflow: hidden;
}

#sidebar .ats-svc__group:last-child {
	margin-bottom: 0;
}

#sidebar .ats-svc__parent {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 13px 16px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.6;
	letter-spacing: .03em;
	transition: background .2s;
}

#sidebar .ats-svc__group:has(ul) .ats-svc__parent {
	background: var(--ats-head-bg);
	border-bottom: 1px solid var(--ats-line);
}

#sidebar .ats-svc__parent:hover,
#sidebar .ats-svc__parent:focus-visible {
	background: var(--ats-head-bg-hover);
	outline: none;
}

#sidebar .ats-svc__parent:hover .ats-go,
#sidebar .ats-svc__parent:focus-visible .ats-go,
#sidebar .ats-svc__parent.is-current .ats-go {
	background: var(--ats-accent-deep);
	border-color: var(--ats-accent-deep);
	color: #fff;
}

#sidebar .ats-svc__group ul {
	padding: 4px 16px 6px;
}

#sidebar .ats-svc__group li + li {
	border-top: 1px dashed var(--ats-line);
}

#sidebar .ats-svc__group li a {
	position: relative;
	display: block;
	padding: 9px 0 9px 1.2em;
	font-size: 13.5px;
	line-height: 1.65;
	letter-spacing: .02em;
	transition: color .2s;
}

#sidebar .ats-svc__group li a::before {
	content: "";
	position: absolute;
	left: 1px;
	top: calc(9px + .82em - 3px);
	width: 5px;
	height: 5px;
	border-top: 1.4px solid var(--ats-accent-deep);
	border-right: 1.4px solid var(--ats-accent-deep);
	transform: rotate(45deg);
}

#sidebar .ats-svc__group li a:hover,
#sidebar .ats-svc__group li a:focus-visible {
	color: var(--ats-accent-deep);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: var(--ats-accent);
	outline: none;
}

/* サービス詳細ページ：今見ているページに色を付ける */
#sidebar .ats-svc__group li a.is-current {
	margin: 0 -16px;
	padding-left: calc(16px + 1.2em);
	padding-right: 16px;
	background: var(--ats-accent-tint);
	color: var(--ats-accent-deep);
	font-weight: 700;
	box-shadow: inset 3px 0 0 var(--ats-accent-deep);
}

#sidebar .ats-svc__group li a.is-current::before {
	left: 17px;
}

/* 記事のリスト（最近の投稿・人気の記事） */
#sidebar .ats-sb-card {
	background: var(--ats-card);
	border: 1px solid var(--ats-line);
	border-radius: 6px;
	overflow: hidden;
}

/* 「#sidebar .ats-sb ul / ol」（余白0）より強くして、左右の余白を効かせる */
#sidebar .ats-sb .ats-sb-posts {
	padding: 4px 16px;
}

#sidebar .ats-sb-posts li + li {
	border-top: 1px dashed var(--ats-line);
}

#sidebar .ats-sb-posts a {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px 0;
}

#sidebar .ats-sb-thumb {
	flex: none;
	width: 72px;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 4px;
	display: block;
	background: #eef1f3;
}

#sidebar .ats-sb-meta {
	display: grid;
	gap: 3px;
	min-width: 0;
}

#sidebar .ats-sb-meta time,
#sidebar .ats-sb-views {
	font-family: var(--ats-label-font);
	font-size: 11.5px;
	line-height: 1.5;
	letter-spacing: .06em;
	color: var(--ats-sub);
	font-variant-numeric: tabular-nums;
}

#sidebar .ats-sb-title {
	font-size: 13px;
	line-height: 1.65;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color .2s;
}

#sidebar .ats-sb-posts a:hover .ats-sb-title,
#sidebar .ats-sb-posts a:focus-visible .ats-sb-title {
	color: var(--ats-accent-deep);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: var(--ats-accent);
}

#sidebar .ats-sb-posts a:focus-visible {
	outline: 2px solid var(--ats-accent-deep);
	outline-offset: 2px;
}

#sidebar .ats-sb-rank__num {
	flex: none;
	width: 22px;
	height: 22px;
	margin-top: 2px;
	border-radius: 50%;
	background: var(--ats-accent-tint);
	color: var(--ats-accent-deep);
	font-family: var(--ats-label-font);
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	display: grid;
	place-items: center;
}

#sidebar .ats-sb-rank li:nth-child(-n+3) .ats-sb-rank__num {
	background: var(--ats-accent-deep);
	color: #fff;
}

#sidebar .ats-sb-more {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	padding: 12px 16px;
	border-top: 1px solid var(--ats-line);
	background: var(--ats-head-bg);
	font-size: 12.5px;
	color: var(--ats-accent-deep);
}

#sidebar .ats-sb-more .ats-go {
	width: 20px;
	height: 20px;
}

#sidebar .ats-sb-more:hover,
#sidebar .ats-sb-more:focus-visible {
	background: var(--ats-head-bg-hover);
	outline: none;
}

/* カテゴリ */
#sidebar .ats-sb-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

#sidebar .ats-sb-chips a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 8px 7px 14px;
	background: var(--ats-card);
	border: 1px solid var(--ats-line);
	border-radius: 999px;
	font-size: 13px;
	line-height: 1.4;
	transition: border-color .2s, color .2s;
}

#sidebar .ats-sb-count {
	min-width: 24px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--ats-accent-tint);
	color: var(--ats-accent-deep);
	font-family: var(--ats-label-font);
	font-size: 11.5px;
	display: grid;
	place-items: center;
	font-variant-numeric: tabular-nums;
}

#sidebar .ats-sb-chips a:hover,
#sidebar .ats-sb-chips a:focus-visible,
#sidebar .ats-sb-chips a.is-current {
	border-color: var(--ats-accent-deep);
	color: var(--ats-accent-deep);
	outline: none;
}

/* 横幅が広いとき（サイドバーが記事の下に回ったとき）：2列に並べる */
@container (min-width: 560px) {
	#sidebar .ats-sb {
		grid-template-columns: 1fr 1fr;
		column-gap: 20px;
	}

	#sidebar .ats-sb-block--wide {
		grid-column: 1 / -1;
	}

	#sidebar .ats-svc {
		columns: 2 250px;
		column-gap: 14px;
	}
}

/* =======================================================================
   画面幅ごとの調整
   ======================================================================= */
@media screen and (max-width: 1440px) {
	#sidebar .ats-sb {
		padding: 100px 40px 48px 0;
	}
}

/* 1024px 以下：サイドバーが記事の下に回る（ブレイクポイントは今と同じ） */
@media screen and (max-width: 1024px) {
	/* 上は0（上の関連記事・ページ送りとの間を詰める）、下は48px */
	#sidebar .ats-sb {
		padding: 0 0 48px;
	}
}

@media screen and (max-width: 850px) {
	#contents .ats-related ul {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media screen and (max-width: 640px) {
	#contents .related-post.ats-related {
		margin-top: 48px;
	}

	/* パンくずの上の余白：ヘッダーの下から約24px（ブログ一覧とそろえる） */
	.ats-crumb--single {
		padding-top: 40px;
	}

	/* サービス詳細ページは外側の枠がさらに75px下から始まるため、本文の枠の上の余白（50px）をなくして詰める */
	#contents.single-contents {
		padding-top: 0;
	}

	#contents.single-contents .ats-crumb--single {
		padding-top: 16px;
	}

	/* 記事・サービス詳細ページ：スマホではパンくずの今のページ名を出さない（すぐ下に見出しで出ているため）。
	   その1つ前（カテゴリ・親ページ）が長いときは「…」で省略する */
	#contents .ats-crumb.ats-crumb--single li[aria-current] {
		display: none;
	}

	#contents .ats-crumb.ats-crumb--single li:nth-last-child(2) {
		flex: 0 1 auto;
		min-width: 0;
	}

	#contents .ats-crumb.ats-crumb--single li:nth-last-child(2) a {
		display: block;
		min-width: 0;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	#contents.ats-blog-article .contentMain h2 {
		margin-top: 64px;
	}

	#contents.ats-blog-article .contentMain h3 {
		margin-top: 44px;
	}

	#contents.ats-blog-article .contentMain ul:not(.blocks-gallery-grid):not(.wp-block-gallery),
	#contents.ats-blog-article .contentMain ol {
		padding: 4px 16px;
	}

	#contents.ats-blog-article .contentMain li ul:not(.blocks-gallery-grid):not(.wp-block-gallery),
	#contents.ats-blog-article .contentMain li ol {
		padding: 0;
	}

	.ats-share__row {
		display: grid;
		grid-template-columns: 1fr 1fr;
		width: 100%;
	}

	#contents .ats-share .ats-sbtn {
		justify-content: center;
		padding: 0 10px;
	}

	.ats-pager {
		grid-template-columns: 1fr;
	}

	#contents .ats-pager .ats-pcard--next {
		grid-column: 1;
	}

	.ats-cta {
		padding: 24px 16px;
	}

	#contents article .ats-cta__btn {
		font-size: 14px;
	}
}

/* top.css の 400px 以下の指定（!important）で行頭がずれないようにする */
@media screen and (max-width: 400px) {
	#contents.ats-blog-article .contentMain ul:not(.blocks-gallery-grid):not(.wp-block-gallery) {
		padding: 4px 16px !important;
	}

	#contents.ats-blog-article .contentMain ul:not(.blocks-gallery-grid):not(.wp-block-gallery) > li {
		padding: 14px 0 14px 1.4em !important;
	}

	#contents.ats-blog-article .contentMain li ul:not(.blocks-gallery-grid):not(.wp-block-gallery) {
		margin: 8px 0 0 !important;
		padding: 0 !important;
	}

	#contents.ats-blog-article .contentMain li ul:not(.blocks-gallery-grid):not(.wp-block-gallery) > li {
		padding: 6px 0 6px 1.4em !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ats-go,
	.ats-pcard__dir svg,
	#contents .ats-share .ats-sbtn,
	#contents .ats-pager .ats-pcard,
	#contents article .ats-cta__btn {
		transition: none;
	}
}

/* =======================================================================
   ブログ一覧（記事一覧・カテゴリ一覧）のカードの並び
   1441px以上は3列、641〜1440pxは2列、640px以下は1列。
   カードの間は上下56px（スマホ40px）・左右32px。カードの中のデザインは今のまま。
   ======================================================================= */
section#topcontents.blog-layout .ats-blog-list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 32px;
	row-gap: 56px;
	/* 同じ段のカードは高さをそろえる（灰色の背景の下端がそろう） */
	align-items: stretch;
}

/* clearfix の疑似要素が1枠分のマスにならないようにする */
section#topcontents.blog-layout .ats-blog-list::before,
section#topcontents.blog-layout .ats-blog-list::after {
	content: none;
}

/* 今の幅・右の余白・下の余白・高さの指定を打ち消して、すべて同じ幅にそろえる */
section#topcontents.blog-layout .ats-blog-list > div.PFList {
	width: auto;
	height: auto;
	margin: 0;
	float: none;
}

@media screen and (max-width: 1440px) {
	section#topcontents.blog-layout .ats-blog-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media screen and (max-width: 640px) {
	section#topcontents.blog-layout .ats-blog-list {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 40px;
	}
}

/* =======================================================================
   スマホ・小さいタブレット（850px以下）：関連記事とサイドバーの左右を本文（30px）にそろえる。
   ブログ記事・サービス詳細・ブログ一覧・カテゴリ一覧ページ共通
   ======================================================================= */
@media screen and (max-width: 850px) {
	#contents aside.related-post {
		margin-left: 30px;
		margin-right: 30px;
	}

	/* 記事・サービス詳細・ブログ一覧・カテゴリ一覧ページ共通 */
	#centerMain aside#sidebar.blog-layout {
		padding-left: 30px;
		padding-right: 30px;
	}
}

/* ブログ一覧・カテゴリ一覧：最後のカードとページ送りの間（今は0px）を、カードの段の間と同じにする */
section#topcontents.blog-layout .ats-blog-list ~ .pagenation {
	margin-top: 56px;
}

@media screen and (max-width: 640px) {
	section#topcontents.blog-layout .ats-blog-list ~ .pagenation {
		margin-top: 40px;
	}
}

/* =======================================================================
   ブログ一覧（記事一覧・カテゴリ一覧）の記事カードをコンパクトにする
   白いカードに細い枠線。画像は16:9、その下にカテゴリと日付、タイトル（2行まで）、抜粋（2行まで・背景なし）。
   ======================================================================= */
section#topcontents.blog-layout .ats-blog-list > div.PFList {
	display: flex;
	flex-direction: column;
	background: var(--ats-card);
	border: 1px solid var(--ats-line);
	border-radius: 6px;
	overflow: hidden;
	transition: border-color .2s;
}

section#topcontents.blog-layout .ats-blog-list > div.PFList:hover,
section#topcontents.blog-layout .ats-blog-list > div.PFList:focus-within {
	border-color: var(--ats-accent-deep);
	/* top.css の div.PFList:hover（opacity: 0.7）でカード全体が薄くなるのを打ち消す */
	opacity: 1;
}

/* 画像：16:9 で切り抜く */
section#topcontents.blog-layout .ats-blog-list > div.PFList .topThum {
	position: relative;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

section#topcontents.blog-layout .ats-blog-list > div.PFList .topThum::before {
	content: none;
}

section#topcontents.blog-layout .ats-blog-list > div.PFList .topThum a {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
}

section#topcontents.blog-layout .ats-blog-list > div.PFList .topThum img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* カテゴリのアイコン・名前と日付 */
section#topcontents.blog-layout .ats-blog-list > div.PFList .postCategory {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
	margin: 0;
	padding: 16px 18px 0;
	font-size: 12px;
	line-height: 1.5;
	color: var(--ats-sub);
}

section#topcontents.blog-layout .ats-blog-list > div.PFList .blogCateIcon {
	width: 18px;
	height: 18px;
	margin: 0 -6px 0 0;
	object-fit: contain;
}

section#topcontents.blog-layout .ats-blog-list > div.PFList .blogCateName {
	font-size: 12px;
	letter-spacing: .02em;
}

section#topcontents.blog-layout .ats-blog-list > div.PFList .blogPostDate {
	position: static;
	display: inline;
	height: auto;
	padding: 0;
	font-family: var(--ats-label-font);
	font-size: 12px;
	line-height: 1.5;
	letter-spacing: .06em;
	color: var(--ats-sub);
	font-variant-numeric: tabular-nums;
}

/* タイトル：黒い帯をやめて、2行まで表示 */
section#topcontents.blog-layout .ats-blog-list > div.PFList > h3 {
	position: static;
	margin: 8px 0 0;
	padding: 0 18px;
	background: none;
	color: var(--ats-fg);
}

section#topcontents.blog-layout .ats-blog-list > div.PFList a.PFTitle {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	height: auto;
	padding: 0;
	background: none;
	color: var(--ats-fg);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.6;
	letter-spacing: .03em;
	text-decoration: none;
	transition: color .2s;
}

section#topcontents.blog-layout .ats-blog-list > div.PFList a.PFTitle::before {
	content: none;
}

section#topcontents.blog-layout .ats-blog-list > div.PFList:hover a.PFTitle,
section#topcontents.blog-layout .ats-blog-list > div.PFList a.PFTitle:focus-visible {
	color: var(--ats-accent-deep);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: var(--ats-accent);
}

/* 抜粋：背景なし・小さめの灰色の文字で2行まで */
section#topcontents.blog-layout .ats-blog-list > div.PFList .postContent {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	height: auto;
	margin: 8px 18px 18px;
	padding: 0;
	background: none;
	font-size: 13px;
	line-height: 1.8;
	letter-spacing: .02em;
	color: var(--ats-sub);
}

section#topcontents.blog-layout .ats-blog-list > div.PFList .postContent * {
	margin: 0;
	padding: 0;
	font-size: inherit;
	line-height: inherit;
	color: inherit;
	background: none;
}

@media (prefers-reduced-motion: reduce) {
	section#topcontents.blog-layout .ats-blog-list > div.PFList,
	section#topcontents.blog-layout .ats-blog-list > div.PFList a.PFTitle {
		transition: none;
	}
}
