/* トップページ専用。 front-page.php でのみ読み込む */

.nm-top {
	--nm-moss: var(--nm-leaf-deep);
	--nm-moss-deep: var(--nm-leaf-deep);
	--nm-butter: var(--nm-honey);
	--nm-cream: var(--nm-kinari);
	--nm-sage: var(--nm-line);
	--nm-ink: var(--nm-brown);
	--nm-sub: var(--nm-brown-sub);
	color: var(--nm-ink);
	font-size: 16px;
	line-height: 1.85;
}

/* SWELL のコンテナを解除して全幅にする */
.nm-is-top #content.l-content {
	max-width: none;
	width: 100%;
	margin: 0;
	padding: 0;
}

.nm-top ul,
.nm-top ol {
	list-style: none;
	margin: 0;
	padding: 0;
}
.nm-top p,
.nm-top h1,
.nm-top h2,
.nm-top dl,
.nm-top dd {
	margin: 0;
}
.nm-top a:focus-visible,
.nm-top summary:focus-visible {
	outline: 3px solid var(--nm-moss-deep);
	outline-offset: 2px;
}

.nm-top-wrap {
	box-sizing: border-box;
	width: 100%;
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 24px;
}

.nm-top-section {
	padding: 72px 0;
}

.nm-top-title {
	font-family: var(--nm-round);
	font-size: clamp(21px, 2.4vw, 26px);
	font-weight: 700;
	line-height: 1.5;
	color: var(--nm-ink);
}

/* ------------------------------------------------------------
   分かれ道（ファーストビュー）
------------------------------------------------------------ */
.nm-top-hero {
	background: var(--nm-cream);
}
.nm-top-hero__head {
	padding-top: 56px;
	padding-bottom: 36px;
}
.nm-top-hero__title {
	font-family: var(--nm-round);
	font-size: clamp(34px, 6.2vw, 56px);
	font-weight: 700;
	line-height: 1.38;
	letter-spacing: 0.01em;
	color: var(--nm-ink);
}
.nm-top-hero__title span {
	display: block;
}
.nm-top-hero__title span:first-child {
	font-size: 0.42em;
	font-weight: 500;
	letter-spacing: 0.06em;
	color: var(--nm-sub);
}
.nm-top-hero__title span:last-child {
	font-size: 1.5em;
	letter-spacing: 0.06em;
	line-height: 1.25;
}
.nm-top-hero__fork-title {
	padding-bottom: 18px;
	word-break: keep-all;
}
.nm-top-hero__lead {
	margin-top: 18px !important;
	max-width: 38em;
	color: var(--nm-sub);
}

.nm-top-fork {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	box-sizing: border-box;
	width: 100%;
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 24px;
}
.nm-top-fork__side {
	padding: 36px 40px 40px;
	border-radius: 28px;
	color: var(--nm-ink);
}
.nm-top-fork__side--mind {
	background: var(--nm-leaf);
}
.nm-top-fork__side--body {
	background: var(--nm-butter);
}
.nm-top-fork__when {
	font-size: 15px;
	font-weight: 700;
}
.nm-top-fork__name {
	font-family: var(--nm-round);
	font-size: clamp(38px, 5.4vw, 64px);
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.02em;
}
.nm-top-fork__list {
	margin-top: 16px !important;
}
.nm-top-fork__list li {
	padding: 7px 0;
	border-top: 1px solid rgba(75, 58, 43, 0.18);
	line-height: 1.6;
}

.nm-top-hero__note {
	padding-top: 24px;
	font-weight: 700;
}
.nm-top-help {
	margin-top: 8px !important;
	padding-bottom: 32px;
	font-size: 14px;
	color: var(--nm-sub);
}
.nm-top-help a {
	color: var(--nm-moss-deep);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ------------------------------------------------------------
   状況から探す
------------------------------------------------------------ */
.nm-top-topics {
	background: var(--nm-honey-soft);
}
.nm-top-topics__grid {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 56px;
}
.nm-top-search {
	margin-top: 20px;
}
.nm-top-topic {
	border-bottom: 1px solid var(--nm-sage);
}
.nm-top-topic:first-child {
	border-top: 1px solid var(--nm-sage);
}
.nm-top-topic__link {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 2px 20px;
	padding: 18px 4px;
	color: inherit;
	text-decoration: none;
}
a.nm-top-topic__link:hover .nm-top-topic__name {
	color: var(--nm-moss);
	text-decoration: underline;
	text-underline-offset: 4px;
}
.nm-top-topic__name {
	font-family: var(--nm-round);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.5;
}
.nm-top-topic__desc {
	grid-column: 1;
	color: var(--nm-sub);
	font-size: 14px;
	line-height: 1.6;
}
.nm-top-topic__count {
	grid-column: 2;
	grid-row: 1 / span 2;
	align-self: center;
	color: var(--nm-moss-deep);
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
}
.nm-top-topic.is-empty .nm-top-topic__name {
	color: var(--nm-sub);
}
.nm-top-topic.is-empty .nm-top-topic__count {
	color: var(--nm-sub);
	font-weight: 400;
}

/* ------------------------------------------------------------
   受診の目安と流れ
------------------------------------------------------------ */
.nm-top-visit {
	background: var(--nm-cream);
}
.nm-top-visit__grid {
	display: grid;
	grid-template-columns: 5fr 6fr;
	gap: 64px;
}
.nm-top-signs__list {
	margin-top: 20px !important;
}
.nm-top-signs__list li {
	padding: 12px 0;
	border-bottom: 1px solid var(--nm-sage);
	line-height: 1.65;
}
.nm-top-signs__note {
	margin-top: 16px !important;
	color: var(--nm-sub);
	font-size: 14px;
}

.nm-top-steps__list {
	margin-top: 20px !important;
	counter-reset: nm-step;
}
.nm-top-step {
	position: relative;
	display: block;
	padding: 0 0 26px 58px;
	counter-increment: nm-step;
}
.nm-top-step::before {
	content: counter(nm-step);
	position: absolute;
	left: 0;
	top: 0;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--nm-honey);
	color: var(--nm-ink);
	font-family: var(--nm-round);
	font-weight: 700;
	line-height: 38px;
	text-align: center;
}
.nm-top-step:not(:last-child)::after {
	content: "";
	position: absolute;
	left: 18px;
	top: 42px;
	bottom: 4px;
	width: 2px;
	background: var(--nm-honey);
}
.nm-top-step__name {
	display: block;
	font-family: var(--nm-round);
	font-size: 18px;
	font-weight: 700;
	line-height: 38px;
}
.nm-top-step__desc {
	display: block;
	color: var(--nm-sub);
	font-size: 15px;
	line-height: 1.75;
}

/* ------------------------------------------------------------
   新しい記事
------------------------------------------------------------ */
.nm-top-latest {
	background: var(--nm-honey-soft);
}
.nm-top-posts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 56px;
	margin-top: 24px !important;
}
.nm-top-post {
	border-top: 1px solid var(--nm-sage);
}
.nm-top-post--lead {
	grid-column: 1;
	grid-row: 1 / span 6;
	border-top: none;
}
.nm-top-post__link {
	display: block;
	padding: 16px 0;
	color: inherit;
	text-decoration: none;
}
.nm-top-post--lead .nm-top-post__link {
	padding-top: 0;
}
.nm-top-post__image {
	display: block;
	width: 100%;
	height: auto;
	margin-bottom: 16px;
	border-radius: 4px;
}
.nm-top-post__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0 14px;
	color: var(--nm-sub);
	font-size: 13px;
}
.nm-top-post__title {
	display: block;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.6;
}
.nm-top-post__link:hover .nm-top-post__title {
	color: var(--nm-moss);
	text-decoration: underline;
	text-underline-offset: 4px;
}
.nm-top-post--lead .nm-top-post__title {
	margin-top: 4px;
	font-family: var(--nm-round);
	font-size: clamp(22px, 2.6vw, 28px);
	line-height: 1.5;
}
.nm-top-post__excerpt {
	display: block;
	margin-top: 10px;
	color: var(--nm-sub);
	font-size: 15px;
}
.nm-top-empty {
	margin-top: 20px !important;
	color: var(--nm-sub);
}

.nm-top-pager {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin-top: 40px;
}
.nm-top-pager .page-numbers {
	min-width: 40px;
	padding: 6px 10px;
	box-sizing: border-box;
	border: 1px solid var(--nm-sage);
	color: inherit;
	text-align: center;
	text-decoration: none;
}
.nm-top-pager .page-numbers.current {
	background: var(--nm-moss);
	border-color: var(--nm-moss);
	color: #fff;
}

/* ------------------------------------------------------------
   よくある質問
------------------------------------------------------------ */
.nm-top-faq {
	background: var(--nm-cream);
}
.nm-top-faq__grid {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 56px;
}
.nm-top-qa {
	border-bottom: 1px solid var(--nm-sage);
}
.nm-top-qa:first-child {
	border-top: 1px solid var(--nm-sage);
}
.nm-top-qa__q {
	position: relative;
	padding: 16px 36px 16px 4px;
	font-weight: 700;
	line-height: 1.6;
	cursor: pointer;
	list-style: none;
}
.nm-top-qa__q::-webkit-details-marker {
	display: none;
}
.nm-top-qa__q::after {
	content: "＋";
	position: absolute;
	right: 8px;
	top: 16px;
	color: var(--nm-moss);
}
.nm-top-qa[open] .nm-top-qa__q::after {
	content: "－";
}
.nm-top-qa__a {
	padding: 0 4px 18px;
	color: var(--nm-sub);
}

/* ------------------------------------------------------------
   記事の作り方 / 監修医
------------------------------------------------------------ */
.nm-top-policy {
	background: var(--nm-honey-soft);
}
.nm-top-policy__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 56px;
}
.nm-top-policy__list {
	margin-top: 16px !important;
}
.nm-top-policy__list > div {
	padding: 12px 0;
	border-bottom: 1px solid var(--nm-sage);
}
.nm-top-policy__list dt {
	font-weight: 700;
}
.nm-top-policy__list dd {
	color: var(--nm-sub);
	font-size: 15px;
}
.nm-top-doctors {
	margin-top: 16px !important;
}
.nm-top-doctors a {
	display: grid;
	grid-template-columns: auto 1fr;
	column-gap: 14px;
	padding: 12px 0;
	border-bottom: 1px solid var(--nm-sage);
	color: inherit;
	text-decoration: none;
}
.nm-top-doctors img {
	grid-row: 1 / span 2;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
}
.nm-top-doctors__name {
	font-weight: 700;
}
.nm-top-doctors__cred {
	grid-column: 2;
	color: var(--nm-sub);
	font-size: 14px;
}

/* ------------------------------------------------------------
   タブレット以下
------------------------------------------------------------ */
@media (max-width: 899px) {
	.nm-top-topics__grid,
	.nm-top-visit__grid,
	.nm-top-faq__grid {
		grid-template-columns: 1fr;
		gap: 24px;
	}
	.nm-top-visit__grid {
		gap: 48px;
	}
	.nm-top-posts {
		grid-template-columns: 1fr;
	}
	.nm-top-post--lead {
		grid-column: auto;
		grid-row: auto;
		margin-bottom: 8px;
	}
}

/* ------------------------------------------------------------
   スマホ：2枚の比較は横並びを保ち、1画面で見比べられるようにする
------------------------------------------------------------ */
@media (max-width: 599px) {
	.nm-top-wrap {
		padding: 0 16px;
	}
	.nm-top-section {
		padding: 48px 0;
	}
	.nm-top-hero__head {
		padding-top: 28px;
		padding-bottom: 20px;
	}
	.nm-top-hero__lead {
		margin-top: 10px !important;
		font-size: 14px;
	}
	.nm-top-fork {
		gap: 8px;
		padding: 0 12px;
	}
	.nm-top-fork__side {
		padding: 18px 13px 20px;
		border-radius: 18px;
	}
	.nm-top-fork__when {
		min-height: 3em;
		font-size: 12px;
		line-height: 1.5;
	}
	.nm-top-fork__name {
		font-size: 25px;
	}
	.nm-top-fork__list {
		margin-top: 8px !important;
	}
	.nm-top-fork__list li {
		font-size: 13px;
		line-height: 1.5;
	}
	.nm-top-hero__note {
		padding-top: 16px;
		font-size: 14px;
		line-height: 1.7;
	}
	.nm-top-help {
		font-size: 13px;
		line-height: 1.75;
	}
	.nm-top-topic__name {
		font-size: 17px;
	}
}
