/* 플럭스 매거진 — 최신글 숏코드와 글 하단 출처·AI 표시. 색은 --fx-* 토큰. */

/* 최신글 숏코드 (360 한 줄 → 768 두 열 → 1280 네 열) */
.fxmg-latest { display: grid; grid-template-columns: 1fr; gap: 24px 20px; max-width: 100%; box-sizing: border-box; }
.fxmg-latest *, .fxmg-latest *::before, .fxmg-latest *::after { box-sizing: border-box; }
.fxmg-latest .fxmg-card { display: block; min-width: 0; min-height: 44px; color: inherit; text-decoration: none; }
.fxmg-latest .fxmg-card:focus-visible { outline: 2px solid var(--fx-accent); outline-offset: 4px; }
.fxmg-latest .fxmg-card__thumb { display: block; aspect-ratio: 1200 / 630; overflow: hidden; background: var(--fx-sunken); border-radius: 2px; font-size: 0; line-height: 0; }
.fxmg-latest .fxmg-card__thumb img { display: block; width: 100%; height: 100%; max-width: 100%; object-fit: cover; transition: transform .6s ease; }
.fxmg-latest .fxmg-card:hover .fxmg-card__thumb img { transform: scale(1.04); }
.fxmg-latest .fxmg-card__thumb--empty { display: block; width: 100%; height: 100%; background: var(--fx-sunken); }
.fxmg-latest .fxmg-card__body { display: block; padding: 14px 2px 0; }
.fxmg-latest .fxmg-card__date { display: block; font-size: 12px; letter-spacing: .06em; color: var(--fx-ink-3); font-variant-numeric: tabular-nums; }
.fxmg-latest .fxmg-card__title { display: block; margin-top: 6px; font-size: 16px; line-height: 1.45; font-weight: 600; color: var(--fx-ink); overflow-wrap: anywhere; }

/* 매거진 게시판 목록(스킨) — 대표 이미지가 없는 카드는 빈 회색 칸을 그리지 않는다.
   스킨은 사이트에 이미 설치된 사본이 우선이라(덮어쓰지 않음), 옛 사본이 그리는 빈 칸도 여기서 숨긴다. */
/* 제목 카드(1200x630)가 잘리지 않게 목록 썸네일 칸을 같은 비율로. 옛 스킨 사본(16:10)도 이 규칙이 덮는다. */
.fxmg-board__grid .fxmg-card__thumb { aspect-ratio: 1200 / 630; }
.fxmg-board__grid .fxmg-card__thumb--empty { display: none; }
.fxmg-board__grid .fxmg-card__thumb:has(> .fxmg-card__thumb--empty) { display: none; }

/* 출처 목록·「AI 도움으로 작성」 — 본문보다 작고 옅은 캡션 한 줄. 상자·띠·아이콘 없음. */
.fxmg-sources, .fxmg-ai-label { margin: 16px 0 0; padding: 0; border: 0; background: none; font-size: 13px; line-height: 1.6; color: var(--fx-ink-3); overflow-wrap: anywhere; }
.fxmg-sources ul, .fxmg-sources ol { margin: 4px 0 0; padding: 0; list-style: none; }
.fxmg-sources__title { margin: 0; font-size: 13px; line-height: 1.6; color: var(--fx-ink-3); }
.fxmg-sources li { margin: 6px 0 0; padding: 0; }
.fxmg-sources a { display: inline-block; padding-block: 11px; line-height: 22px; color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.fxmg-sources a:hover, .fxmg-sources a:focus-visible { color: var(--fx-ink); }
.fxmg-sources a:focus-visible { outline: 2px solid var(--fx-accent); outline-offset: 2px; }
.fxmg-sources + .fxmg-ai-label { margin-top: 4px; }

@media (min-width: 768px)  { .fxmg-latest { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .fxmg-latest { grid-template-columns: repeat(4, 1fr); gap: 24px; } }
@media (prefers-reduced-motion: reduce) {
	.fxmg-latest .fxmg-card__thumb img { transition: none; }
	.fxmg-latest .fxmg-card:hover .fxmg-card__thumb img { transform: none; }
}

/* 카드형 스킨(사이트에 복사된 옛 사본 포함): 테마 본문 폭이 좁아도 깨지지 않게 화면 폭이 아니라 목록 폭(컨테이너)으로 열 수를 정한다.
   700 미만 1열, 700 이상 2열, 960 이상 3열, 800 이상이면 대문 글을 가로로 놓고 썸네일 칸을 글 칸 높이까지 늘린다(이미지는 contain + 면 색 바탕). */
.fxmgc-board { container-type: inline-size; }
.fxmgc-board .fxmgc-card__thumb { aspect-ratio: 1200 / 630; }
@container (max-width: 699px) {
	.fxmgc-board .fxmgc-board__list { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@container (min-width: 700px) and (max-width: 959px) {
	.fxmgc-board .fxmgc-board__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}
@container (min-width: 960px) {
	.fxmgc-board .fxmgc-board__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
}
@container (max-width: 799px) {
	.fxmgc-board .fxmgc-card--lead { grid-column: 1 / -1; flex-direction: column; }
	.fxmgc-board .fxmgc-card--lead .fxmgc-card__thumb { flex: 0 0 auto; width: 100%; align-self: auto; }
	.fxmgc-board .fxmgc-card--lead .fxmgc-card__body { display: block; padding: 16px; }
	.fxmgc-board .fxmgc-card--lead .fxmgc-card__title { font-size: 18px; line-height: 1.4; }
	.fxmgc-board .fxmgc-card--lead .fxmgc-card__excerpt { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
@container (min-width: 800px) {
	.fxmgc-board .fxmgc-card--lead { grid-column: 1 / -1; flex-direction: row; align-items: stretch; }
	.fxmgc-board .fxmgc-card--lead .fxmgc-card__thumb { flex: 0 0 56%; align-self: stretch; min-height: 0; }
	.fxmgc-board .fxmgc-card--lead .fxmgc-card__thumb img { object-fit: contain; }
	.fxmgc-board .fxmgc-card--lead .fxmgc-card__body { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 28px; }
	.fxmgc-board .fxmgc-card--lead .fxmgc-card__title { font-size: clamp(20px, 2.4cqi, 26px); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
	.fxmgc-board .fxmgc-card--lead .fxmgc-card__excerpt { font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}
