/**
 * Moneyshot 사이트 레이아웃 (v1.0).
 *
 * 색·글꼴·글자 크기는 theme.json 토큰을 씁니다. 이 파일은 WordPress 기본
 * 레이아웃(자동 가운데 정렬, 블록 간 자동 여백) 대신 테마가 직접 폭과 간격을
 * 정하는 부분만 담당합니다. 클래스는 모두 ms- 로 시작합니다.
 *
 * 레이아웃: 1200px 캔버스, 섹션마다 배경 띠(흰색 → 연한 블루 → 흰색 → 회색)로 구분,
 * 글 상세는 720px 읽기 칼럼.
 */

:root {
	--ms-ink: var(--wp--preset--color--contrast);
	--ms-ink-2: var(--wp--preset--color--subtle);
	--ms-ink-3: var(--wp--preset--color--muted);
	--ms-line: var(--wp--preset--color--border);
	--ms-grey: var(--wp--preset--color--surface);
	--ms-blue: var(--wp--preset--color--accent);
	--ms-blue-hover: #1450b8;
	--ms-blue-soft: var(--wp--preset--color--accent-soft);
	--ms-navy: var(--wp--preset--color--navy);
	--ms-yellow: var(--wp--preset--color--primary);
	--ms-white: var(--wp--preset--color--base);
	--ms-gutter: clamp(16px, 4vw, 24px);
	--ms-container: 1200px;
	--ms-read: 720px;
	--ms-radius: 14px;
	--ms-tile-investment: #dce8fd;
	--ms-tile-money: #fff1c2;
	--ms-tile-frugal: #ddf1e6;
	--ms-tile-money-news: #e6e9ef;
	--ms-tile-default: #eef1f5;
}

/* ---------- 기본 정리 ---------- */

/* 화면에는 숨기고 화면 낭독기에는 읽히는 글자(검색 버튼 이름, "자세히 보기: 제목" 등) */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	border: 0;
	white-space: nowrap;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	top: 8px;
	left: 8px;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 12px 16px;
	clip: auto;
	clip-path: none;
	background: #fff;
	color: #191f28;
	font-size: 14px;
	font-weight: 700;
}

body {
	word-break: keep-all;
	overflow-wrap: break-word;
	-webkit-font-smoothing: antialiased;
}

/* WordPress 기본 블록 간 자동 여백을 테마 레이아웃 요소에서는 끕니다. */
body .wp-site-blocks > *,
body :is(.ms-main, .ms-header, .ms-header__in, .ms-footer, .ms-footer__in, .ms-wrap, .ms-band, .ms-hero, .ms-hero__copy,
	.ms-today, .ms-today__item, .ms-today__text, .ms-today__meta, .ms-sec-head, .ms-sec-head__row, .ms-invest, .ms-invest__main,
	.ms-aside, .ms-picks, .ms-lead, .ms-lead__text, .ms-row, .ms-row__text, .ms-card, .ms-news-card, .ms-news-card__text,
	.ms-rank__item, .ms-archive-head, .ms-archive, .ms-read, .ms-single__head, .ms-hero-band, .wp-block-query) > * {
	margin-block: 0;
}

.ms-main a,
.ms-header a,
.ms-footer a {
	text-decoration: none;
}

.ms-main :focus-visible,
.ms-header :focus-visible,
.ms-footer :focus-visible {
	outline: 2px solid var(--ms-blue);
	outline-offset: 2px;
	border-radius: 4px;
}

.ms-wrap {
	width: 100%;
	max-width: var(--ms-container);
	margin-inline: auto;
}

/* WordPress는 목록의 두 번째 항목부터 자동 위 여백을 붙입니다. 카드 줄이 어긋나지 않게 없앱니다. */
body :is(.ms-rows, .ms-cards, .ms-news, .ms-rank, .ms-today__list, .ms-lead-list) > li {
	margin: 0;
}

body :is(.ms-cards, .ms-news) > li {
	display: flex;
}

body :is(.ms-cards, .ms-news) > li > * {
	flex: 1 1 auto;
	min-width: 0;
}

.wp-block-post-template.ms-rows,
.wp-block-post-template.ms-cards,
.wp-block-post-template.ms-news,
.wp-block-post-template.ms-rank,
.wp-block-post-template.ms-today__list,
.wp-block-post-template.ms-lead-list,
.ms-rows {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* ---------- 공통 조각 ---------- */

.ms-cat {
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
	color: var(--ms-blue);
}

.ms-cat a {
	color: inherit;
}

/* 카테고리가 여러 개여도 첫 번째만 보여 줄 맞춤을 유지합니다. */
.ms-cat a ~ a,
.ms-cat .wp-block-post-terms__separator {
	display: none;
}

.ms-date {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	font-size: 13px;
	line-height: 1.5;
	color: var(--ms-ink-3);
	font-variant-numeric: tabular-nums;
}

.ms-reading::before {
	content: "·";
	margin-inline: 6px;
}

.ms-excerpt,
.ms-excerpt p {
	margin: 0;
	color: var(--ms-ink-2);
	font-size: 15px;
	line-height: 1.65;
}

.ms-excerpt .wp-block-post-excerpt__excerpt {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.ms-thumb {
	position: relative;
	width: 100%;
	max-width: 100%;
	margin: 0;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	border-radius: var(--ms-radius);
	background: var(--ms-grey);
}

.ms-thumb > a {
	display: block;
	width: 100%;
	height: 100%;
}

/* WordPress 기본 대표 이미지 스타일(height: auto)보다 우선해 칸을 꽉 채웁니다. */
.ms-thumb img,
.wp-block-post-featured-image.ms-thumb img {
	display: block;
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	border-radius: 0;
}

/* 대표 이미지가 없는 글: 카테고리 색 타일 */
.ms-tile a {
	display: grid;
	place-items: center;
	color: var(--ms-ink);
	text-align: center;
}

.ms-tile span {
	position: relative;
	padding-bottom: 12px;
	font-size: clamp(12px, 1.4vw, 15px);
	font-weight: 800;
	letter-spacing: -0.02em;
}

.ms-tile span::after {
	position: absolute;
	bottom: 0;
	left: 50%;
	width: 24px;
	height: 4px;
	border-radius: 99px;
	background: var(--ms-yellow);
	content: "";
	transform: translateX(-50%);
}

.ms-tile--investment { background: var(--ms-tile-investment); }
.ms-tile--money { background: var(--ms-tile-money); }
.ms-tile--frugal { background: var(--ms-tile-frugal); }
.ms-tile--money-news { background: var(--ms-tile-money-news); }
.ms-tile--default { background: var(--ms-tile-default); }
body .ms-row__title,
body .ms-lead__title,
body .ms-card__title,
body .ms-news-card__title,
body .ms-today__title,
body .ms-rank__title {
	margin: 0;
	color: var(--ms-ink);
	letter-spacing: -0.02em;
}
body .ms-row__title a,
body .ms-lead__title a,
body .ms-card__title a,
body .ms-news-card__title a,
body .ms-today__title a,
body .ms-rank__title a {
	display: -webkit-box;
	overflow: hidden;
	color: inherit;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.ms-main :is(.ms-row, .ms-lead, .ms-card, .ms-news-card, .ms-today__item):hover :is(h2, h3) a {
	text-decoration: underline;
	text-decoration-color: var(--ms-yellow);
	text-decoration-thickness: 3px;
	text-underline-offset: 5px;
}

.ms-empty {
	margin: 0;
	padding: 28px;
	border: 1px dashed var(--ms-line);
	border-radius: var(--ms-radius);
	background: var(--ms-white);
	color: var(--ms-ink-3);
}

/* ---------- 헤더 ---------- */

.ms-header {
	position: sticky;
	top: 0;
	z-index: 20;
	padding-inline: var(--ms-gutter);
	border-bottom: 1px solid var(--ms-line);
	background: color-mix(in srgb, var(--ms-white) 94%, transparent);
	backdrop-filter: saturate(180%) blur(12px);
}

.admin-bar .ms-header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

.ms-header__in {
	display: flex;
	align-items: center;
	gap: 24px;
	max-width: var(--ms-container);
	height: 68px;
	margin-inline: auto;
}

.ms-logo {
	margin: 0 auto 0 0;
	font-size: 20px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.03em;
	white-space: nowrap;
}

.ms-logo a {
	color: var(--ms-navy);
}

.ms-logo a::after {
	display: inline-block;
	width: 7px;
	height: 7px;
	margin-left: 2px;
	border-radius: 50%;
	background: var(--ms-yellow);
	content: "";
}

.ms-nav {
	align-self: stretch;
	min-width: 0;
}

.ms-nav .wp-block-navigation__container {
	gap: 4px;
	height: 100%;
	flex-wrap: nowrap;
	overflow-x: auto;
	scrollbar-width: none;
}

.ms-nav .wp-block-navigation-item {
	height: 100%;
}

.ms-nav .wp-block-navigation-item__content {
	display: flex;
	align-items: center;
	height: 100%;
	padding-inline: 12px;
	color: var(--ms-ink-2);
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
	box-shadow: inset 0 -3px 0 transparent;
}

.ms-nav .wp-block-navigation-item__content:hover {
	color: var(--ms-ink);
}

/* 지금 보고 있는 카테고리 */
.ms-nav .current-menu-item > .wp-block-navigation-item__content,
.ms-nav [aria-current="page"] {
	color: var(--ms-blue);
	font-weight: 800;
	box-shadow: inset 0 -3px 0 var(--ms-blue);
}

.ms-search {
	flex: none;
	margin: 0;
}

.ms-search .wp-block-search__inside-wrapper {
	padding: 0;
	border: 0;
	background: transparent;
}

.ms-search .wp-block-search__button {
	display: grid;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	place-items: center;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--ms-ink-2);
}

.ms-search .wp-block-search__button:hover {
	background: var(--ms-grey);
	color: var(--ms-ink);
}

.ms-search .wp-block-search__button svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
}

.ms-search .wp-block-search__input {
	border: 1px solid var(--ms-line);
	border-radius: 10px;
	font-size: 15px;
}

/* ---------- 홈: 첫 화면 ---------- */

.ms-hero-band {
	padding-block: 32px 64px;
	padding-inline: var(--ms-gutter);
}

.ms-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 470px);
	gap: 40px;
	align-items: center;
	padding: clamp(24px, 4vw, 48px);
	border-radius: 20px;
	background: var(--ms-grey);
}

.ms-hero__copy {
	display: grid;
	gap: 14px;
	padding-bottom: 8px;
}
body .ms-hero__title {
	margin: 0;
	font-size: clamp(36px, 5vw, 56px);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.03em;
}
body .ms-hero__title mark {
	background: linear-gradient(transparent 64%, var(--ms-yellow) 64%);
	color: inherit;
}

.ms-hero__lead {
	margin: 0;
	color: var(--ms-ink-2);
	font-size: 18px;
}

/* 첫 화면 카테고리 바로가기 */
.ms-shortcuts {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

.ms-shortcut {
	display: inline-flex;
	gap: 6px;
	align-items: baseline;
	padding: 10px 16px;
	border-radius: 999px;
	background: var(--ms-white);
	color: var(--ms-ink);
	font-size: 15px;
	font-weight: 700;
	box-shadow: 0 1px 2px rgba(0, 27, 55, 0.06);
}

.ms-shortcut small {
	color: var(--ms-blue);
	font-size: 13px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.ms-shortcut:hover {
	background: var(--ms-blue-soft);
	color: var(--ms-blue);
}

.ms-today {
	display: grid;
	gap: 8px;
	padding: 20px;
	border-radius: 18px;
	background: var(--ms-white);
}
body .ms-today__heading {
	margin: 0 0 4px;
	padding-inline: 8px;
	font-size: 16px;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.ms-today__list {
	counter-reset: ms-today;
}

.ms-today__list > li {
	counter-increment: ms-today;
}

.ms-today__item {
	position: relative;
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr);
	gap: 12px;
	align-items: center;
	padding: 10px 8px 10px 42px;
	border-radius: 12px;
}

.ms-today__item::before {
	position: absolute;
	top: 50%;
	left: 12px;
	width: 22px;
	color: var(--ms-blue);
	content: counter(ms-today);
	font-size: 15px;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	text-align: center;
	transform: translateY(-50%);
}

.ms-today__list > li:first-child .ms-today__item,
.ms-today__item:hover {
	background: var(--ms-blue-soft);
}

.ms-today .ms-thumb {
	width: 56px;
	aspect-ratio: 1 / 1;
	border-radius: 10px;
}

.ms-today .ms-tile span {
	padding-bottom: 7px;
	font-size: 10px;
}

.ms-today .ms-tile span::after {
	width: 14px;
	height: 3px;
}

.ms-today__text {
	display: grid;
	gap: 2px;
	min-width: 0;
}

.ms-today__meta {
	display: flex;
	gap: 6px;
	align-items: baseline;
}

.ms-today__date {
	color: var(--ms-ink-3);
	font-size: 13px;
}
body .ms-today__title {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
}

/* PC에서는 한 줄로 줄여 첫 화면 높이를 시안과 맞춥니다. */
@media (min-width: 961px) {
body .ms-today__title a {
		-webkit-line-clamp: 1;
	}
}

/* ---------- 홈: 섹션 공통 ---------- */

.ms-band {
	padding-block: 96px;
	padding-inline: var(--ms-gutter);
}

.ms-band--soft {
	background: var(--ms-blue-soft);
}

.ms-band--grey {
	background: var(--ms-grey);
}

.ms-sec-head {
	display: grid;
	gap: 8px;
	min-width: 0;
	margin-bottom: 40px !important;
}

.ms-sec-head__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
}
body .ms-sec-head__title {
	margin: 0;
	font-size: clamp(24px, 2.6vw, 28px);
	font-weight: 800;
	line-height: 1.3;
}

.ms-sec-head__desc {
	margin: 0;
	overflow: hidden;
	color: var(--ms-ink-3);
	font-size: 15.5px;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.ms-more {
	color: var(--ms-blue);
	font-size: 15px;
	font-weight: 700;
	white-space: nowrap;
}

.ms-more:hover {
	color: var(--ms-blue-hover);
}

/* 목록 한 줄: 왼쪽 글, 오른쪽 썸네일 */
.ms-rows > li + li {
	border-top: 1px solid var(--ms-line);
}

.ms-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 176px;
	gap: 28px;
	align-items: center;
	padding-block: 24px;
}

.ms-row__text {
	display: grid;
	gap: 6px;
	min-width: 0;
}
body .ms-row__title {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.45;
}

/* 투자: 대표 글 + 목록 + 사이드바 */
.ms-invest {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 56px;
}

.ms-lead {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	gap: 28px;
	align-items: center;
	margin-bottom: 8px;
	padding-bottom: 36px;
	border-bottom: 1px solid var(--ms-line);
}

.ms-lead .ms-thumb {
	aspect-ratio: 16 / 10;
	border-radius: 16px;
}

.ms-lead__text {
	display: grid;
	gap: 10px;
}
body .ms-lead__title {
	font-size: clamp(22px, 2.4vw, 28px);
	font-weight: 800;
	line-height: 1.35;
	text-wrap: balance;
}

.ms-lead .ms-excerpt .wp-block-post-excerpt__excerpt {
	-webkit-line-clamp: 3;
}

.ms-aside {
	display: grid;
	align-content: start;
	gap: 36px;
}
body .ms-tags__label,
body .ms-picks__title {
	margin: 0 0 12px;
	color: var(--ms-ink);
	font-size: 15.5px;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.ms-tags__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ms-chip {
	display: inline-flex;
	gap: 5px;
	align-items: baseline;
	padding: 7px 12px;
	border-radius: 999px;
	background: var(--ms-grey);
	color: var(--ms-ink-2);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
}

.ms-chip:hover {
	background: var(--ms-blue-soft);
	color: var(--ms-blue);
}

.ms-chip small {
	color: var(--ms-ink-3);
	font-size: 12px;
	font-variant-numeric: tabular-nums;
}

.ms-rank {
	counter-reset: ms-rank;
}

.ms-rank > li {
	counter-increment: ms-rank;
}

.ms-rank > li + li .ms-rank__item {
	border-top: 1px solid var(--ms-line);
}

.ms-rank__item {
	display: grid;
	grid-template-columns: 20px minmax(0, 1fr);
	gap: 10px;
	padding-block: 10px;
}

.ms-rank__item::before {
	color: var(--ms-blue);
	content: counter(ms-rank);
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}
body .ms-rank__title {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.45;
}

/* 돈되는 정보: 정보 카드 */
.ms-cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}

/* 글이 1개뿐이면 오른쪽 칸에 안내를 보여줍니다. */
.ms-cards:has(> li:only-child)::after {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-self: start;
	padding: 28px;
	border: 1px dashed var(--ms-line);
	border-radius: 18px;
	background: var(--ms-white);
	color: var(--ms-ink-3);
	content: "돈되는 정보 글이 더 올라오면 여기에 이어서 보여드려요";
	font-size: 15px;
	font-weight: 600;
}

.ms-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ms-stat {
	display: grid;
	gap: 2px;
	min-width: 104px;
	padding: 12px 16px;
	border-radius: 12px;
	background: var(--ms-grey);
}

.ms-stat span {
	color: var(--ms-ink-3);
	font-size: 13px;
}

.ms-stat b {
	color: var(--ms-ink);
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
}

.ms-stat b small {
	margin-left: 1px;
	font-size: 15px;
	font-weight: 700;
}

.ms-stat--hl b {
	color: var(--ms-blue);
}

.ms-card {
	display: grid;
	align-content: start;
	gap: 12px;
	height: 100%;
	padding: 28px;
	border-radius: 18px;
	background: var(--ms-white);
}
body .ms-card__title {
	font-size: 22px;
	font-weight: 800;
	line-height: 1.4;
}

.ms-card__more {
	justify-self: start;
	margin-top: 4px;
	padding: 11px 18px;
	border-radius: 12px;
	background: var(--ms-blue);
	color: var(--ms-white) !important;
	font-size: 15px;
	font-weight: 700;
}

.ms-card__more:hover {
	background: var(--ms-blue-hover);
}

/* 머니뉴스: 3열 카드 */
.ms-news {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

.ms-news-card {
	display: grid;
	grid-template-rows: auto 1fr;
	height: 100%;
	overflow: hidden;
	border-radius: 18px;
	background: var(--ms-white);
}

.ms-news-card .ms-thumb {
	aspect-ratio: 16 / 9;
	border-radius: 0;
}

.ms-news-card__text {
	display: grid;
	align-content: start;
	gap: 8px;
	padding: 20px 22px 22px;
}
body .ms-news-card__title {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.45;
}
body .ms-news-card__title a {
	-webkit-line-clamp: 3;
}

/* ---------- 스크롤 모션 (assets/js/reveal.js) ---------- */

.ms-reveal {
	transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.ms-sec-head ~ .ms-reveal {
	transition-delay: 80ms;
}

html.ms-motion .ms-reveal:not(.is-in) {
	opacity: 0;
	transform: translateY(16px);
}

@media (prefers-reduced-motion: reduce) {
	.ms-reveal {
		transition: none;
	}

	html.ms-motion .ms-reveal:not(.is-in) {
		opacity: 1;
		transform: none;
	}
}

/* ---------- 목록 (카테고리·태그·검색) ---------- */

.ms-archive-head {
	padding-block: 40px 24px;
	padding-inline: var(--ms-gutter);
	background: var(--ms-blue-soft);
}

.ms-archive-head .ms-wrap {
	display: grid;
	gap: 8px;
	justify-items: start;
}
body .ms-archive__title {
	margin: 0;
	font-size: clamp(28px, 4vw, 40px);
	font-weight: 800;
	letter-spacing: -0.03em;
}

.tag .ms-archive__title::before {
	content: "#";
}

.ms-archive__desc {
	max-width: 32em;
	margin: 0;
	color: var(--ms-ink-2);
	font-size: 15.5px;
	text-wrap: pretty;
}

.ms-archive-head .ms-tags {
	margin-top: 14px;
}

.ms-archive-head .ms-tags__label {
	margin-bottom: 8px;
	color: var(--ms-ink-3);
	font-size: 13px;
	font-weight: 700;
}

.ms-archive-head .ms-chip {
	padding: 8px 14px;
	background: var(--ms-white);
	font-size: 15px;
}

.ms-archive {
	padding-block: 24px 72px;
	padding-inline: var(--ms-gutter);
}

.ms-list-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-block: 4px 12px;
	border-bottom: 1px solid var(--ms-line);
	color: var(--ms-ink-3);
	font-size: 14px;
}

.ms-list-head b {
	color: var(--ms-ink);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.ms-pagination {
	gap: 4px;
	margin-top: 40px !important;
	font-variant-numeric: tabular-nums;
}

.ms-pagination a,
.ms-pagination .page-numbers {
	display: inline-grid;
	min-width: 40px;
	height: 40px;
	padding-inline: 8px;
	place-items: center;
	border-radius: 10px;
	color: var(--ms-ink-2);
	font-weight: 600;
}

.ms-pagination .page-numbers.current {
	background: var(--ms-ink);
	color: var(--ms-white);
}

.ms-search-form {
	width: 100%;
	max-width: 480px;
	margin-top: 8px;
}

/* ---------- 글 상세 ---------- */

.ms-read {
	max-width: var(--ms-read);
	margin-inline: auto;
	padding-block: 56px 72px;
	padding-inline: var(--ms-gutter);
	box-sizing: content-box;
}

body .ms-read > .ms-back {
	display: inline-block;
	margin-bottom: 20px;
	color: var(--ms-blue);
	font-size: 14px;
	font-weight: 700;
}

.ms-single__head {
	display: grid;
	gap: 14px;
	margin-bottom: 32px !important;
}
body .ms-single__title {
	margin: 0;
	font-size: clamp(28px, 4.2vw, 40px);
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: -0.03em;
	text-wrap: balance;
}

.ms-single__thumb {
	margin: 0 0 40px !important;
	overflow: hidden;
	border-radius: 20px;
}

.ms-single__thumb img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.ms-prose {
	font-size: 17.5px;
	line-height: 1.85;
}

.ms-prose > * + * {
	margin-block-start: 1.15em;
}

.ms-prose h2 {
	margin-block-start: 2.4em;
	font-size: 24px;
	line-height: 1.4;
}

.ms-prose h3 {
	margin-block-start: 2em;
	font-size: 20px;
	line-height: 1.45;
}

.ms-prose a {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ms-prose strong {
	background: linear-gradient(transparent 62%, #fff3c4 62%);
}

.ms-prose img {
	height: auto;
	border-radius: var(--ms-radius);
}

.ms-post-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 40px !important;
}

.ms-post-tags .wp-block-post-terms__separator {
	display: none;
}

.ms-post-tags a {
	padding: 7px 12px;
	border-radius: 999px;
	background: var(--ms-grey);
	color: var(--ms-ink-2);
	font-size: 14px;
	font-weight: 600;
}

.ms-post-tags a::before {
	content: "#";
}

.ms-post-tags a:hover {
	background: var(--ms-blue-soft);
	color: var(--ms-blue);
}

body .ms-read > .ms-list-button {
	display: flex;
	justify-content: center;
	margin-top: 40px;
}

.ms-list-button a {
	display: inline-flex;
	justify-content: center;
	min-width: 200px;
	padding: 14px 24px;
	border-radius: 12px;
	background: var(--ms-grey);
	color: var(--ms-ink);
	font-size: 15px;
	font-weight: 700;
}

.ms-list-button a:hover {
	background: var(--ms-blue-soft);
	color: var(--ms-blue);
}

body .ms-read > .ms-related {
	margin-top: 56px;
	padding-top: 32px;
	border-top: 1px solid var(--ms-line);
}
body .ms-related__title {
	margin: 0 0 8px;
	font-size: 22px;
	font-weight: 800;
}

.ms-related .ms-row {
	grid-template-columns: minmax(0, 1fr) 132px;
	gap: 20px;
	padding-block: 18px;
}

.ms-related .ms-row__title {
	font-size: 17px;
}

.ms-related p.ms-cat,
.ms-related .ms-row__title {
	margin: 0;
}

.ms-404__home {
	margin-top: 24px;
}

/* ---------- 푸터 ---------- */

.ms-footer {
	padding-block: 48px 56px;
	padding-inline: var(--ms-gutter);
	background: var(--ms-navy);
	color: #a9b8d3;
}

.ms-footer__in {
	display: grid;
	gap: 14px;
	font-size: 14px;
}

.ms-footer .ms-logo {
	margin: 0;
}

.ms-footer .ms-logo a {
	color: #e7edf8;
}

.ms-footer__tagline,
.ms-footer__note {
	margin: 0;
}

.ms-footer__nav .wp-block-navigation__container {
	gap: 4px 20px;
}

.ms-footer__nav .wp-block-navigation-item__content {
	color: #e7edf8;
	font-size: 14px;
	font-weight: 600;
}

/* ---------- 태블릿 ---------- */

@media (max-width: 960px) {
	.ms-hero {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}

	.ms-invest {
		grid-template-columns: minmax(0, 1fr);
		gap: 40px;
	}

	.ms-cards {
		grid-template-columns: minmax(0, 1fr);
	}

	.ms-cards:has(> li:only-child)::after {
		display: none;
	}

	.ms-news {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ---------- 모바일 ---------- */

@media (max-width: 640px) {
	.ms-header__in {
		flex-wrap: wrap;
		gap: 4px;
		height: auto;
		padding-top: 10px;
	}

	.ms-nav {
		order: 3;
		flex-basis: 100%;
		height: 44px;
		margin-inline: -8px;
	}

	.ms-nav .wp-block-navigation-item__content {
		padding-inline: 8px;
		font-size: 14px;
	}

	.ms-hero-band {
		padding-block: 16px 40px;
	}

	.ms-band {
		padding-block: 64px;
	}

	.ms-sec-head {
		margin-bottom: 28px !important;
	}

	.ms-sec-head__desc {
		font-size: 14.5px;
	}

	.ms-lead {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
	}

	.ms-row {
		grid-template-columns: minmax(0, 1fr) 96px;
		gap: 16px;
		align-items: start;
		padding-block: 20px;
	}

	.ms-row .ms-thumb {
		aspect-ratio: 1 / 1;
		border-radius: 12px;
	}
body .ms-row__title {
		font-size: 17px;
	}
body .ms-row__title a {
		-webkit-line-clamp: 3;
	}

	.ms-row .ms-excerpt {
		display: none;
	}

	.ms-related .ms-row {
		grid-template-columns: minmax(0, 1fr) 88px;
	}

	.ms-news {
		grid-template-columns: minmax(0, 1fr);
	}

	.ms-news-card {
		grid-template-columns: minmax(0, 1fr) 104px;
		grid-template-rows: none;
		align-items: center;
	}

	.ms-news-card .ms-thumb {
		order: 2;
		margin: 16px 16px 16px 0;
		aspect-ratio: 1 / 1;
		border-radius: 12px;
	}

	.ms-news-card__text {
		padding: 18px;
	}
body .ms-news-card__title {
		font-size: 16.5px;
	}

	.ms-card {
		padding: 22px;
	}

	.ms-archive-head {
		padding-block: 36px 28px;
	}

	.ms-archive-head .ms-tags {
		margin-top: 16px;
	}

	.ms-archive-head .ms-tags__chips {
		gap: 6px;
	}

	.ms-archive-head .ms-chip {
		gap: 4px;
		padding: 6px 10px;
		font-size: 13.5px;
	}

	.ms-read {
		padding-block: 32px 56px;
	}

	.ms-prose {
		font-size: 17px;
	}
}

/* WordPress 기본 제목 블록 규칙(word-break: break-word, a { display: inline-block })보다 우선합니다. */
body :is(.ms-row__title, .ms-lead__title, .ms-card__title, .ms-news-card__title, .ms-today__title, .ms-rank__title, .ms-single__title) {
	word-break: keep-all;
	overflow-wrap: break-word;
}

body :is(.ms-row__title, .ms-lead__title, .ms-card__title, .ms-news-card__title, .ms-today__title, .ms-rank__title) a {
	display: -webkit-box;
}

/* 카테고리 색 타일의 글자를 칸 가운데에 둡니다. */
body .ms-thumb.ms-tile > a {
	display: grid;
	height: 100%;
	place-items: center;
}
