/* ===========================================================
   Article styles for ムダシル。 (single.php body)
   =========================================================== */

/* ---------- Article hero ---------- */
.article-hero {
	padding: 20px 16px 0;
}
@media (min-width: 960px) {
	.article-hero { padding: 36px 36px 0; }
}
.article-hero__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 14px 0 12px;
}
.article-h1 {
	font-family: var(--font-heading);
	font-weight: 900;
	font-size: var(--fs-h1-m);
	line-height: var(--lh-heading);
	margin: 0 0 18px;
	color: var(--ink);
	letter-spacing: .005em;
	text-wrap: pretty;
}
@media (min-width: 640px) {
	.article-h1 { font-size: var(--fs-h1); }
}
.article-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	font-size: var(--fs-meta);
	color: var(--ink-mute);
	margin-bottom: 24px;
}
.article-meta__author {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--ink-soft);
	font-weight: 700;
}
.article-meta__author img { display: block; border-radius: 50%; }
.article-meta__sep { color: var(--ink-mute); }
.article-eye {
	border-radius: 18px;
	overflow: hidden;
	margin: 0;
	aspect-ratio: 16 / 9;
	background: var(--brand-soft);
}
.article-eye img,
.article-eye svg { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Article body container ---------- */
.article-body {
	padding: 20px 16px 32px;
	max-width: 100%;
	margin: 0 auto;
}
@media (min-width: 960px) {
	.article-body {
		padding: 32px 0 48px;
		max-width: 720px;
	}
}

.article-body p {
	font-family: var(--font-body);
	font-size: var(--fs-body-m);
	line-height: var(--lh-body);
	color: var(--ink);
	margin: 0 0 18px;
	text-wrap: pretty;
}
@media (min-width: 640px) {
	.article-body p { font-size: var(--fs-body); }
}

.article-body strong {
	font-weight: 700;
	background: linear-gradient(transparent 60%, var(--sun-soft) 60%);
	padding: 0 2px;
}

.article-body em { font-style: italic; }

/* Inline article links: brand orange + underline. Exclude .btn so the
   button-styled links (.btn / .btn-brand / .btn-ghost) keep their own colors
   and no underline. (Without :not(.btn), .article-body a beats .btn { color:#fff }
   on specificity and the [muda-cta] '登録する' label disappears on orange bg.) */
.article-body a:not(.btn) {
	color: var(--brand);
	text-decoration: underline;
	text-decoration-thickness: 1.5px;
	text-underline-offset: 2px;
}
.article-body a:not(.btn):hover { color: var(--brand-deep); }

/* ---------- Article h2 (marker underline) ---------- */
.article-body h2 {
	font-family: var(--font-heading);
	font-weight: 900;
	font-size: var(--fs-h2-m);
	line-height: var(--lh-heading);
	margin: 40px 0 16px;
	position: relative;
	display: inline-block;
	color: var(--ink);
}
@media (min-width: 640px) {
	.article-body h2 { font-size: var(--fs-h2); margin-top: 48px; }
}
.article-body h2::after {
	content: '';
	position: absolute;
	left: -4px; right: -4px; bottom: 2px;
	height: .45em;
	background: var(--sun);
	z-index: -1;
	border-radius: 4px;
	transform: rotate(-.5deg);
}

/* ---------- Article h3 (left bar) ---------- */
.article-body h3 {
	font-family: var(--font-heading);
	font-weight: 800;
	font-size: 17px;
	margin: 28px 0 10px;
	border-left: 5px solid var(--brand);
	padding-left: 10px;
	color: var(--ink);
	line-height: 1.4;
}

/* ---------- Lists ---------- */
.article-body ul,
.article-body ol {
	margin: 0 0 18px;
	padding-left: 24px;
	font-size: var(--fs-body);
	line-height: 1.85;
	color: var(--ink);
}
.article-body li { margin: 6px 0; }

/* ---------- Blockquote ---------- */
.article-body blockquote {
	margin: 24px 0;
	padding: 16px 22px;
	border-left: 4px solid var(--accent);
	background: var(--accent-soft);
	font-family: var(--font-quote);
	font-style: italic;
	color: var(--ink-soft);
}

/* ---------- Code (inline + block) ---------- */
.article-body code {
	background: var(--accent-soft);
	color: var(--accent);
	padding: 2px 6px;
	border-radius: 4px;
	font-size: .92em;
}
.article-body pre {
	background: var(--ink);
	color: #fff;
	padding: 16px;
	border-radius: var(--r-md);
	overflow-x: auto;
	font-size: 13px;
	line-height: 1.6;
}
.article-body pre code { background: transparent; color: inherit; padding: 0; }

/* ---------- KaTeX display equations ---------- */
.article-body .katex-display {
	margin: 24px 0;
	padding: 12px 16px;
	background: var(--paper);
	border: 1.5px solid var(--line-soft);
	border-radius: var(--r-md);
	overflow-x: auto;
}
.article-body .katex { font-size: 1.05em; }

/* ---------- Tags row ---------- */
.article-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 32px 0 16px;
}

/* ---------- Related articles ---------- */
.related-articles {
	padding: 8px 16px 32px;
	max-width: 100%;
	margin: 0 auto;
}
@media (min-width: 960px) {
	.related-articles {
		padding: 8px 36px 48px;
		max-width: 1180px;
	}
}
.related-articles__h {
	font-family: var(--font-heading);
	font-weight: 900;
	font-size: var(--fs-h2);
	margin: 0 0 20px;
	position: relative;
	display: inline-block;
	color: var(--ink);
}
.related-articles__h::after {
	content: '';
	position: absolute;
	left: -4px; right: -4px; bottom: 2px;
	height: .45em;
	background: var(--sun);
	z-index: -1;
	border-radius: 4px;
	transform: rotate(-.5deg);
}
.related-articles__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}
@media (min-width: 640px) {
	.related-articles__grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

/* ---------- Article eye fallback (no thumbnail) ---------- */
.article-eye--fallback {
	background: var(--brand-soft);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--font-quote);
	font-weight: 800;
	font-size: 80px;
	color: var(--brand);
	opacity: .9;
}
.card__eye--fallback {
	background: var(--brand-soft);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--font-quote);
	font-weight: 800;
	font-size: 36px;
	color: var(--brand);
	opacity: .85;
}
