/* ============================================================
 * Dboard 블로그 — 매거진 스타일
 *
 * 공개 블로그(/blog/ 목록 + 단일 기사) 전용. design-tokens.css 만
 * 의존하며 대시보드/랜딩 CSS 와 독립적이다.
 *
 * 구성: 마스트헤드(.dp-blognav) · 공유 푸터(.dp-foot) ·
 *       목록(.dp-mag-list/lead/grid/card) · 기사(.dp-mag-article) ·
 *       본문 프로즈(.dp-article) · CTA/관련글.
 * ============================================================ */

/* ── 기본 ─────────────────────────────────────────────────── */
.dp-blog-body {
	margin: 0;
	background: var(--dp-bg-page-solid);
	color: var(--dp-text-primary);
	font-family: var(--dp-font-sans);
	font-size: var(--dp-text-lg);
	line-height: var(--dp-leading-normal);
	-webkit-font-smoothing: antialiased;
}
.dp-blog-body * { box-sizing: border-box; }
.dp-blog-body img { max-width: 100%; height: auto; }

.dp-home__wrap {
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 var(--dp-space-6);
}

/* ── 마스트헤드 ───────────────────────────────────────────── */
.dp-blognav {
	position: sticky;
	top: 0;
	z-index: var(--dp-z-sticky);
	background: rgba(255, 255, 255, 0.82);
	backdrop-filter: blur(var(--dp-blur-md));
	-webkit-backdrop-filter: blur(var(--dp-blur-md));
	border-bottom: 1px solid var(--dp-border-subtle);
}
.dp-blognav__inner {
	max-width: 1140px;
	margin: 0 auto;
	padding: var(--dp-space-3) var(--dp-space-6);
	display: flex;
	align-items: center;
	gap: var(--dp-space-6);
}
.dp-blognav__brand {
	display: inline-flex;
	align-items: center;
	gap: var(--dp-space-2);
	font-size: var(--dp-text-xl);
	font-weight: var(--dp-weight-bold);
	letter-spacing: var(--dp-tracking-tight);
	color: var(--dp-text-primary);
	text-decoration: none;
	white-space: nowrap;
}
.dp-blognav__brand .dp-brand-logo { height: 30px; width: auto; }
/* dp_home_brand_inner() 의 site-icon 락업 폴백 — home.css 없이도 정렬 유지 */
.dp-blognav__brand .dp-brand-lockup { display: inline-flex; align-items: center; }
.dp-blognav__brand .dp-brand-icon { width: 26px; height: 26px; border-radius: var(--dp-radius-sm); }
.dp-blognav__brand .dp-brand-rest { font-weight: var(--dp-weight-bold); }
.dp-blognav__badge {
	font-size: var(--dp-text-xs);
	font-weight: var(--dp-weight-semibold);
	color: var(--dp-color-primary);
	background: var(--dp-color-primary-soft);
	padding: 2px var(--dp-space-2);
	border-radius: var(--dp-radius-full);
}
.dp-blognav__links {
	display: flex;
	align-items: center;
	gap: var(--dp-space-1);
	flex: 1;
	overflow-x: auto;
	scrollbar-width: none;
}
.dp-blognav__links::-webkit-scrollbar { display: none; }
.dp-blognav__link {
	padding: var(--dp-space-2) var(--dp-space-3);
	font-size: var(--dp-text-base);
	font-weight: var(--dp-weight-medium);
	color: var(--dp-text-secondary);
	text-decoration: none;
	border-radius: var(--dp-radius-md);
	white-space: nowrap;
	transition: background var(--dp-duration-fast) var(--dp-ease-out),
		color var(--dp-duration-fast) var(--dp-ease-out);
}
.dp-blognav__link:hover { color: var(--dp-text-primary); background: var(--dp-color-primary-tint); }
.dp-blognav__link.is-active { color: var(--dp-color-primary); background: var(--dp-color-primary-soft); }
.dp-blognav__actions {
	display: flex;
	align-items: center;
	gap: var(--dp-space-3);
	white-space: nowrap;
}
.dp-blognav__home {
	font-size: var(--dp-text-base);
	font-weight: var(--dp-weight-medium);
	color: var(--dp-text-secondary);
	text-decoration: none;
}
.dp-blognav__home:hover { color: var(--dp-text-primary); }
.dp-blognav__cta {
	display: inline-flex;
	align-items: center;
	height: var(--dp-control-h-md);
	padding: 0 var(--dp-space-4);
	font-size: var(--dp-text-base);
	font-weight: var(--dp-weight-semibold);
	color: var(--dp-text-on-primary);
	background: var(--dp-color-primary);
	border-radius: var(--dp-radius-md);
	text-decoration: none;
	transition: background var(--dp-duration-fast) var(--dp-ease-out);
}
.dp-blognav__cta:hover { background: var(--dp-color-primary-hover); }

/* ── 본문 컨테이너 ────────────────────────────────────────── */
.dp-mag {
	max-width: 1140px;
	margin: 0 auto;
	padding: var(--dp-space-12) var(--dp-space-6) var(--dp-space-20);
	min-height: 60vh;
}

/* ── 목록: 헤더 ───────────────────────────────────────────── */
.dp-mag-list__head { margin-bottom: var(--dp-space-10); }
.dp-mag-list__head h1 {
	margin: 0 0 var(--dp-space-2);
	font-size: var(--dp-text-4xl);
	font-weight: var(--dp-weight-bold);
	letter-spacing: var(--dp-tracking-tight);
}
.dp-mag-list__head p {
	margin: 0;
	font-size: var(--dp-text-lg);
	color: var(--dp-text-muted);
}

/* ── 카테고리 칩 ──────────────────────────────────────────── */
.dp-mag-chip {
	align-self: flex-start;
	display: inline-block;
	font-size: var(--dp-text-xs);
	font-weight: var(--dp-weight-semibold);
	color: var(--dp-color-primary);
	background: var(--dp-color-primary-soft);
	padding: 3px var(--dp-space-2);
	border-radius: var(--dp-radius-sm);
	text-decoration: none;
}
a.dp-mag-chip:hover { background: var(--dp-blue-200); }

/* ── 목록: 리드(대형) 카드 ────────────────────────────────── */
.dp-mag-lead {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: var(--dp-space-8);
	margin-bottom: var(--dp-space-10);
	padding: var(--dp-space-6);
	background: var(--dp-neutral-0);
	border: 1px solid var(--dp-border-subtle);
	border-radius: var(--dp-radius-2xl);
	box-shadow: var(--dp-shadow-sm);
	text-decoration: none;
	color: inherit;
	transition: box-shadow var(--dp-duration-base) var(--dp-ease-out),
		transform var(--dp-duration-base) var(--dp-ease-out);
}
.dp-mag-lead:hover { box-shadow: var(--dp-shadow-lg); transform: translateY(-2px); }
.dp-mag-lead__cover {
	display: block;
	border-radius: var(--dp-radius-xl);
	background-size: cover;
	background-position: center;
	min-height: 240px;
}
.dp-mag-lead__cover--blank {
	background: linear-gradient(135deg, var(--dp-blue-100), var(--dp-blue-50) 55%, var(--dp-neutral-100));
}
.dp-mag-lead__body {
	display: flex;
	flex-direction: column;
	gap: var(--dp-space-3);
	justify-content: center;
}
.dp-mag-lead__title {
	font-size: var(--dp-text-2xl);
	font-weight: var(--dp-weight-bold);
	line-height: var(--dp-leading-snug);
	letter-spacing: var(--dp-tracking-tight);
}
.dp-mag-lead__excerpt {
	font-size: var(--dp-text-base);
	color: var(--dp-text-secondary);
	line-height: var(--dp-leading-relaxed);
}

/* ── 목록: 그리드 카드 ────────────────────────────────────── */
.dp-mag-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--dp-space-6);
}
.dp-mag-card {
	background: var(--dp-neutral-0);
	border: 1px solid var(--dp-border-subtle);
	border-radius: var(--dp-radius-xl);
	overflow: hidden;
	box-shadow: var(--dp-shadow-xs);
	transition: box-shadow var(--dp-duration-base) var(--dp-ease-out),
		transform var(--dp-duration-base) var(--dp-ease-out);
}
.dp-mag-card:hover { box-shadow: var(--dp-shadow-md); transform: translateY(-2px); }
.dp-mag-card > a {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
	color: inherit;
}
.dp-mag-card__cover {
	display: block;
	height: 168px;
	background-size: cover;
	background-position: center;
}
.dp-mag-card__cover--blank {
	background: linear-gradient(135deg, var(--dp-blue-50), var(--dp-neutral-100));
}
.dp-mag-card__body {
	display: flex;
	flex-direction: column;
	gap: var(--dp-space-2);
	padding: var(--dp-space-4) var(--dp-space-4) var(--dp-space-5);
	flex: 1;
}
.dp-mag-card__title {
	font-size: var(--dp-text-lg);
	font-weight: var(--dp-weight-semibold);
	line-height: var(--dp-leading-snug);
	color: var(--dp-text-primary);
}
.dp-mag-card:hover .dp-mag-card__title { color: var(--dp-color-primary); }
.dp-mag-card__excerpt {
	font-size: var(--dp-text-sm);
	color: var(--dp-text-secondary);
	line-height: var(--dp-leading-snug);
	flex: 1;
}
.dp-mag-card__date {
	font-size: var(--dp-text-xs);
	color: var(--dp-text-muted);
}

/* ── 목록: 페이지네이션 / 빈 상태 ─────────────────────────── */
.dp-mag-pagination {
	display: flex;
	justify-content: center;
	gap: var(--dp-space-2);
	margin-top: var(--dp-space-12);
}
.dp-mag-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--dp-control-h-md);
	height: var(--dp-control-h-md);
	padding: 0 var(--dp-space-3);
	font-size: var(--dp-text-base);
	color: var(--dp-text-secondary);
	background: var(--dp-neutral-0);
	border: 1px solid var(--dp-border-subtle);
	border-radius: var(--dp-radius-md);
	text-decoration: none;
}
.dp-mag-pagination .page-numbers:hover { border-color: var(--dp-color-primary); color: var(--dp-color-primary); }
.dp-mag-pagination .page-numbers.current {
	background: var(--dp-color-primary);
	border-color: var(--dp-color-primary);
	color: var(--dp-text-on-primary);
	font-weight: var(--dp-weight-semibold);
}
.dp-mag-empty {
	text-align: center;
	padding: var(--dp-space-20) var(--dp-space-6);
	color: var(--dp-text-muted);
}
.dp-mag-empty p { margin: 0 0 var(--dp-space-5); font-size: var(--dp-text-lg); }

/* ── 단일 기사 ────────────────────────────────────────────── */
.dp-mag-article { max-width: 760px; margin: 0 auto; }
.dp-mag-article__head { margin-bottom: var(--dp-space-8); }
.dp-mag-article__title {
	margin: var(--dp-space-3) 0 var(--dp-space-4);
	font-size: var(--dp-text-4xl);
	font-weight: var(--dp-weight-bold);
	line-height: var(--dp-leading-tight);
	letter-spacing: var(--dp-tracking-tight);
}
.dp-mag-article__meta {
	display: flex;
	align-items: center;
	gap: var(--dp-space-2);
	font-size: var(--dp-text-base);
	color: var(--dp-text-muted);
}
.dp-mag-article__dot { color: var(--dp-border-default); }
.dp-mag-article__cover {
	margin: 0 0 var(--dp-space-8);
	border-radius: var(--dp-radius-2xl);
	overflow: hidden;
}
.dp-mag-article__cover img { display: block; width: 100%; }

.dp-mag-article__foot { margin-top: var(--dp-space-16); }
.dp-mag-article__back {
	display: inline-block;
	margin-top: var(--dp-space-10);
	font-size: var(--dp-text-base);
	font-weight: var(--dp-weight-medium);
	color: var(--dp-text-secondary);
	text-decoration: none;
}
.dp-mag-article__back:hover { color: var(--dp-color-primary); }

/* ── CTA 박스 ─────────────────────────────────────────────── */
.dp-mag-cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--dp-space-6);
	padding: var(--dp-space-6) var(--dp-space-7);
	background: linear-gradient(135deg, var(--dp-blue-600), var(--dp-blue-800));
	border-radius: var(--dp-radius-2xl);
	color: #fff;
}
.dp-mag-cta strong { display: block; font-size: var(--dp-text-xl); font-weight: var(--dp-weight-bold); }
.dp-mag-cta span { display: block; margin-top: var(--dp-space-1); font-size: var(--dp-text-base); color: rgba(255, 255, 255, 0.82); }
.dp-mag-cta__btn {
	display: inline-flex;
	align-items: center;
	height: var(--dp-control-h-lg);
	padding: 0 var(--dp-space-6);
	font-size: var(--dp-text-base);
	font-weight: var(--dp-weight-semibold);
	color: var(--dp-blue-700);
	background: #fff;
	border-radius: var(--dp-radius-md);
	text-decoration: none;
	white-space: nowrap;
	transition: transform var(--dp-duration-fast) var(--dp-ease-out);
}
.dp-mag-cta__btn:hover { transform: translateY(-1px); }

/* ── 관련 글 ──────────────────────────────────────────────── */
.dp-mag-related { margin-top: var(--dp-space-12); }
.dp-mag-related__title {
	margin: 0 0 var(--dp-space-4);
	font-size: var(--dp-text-xl);
	font-weight: var(--dp-weight-bold);
}
.dp-mag-related__items { list-style: none; margin: 0; padding: 0; }
.dp-mag-related__item + .dp-mag-related__item { border-top: 1px solid var(--dp-border-subtle); }
.dp-mag-related__item a {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--dp-space-4);
	padding: var(--dp-space-3) 0;
	text-decoration: none;
	color: var(--dp-text-primary);
}
.dp-mag-related__name { font-size: var(--dp-text-lg); font-weight: var(--dp-weight-medium); }
.dp-mag-related__item a:hover .dp-mag-related__name { color: var(--dp-color-primary); }
.dp-mag-related__date { font-size: var(--dp-text-sm); color: var(--dp-text-muted); white-space: nowrap; }

/* ── 기사 본문 프로즈 (.dp-article) ──────────────────────────
 * 매거진 모드에서 편집기 본문에 일관된 읽기 타이포를 입힌다.
 * standalone 모드 글은 이 스타일을 거치지 않는다.
 * ──────────────────────────────────────────────────────────── */
.dp-article {
	font-size: 1.0625rem;          /* 17px — 본문 가독성 */
	line-height: var(--dp-leading-relaxed);
	color: var(--dp-neutral-800);
	word-break: keep-all;
	overflow-wrap: anywhere;
}
.dp-article > *:first-child { margin-top: 0; }
.dp-article > *:last-child { margin-bottom: 0; }
.dp-article p { margin: 0 0 var(--dp-space-5); }
.dp-article h2 {
	margin: var(--dp-space-12) 0 var(--dp-space-4);
	font-size: var(--dp-text-2xl);
	font-weight: var(--dp-weight-bold);
	line-height: var(--dp-leading-snug);
	letter-spacing: var(--dp-tracking-tight);
}
.dp-article h3 {
	margin: var(--dp-space-8) 0 var(--dp-space-3);
	font-size: var(--dp-text-xl);
	font-weight: var(--dp-weight-semibold);
}
.dp-article h4 {
	margin: var(--dp-space-6) 0 var(--dp-space-2);
	font-size: var(--dp-text-lg);
	font-weight: var(--dp-weight-semibold);
}
.dp-article a {
	color: var(--dp-text-link);
	text-decoration: underline;
	text-underline-offset: 2px;
}
.dp-article a:hover { color: var(--dp-color-primary-hover); }
.dp-article ul,
.dp-article ol { margin: 0 0 var(--dp-space-5); padding-left: var(--dp-space-6); }
.dp-article li { margin: var(--dp-space-1) 0; }
.dp-article img,
.dp-article video {
	display: block;
	max-width: 100%;
	height: auto;
	margin: var(--dp-space-6) auto;
	border-radius: var(--dp-radius-lg);
}
.dp-article figure { margin: var(--dp-space-6) 0; }
.dp-article figcaption {
	margin-top: var(--dp-space-2);
	font-size: var(--dp-text-sm);
	color: var(--dp-text-muted);
	text-align: center;
}
.dp-article blockquote {
	margin: var(--dp-space-6) 0;
	padding: var(--dp-space-3) var(--dp-space-5);
	border-left: 3px solid var(--dp-color-primary);
	background: var(--dp-blue-50);
	border-radius: 0 var(--dp-radius-md) var(--dp-radius-md) 0;
	color: var(--dp-text-secondary);
}
.dp-article blockquote p:last-child { margin-bottom: 0; }
.dp-article code {
	font-family: var(--dp-font-mono);
	font-size: 0.9em;
	background: var(--dp-neutral-100);
	padding: 2px 6px;
	border-radius: var(--dp-radius-sm);
}
.dp-article pre {
	margin: var(--dp-space-6) 0;
	padding: var(--dp-space-4);
	background: var(--dp-neutral-900);
	color: var(--dp-neutral-50);
	border-radius: var(--dp-radius-lg);
	overflow-x: auto;
	font-size: var(--dp-text-sm);
	line-height: var(--dp-leading-normal);
}
.dp-article pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.dp-article hr {
	margin: var(--dp-space-10) 0;
	border: none;
	border-top: 1px solid var(--dp-border-default);
}
.dp-article table {
	width: 100%;
	margin: var(--dp-space-6) 0;
	border-collapse: collapse;
	font-size: var(--dp-text-base);
}
.dp-article th,
.dp-article td {
	padding: var(--dp-space-2) var(--dp-space-3);
	border: 1px solid var(--dp-border-default);
	text-align: left;
}
.dp-article th { background: var(--dp-neutral-100); font-weight: var(--dp-weight-semibold); }

/* ── 공유 푸터 (.dp-foot) — index.php 와 동일 마크업 ────────── */
.dp-foot {
	border-top: 1px solid var(--dp-border-subtle);
	background: var(--dp-neutral-50);
	padding: var(--dp-space-12) 0;
}
.dp-foot__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--dp-space-4);
	text-align: center;
}
.dp-foot__brand {
	display: inline-flex;
	align-items: center;
	gap: var(--dp-space-2);
	font-size: var(--dp-text-lg);
	font-weight: var(--dp-weight-bold);
	letter-spacing: var(--dp-tracking-tight);
	color: var(--dp-text-primary);
	text-decoration: none;
}
.dp-foot__links { display: flex; align-items: center; gap: var(--dp-space-5); }
.dp-foot__links a {
	font-size: var(--dp-text-sm);
	color: var(--dp-text-secondary);
	text-decoration: none;
}
.dp-foot__links a:hover { color: var(--dp-color-primary); }
.dp-foot__biz {
	margin: 0;
	max-width: 720px;
	font-size: var(--dp-text-xs);
	line-height: var(--dp-leading-relaxed);
	color: var(--dp-text-muted);
}
.dp-foot__sep { margin: 0 var(--dp-space-2); color: var(--dp-border-default); }
.dp-foot__copy { margin: 0; font-size: var(--dp-text-xs); color: var(--dp-text-disabled); }

/* ── 반응형 ───────────────────────────────────────────────── */
@media (max-width: 920px) {
	.dp-mag-grid { grid-template-columns: repeat(2, 1fr); }
	.dp-mag-lead { grid-template-columns: 1fr; }
	.dp-mag-lead__cover { min-height: 200px; }
}
@media (max-width: 680px) {
	.dp-blognav__inner { flex-wrap: wrap; gap: var(--dp-space-3); }
	.dp-blognav__links { order: 3; width: 100%; }
	.dp-mag { padding: var(--dp-space-8) var(--dp-space-4) var(--dp-space-16); }
	.dp-mag-grid { grid-template-columns: 1fr; }
	.dp-mag-list__head h1 { font-size: var(--dp-text-3xl); }
	.dp-mag-article__title { font-size: var(--dp-text-3xl); }
	.dp-mag-cta { flex-direction: column; align-items: flex-start; }
}
