@charset "utf-8";

/* ============================================================
   mcat12 — 조판실형 분류 페이지
   흰 용지 + 격자 오버레이 + 크롭마크 + 기사 인덱스
   ============================================================ */

:root {
	--ts-bg: #f8f7f4;
	--ts-ink: #1c1c1c;
	--ts-accent: #1a56db;
	--ts-muted: #6b7280;
	--ts-grid: rgba(0, 0, 0, 0.06);
	--ts-crop: #bbb;
	--ts-border: rgba(0, 0, 0, 0.1);
	--ts-border-strong: rgba(0, 0, 0, 0.2);
}

body {
	background: var(--ts-bg);
}
body.dark {
	background: #111318;
}

body.page-light-header #header,
body.page-light-header #header.on,
body.page-light-header #header.act {
	background-color: var(--ts-bg) !important;
}

.mc12-wrap {
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 60px;
	position: relative;
}

.mc12-item {
	text-decoration: none;
	color: inherit;
}

/* ── 격자 오버레이 ── */
.mc12-grid-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	pointer-events: none;
	opacity: 0;
	background-image: linear-gradient(var(--ts-grid) 1px, transparent 1px), linear-gradient(90deg, var(--ts-grid) 1px, transparent 1px);
	background-size: 64px 64px;
}

/* ── 크롭마크 ── */
.mc12-cropmarks {
	position: absolute;
	inset: 0;
	pointer-events: none;
}
.mc12-cm {
	position: absolute;
	width: 14px;
	height: 14px;
	opacity: 0;
}
.mc12-cm--tl {
	top: 0;
	left: 0;
	border-top: 1px solid var(--ts-crop);
	border-left: 1px solid var(--ts-crop);
}
.mc12-cm--tr {
	top: 0;
	right: 0;
	border-top: 1px solid var(--ts-crop);
	border-right: 1px solid var(--ts-crop);
}
.mc12-cm--bl {
	bottom: 0;
	left: 0;
	border-bottom: 1px solid var(--ts-crop);
	border-left: 1px solid var(--ts-crop);
}
.mc12-cm--br {
	bottom: 0;
	right: 0;
	border-bottom: 1px solid var(--ts-crop);
	border-right: 1px solid var(--ts-crop);
}

/* ============================================================
   S1: 헤더
   ============================================================ */
.mc12-head {
	padding: 120px 0 56px;
	position: relative;
}

.mc12-folio-bar {
	display: flex;
	align-items: center;
	gap: 16px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--ts-border-strong);
	margin-bottom: 40px;
	opacity: 0;
}
.mc12-fvol {
	font-size: clamp(14px, calc(4px + 1.2vw), 18px);
	font-weight: 700;
	font-family: var(--font-serif);
	color: var(--ts-ink);
}
.mc12-fdiv {
	display: block;
	width: 1px;
	height: 14px;
	background: var(--ts-border-strong);
	flex-shrink: 0;
}
.mc12-folio-bar span:not(.mc12-fvol):not(.mc12-fdiv):not(.mc12-fspecial) {
	font-size: clamp(14px, calc(4px + 1.2vw), 18px);
	color: var(--ts-muted);
}
.mc12-fspecial {
	margin-left: auto;
	font-size: clamp(14px, calc(4px + 1.2vw), 18px);
	color: var(--ts-muted);
	font-family: var(--font-serif);
	font-style: italic;
}

.mc12-tit-outer {
	overflow: hidden;
	margin-bottom: 16px;
}
.mc12-tit {
	font-size: clamp(56px, calc(16px + 6vw), 96px);
	font-weight: 900;
	font-family: var(--font-serif);
	color: var(--ts-ink);
	clip-path: inset(0 100% 0 0);
}

.mc12-head-sub {
	font-size: clamp(14px, calc(4px + 1.2vw), 18px);
	color: var(--ts-muted);
	font-family: var(--font-serif);
	opacity: 0;
}

/* ============================================================
   S2: 필터 바 (스티키)
   ============================================================ */
.mc12-filter-bar {
	position: sticky;
	top: 90px;
	z-index: 2;
	background: var(--ts-bg);
	border-bottom: 1px solid var(--ts-border-strong);
	transition: top 0.25s ease;
}

.mc12-filter-inner {
	display: flex;
	align-items: stretch;
	overflow-x: auto;
	scrollbar-width: none;
}
.mc12-filter-inner::-webkit-scrollbar {
	display: none;
}

.mc12-fbtn {
	flex-shrink: 0;
	padding: 18px 22px;
	font-size: clamp(14px, calc(4px + 1.2vw), 18px);
	font-family: var(--font-serif);
	font-weight: 600;
	color: var(--ts-muted);
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	cursor: pointer;
	white-space: nowrap;
	transition:
		color 0.2s,
		border-color 0.2s;
	margin-bottom: -1px;
}
.mc12-fbtn:hover {
	color: var(--ts-ink);
}
.mc12-fbtn.is-active {
	color: var(--ts-ink);
	border-bottom-color: var(--ts-ink);
}

/* ============================================================
   S3: 기사 목록
   ============================================================ */
.mc12-main {
	padding: 40px 0 80px;
}

.mc12-ch.is-hidden {
	display: none;
}

.mc12-ch-hd {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 44px 0 20px;
	border-top: 2px solid var(--ts-border-strong);
}
.mc12-ch:first-child .mc12-ch-hd {
	border-top: none;
	padding-top: 0;
}

.mc12-ch-folio {
	font-size: clamp(14px, calc(4px + 1.2vw), 18px);
	font-weight: 700;
	font-family: var(--font-serif);
	color: var(--ts-crop);
	flex-shrink: 0;
	min-width: 18px;
}
.mc12-ch-label {
	font-size: clamp(15px, calc(4px + 1.4vw), 20px);
	font-weight: 700;
	color: var(--ts-ink);
	flex-shrink: 0;
}
.mc12-ch-rule {
	flex: 1;
	height: 1px;
	background: var(--ts-border-strong);
}

/* 아이템 */
.mc12-item {
	display: grid;
	grid-template-columns: 72px 1fr 180px 56px;
	align-items: center;
	gap: 24px;
	padding: 26px 16px;
	position: relative;
	border-bottom: 1px solid var(--ts-border);
	transition: background 0.2s;
}
.mc12-item:hover {
	background: rgba(0, 0, 0, 0.02);
}
.mc12-ch:last-child .mc12-item:last-child {
	border-bottom: none;
}

.mc12-item-frame {
	position: absolute;
	inset: 0;
	border: 1px dashed var(--ts-crop);
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.2s;
}
.mc12-item:hover .mc12-item-frame {
	opacity: 1;
}

.mc12-item-folio {
	font-size: clamp(14px, calc(4px + 1.2vw), 18px);
	font-family: var(--font-serif);
	color: var(--ts-crop);
	align-self: start;
	padding-top: 3px;
}

.mc12-item-body {
	min-width: 0;
}
.mc12-item-kicker {
	display: block;
	font-size: clamp(14px, calc(4px + 1.2vw), 18px);
	font-weight: 700;
	color: var(--ts-accent);
	margin-bottom: 6px;
}
.mc12-item-tit {
	display: block;
	font-size: clamp(20px, calc(6px + 1.8vw), 28px);
	font-weight: 800;
	color: var(--ts-ink);
	margin-bottom: 8px;
	word-break: keep-all;
	transition: color 0.2s;
}
.mc12-item:hover .mc12-item-tit {
	color: var(--ts-accent);
}
.mc12-item-desc {
	font-size: clamp(15px, calc(4px + 1.4vw), 18px);
	color: var(--ts-muted);
	word-break: keep-all;
}

.mc12-item-fig {
	aspect-ratio: 3 / 2;
	overflow: hidden;
}
.mc12-item-fig img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.mc12-item:hover .mc12-item-fig img {
	transform: scale(1.04);
}

.mc12-item-pg {
	font-size: clamp(14px, calc(4px + 1.2vw), 18px);
	font-family: var(--font-serif);
	color: var(--ts-crop);
	text-align: right;
	align-self: start;
	padding-top: 3px;
}

/* ============================================================
   반응형 — 999px
   ============================================================ */
@media all and (max-width: 999px) {
	.mc12-wrap {
		padding: 0 32px;
	}
	.mc12-head {
		padding: 90px 0 40px;
	}
	.mc12-filter-bar {
		top: 70px;
	}

	.mc12-item {
		grid-template-columns: 60px 1fr 56px;
		gap: 16px;
	}
	.mc12-item-fig {
		display: none;
	}
}

/* ============================================================
   반응형 — 768px
   ============================================================ */
@media all and (max-width: 768px) {
	.mc12-wrap {
		padding: 0 20px;
	}
	.mc12-head {
		padding: 80px 0 32px;
	}

	.mc12-folio-bar {
		gap: 10px;
		flex-wrap: wrap;
	}
	.mc12-fspecial {
		margin-left: 0;
		width: 100%;
	}

	.mc12-item {
		grid-template-columns: 52px 1fr 44px;
		gap: 12px;
		padding: 20px 10px;
	}
	.mc12-fbtn {
		padding: 14px 16px;
	}
	.mc12-ch-hd {
		gap: 12px;
		padding: 32px 0 16px;
	}
	.mc12-item-desc {
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}
}

/* ============================================================
   반응형 — 499px
   ============================================================ */
@media all and (max-width: 499px) {
	.mc12-item {
		grid-template-columns: 44px 1fr;
		gap: 10px;
	}
	.mc12-item-pg {
		display: none;
	}
}

/* ============================================================
   darkmode
   ============================================================ */
body.dark {
	--ts-bg: #111318;
	--ts-ink: #e8e8e8;
	--ts-accent: #60a5fa;
	--ts-muted: #9ca3af;
	--ts-grid: rgba(255, 255, 255, 0.05);
	--ts-crop: #555;
	--ts-border: rgba(255, 255, 255, 0.08);
	--ts-border-strong: rgba(255, 255, 255, 0.15);
}

body.dark .mc12-grid-overlay {
	mix-blend-mode: screen;
}
body.dark .mc12-item:hover {
	background: rgba(255, 255, 255, 0.03);
}
