/* News body styling shared by the custom daily page and SANGO weekly posts. */

.dm-ai-daily-content .toc,
body.dm-ai-weekly-post .toc { display: none !important; }

.dm-ai-daily-content .dm-news.dm-fx { opacity: 1 !important; transform: none !important; }

.dm-ai-daily-content h2 a[target="_blank"]::after,
body.dm-ai-weekly-post .dm-news h2 a[target="_blank"]::after { content: " 🔗"; }

.dm-ai-feature { max-width: 920px; margin: 34px 0 0; }
.dm-ai-feature img { display: block; width: 100%; height: auto; border: 1px solid #dde3e9; }

/* 日次詳細は見出しから本文までをメイン＋サブカラムにし、目次のテーマ名を折り返さない。 */
.dm-ai-daily-layout { padding-block: 64px 70px; }
.dm-ai-daily-main > .dm-ai-page-head { padding-block: 0; }
.dm-ai-daily-main > .dm-ai-daily-content { margin-top: 44px; padding-block: 0; border-top: 0; }
.dm-ai-daily-main .dm-sec__head { position: relative; z-index: 1; }
.dm-ai-daily-main .dm-reading { max-width: none; }
.dm-ai-daily-content .dm-toc a { grid-template-columns: 32px max-content minmax(0, 1fr); }
.dm-ai-daily-content .dm-toc__th { white-space: nowrap; }

/* AIニュース詳細だけの回遊カードと相談バナー。通常ブログのカテゴリーは表示しない。 */
.dm-ai-news-sidebar { gap: 30px; }
.dm-ai-next__list { display: grid; gap: 10px; }
.dm-ai-next__card {
	display: grid;
	gap: 8px;
	padding: 14px 15px 15px;
	border: 1px solid #d7e0e7;
	background: #fff;
	color: #0d141b;
	text-decoration: none;
	transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.dm-ai-next__card:hover,
.dm-ai-next__card:focus-visible {
	border-color: #0071c8;
	box-shadow: 4px 4px 0 rgba(0, 113, 200, .12);
	color: #0d141b;
	transform: translate(-1px, -1px);
}
.dm-ai-next__meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; color: #64717d; font-family: var(--dm-mono, monospace); font-size: 10.5px; line-height: 1.5; letter-spacing: .05em; }
.dm-ai-next__meta b { padding: 2px 7px; border: 1px solid #aebbc6; color: #0071c8; font-size: 10px; letter-spacing: .12em; }
.dm-ai-next__title { display: -webkit-box; overflow: hidden; font-size: 13.5px; font-weight: 700; line-height: 1.7; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }

.dm-ai-consult {
	padding: 24px 22px;
	border-top: 4px solid #0aa7eb;
	background: #0d1824;
	color: #fff;
}
.dm-ai-consult__eyebrow { display: block; margin: 0 0 12px; color: #7ed7ff; font-family: var(--dm-mono, monospace); font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.dm-ai-consult h2 { margin: 0; color: #fff; font-size: 19px; line-height: 1.55; }
.dm-ai-consult p { margin: 14px 0 18px; color: #d5dde5; font-size: 13px; line-height: 1.85; }
.dm-ai-consult__primary { display: flex; min-height: 44px; align-items: center; justify-content: center; padding: 10px 16px; background: #ffb66a; color: #3d250c; font-size: 13px; font-weight: 700; line-height: 1.5; text-decoration: none; }
.dm-ai-consult__primary:hover,
.dm-ai-consult__primary:focus-visible { background: #ffc689; color: #3d250c; }
.dm-ai-consult__link { display: block; margin-top: 12px; color: #fff; font-size: 12.5px; font-weight: 700; line-height: 1.6; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .45); text-underline-offset: 4px; }
.dm-ai-consult__link::after { content: " →"; color: #7ed7ff; }
.dm-ai-consult__link:hover,
.dm-ai-consult__link:focus-visible { color: #7ed7ff; }

.dm-ai-index-return { display: flex; justify-content: flex-end; margin: 44px 0 0; padding: 24px 0 0; border-top: 1px solid #dde3e9; }
.dm-ai-index-return .dm-btn { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 10px 20px; border: 1px solid #9caab6; background: #fff; color: #0d141b; font-size: 13px; font-weight: 700; line-height: 1.5; text-decoration: none; }
.dm-ai-index-return .dm-btn:hover,
.dm-ai-index-return .dm-btn:focus-visible { border-color: #0d141b; background: #0d141b; color: #fff; }

body.dm-ai-weekly-post {
	--dm-news-ink: #0d141b;
	--dm-news-ink-2: #46535f;
	--dm-news-line: #dde3e9;
	--dm-news-line-2: #c3ccd4;
	--dm-news-blue: #0071c8;
	--dm-news-blue-bg: #e8f5fe;
}

body.dm-ai-weekly-post .dm-summary {
	margin: 0 0 34px;
	padding: 24px 28px;
	border-left: 5px solid var(--dm-news-ink);
	background: #f4f6f8;
}
body.dm-ai-weekly-post .dm-summary h2 { margin-top: 0; }
body.dm-ai-weekly-post .dm-summary h3 { margin-top: 24px; font-size: 1.1em; }
body.dm-ai-weekly-post .dm-summary p { line-height: 1.95; }

body.dm-ai-weekly-post .dm-tocbox {
	margin: 0 0 34px;
	border: 1px solid var(--dm-news-line-2);
	background: #f4f6f8;
}
body.dm-ai-weekly-post .dm-tocbox__h { margin: 0; padding: 14px 18px; border-bottom: 1px solid var(--dm-news-line); font-weight: 700; }
body.dm-ai-weekly-post .dm-toc { margin: 0; padding: 8px 18px 14px; list-style: none; }
body.dm-ai-weekly-post .dm-toc li + li { border-top: 1px solid var(--dm-news-line); }
body.dm-ai-weekly-post .dm-toc a { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 10px 0; color: var(--dm-news-ink); text-decoration: none; }
body.dm-ai-weekly-post .dm-toc__n { color: var(--dm-news-blue); font-family: monospace; font-weight: 700; }

body.dm-ai-weekly-post .dm-news { padding: 38px 0; border-top: 1px solid var(--dm-news-line); scroll-margin-top: 80px; }
body.dm-ai-weekly-post .dm-tocbox + .dm-news { border-top: 2px solid var(--dm-news-ink); }
body.dm-ai-weekly-post .dm-news__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 0 0 14px; color: var(--dm-news-ink-2); font-family: monospace; font-size: 12px; }
body.dm-ai-weekly-post .dm-news__theme { padding: 2px 9px; border: 1px solid var(--dm-news-line-2); }
body.dm-ai-weekly-post .dm-news__n { color: var(--dm-news-blue); font-weight: 700; }
body.dm-ai-weekly-post .dm-news h2 { margin-top: 0; font-size: clamp(21px, 2.6vw, 28px); line-height: 1.55; }
body.dm-ai-weekly-post .dm-news h2 a { color: var(--dm-news-ink); text-decoration: none; border-bottom: 2px solid var(--dm-news-line-2); }
body.dm-ai-weekly-post .dm-news__fact { font-size: 16px; line-height: 2; }
body.dm-ai-weekly-post .dm-news__view { margin-top: 20px; padding: 18px 22px; border-left: 4px solid var(--dm-news-blue); background: var(--dm-news-blue-bg); }
body.dm-ai-weekly-post .dm-news__view h3 { margin: 0 0 8px; color: var(--dm-news-blue); font-size: 14px; }
body.dm-ai-weekly-post .dm-news__view p { line-height: 1.95; }
body.dm-ai-weekly-post .dm-news__links { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(0, 113, 200, .2); }

@media (max-width: 600px) {
	body.dm-ai-weekly-post .dm-summary { padding: 18px; }
	body.dm-ai-weekly-post .dm-news__view { padding: 16px 18px; }
	.dm-ai-feature { margin-top: 24px; }
	.dm-ai-daily-layout { padding-block: 54px; }
	.dm-ai-daily-content .dm-toc a {
		grid-template-columns: 28px minmax(0, 1fr);
		gap: 2px 10px;
	}
	.dm-ai-daily-content .dm-toc__n { grid-row: 1 / span 2; }
	.dm-ai-daily-content .dm-toc__th,
	.dm-ai-daily-content .dm-toc a > span:last-child { grid-column: 2; }
	.dm-ai-index-return .dm-btn { width: 100%; }
}
