/**
 * 記事詳細・著者ページ向けスタイル
 */

/* 更新日表示（一覧以外の single では updated を見せる） */
.single-post .posted-on--modified .updated,
.single-post .posted-on--modified .updated:not(.published) {
	display: inline !important;
}

/* 上部著者（本文内・アイキャッチ直後） */
.entry-content > .article-author-inline {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 10px;
	margin: 20px 0 4px;
	padding: 8px 0;
	border-bottom: 1px solid #eee;
}

.article-author-inline__photo {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.article-author-inline__text {
	margin: 0;
	font-size: 13px;
	color: #666;
	line-height: 1.5;
}

.article-author-inline__text a {
	color: #333;
	font-weight: 700;
	text-decoration: none;
}

.article-author-inline__text a:hover {
	color: #f08300;
}

.article-author-inline__title {
	font-weight: 400;
	color: #666;
}

/* 本文の読みやすさ */
.single-post .entry-content {
	line-height: 2;
}

.single-post .entry-content > p {
	margin-bottom: 1.25em;
	line-height: 2;
}

.single-post .entry-content ul {
	list-style: none;
	margin: 0 0 1.25em;
	padding: 0;
}

.single-post .entry-content ul > li {
	position: relative;
	padding-left: 1.1em;
	margin-bottom: 0.4em;
	line-height: 2;
}

.single-post .entry-content ul > li::before {
	content: "・";
	position: absolute;
	left: 0;
	color: #333;
}

.single-post .entry-content ol {
	list-style: decimal;
	margin: 0 0 1.25em;
	padding-left: 1.5em;
}

.single-post .entry-content ol > li {
	margin-bottom: 0.4em;
	line-height: 2;
}

.single-post .entry-content table,
.single-post .entry-content .wp-block-table,
.single-post .entry-content .table_entry {
	margin-bottom: 2em;
}

.single-post .entry-content h2 {
	font-size: 19px;
	color: #f08300;
	font-weight: 700;
	line-height: 1.5;
	margin: 2.4em 0 1em;
	background: #f2f2f2;
	border-left: 6px solid #f08300;
	padding: 14px 20px;
}

.single-post .entry-content h3 {
	margin-top: 2.2em;
	margin-bottom: 1em;
}

.single-post .entry-content h4 {
	margin-top: 1.8em;
	margin-bottom: 0.8em;
}

/* 目次（本文） */
.article-toc--main {
	margin: 2em 0 2.4em;
	border: none;
	background: #fdf3e7;
	overflow: hidden;
}

.article-toc__toggle {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 18px;
	border: 0;
	background: #fdf3e7;
	cursor: pointer;
	font-family: inherit;
}

.article-toc__title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #f08300;
}

.article-toc__toggle-label {
	font-size: 13px;
	color: #f08300;
}

.article-toc__body {
	padding: 0 22px 18px;
	font-size: 14.5px;
}

.article-toc--main.is-collapsed .article-toc__body {
	display: none;
}

.article-toc__list {
	margin: 0;
	padding-left: 1.4em;
	line-height: 2.1;
	color: #4a4a4a;
	list-style: decimal;
}

.article-toc__list a {
	color: #4a4a4a;
	text-decoration: none;
}

.article-toc__list a:hover,
.article-toc__item.is-active > a {
	color: #f08300;
}

.article-toc__sublist {
	list-style: none;
	margin: 0;
	padding-left: 1em;
	font-size: 13.5px;
	line-height: 2;
}

.article-toc__sublist a {
	color: #666;
}

/* サイドバー追従目次 */
.wrap .widget-area--article-toc {
	width: calc(100% - 850px);
}

.article-toc-sticky {
	position: sticky;
	top: 100px;
}

.article-toc--sidebar {
	border: 1px solid #eee;
	background: #fff;
}

.article-toc--sidebar .article-toc__title {
	background: #f08300;
	color: #fff;
	font-size: 14.5px;
	font-weight: 700;
	padding: 12px 18px;
}

.article-toc--sidebar .article-toc__list {
	list-style: none;
	margin: 0;
	padding: 10px 0;
	font-size: 13px;
	line-height: 1.6;
}

.article-toc--sidebar .article-toc__item {
	margin: 0;
	padding: 0;
}

.article-toc--sidebar .article-toc__item a {
	display: block;
	padding: 8px 16px;
	border-left: 3px solid transparent;
	color: #555;
	text-decoration: none;
}

.article-toc--sidebar .article-toc__item a:hover,
.article-toc--sidebar .article-toc__item.is-active a {
	color: #f08300;
	background: #fff7ef;
	border-left-color: #f08300;
}

/* 下部著者ボックス */
.article-author-box {
	margin: 3em 0 2em;
	padding: 28px 24px;
	border: 1px solid #f08300;
	background: #fff;
}

.article-author-box__inner {
	display: flex;
	gap: 24px;
	align-items: flex-start;
	flex-wrap: wrap;
}

.article-author-box__photo {
	width: 110px;
	height: 110px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.article-author-box__body {
	flex: 1;
	min-width: 260px;
}

.article-author-box__job {
	margin: 0;
	font-size: 12.5px;
	color: #888;
}

.article-author-box__name {
	margin: 2px 0 10px;
	font-size: 19px;
	font-weight: 700;
	color: #333;
}

.article-author-box__bio {
	margin: 0 0 8px;
	line-height: 1.9;
	font-size: 14px;
}

.article-author-box__bio strong {
	color: #f08300;
	font-weight: 700;
}

.article-author-box__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 6px;
	font-size: 13.5px;
	font-weight: 700;
	color: #f08300;
	text-decoration: none;
}

.article-author-box__link:hover {
	opacity: 0.85;
}

/* 関連記事 */
.article-related {
	margin: 3.5em 0 0;
}

.article-related__heading {
	margin: 0 0 1.2em;
	background: #f2f2f2;
	border-left: 6px solid #f08300;
	padding: 14px 20px;
	font-size: 19px;
	color: #f08300;
	font-weight: 700;
}

.article-related__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 22px;
}

.article-related__card {
	display: block;
	border: 1px solid #eee;
	border-radius: 4px;
	overflow: hidden;
	color: #4a4a4a;
	text-decoration: none;
	background: #fff;
	transition: opacity 0.2s ease;
}

.article-related__card:hover {
	opacity: 0.85;
}

.article-related__thumb {
	height: 120px;
	background: linear-gradient(135deg, #fdf3e7, #fde8cf);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.article-related__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.article-related__thumb--empty::after {
	content: "CELLNETS";
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: #f08300;
	opacity: 0.55;
}

.article-related__meta {
	padding: 14px 16px 16px;
}

.article-related__cat {
	display: inline-block;
	background: #f08300;
	color: #fff;
	font-size: 10.5px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 2px;
}

.article-related__title {
	margin: 8px 0 6px;
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1.6;
	color: #333;
}

.article-related__date {
	margin: 0;
	font-size: 11.5px;
	color: #999;
}

/* 著者詳細ページ */
.author-profile {
	max-width: 1140px;
	margin: 40px auto 80px;
	padding: 0 20px;
}

.author-profile__hero {
	display: flex;
	gap: 40px;
	align-items: flex-start;
	border: 1px solid #f08300;
	background: #fff;
	border-radius: 8px;
	padding: 40px;
	margin-bottom: 40px;
}

.author-profile__photo {
	width: 160px;
	height: 160px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.author-profile__job {
	margin: 0;
	font-size: 14px;
	color: #888;
}

.author-profile__name {
	margin: 4px 0 16px;
	font-size: 28px;
	font-weight: 700;
	color: #333;
}

.author-profile__tagline {
	margin: 0 0 16px;
	font-size: 14.5px;
	font-weight: 500;
	color: #f08300;
	line-height: 1.7;
}

.author-profile__bio {
	margin: 0;
	font-size: 14.5px;
	line-height: 1.9;
	color: #333;
}

.author-profile__social {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 24px;
}

.author-profile__social a {
	display: inline-flex;
	align-items: center;
	border: 1px solid #f08300;
	border-radius: 4px;
	padding: 8px 18px;
	font-size: 13px;
	font-weight: 500;
	color: #f08300;
	text-decoration: none;
}

.author-profile__social a:hover {
	background: #fff7ef;
}

.author-profile__section-title {
	margin: 0 0 1.2em;
	background: #f2f2f2;
	border-left: 6px solid #f08300;
	padding: 14px 20px;
	font-size: 19px;
	color: #f08300;
	font-weight: 700;
}

.author-profile__details {
	margin-bottom: 48px;
}

.author-profile__dl {
	margin: 0;
	border: 1px solid #eee;
}

.author-profile__dl-row {
	display: grid;
	grid-template-columns: 140px 1fr;
	border-bottom: 1px solid #eee;
}

.author-profile__dl-row:last-child {
	border-bottom: 0;
}

.author-profile__dl-row dt {
	padding: 16px 12px;
	background: #f7f7f7;
	font-weight: 700;
	border-right: 1px solid #eee;
}

.author-profile__dl-row dd {
	margin: 0;
	padding: 16px 18px;
	line-height: 1.8;
}

.author-profile__posts {
	margin-bottom: 40px;
}

.author-profile__grid {
	margin-bottom: 32px;
}

@media screen and (max-width: 1024px) {
	/* モック同様、狭い画面ではサイドバー目次を隠し本文目次のみ使う */
	.wrap .widget-area--article-toc {
		display: none;
	}

	.article-related__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (max-width: 767px) {
	.article-related__grid,
	.author-profile__grid {
		grid-template-columns: 1fr;
	}

	.author-profile__hero {
		flex-direction: column;
		align-items: center;
		text-align: center;
		padding: 28px 20px;
		gap: 20px;
	}

	.author-profile__social {
		justify-content: center;
	}

	.author-profile__dl-row {
		grid-template-columns: 1fr;
	}

	.author-profile__dl-row dt {
		border-right: 0;
		border-bottom: 1px solid #eee;
	}

	.article-author-box__inner {
		justify-content: center;
		text-align: center;
	}

	.article-author-box__link {
		justify-content: center;
	}
}
