/* Phase 2C home, branded and refined in Phase 2E. */
.kcc-home,
.kcc-home * {
	box-sizing: border-box;
}

.kcc-home {
	width: 100%;
	max-width: var(--kcc-container);
	margin-inline: auto;
	overflow-wrap: anywhere;
	color: var(--kcc-text);
	font-size: 1rem;
	line-height: 1.75;
}

.kcc-home-section,
.kcc-home-hero {
	margin: 0 0 var(--kcc-section-gap);
}

.kcc-home-section > h2 {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0 0 1.5rem;
	color: var(--kcc-text);
	font-size: clamp(1.45rem, 2.5vw, 2rem);
	line-height: 1.35;
}

.kcc-home-section > h2::before {
	width: 5px;
	height: 1.4em;
	flex: 0 0 5px;
	border-radius: 999px;
	background: var(--kcc-primary);
	content: "";
}

.kcc-home-hero {
	position: relative;
	border: 1px solid var(--kcc-primary-border);
	border-radius: var(--kcc-radius-lg);
	background: linear-gradient(135deg, var(--kcc-primary-light), var(--kcc-bg));
	overflow: hidden;
	padding: clamp(2rem, 6vw, 4.75rem) clamp(1.25rem, 5vw, 4rem);
	text-align: center;
}

.kcc-home-hero::after {
	position: absolute;
	right: -4rem;
	bottom: -5rem;
	width: 13rem;
	height: 13rem;
	border: 2.5rem solid var(--kcc-decoration);
	border-radius: 50%;
	content: "";
	pointer-events: none;
}

.kcc-home-hero__copy {
	position: relative;
	margin: 0 0 1rem;
	color: var(--kcc-primary-dark);
	font-size: clamp(1.85rem, 4vw, 3rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.3;
	z-index: 1;
}

.kcc-home-hero__copy > span {
	display: block;
	white-space: nowrap;
}

.kcc-home-hero__lead {
	margin: 0 auto 1.5rem;
	max-width: 48rem;
	color: var(--kcc-text-sub);
	line-height: 1.8;
}

.kcc-home-hero__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
	position: relative;
	z-index: 1;
}

.kcc-home-button {
	display: inline-flex;
	min-height: 48px;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--kcc-primary);
	border-radius: var(--kcc-radius-sm);
	background: var(--kcc-primary);
	box-shadow: var(--kcc-shadow-primary);
	color: var(--kcc-bg);
	font-weight: 700;
	line-height: 1.4;
	padding: 0.75rem 1.2rem;
	text-align: center;
	text-decoration: none;
	transition: background-color var(--kcc-transition), border-color var(--kcc-transition), box-shadow var(--kcc-transition), color var(--kcc-transition), transform var(--kcc-transition);
}

.kcc-home-button--secondary {
	background: var(--kcc-bg);
	box-shadow: none;
	color: var(--kcc-primary-dark);
}

.kcc-home-link-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

.kcc-home-purpose .kcc-home-link-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kcc-home-beginner .kcc-home-link-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kcc-home-categories .kcc-home-link-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.kcc-home-latest__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.25rem;
}

.kcc-home-link-card,
.kcc-home-latest__item {
	min-width: 0;
	border: 1px solid var(--kcc-border);
	border-radius: var(--kcc-radius-md);
	background: var(--kcc-bg);
	box-shadow: var(--kcc-shadow-sm);
}

.kcc-home-link-card {
	display: grid;
	min-height: 88px;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.75rem;
	color: var(--kcc-primary-dark);
	font-weight: 700;
	padding: 1rem;
	text-decoration: none;
	transition: border-color var(--kcc-transition), box-shadow var(--kcc-transition), transform var(--kcc-transition);
}

.kcc-home-link-card__label {
	min-width: 0;
	line-height: 1.5;
}

.kcc-home-link-card__phrase {
	display: inline-block;
	white-space: nowrap;
}

.kcc-home-purpose .kcc-home-link-card::before {
	display: inline-flex;
	width: 2.2rem;
	height: 2.2rem;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--kcc-primary-light);
	color: var(--kcc-primary-dark);
	content: "•";
	font-size: 0.78rem;
	font-weight: 800;
	line-height: 1;
	text-align: center;
}

.kcc-home-purpose .kcc-home-link-card:nth-child(1)::before { content: "¥"; }
.kcc-home-purpose .kcc-home-link-card:nth-child(2)::before { content: "%"; }
.kcc-home-purpose .kcc-home-link-card:nth-child(3)::before { content: "入門"; font-size: 0.625rem; }
.kcc-home-purpose .kcc-home-link-card:nth-child(4)::before { content: "学"; }
.kcc-home-purpose .kcc-home-link-card:nth-child(5)::before { content: "G"; }
.kcc-home-purpose .kcc-home-link-card:nth-child(6)::before { content: "法"; }
.kcc-home-purpose .kcc-home-link-card:nth-child(7)::before { content: "ETC"; font-size: 0.55rem; }
.kcc-home-purpose .kcc-home-link-card:nth-child(8)::before { content: "速"; }

.kcc-home-beginner .kcc-home-link-card {
	min-height: 72px;
	grid-template-columns: minmax(0, 1fr) auto;
}

.kcc-home .kcc-home-beginner .kcc-home-link-card:link,
.kcc-home .kcc-home-beginner .kcc-home-link-card:visited {
	color: var(--kcc-primary-dark) !important;
}

.kcc-home-categories .kcc-home-link-card {
	min-height: 76px;
	grid-template-columns: minmax(0, 1fr) auto;
	border-left: 4px solid var(--kcc-primary);
}

.kcc-home-link-card[href]::after {
	content: "›";
	color: var(--kcc-primary);
	font-size: 1.35rem;
}

.kcc-home-link-card--unavailable {
	color: var(--kcc-text-sub);
}

.kcc-home-compare {
	border: 1px solid var(--kcc-primary-border);
	border-radius: var(--kcc-radius-lg);
	background: var(--kcc-primary-light);
	padding: clamp(1.5rem, 4vw, 2.5rem);
}

.kcc-home-compare > h2 { margin-bottom: 0.75rem; }
.kcc-home-compare > p { max-width: 45rem; color: var(--kcc-text-sub); }
.kcc-home-compare .kcc-home-button { margin-top: 0.35rem; }

.kcc-home-latest__item {
	display: flex;
	flex-direction: column;
	transition: border-color var(--kcc-transition), box-shadow var(--kcc-transition), transform var(--kcc-transition);
}

.kcc-home-latest__item {
	overflow: hidden;
}

.kcc-home-latest__image,
.kcc-home-latest__image img {
	display: block;
	width: 100%;
}

.kcc-home-latest__image img {
	aspect-ratio: 16 / 9;
	height: auto;
	object-fit: cover;
}

.kcc-home-latest__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 1rem;
}

.kcc-home-latest__body h3 {
	margin: 0 0 0.5rem;
	font-size: 1.1rem;
	line-height: 1.5;
}

.kcc-home-latest__body time {
	color: var(--kcc-text-sub);
	font-size: 0.88rem;
}

.kcc-home-latest__body p {
	flex: 1;
	color: var(--kcc-text-sub);
	line-height: 1.7;
}

.kcc-home-text-link {
	color: var(--kcc-primary-dark);
	font-weight: 700;
}

.kcc-home-criteria__table {
	max-width: 52rem;
	border: 1px solid var(--kcc-border);
	border-radius: var(--kcc-radius-md);
	overflow: hidden;
	box-shadow: var(--kcc-shadow-sm);
}

.kcc-home-criteria__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(9rem, 40%) auto;
	align-items: center;
	gap: 1rem;
	border-bottom: 1px solid var(--kcc-border);
	padding: 0.75rem 1rem;
}

.kcc-home-criteria__row progress {
	width: 100%;
	height: 8px;
	border: 0;
	border-radius: 999px;
	background: var(--kcc-border);
	overflow: hidden;
}

.kcc-home-criteria__row progress::-webkit-progress-bar { background: var(--kcc-border); }
.kcc-home-criteria__row progress::-webkit-progress-value { background: var(--kcc-primary); }
.kcc-home-criteria__row progress::-moz-progress-bar { background: var(--kcc-primary); }

.kcc-home-criteria__row:last-child {
	border-bottom: 0;
}

.kcc-home-criteria__total {
	grid-template-columns: minmax(0, 1fr) auto;
	background: var(--kcc-primary-light);
	color: var(--kcc-primary-dark);
}

.kcc-home-criteria__trust {
	max-width: 52rem;
	margin: 1rem 0 0;
	border-left: 4px solid var(--kcc-success);
	border-radius: var(--kcc-radius-sm);
	background: var(--kcc-success-soft);
	color: var(--kcc-text);
	font-weight: 700;
	padding: 0.9rem 1rem;
}

.kcc-home-faq__item {
	margin-bottom: 0.75rem;
	border: 1px solid var(--kcc-border);
	border-radius: var(--kcc-radius-md);
	background: var(--kcc-bg);
	overflow: hidden;
}

.kcc-home-faq__item:last-child {
	border-bottom: 1px solid var(--kcc-border);
}

.kcc-home-faq__item summary {
	position: relative;
	cursor: pointer;
	font-weight: 700;
	line-height: 1.6;
	list-style: none;
	padding: 1rem 3.5rem 1rem 1.1rem;
}

.kcc-home-faq__item summary::-webkit-details-marker { display: none; }
.kcc-home-faq__item summary::after {
	position: absolute;
	top: 50%;
	right: 1.1rem;
	width: 1.7rem;
	height: 1.7rem;
	border-radius: 50%;
	background: var(--kcc-primary-light);
	color: var(--kcc-primary-dark);
	content: "+";
	font-size: 1.25rem;
	font-weight: 500;
	line-height: 1.55rem;
	text-align: center;
	transform: translateY(-50%);
}

.kcc-home-faq__item[open] { border-color: var(--kcc-primary-border-strong); background: var(--kcc-primary-soft); }
.kcc-home-faq__item[open] summary::after { content: "−"; }

.kcc-home-faq__item > div {
	padding: 0 1.1rem 1rem;
}

@media (min-width: 769px) {
	.kcc-home-hero,
	.kcc-home-ranking,
	.kcc-home-purpose {
		margin-bottom: clamp(3rem, 4.5vw, 4rem);
	}
}

@media (hover: hover) {
	.kcc-home-button:hover { border-color: var(--kcc-primary-dark); background: var(--kcc-primary-dark); color: var(--kcc-bg); transform: translateY(-1px); }
	.kcc-home-button--secondary:hover { background: var(--kcc-primary-light); color: var(--kcc-primary-dark); }
	.kcc-home-link-card[href]:hover,
	.kcc-home-latest__item:hover { border-color: var(--kcc-primary-border-strong); box-shadow: var(--kcc-shadow-md); transform: translateY(-2px); }
	.kcc-home-faq__item summary:hover { background: var(--kcc-primary-soft); }
}
