/*
 * Hojo Match column components.
 * Public component classes use the site-specific hm- prefix.
 */

:root {
	--color-main: #059669;
	--color-main-dark: #047857;
	--color-main-deep: #064e3b;
	--color-sub: #ecfdf5;
	--color-sub-strong: #d1fae5;
	--color-accent: #7c3aed;
	--color-accent-dark: #6d28d9;
	--color-text: #064e3b;
	--color-body: #243d35;
	--color-muted: #64748b;
	--color-border: #a7f3d0;
	--color-border-soft: #d8e7e1;
	--color-warning: #b45309;
	--color-warning-bg: #fffbeb;
	--hm-radius: 6px;
	--hm-radius-lg: 12px;
	--hm-shadow: 0 12px 32px rgb(6 78 59 / 10%);
	--hm-font-heading: "Noto Sans JP", "Yu Gothic", "YuGothic", sans-serif;
	--hm-font-body: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
	--hm-font-number: "Roboto", "Arial", sans-serif;
}

.hm-column-preview,
.hm-entry-content {
	color: var(--color-body);
	font-family: var(--hm-font-body);
	font-size: 1rem;
	line-height: 1.95;
	overflow-wrap: anywhere;
}

.hm-column-preview *,
.hm-entry-content * {
	box-sizing: border-box;
}

.hm-column-preview p,
.hm-entry-content p {
	margin: 0 0 1.4rem;
}

.hm-column-preview h2,
.hm-entry-content h2 {
	border-left: 6px solid var(--color-main);
	color: var(--color-text);
	font-family: var(--hm-font-heading);
	font-size: clamp(1.5rem, 5vw, 2rem);
	line-height: 1.45;
	margin: 3.5rem 0 1.5rem;
	padding: .45rem 0 .45rem 1rem;
	scroll-margin-top: 90px;
}

.hm-column-preview h3,
.hm-entry-content h3 {
	border-bottom: 3px solid var(--color-border);
	color: var(--color-text);
	font-family: var(--hm-font-heading);
	font-size: clamp(1.2rem, 4vw, 1.45rem);
	line-height: 1.5;
	margin: 2.75rem 0 1.25rem;
	padding-bottom: .55rem;
	scroll-margin-top: 90px;
}

.hm-column-preview h4,
.hm-entry-content h4 {
	color: var(--color-text);
	font-family: var(--hm-font-heading);
	font-size: 1.1rem;
	line-height: 1.55;
	margin: 2rem 0 1rem;
	padding-left: 1.15rem;
	position: relative;
}

.hm-column-preview h4::before,
.hm-entry-content h4::before {
	background: var(--color-main);
	border-radius: 50%;
	content: "";
	height: .55rem;
	left: 0;
	position: absolute;
	top: .58em;
	width: .55rem;
}

.hm-column-preview strong,
.hm-entry-content strong {
	color: var(--color-main-deep);
	font-weight: 700;
}

.hm-column-preview em,
.hm-entry-content em {
	background: linear-gradient(transparent 58%, rgb(167 243 208 / 75%) 58%);
	color: var(--color-main-deep);
	font-style: normal;
	padding-inline: .08em;
}

.hm-column-preview a,
.hm-entry-content a {
	color: var(--color-accent);
	text-decoration: none;
	text-decoration-thickness: .08em;
	text-underline-offset: .18em;
}

.hm-column-preview a:hover,
.hm-column-preview a:focus-visible,
.hm-entry-content a:hover,
.hm-entry-content a:focus-visible {
	color: var(--color-accent-dark);
	text-decoration: underline;
}

.hm-column-preview > ul:not([class]),
.hm-entry-content > ul:not([class]) {
	list-style: none;
	margin: 1.5rem 0;
	padding-left: 1.5rem;
}

.hm-column-preview > ul:not([class]) li,
.hm-entry-content > ul:not([class]) li {
	margin: .55rem 0;
	position: relative;
}

.hm-column-preview > ul:not([class]) li::before,
.hm-entry-content > ul:not([class]) li::before {
	background: var(--color-main);
	border-radius: 50%;
	content: "";
	height: .5rem;
	left: -1.25rem;
	position: absolute;
	top: .72em;
	width: .5rem;
}

.hm-column-preview > ol:not([class]),
.hm-entry-content > ol:not([class]) {
	counter-reset: hm-ordered-list;
	list-style: none;
	margin: 1.5rem 0;
	padding-left: 2.25rem;
}

.hm-column-preview > ol:not([class]) li,
.hm-entry-content > ol:not([class]) li {
	counter-increment: hm-ordered-list;
	margin: .65rem 0;
	position: relative;
}

.hm-column-preview > ol:not([class]) li::before,
.hm-entry-content > ol:not([class]) li::before {
	color: var(--color-main);
	content: counter(hm-ordered-list) ".";
	font-family: var(--hm-font-number);
	font-weight: 700;
	left: -2rem;
	position: absolute;
}

.hm-column-preview blockquote,
.hm-entry-content blockquote {
	background: #f4faf7;
	border-left: 6px solid var(--color-main);
	color: #38584e;
	font-style: italic;
	margin: 2rem 0;
	padding: 1.25rem 1.5rem;
}

.hm-column-preview blockquote > :last-child,
.hm-entry-content blockquote > :last-child {
	margin-bottom: 0;
}

.hm-column-preview pre,
.hm-entry-content pre {
	background: #10251f;
	border-radius: var(--hm-radius);
	color: #d1fae5;
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
	font-size: .88rem;
	line-height: 1.7;
	margin: 2rem 0;
	overflow-x: auto;
	padding: 1.25rem;
	tab-size: 2;
}

.hm-column-preview :not(pre) > code,
.hm-entry-content :not(pre) > code {
	background: #e8f5f0;
	border-radius: 4px;
	color: #6d28d9;
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
	font-size: .9em;
	padding: .12em .4em;
}

.hm-column-preview figure,
.hm-entry-content figure {
	margin: 2.25rem 0;
}

.hm-column-preview figure img,
.hm-entry-content figure img {
	border-radius: var(--hm-radius);
	display: block;
	height: auto;
	max-width: 100%;
	width: 100%;
}

.hm-column-preview figcaption,
.hm-entry-content figcaption {
	color: var(--color-muted);
	font-size: .78rem;
	line-height: 1.6;
	margin-top: .65rem;
	text-align: center;
}

/* 1. Table of contents */
.hm-toc {
	background: var(--color-sub);
	border: 1px solid var(--color-border);
	border-radius: var(--hm-radius);
	margin: 2rem 0;
	overflow: hidden;
}

.hm-toc__toggle {
	align-items: center;
	background: transparent;
	border: 0;
	color: var(--color-text);
	cursor: pointer;
	display: flex;
	font-weight: 700;
	justify-content: space-between;
	padding: 1rem 1.15rem;
	text-align: left;
	width: 100%;
}

.hm-toc__title {
	align-items: center;
	display: inline-flex;
	gap: .65rem;
}

.hm-toc__title::before {
	background: var(--color-main);
	border-radius: 50%;
	color: #fff;
	content: "目";
	display: inline-grid;
	font-size: .72rem;
	height: 1.7rem;
	place-items: center;
	width: 1.7rem;
}

.hm-toc__list {
	border-top: 1px solid var(--color-border);
	margin: 0;
	padding: .85rem 1.25rem 1rem 2.75rem;
}

.hm-toc__item {
	margin: .35rem 0;
}

.hm-toc__item--h3 {
	font-size: .9rem;
	margin-left: 1rem;
}

.hm-toc__item a {
	color: var(--color-text);
}

.hm-toc.hm-toc--collapsed .hm-toc__list {
	display: none;
}

/* 2-3. Point and caution boxes */
.hm-point,
.hm-caution {
	border: 1px solid var(--color-border);
	border-left-width: 6px;
	border-radius: var(--hm-radius);
	margin: 2rem 0;
	padding: 1.2rem;
}

.hm-point {
	background: var(--color-sub);
	border-left-color: var(--color-main);
}

.hm-caution {
	background: var(--color-warning-bg);
	border-color: #fcd34d;
	border-left-color: var(--color-warning);
}

.hm-point__label,
.hm-caution__label {
	display: block;
	font-family: var(--hm-font-number);
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .12em;
	margin-bottom: .35rem;
}

.hm-point__label {
	color: var(--color-main-dark);
}

.hm-caution__label {
	color: #92400e;
}

.hm-point__title,
.hm-caution__title {
	border: 0 !important;
	font-size: 1.08rem !important;
	margin: 0 0 .5rem !important;
	padding: 0 !important;
}

.hm-point > :last-child,
.hm-caution > :last-child {
	margin-bottom: 0;
}

/* 4. Checklist */
.hm-checklist {
	background: #fff;
	border: 1px solid var(--color-border-soft);
	border-radius: var(--hm-radius);
	list-style: none;
	margin: 2rem 0;
	padding: .5rem 1.25rem;
}

.hm-checklist li {
	border-bottom: 1px solid #e8f1ed;
	padding: .75rem 0 .75rem 2rem;
	position: relative;
}

.hm-checklist li:last-child {
	border-bottom: 0;
}

.hm-checklist li::before {
	align-items: center;
	background: var(--color-accent);
	border-radius: 50%;
	color: #fff;
	content: "✓";
	display: flex;
	font-size: .68rem;
	font-weight: 700;
	height: 1.25rem;
	justify-content: center;
	left: 0;
	position: absolute;
	top: 1rem;
	width: 1.25rem;
}

/* 5. Comparison table */
.hm-table-wrap {
	margin: 2rem 0;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.hm-table {
	border-collapse: collapse;
	font-size: .92rem;
	min-width: 660px;
	width: 100%;
}

.hm-table th,
.hm-table td {
	border: 1px solid #c8ddd5;
	padding: .8rem .9rem;
	text-align: left;
	vertical-align: top;
}

.hm-table th {
	background: var(--color-main-deep);
	color: #fff;
	font-weight: 700;
}

.hm-table tbody tr:nth-child(even) {
	background: #f4faf7;
}

/* 6. FAQ */
.hm-faq {
	margin: 2.5rem 0;
}

.hm-faq__item {
	border: 1px solid var(--color-border-soft);
	border-radius: var(--hm-radius);
	margin-bottom: .85rem;
	overflow: hidden;
}

.hm-faq__question,
.hm-faq__answer {
	margin: 0 !important;
	padding: 1rem 1.1rem 1rem 3.5rem !important;
	position: relative;
}

.hm-faq__question {
	background: var(--color-sub);
	border: 0 !important;
	color: var(--color-text);
	font-size: 1rem !important;
}

.hm-faq__answer {
	background: #fff;
}

.hm-faq__question::before,
.hm-faq__answer::before {
	align-items: center;
	border-radius: 50%;
	color: #fff;
	display: flex;
	font-family: var(--hm-font-number);
	font-size: .8rem;
	font-weight: 700;
	height: 1.75rem;
	justify-content: center;
	left: 1rem;
	position: absolute;
	top: 1rem;
	width: 1.75rem;
}

.hm-faq__question::before {
	background: var(--color-main);
	content: "Q";
}

.hm-faq__answer::before {
	background: var(--color-accent);
	content: "A";
}

.hm-faq__answer > :last-child {
	margin-bottom: 0;
}

/* 7. Related article cards */
.hm-related-grid {
	display: grid;
	gap: 1rem;
	margin: 2rem 0;
}

.hm-related-card {
	background: #fff;
	border: 1px solid var(--color-border-soft);
	border-radius: var(--hm-radius);
	color: var(--color-text) !important;
	display: grid;
	grid-template-columns: 112px 1fr;
	overflow: hidden;
	text-decoration: none !important;
	transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.hm-related-card:hover {
	border-color: var(--color-main);
	box-shadow: var(--hm-shadow);
	transform: translateY(-2px);
}

.hm-related-card__image {
	height: 100%;
	min-height: 112px;
	object-fit: cover;
	width: 100%;
}

.hm-related-card__body {
	min-width: 0;
	padding: .75rem .85rem;
}

.hm-related-card__category {
	color: var(--color-main-dark);
	display: block;
	font-size: .68rem;
	font-weight: 700;
}

.hm-related-card__title {
	display: -webkit-box;
	font-weight: 700;
	line-height: 1.55;
	margin: .25rem 0;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.hm-related-card__date {
	color: var(--color-muted);
	display: block;
	font-family: var(--hm-font-number);
	font-size: .7rem;
}

.hm-inline-related {
	align-items: center;
	background: #fff;
	border: 1px solid var(--color-border-soft);
	border-radius: var(--hm-radius);
	color: var(--color-text) !important;
	display: grid;
	gap: 1rem;
	grid-template-columns: 100px 1fr;
	margin: 2rem 0;
	overflow: hidden;
	padding: .75rem;
	text-decoration: none !important;
}

.hm-inline-related:hover {
	border-color: var(--color-main);
	box-shadow: var(--hm-shadow);
}

.hm-inline-related__image {
	aspect-ratio: 1;
	border-radius: var(--hm-radius);
	object-fit: cover;
	width: 100%;
}

.hm-inline-related__label {
	color: var(--color-main-dark);
	display: block;
	font-size: .72rem;
	font-weight: 700;
}

.hm-inline-related__title {
	color: var(--color-text);
	display: block;
	font-weight: 700;
	line-height: 1.5;
}

/* 8. Speech balloons */
.hm-balloon {
	align-items: flex-start;
	display: flex;
	gap: .85rem;
	margin: 2rem 0;
}

.hm-balloon--right {
	flex-direction: row-reverse;
}

.hm-balloon__avatar {
	border: 3px solid #fff;
	border-radius: 50%;
	box-shadow: 0 0 0 1px var(--color-border);
	flex: 0 0 56px;
	height: 56px;
	object-fit: cover;
	width: 56px;
}

.hm-balloon__body {
	background: var(--color-sub);
	border: 1px solid var(--color-border);
	border-radius: var(--hm-radius-lg);
	margin: 0;
	padding: .9rem 1rem;
	position: relative;
}

.hm-balloon__body::before {
	border: 8px solid transparent;
	border-right-color: var(--color-border);
	content: "";
	left: -17px;
	position: absolute;
	top: 19px;
}

.hm-balloon--right .hm-balloon__body {
	background: #f5f3ff;
	border-color: #ddd6fe;
}

.hm-balloon--right .hm-balloon__body::before {
	border-left-color: #ddd6fe;
	border-right-color: transparent;
	left: auto;
	right: -17px;
}

.hm-balloon__name {
	color: var(--color-muted);
	display: block;
	font-size: .7rem;
	font-weight: 700;
	margin-top: .35rem;
}

.hm-balloon__body > :last-child {
	margin-bottom: 0;
}

/* 9. Author and supervisor profile */
.hm-profile {
	background: #f7fbf9;
	border: 1px solid var(--color-border-soft);
	border-radius: var(--hm-radius);
	display: grid;
	gap: 1rem;
	margin: 2rem 0;
	padding: 1.25rem;
}

.hm-profile__image {
	border: 3px solid #fff;
	border-radius: 50%;
	box-shadow: 0 0 0 1px var(--color-border);
	height: 90px;
	object-fit: cover;
	width: 90px;
}

.hm-profile__role {
	color: var(--color-main-dark);
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .05em;
}

.hm-profile__name {
	border: 0 !important;
	font-size: 1.15rem !important;
	margin: .1rem 0 .35rem !important;
	padding: 0 !important;
}

.hm-profile__body > :last-child {
	margin-bottom: 0;
}

.hm-profile__social {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin-top: .75rem;
}

.hm-profile__social a {
	border: 1px solid var(--color-border);
	border-radius: 999px;
	font-size: .72rem;
	font-weight: 700;
	padding: .3rem .7rem;
}

/* 10. Conversion CTA */
.hm-column-cta {
	background: linear-gradient(135deg, var(--color-main-deep), var(--color-main));
	border-radius: var(--hm-radius-lg);
	color: #fff;
	margin: 2.75rem 0;
	overflow: hidden;
	padding: 1.65rem 1.35rem;
	position: relative;
	text-align: center;
}

.hm-column-cta::after {
	border: 28px solid rgb(255 255 255 / 8%);
	border-radius: 50%;
	content: "";
	height: 130px;
	position: absolute;
	right: -45px;
	top: -45px;
	width: 130px;
}

.hm-column-cta__label {
	color: #d1fae5;
	display: block;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .12em;
	margin-bottom: .4rem;
	position: relative;
	z-index: 1;
}

.hm-column-cta__title {
	border: 0 !important;
	color: #fff !important;
	font-size: clamp(1.3rem, 5vw, 1.75rem) !important;
	margin: 0 0 .65rem !important;
	padding: 0 !important;
	position: relative;
	z-index: 1;
}

.hm-column-cta p {
	position: relative;
	z-index: 1;
}

.hm-column-cta__button {
	background: var(--color-accent);
	border-radius: var(--hm-radius);
	box-shadow: 0 8px 20px rgb(32 11 76 / 22%);
	color: #fff !important;
	display: inline-flex;
	font-weight: 700;
	justify-content: center;
	margin-top: .4rem;
	min-height: 50px;
	padding: .65rem 1.4rem;
	position: relative;
	text-decoration: none !important;
	z-index: 1;
}

.hm-column-cta__button:hover {
	background: var(--color-accent-dark);
	transform: translateY(-2px);
}

/* Standalone dummy article frame */
.hm-dummy-page {
	background: #f4f8f6;
	color: var(--color-body);
	font-family: var(--hm-font-body);
	margin: 0;
}

.hm-dummy-page *,
.hm-dummy-page *::before,
.hm-dummy-page *::after {
	box-sizing: border-box;
}

.hm-dummy-header {
	background: #fff;
	border-bottom: 1px solid var(--color-border-soft);
	padding: 1rem 1.25rem;
}

.hm-dummy-header__inner,
.hm-dummy-shell {
	margin-inline: auto;
	max-width: 920px;
	width: 100%;
}

.hm-dummy-brand {
	color: var(--color-text);
	font-family: var(--hm-font-heading);
	font-size: 1.1rem;
	font-weight: 700;
	text-decoration: none;
}

.hm-dummy-shell {
	padding: 1.5rem 1.15rem 4rem;
}

.hm-dummy-breadcrumb {
	color: var(--color-muted);
	font-size: .75rem;
	margin-bottom: 1.25rem;
}

.hm-dummy-breadcrumb a {
	color: var(--color-main-dark);
}

.hm-dummy-article {
	background: #fff;
	border: 1px solid var(--color-border-soft);
	border-radius: var(--hm-radius-lg);
	box-shadow: var(--hm-shadow);
	padding: 1.35rem;
}

.hm-dummy-category {
	background: var(--color-sub);
	border-radius: 999px;
	color: var(--color-main-dark);
	display: inline-block;
	font-size: .72rem;
	font-weight: 700;
	padding: .25rem .65rem;
}

.hm-dummy-title {
	color: var(--color-text);
	font-family: var(--hm-font-heading);
	font-size: clamp(2rem, 7vw, 3rem);
	line-height: 1.35;
	margin: .85rem 0 1rem;
}

.hm-dummy-meta {
	color: var(--color-muted);
	display: flex;
	flex-wrap: wrap;
	font-size: .75rem;
	gap: .35rem 1rem;
	margin-bottom: 2rem;
}

.hm-dummy-lead {
	border-bottom: 1px solid var(--color-border-soft);
	font-size: 1.08rem;
	font-weight: 500;
	margin-bottom: 2rem;
	padding-bottom: 1.5rem;
}

@media (min-width: 640px) {
	.hm-point,
	.hm-caution {
		padding: 1.5rem;
	}

	.hm-profile {
		align-items: center;
		grid-template-columns: 110px 1fr;
		padding: 1.5rem;
	}

	.hm-column-cta {
		padding: 2.25rem;
	}

	.hm-dummy-article {
		padding: 2.5rem;
	}
}

@media (min-width: 768px) {
	.hm-related-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (prefers-reduced-motion: reduce) {
	.hm-related-card,
	.hm-column-cta__button {
		scroll-behavior: auto;
		transition-duration: .01ms !important;
	}
}
